diff --git a/cmd/resources/resource_cmds.go b/cmd/resources/resource_cmds.go index 97a57b9a7..859ce0d3f 100644 --- a/cmd/resources/resource_cmds.go +++ b/cmd/resources/resource_cmds.go @@ -75,7 +75,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "approval-requests", - "An account member can request approval on changes to a flag's targeting or variations, or to a segment's targeting. Members may be required to request approval depending on the settings in their LaunchDarkly project. Members can optionally request an approval even if it is not required.\n\nAn approval request prevents a change from being applied without approval from another member. Select up to ten members as reviewers. Reviewers receive an email notification, but anyone with sufficient permissions can review a pending approval request. A change needs at least one approval before you can apply it. To learn more, read [Approvals](https://launchdarkly.com/docs/home/releases/approvals).\n\nChanges that conflict will fail if approved and applied, and the flag or segment will not be updated.\n\nSeveral of the endpoints in the approvals API require an approval request ID. The approval request ID is returned as part of the [Create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) and [List approval requests for a flag](https://launchdarkly.com/docs/api/approvals/get-approvals-for-flag) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. If you created the approval request as part of a [workflow](https://launchdarkly.com/docs/api/workflows), you can also use a workflow ID as the approval request ID. The workflow ID is returned as part of the [Create workflow](https://launchdarkly.com/docs/api/workflows/post-workflow) and [Get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n", + "An account member can request approval on changes to a flag or AI Config's targeting or variations, or to a segment's targeting. Members may be required to request approval depending on the settings in their LaunchDarkly project. Members can optionally request an approval even if it is not required.\n\nAn approval request prevents a change from being applied without approval from another member. Select up to ten members as reviewers. Reviewers receive an email notification, but anyone with sufficient permissions can review a pending approval request. A change needs at least one approval before you can apply it. To learn more, read [Approvals](https://launchdarkly.com/docs/home/releases/approvals).\n\nChanges that conflict will fail if approved and applied, and the flag or segment will not be updated.\n\nSeveral of the endpoints in the approvals API require an approval request ID. The approval request ID is returned as part of the [Create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) and [List approval requests for a flag](https://launchdarkly.com/docs/api/approvals/get-approvals-for-flag) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. If you created the approval request as part of a [workflow](https://launchdarkly.com/docs/api/workflows), you can also use a workflow ID as the approval request ID. The workflow ID is returned as part of the [Create workflow](https://launchdarkly.com/docs/api/workflows/post-workflow) and [Get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n", ) gen_ApprovalsBetaResourceCmd := NewResourceCmd( @@ -147,7 +147,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "experiments", - "\u003e ### Available for subscription customers\n\u003e\n\u003e Experimentation is available to all customers on a Developer, Foundation, or Enterprise subscription. If you're on an older Pro or Enterprise plan, Experimentation is available as an add-on. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To change your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\n\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](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\nExperimentation lets you validate the impact of features you roll out to your app or infrastructure. You can measure things like page views, clicks, load time, infrastructure costs, and more. By connecting metrics you create to flags in your LaunchDarkly environment, you can measure the changes in your customers' behavior based on what flags they evaluate. You can run experiments with any type of flag, including boolean, string, number, and JSON flags. To learn more, read [Experimentation](https://launchdarkly.com/docs/home/experimentation).\n\nYou can manage experiments by using the dedicated experiment endpoints described below.\n\nSeveral of the endpoints require a treatment ID or a flag rule ID. Treatment IDs are returned as part of the [Get experiment results](https://launchdarkly.com/docs/api/experiments/get-experiment-results) response. They are the `treatmentId` of each element in the `treatmentResults` array. Winning treatment IDs are also returned as part of the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response. They are the `winningTreatmentId` in the `currentIteration`, the `winningTreatmentId` in the `draftIteration`, and the `winningTreatmentId` in each element of the `previousIterations` array. In the flags object, the rule ID is the ID of the variation or rollout of the flag. Each flag variation ID is returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. It is the `_id` field in each element of the `variations` array.\n", + "\u003e ### Available for subscription customers\n\u003e\n\u003e Experimentation is available to all customers on a Developer, Foundation, or Enterprise subscription. If you're on an older Pro or Enterprise plan, Experimentation is available as an add-on. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To change your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\n\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](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\nExperimentation lets you validate the impact of features you roll out to your app or infrastructure. You can measure things like page views, clicks, load time, infrastructure costs, and more. By connecting metrics you create to flags in your LaunchDarkly environment, you can measure the changes in your customers' behavior based on what flags they evaluate. You can run experiments with any type of flag, including boolean, string, number, and JSON flags. To learn more, read [Experimentation](https://launchdarkly.com/docs/home/experimentation).\n\nYou can manage experiments by using the dedicated experiment endpoints described below.\n\nSeveral of the endpoints require a treatment ID or a flag rule ID. Treatment IDs are returned as part of the expanded [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment#expanding-the-experiment-response) response. Winning treatment IDs are also returned as part of the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response. They are the `winningTreatmentId` in the `currentIteration`, the `winningTreatmentId` in the `draftIteration`, and the `winningTreatmentId` in each element of the `previousIterations` array. In the flags object, the rule ID is the ID of the variation or rollout of the flag. Each flag variation ID is returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. It is the `_id` field in each element of the `variations` array.\n", ) gen_FlagImportConfigurationsBetaResourceCmd := NewResourceCmd( @@ -350,6 +350,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\nRelease pipelines standardize the release process for feature flags across a series of phases, where each phase consists of one or more environments. When you add a flag to a release pipeline, you create a \"release\" to automate that flag's progress through the pipeline.\n\nYou can use release pipelines to ensure that you correctly roll out the flag in each environment before moving on to the next. A release can use an immediate or guarded rollout to a designated audience, and can require approvals for selected environments. You can also use release pipelines to view the status of ongoing releases across all flags within a project, enforcing a standardized process and ensuring they are following best practices. To learn more, read [Release pipelines](https://launchdarkly.com/docs/home/releases/release-pipelines).\n\nWith the release pipelines API, you can view, create, update, and delete release pipelines.\n\nWith the related [releases API](https://launchdarkly.com/docs/api/releases-beta), you can view and update the active releases for a given flag.\n\nTo add a feature flag to an existing release pipeline, use the [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag) endpoint.\n", ) + 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\nRelease policies let you specify your preferred rollout method for a given set of environments.\n", + ) + gen_ReleasesBetaResourceCmd := NewResourceCmd( rootCmd, analyticsTrackerFn, @@ -398,6 +406,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\n\u003e ### Teams is an Enterprise feature\n\u003e\n\u003e Teams is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nA team is a group of members in your LaunchDarkly account. A team can have maintainers who are able to add and remove team members. It also can have custom roles assigned to it that allows shared access to those roles for all team members. To learn more, read [Teams](https://launchdarkly.com/docs/home/account/teams).\n", ) + gen_ViewsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "views-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](https://launchdarkly.com/docs/api#beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\nThe views API allows you to create, retrieve, and edit views, and link other resources to views.\n\nA view is a resource in LaunchDarkly that you can use to logically group other resources within a project, such as flags or segments. For example, views let you restrict access to sets of flags, so that members of your organization can focus on just the flags they work with.\n\nTo learn more, read [Views](https://launchdarkly.com/docs/home/account/views).\n", + ) + gen_WebhooksResourceCmd := NewResourceCmd( rootCmd, analyticsTrackerFn, @@ -411,7 +427,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "workflow-templates", - "\u003e ### Workflow templates is an Enterprise feature\n\u003e\n\u003e Workflow templates are available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nWorkflow templates allow you to define a set of workflow stages that you can use as a starting point for new workflows. You can create these workflows for any flag in any environment and any project, and you can create as many workflows as you like from a given template.\n\nYou can create workflow templates in two ways:\n* by specifying the desired stages, using the `stages` property of the request body\n* by specifying an existing workflow to save as a template, using the `workflowId` property of the request body\n\nYou can use templates to create a workflow in any project, environment, or flag. However, when you create a template, you must specify a particular project, environment, and flag. This means that when you create a template using the `stages` property, you must also include `projectKey`, `environmentKey`, and `flagKey` properties in the request body. When you create a template from an existing workflow, it will use the project, environment, and flag of the existing workflow, so those properties can be omitted from the request body.\n\nTo learn more, read [Workflows documentation](https://launchdarkly.com/docs/home/releases/workflows) and [Workflows API documentation](https://launchdarkly.com/docs/api/workflows).\n", + "\u003e ### Workflows are in maintenance mode\n\u003e\n\u003e The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.\n\nWorkflow templates allow you to define a set of workflow stages that you can use as a starting point for new workflows. You can create these workflows for any flag in any environment and any project, and you can create as many workflows as you like from a given template.\n\nYou can create workflow templates in two ways:\n* by specifying the desired stages, using the `stages` property of the request body\n* by specifying an existing workflow to save as a template, using the `workflowId` property of the request body\n\nYou can use templates to create a workflow in any project, environment, or flag. However, when you create a template, you must specify a particular project, environment, and flag. This means that when you create a template using the `stages` property, you must also include `projectKey`, `environmentKey`, and `flagKey` properties in the request body. When you create a template from an existing workflow, it will use the project, environment, and flag of the existing workflow, so those properties can be omitted from the request body.\n\nTo learn more, read [Workflows documentation](https://launchdarkly.com/docs/home/releases/workflows) and [Workflows API documentation](https://launchdarkly.com/docs/api/workflows).\n", ) gen_WorkflowsResourceCmd := NewResourceCmd( @@ -419,7 +435,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "workflows", - "\u003e ### Workflows is an Enterprise feature\n\u003e\n\u003e Workflows is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nA workflow is a set of actions that you can schedule in advance to make changes to a feature flag at a future date and time. You can also include approval requests at different stages of a workflow. To learn more, read [Workflows](https://launchdarkly.com/docs/home/releases/workflows).\n\nThe actions supported are as follows:\n\n- Turning targeting `ON` or `OFF`\n- Setting the default variation\n- Adding targets to a given variation\n- Creating a rule to target by segment\n- Modifying the rollout percentage for rules\n\nYou can create multiple stages of a flag release workflow. Unique stages are defined by their conditions: either approvals and/or scheduled changes.\n\nSeveral of the endpoints in the workflows API require a workflow ID or one or more member IDs. The workflow ID is returned as part of the [Create workflow](https://launchdarkly.com/docs/api/workflows/post-workflow) and [Get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. The member ID is returned as part of the [List account members](https://launchdarkly.com/docs/api/account-members/get-members) response. It is the `_id` field of each element in the `items` array.\n", + "\u003e ### Workflows are in maintenance mode\n\u003e\n\u003e The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.\n\nA workflow is a set of actions that you can schedule in advance to make changes to a feature flag at a future date and time. You can also include approval requests at different stages of a workflow. To learn more, read [Workflows](https://launchdarkly.com/docs/home/releases/workflows).\n\nThe actions supported are as follows:\n\n- Turning targeting `ON` or `OFF`\n- Setting the default variation\n- Adding targets to a given variation\n- Creating a rule to target by segment\n- Modifying the rollout percentage for rules\n\nYou can create multiple stages of a flag release workflow. Unique stages are defined by their conditions: either approvals and/or scheduled changes.\n\nSeveral of the endpoints in the workflows API require a workflow ID or one or more member IDs. The workflow ID is returned as part of the [Create workflow](https://launchdarkly.com/docs/api/workflows/post-workflow) and [Get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. The member ID is returned as part of the [List account members](https://launchdarkly.com/docs/api/account-members/get-members) response. It is the `_id` field of each element in the `items` array.\n", ) // Operation commands @@ -556,114 +572,68 @@ func AddAllResourceCmds( }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get data export events usage", - Long: "Get a time-series array of the number of monthly data export events from your account. The granularity is always daily, with a maximum of 31 days.", - Use: "get-data-export-events-usage", + Short: "Get contexts clientside usage", + Long: "Get a detailed time series of the number of context key usages observed by LaunchDarkly in your account, including non-primary context kinds. Use this for breakdowns that go beyond the primary-only aggregation of MAU endpoints. The counts reflect data reported by client-side SDKs.\u003cbr/\u003e\u003cbr/\u003eThe supported granularity varies by aggregation type. The maximum time range is 365 days.", + Use: "get-contexts-clientside-usage", Params: []Param{ { Name: "from", In: "query", - Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Description: "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", Type: "string", }, { Name: "to", In: "query", - Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + Description: "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", Type: "string", }, { Name: "project-key", In: "query", - Description: "A project key. If specified, 'environmentKey' is required and results apply to the corresponding environment in this project.", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", Type: "string", }, { Name: "environment-key", In: "query", - Description: "An environment key. If specified, 'projectKey' is required and results apply to the corresponding environment in this project.", - Type: "string", - }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/usage/data-export-events", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get evaluations usage", - Long: "Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", - Use: "get-evaluations-usage", - Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.", Type: "string", }, { - Name: "from", + Name: "context-kind", In: "query", - Description: "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + Description: "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.", Type: "string", }, { - Name: "to", + Name: "sdk-name", In: "query", - Description: "The series of data returned ends at this timestamp. Defaults to the current time.", + Description: "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.", Type: "string", }, { - Name: "tz", + Name: "anonymous", In: "query", - Description: "The timezone to use for breaks between days when returning daily data.", + Description: "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.\u003cbr/\u003eValid values: 'true', 'false'.", Type: "string", }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get events usage", - Long: "Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", - Use: "get-events-usage", - Params: []Param{ { - Name: "type", - In: "path", - Description: "The type of event to retrieve. Must be either 'received' or 'published'.", + Name: "group-by", + In: "query", + Description: "If specified, returns data for each distinct value of the given field. 'contextKind' is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.\u003cbr/\u003eValid values: 'projectId', 'environmentId', 'sdkName', 'sdkAppId', 'anonymousV2'.", Type: "string", }, { - Name: "from", + Name: "aggregation-type", In: "query", - Description: "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", Type: "string", }, { - Name: "to", + Name: "granularity", In: "query", - Description: "The series of data returned ends at this timestamp. Defaults to the current time.", + Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", Type: "string", }, }, @@ -671,14 +641,14 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/events/{type}", + Path: "/api/v2/usage/clientside-contexts", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experimentation keys usage", - Long: "Get a time-series array of the number of monthly experimentation keys from your account. The granularity is always daily, with a maximum of 31 days.", - Use: "get-experimentation-keys-usage", + Short: "Get contexts serverside usage", + Long: "Get a detailed time series of the number of context key usages observed by LaunchDarkly in your account, including non-primary context kinds. Use this for breakdowns that go beyond the primary-only aggregation of MAU endpoints. The counts reflect data reported by server-side SDKs.\u003cbr/\u003e\u003cbr/\u003eThe supported granularity varies by aggregation type. The maximum time range is 365 days.", + Use: "get-contexts-serverside-usage", Params: []Param{ { Name: "from", @@ -695,83 +665,49 @@ func AddAllResourceCmds( { Name: "project-key", In: "query", - Description: "A project key. If specified, 'environmentKey' is required and results apply to the corresponding environment in this project.", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", Type: "string", }, { Name: "environment-key", In: "query", - Description: "An environment key. If specified, 'projectKey' is required and results apply to the corresponding environment in this project.", - Type: "string", - }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/usage/experimentation-keys", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experimentation units usage", - Long: "Get a time-series array of the number of monthly experimentation units from your account. The granularity is always daily, with a maximum of 31 days.", - Use: "get-experimentation-units-usage", - Params: []Param{ - { - Name: "from", - In: "query", - Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.", Type: "string", }, { - Name: "to", + Name: "context-kind", In: "query", - Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + Description: "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.", Type: "string", }, { - Name: "project-key", + Name: "sdk-name", In: "query", - Description: "A project key. If specified, 'environmentKey' is required and results apply to the corresponding environment in this project.", + Description: "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.", Type: "string", }, { - Name: "environment-key", + Name: "anonymous", In: "query", - Description: "An environment key. If specified, 'projectKey' is required and results apply to the corresponding environment in this project.", + Description: "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.\u003cbr/\u003eValid values: 'true', 'false'.", Type: "string", }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/usage/experimentation-units", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get MAU SDKs by type", - Long: "Get a list of SDKs. These are all of the SDKs that have connected to LaunchDarkly by monthly active users (MAU) in the requested time period.\u003cbr/\u003e\u003cbr/\u003eEndpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://launchdarkly.com/docs/home/account/metrics).", - Use: "get-mau-sdks-by-type", - Params: []Param{ { - Name: "from", + Name: "group-by", In: "query", - Description: "The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000.", + Description: "If specified, returns data for each distinct value of the given field. 'contextKind' is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.\u003cbr/\u003eValid values: 'projectId', 'environmentId', 'sdkName', 'sdkAppId', 'anonymousV2'.", Type: "string", }, { - Name: "to", + Name: "aggregation-type", In: "query", - Description: "The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000.", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", Type: "string", }, { - Name: "sdktype", + Name: "granularity", In: "query", - Description: "The type of SDK with monthly active users (MAU) to list. Must be either 'client' or 'server'.", + Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", Type: "string", }, }, @@ -779,73 +715,79 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/mau/sdks", + Path: "/api/v2/usage/serverside-contexts", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get MAU usage", - Long: "Get a time-series array of the number of monthly active users (MAU) seen by LaunchDarkly from your account. The granularity is always daily.\u003cbr/\u003e\u003cbr/\u003eEndpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://launchdarkly.com/docs/home/account/metrics).", - Use: "get-mau-usage", + Short: "Get contexts total usage", + Long: "Get a detailed time series of the number of context key usages observed by LaunchDarkly in your account, including non-primary context kinds. Use this for breakdowns that go beyond the primary-only aggregation of MAU endpoints.\u003cbr/\u003e\u003cbr/\u003eThe supported granularity varies by aggregation type. The maximum time range is 365 days.", + Use: "get-contexts-total-usage", Params: []Param{ { Name: "from", In: "query", - Description: "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + Description: "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", Type: "string", }, { Name: "to", In: "query", - Description: "The series of data returned ends at this timestamp. Defaults to the current time.", + Description: "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", Type: "string", }, { - Name: "project", + Name: "project-key", In: "query", - Description: "A project key to filter results to. Can be specified multiple times, one query parameter per project key, to view data for multiple projects.", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", Type: "string", }, { - Name: "environment", + Name: "environment-key", In: "query", - Description: "An environment key to filter results to. When using this parameter, exactly one project key must also be set. Can be specified multiple times as separate query parameters to view data for multiple environments within a single project.", + Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.", Type: "string", }, { - Name: "sdktype", + Name: "context-kind", In: "query", - Description: "An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server", + Description: "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.", Type: "string", }, { - Name: "sdk", + Name: "sdk-name", In: "query", - Description: "An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK.", + Description: "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.", + Type: "string", + }, + { + Name: "sdk-type", + In: "query", + Description: "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.", Type: "string", }, { Name: "anonymous", In: "query", - Description: "If specified, filters results to either anonymous or nonanonymous users.", + Description: "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.\u003cbr/\u003eValid values: 'true', 'false'.", Type: "string", }, { - Name: "groupby", + Name: "group-by", In: "query", - Description: "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions (for example, to group by both project and SDK). Valid values: project, environment, sdktype, sdk, anonymous, contextKind, sdkAppId", + Description: "If specified, returns data for each distinct value of the given field. 'contextKind' is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.\u003cbr/\u003eValid values: 'projectId', 'environmentId', 'sdkName', 'sdkType', 'sdkAppId', 'anonymousV2'.", Type: "string", }, { Name: "aggregation-type", In: "query", - Description: "If specified, queries for rolling 30-day, month-to-date, or daily incremental counts. Default is rolling 30-day. Valid values: rolling_30d, month_to_date, daily_incremental", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", Type: "string", }, { - Name: "context-kind", + Name: "granularity", In: "query", - Description: "Filters results to the specified context kinds. Can be specified multiple times, one query parameter per context kind. If not set, queries for the user context kind.", + Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", Type: "string", }, }, @@ -853,69 +795,61 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/mau", + Path: "/api/v2/usage/total-contexts", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get MAU usage by category", - Long: "Get time-series arrays of the number of monthly active users (MAU) seen by LaunchDarkly from your account, broken down by the category of users. The category is either `browser`, `mobile`, or `backend`.\u003cbr/\u003e\u003cbr/\u003eEndpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://launchdarkly.com/docs/home/account/metrics).", - Use: "get-mau-usage-by-category", + Short: "Get data export events usage", + Long: "Get a time series array showing the number of data export events from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.", + Use: "get-data-export-events-usage", Params: []Param{ { Name: "from", In: "query", - Description: "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + Description: "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", Type: "string", }, { Name: "to", In: "query", - Description: "The series of data returned ends at this timestamp. Defaults to the current time.", + Description: "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", Type: "string", }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/usage/mau/bycategory", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get observability errors usage", - Long: "Get time-series arrays of the number of observability errors. Supports `daily` and `monthly` granularity.", - Use: "get-observability-errors-usage", - Params: []Param{ { - Name: "from", + Name: "project-key", In: "query", - Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", Type: "string", }, { - Name: "to", + Name: "environment-key", In: "query", - Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.", Type: "string", }, { - Name: "project-key", + Name: "event-kind", In: "query", - Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", + Description: "An event kind to filter results by. Can be specified multiple times, one query parameter per event kind.", Type: "string", }, { - Name: "granularity", + Name: "group-by", In: "query", - Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", + Description: "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.\u003cbr/\u003eValid values: 'environmentId', 'eventKind'.", Type: "string", }, { Name: "aggregation-type", In: "query", - Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental'.", + Type: "string", + }, + { + Name: "granularity", + In: "query", + Description: "Specifies the data granularity. Defaults to 'daily'. 'monthly' granularity is only supported with the **month_to_date** aggregation type.\u003cbr/\u003eValid values: 'daily', 'hourly', 'monthly'.", Type: "string", }, }, @@ -923,43 +857,49 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/observability/errors", + Path: "/api/v2/usage/data-export-events", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get observability logs usage", - Long: "Get time-series arrays of the number of observability logs. Supports `daily` and `monthly` granularity.", - Use: "get-observability-logs-usage", + Short: "Get evaluations usage", + Long: "Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", + Use: "get-evaluations-usage", Params: []Param{ { - Name: "from", - In: "query", - Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Name: "project-key", + In: "path", + Description: "The project key", Type: "string", }, { - Name: "to", - In: "query", - Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + Name: "environment-key", + In: "path", + Description: "The environment key", Type: "string", }, { - Name: "project-key", + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "from", In: "query", - Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", + Description: "The series of data returned starts from this timestamp. Defaults to 30 days ago.", Type: "string", }, { - Name: "granularity", + Name: "to", In: "query", - Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", + Description: "The series of data returned ends at this timestamp. Defaults to the current time.", Type: "string", }, { - Name: "aggregation-type", + Name: "tz", In: "query", - Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", + Description: "The timezone to use for breaks between days when returning daily data.", Type: "string", }, }, @@ -967,43 +907,31 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/observability/logs", + Path: "/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get observability sessions usage", - Long: "Get time-series arrays of the number of observability sessions. Supports `daily` and `monthly` granularity.", - Use: "get-observability-sessions-usage", + Short: "Get events usage", + Long: "Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", + Use: "get-events-usage", Params: []Param{ { - Name: "from", - In: "query", - Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", - Type: "string", - }, - { - Name: "to", - In: "query", - Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", - Type: "string", - }, - { - Name: "project-key", - In: "query", - Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", + Name: "type", + In: "path", + Description: "The type of event to retrieve. Must be either 'received' or 'published'.", Type: "string", }, { - Name: "granularity", + Name: "from", In: "query", - Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", + Description: "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", Type: "string", }, { - Name: "aggregation-type", + Name: "to", In: "query", - Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", + Description: "The series of data returned ends at this timestamp. Defaults to the current time.", Type: "string", }, }, @@ -1011,25 +939,25 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/observability/sessions", + Path: "/api/v2/usage/events/{type}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get observability traces usage", - Long: "Get time-series arrays of the number of observability traces. Supports `daily` and `monthly` granularity.", - Use: "get-observability-traces-usage", + Short: "Get experimentation events usage", + Long: "Get a time series array showing the number of experimentation events from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.", + Use: "get-experimentation-events-usage", Params: []Param{ { Name: "from", In: "query", - Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Description: "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", Type: "string", }, { Name: "to", In: "query", - Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + Description: "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", Type: "string", }, { @@ -1039,15 +967,39 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "granularity", + Name: "environment-key", In: "query", - Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", + Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.", + Type: "string", + }, + { + Name: "event-key", + In: "query", + Description: "An event key to filter results by. Can be specified multiple times, one query parameter per event key.", + Type: "string", + }, + { + Name: "event-kind", + In: "query", + Description: "An event kind to filter results by. Can be specified multiple times, one query parameter per event kind.", + Type: "string", + }, + { + Name: "group-by", + In: "query", + Description: "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.\u003cbr/\u003eValid values: 'environmentId', 'eventKey', 'eventKind'.", Type: "string", }, { Name: "aggregation-type", In: "query", - Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental'.", + Type: "string", + }, + { + Name: "granularity", + In: "query", + Description: "Specifies the data granularity. Defaults to 'daily'. 'monthly' granularity is only supported with the **month_to_date** aggregation type.\u003cbr/\u003eValid values: 'daily', 'hourly', 'monthly'.", Type: "string", }, }, @@ -1055,37 +1007,61 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/observability/traces", + Path: "/api/v2/usage/experimentation-events", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get service connection usage", - Long: "Get a time-series array of the number of monthly service connections from your account. The granularity is always daily, with a maximum of 31 days.", - Use: "get-service-connection-usage", + Short: "Get experimentation keys usage", + Long: "Get a time series array showing the number of experimentation keys from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.", + Use: "get-experimentation-keys-usage", Params: []Param{ { Name: "from", In: "query", - Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Description: "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", Type: "string", }, { Name: "to", In: "query", - Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + Description: "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", Type: "string", }, { Name: "project-key", In: "query", - Description: "A project key. If specified, 'environmentKey' is required and results apply to the corresponding environment in this project.", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", Type: "string", }, { Name: "environment-key", In: "query", - Description: "An environment key. If specified, 'projectKey' is required and results apply to the corresponding environment in this project.", + Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.", + Type: "string", + }, + { + Name: "experiment-id", + In: "query", + Description: "An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID.", + Type: "string", + }, + { + Name: "group-by", + In: "query", + Description: "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.\u003cbr/\u003eValid values: 'projectId', 'environmentId', 'experimentId'.", + Type: "string", + }, + { + Name: "aggregation-type", + In: "query", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental'.", + Type: "string", + }, + { + Name: "granularity", + In: "query", + Description: "Specifies the data granularity. Defaults to 'daily'. 'monthly' granularity is only supported with the **month_to_date** aggregation type.\u003cbr/\u003eValid values: 'daily', 'hourly', 'monthly'.", Type: "string", }, }, @@ -1093,37 +1069,31 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/service-connections", + Path: "/api/v2/usage/experimentation-keys", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get stream usage", - Long: "Get a time-series array of the number of streaming connections to LaunchDarkly in each time period. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", - Use: "get-stream-usage", + Short: "Get MAU SDKs by type", + Long: "Get a list of SDKs. These are all of the SDKs that have connected to LaunchDarkly by monthly active users (MAU) in the requested time period.\u003cbr/\u003e\u003cbr/\u003eEndpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://launchdarkly.com/docs/home/account/metrics).", + Use: "get-mau-sdks-by-type", Params: []Param{ - { - Name: "source", - In: "path", - Description: "The source of streaming connections to describe. Must be either 'client' or 'server'.", - Type: "string", - }, { Name: "from", In: "query", - Description: "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + Description: "The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000.", Type: "string", }, { Name: "to", In: "query", - Description: "The series of data returned ends at this timestamp. Defaults to the current time.", + Description: "The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000.", Type: "string", }, { - Name: "tz", + Name: "sdktype", In: "query", - Description: "The timezone to use for breaks between days when returning daily data.", + Description: "The type of SDK with monthly active users (MAU) to list. Must be either 'client' or 'server'.", Type: "string", }, }, @@ -1131,25 +1101,19 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/streams/{source}", + Path: "/api/v2/usage/mau/sdks", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get stream usage by SDK version", - Long: "Get multiple series of the number of streaming connections to LaunchDarkly in each time period, separated by SDK type and version. Information about each series is in the metadata array. The granularity of the data depends on the age of the data requested. If the requested range is within the past 2 hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", - Use: "get-stream-usage-by-sdk-version", + Short: "Get MAU usage", + Long: "Get a time-series array of the number of monthly active users (MAU) seen by LaunchDarkly from your account. The granularity is always daily.\u003cbr/\u003e\u003cbr/\u003eEndpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://launchdarkly.com/docs/home/account/metrics).", + Use: "get-mau-usage", Params: []Param{ - { - Name: "source", - In: "path", - Description: "The source of streaming connections to describe. Must be either 'client' or 'server'.", - Type: "string", - }, { Name: "from", In: "query", - Description: "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", + Description: "The series of data returned starts from this timestamp. Defaults to 30 days ago.", Type: "string", }, { @@ -1159,21 +1123,51 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "tz", + Name: "project", In: "query", - Description: "The timezone to use for breaks between days when returning daily data.", + Description: "A project key to filter results to. Can be specified multiple times, one query parameter per project key, to view data for multiple projects.", + Type: "string", + }, + { + Name: "environment", + In: "query", + Description: "An environment key to filter results to. When using this parameter, exactly one project key must also be set. Can be specified multiple times as separate query parameters to view data for multiple environments within a single project.", + Type: "string", + }, + { + Name: "sdktype", + In: "query", + Description: "An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server", Type: "string", }, { Name: "sdk", In: "query", - Description: "If included, this filters the returned series to only those that match this SDK name.", + Description: "An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK.", Type: "string", }, { - Name: "version", + Name: "anonymous", In: "query", - Description: "If included, this filters the returned series to only those that match this SDK version.", + Description: "If specified, filters results to either anonymous or nonanonymous users.", + Type: "string", + }, + { + Name: "groupby", + In: "query", + Description: "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions (for example, to group by both project and SDK). Valid values: project, environment, sdktype, sdk, anonymous, contextKind, sdkAppId", + Type: "string", + }, + { + Name: "aggregation-type", + In: "query", + Description: "If specified, queries for rolling 30-day, month-to-date, or daily incremental counts. Default is rolling 30-day. Valid values: rolling_30d, month_to_date, daily_incremental", + Type: "string", + }, + { + Name: "context-kind", + In: "query", + Description: "Filters results to the specified context kinds. Can be specified multiple times, one query parameter per context kind. If not set, queries for the user context kind.", Type: "string", }, }, @@ -1181,19 +1175,25 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/streams/{source}/bysdkversion", + Path: "/api/v2/usage/mau", SupportsSemanticPatch: false, }) NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get stream usage SDK versions", - Long: "Get a list of SDK version objects, which contain an SDK name and version. These are all of the SDKs that have connected to LaunchDarkly from your account in the past 60 days.", - Use: "get-stream-usage-sdkversion", + Short: "Get MAU usage by category", + Long: "Get time-series arrays of the number of monthly active users (MAU) seen by LaunchDarkly from your account, broken down by the category of users. The category is either `browser`, `mobile`, or `backend`.\u003cbr/\u003e\u003cbr/\u003eEndpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://launchdarkly.com/docs/home/account/metrics).", + Use: "get-mau-usage-by-category", Params: []Param{ { - Name: "source", - In: "path", - Description: "The source of streaming connections to describe. Must be either 'client' or 'server'.", + Name: "from", + In: "query", + Description: "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "The series of data returned ends at this timestamp. Defaults to the current time.", Type: "string", }, }, @@ -1201,81 +1201,451 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/usage/streams/{source}/sdkversions", + Path: "/api/v2/usage/mau/bycategory", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete AI Config", - Long: "Delete an existing AI Config.", - Use: "delete-ai-config", + NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get observability errors usage", + Long: "Get time-series arrays of the number of observability errors. Supports `daily` and `monthly` granularity.", + Use: "get-observability-errors-usage", Params: []Param{ { - Name: "ld-api-version", - In: "header", - Description: "Version of the endpoint.", + Name: "from", + In: "query", + Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", Type: "string", }, { Name: "project-key", - In: "path", - Description: "", + In: "query", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", Type: "string", }, { - Name: "config-key", - In: "path", - Description: "", + Name: "granularity", + In: "query", + Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", + Type: "string", + }, + { + Name: "aggregation-type", + In: "query", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", Type: "string", }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}", + Path: "/api/v2/usage/observability/errors", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete AI Config variation", - Long: "Delete a specific variation of an AI Config by config key and variation key.", - Use: "delete-ai-config-variation", + NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get observability logs usage", + Long: "Get time-series arrays of the number of observability logs. Supports `daily` and `monthly` granularity.", + Use: "get-observability-logs-usage", Params: []Param{ { - Name: "ld-api-version", - In: "header", - Description: "Version of the endpoint.", + Name: "from", + In: "query", + Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", Type: "string", }, { Name: "project-key", - In: "path", - Description: "", + In: "query", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", Type: "string", }, { - Name: "config-key", - In: "path", - Description: "", + Name: "granularity", + In: "query", + Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", Type: "string", }, { - Name: "variation-key", - In: "path", - Description: "", + Name: "aggregation-type", + In: "query", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", Type: "string", }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}", + Path: "/api/v2/usage/observability/logs", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get observability sessions usage", + Long: "Get time-series arrays of the number of observability sessions. Supports `daily` and `monthly` granularity.", + Use: "get-observability-sessions-usage", + Params: []Param{ + { + Name: "from", + In: "query", + Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + Type: "string", + }, + { + Name: "project-key", + In: "query", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", + Type: "string", + }, + { + Name: "granularity", + In: "query", + Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", + Type: "string", + }, + { + Name: "aggregation-type", + In: "query", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/usage/observability/sessions", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get observability traces usage", + Long: "Get time-series arrays of the number of observability traces. Supports `daily` and `monthly` granularity.", + Use: "get-observability-traces-usage", + Params: []Param{ + { + Name: "from", + In: "query", + Description: "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + Type: "string", + }, + { + Name: "project-key", + In: "query", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", + Type: "string", + }, + { + Name: "granularity", + In: "query", + Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.", + Type: "string", + }, + { + Name: "aggregation-type", + In: "query", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/usage/observability/traces", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get service connections usage", + Long: "Get a time series array showing the number of service connection minutes from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.", + Use: "get-service-connections-usage", + Params: []Param{ + { + Name: "from", + In: "query", + Description: "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", + Type: "string", + }, + { + Name: "project-key", + In: "query", + Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", + Type: "string", + }, + { + Name: "environment-key", + In: "query", + Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.", + Type: "string", + }, + { + Name: "connection-type", + In: "query", + Description: "A connection type to filter results by. Can be specified multiple times, one query parameter per connection type.", + Type: "string", + }, + { + Name: "relay-version", + In: "query", + Description: "A relay version to filter results by. Can be specified multiple times, one query parameter per relay version.", + Type: "string", + }, + { + Name: "sdk-name", + In: "query", + Description: "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.", + Type: "string", + }, + { + Name: "sdk-version", + In: "query", + Description: "An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version.", + Type: "string", + }, + { + Name: "sdk-type", + In: "query", + Description: "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.", + Type: "string", + }, + { + Name: "group-by", + In: "query", + Description: "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.\u003cbr/\u003eValid values: 'projectId', 'environmentId', 'connectionType', 'relayVersion', 'sdkName', 'sdkVersion', 'sdkType'.", + Type: "string", + }, + { + Name: "aggregation-type", + In: "query", + Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental'.", + Type: "string", + }, + { + Name: "granularity", + In: "query", + Description: "Specifies the data granularity. Defaults to 'daily'. 'monthly' granularity is only supported with the **month_to_date** aggregation type.\u003cbr/\u003eValid values: 'daily', 'hourly', 'monthly'.", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/usage/service-connections", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get stream usage", + Long: "Get a time-series array of the number of streaming connections to LaunchDarkly in each time period. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", + Use: "get-stream-usage", + Params: []Param{ + { + Name: "source", + In: "path", + Description: "The source of streaming connections to describe. Must be either 'client' or 'server'.", + Type: "string", + }, + { + Name: "from", + In: "query", + Description: "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "The series of data returned ends at this timestamp. Defaults to the current time.", + Type: "string", + }, + { + Name: "tz", + In: "query", + Description: "The timezone to use for breaks between days when returning daily data.", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/usage/streams/{source}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get stream usage by SDK version", + Long: "Get multiple series of the number of streaming connections to LaunchDarkly in each time period, separated by SDK type and version. Information about each series is in the metadata array. The granularity of the data depends on the age of the data requested. If the requested range is within the past 2 hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", + Use: "get-stream-usage-by-sdk-version", + Params: []Param{ + { + Name: "source", + In: "path", + Description: "The source of streaming connections to describe. Must be either 'client' or 'server'.", + Type: "string", + }, + { + Name: "from", + In: "query", + Description: "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "The series of data returned ends at this timestamp. Defaults to the current time.", + Type: "string", + }, + { + Name: "tz", + In: "query", + Description: "The timezone to use for breaks between days when returning daily data.", + Type: "string", + }, + { + Name: "sdk", + In: "query", + Description: "If included, this filters the returned series to only those that match this SDK name.", + Type: "string", + }, + { + Name: "version", + In: "query", + Description: "If included, this filters the returned series to only those that match this SDK version.", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/usage/streams/{source}/bysdkversion", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get stream usage SDK versions", + Long: "Get a list of SDK version objects, which contain an SDK name and version. These are all of the SDKs that have connected to LaunchDarkly from your account in the past 60 days.", + Use: "get-stream-usage-sdkversion", + Params: []Param{ + { + Name: "source", + In: "path", + Description: "The source of streaming connections to describe. Must be either 'client' or 'server'.", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/usage/streams/{source}/sdkversions", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete AI Config", + Long: "Delete an existing AI Config.", + Use: "delete-ai-config", + Params: []Param{ + { + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "config-key", + In: "path", + Description: "", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete AI Config variation", + Long: "Delete a specific variation of an AI Config by config key and variation key.", + Use: "delete-ai-config-variation", + Params: []Param{ + { + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "config-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "variation-key", + In: "path", + Description: "", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ Short: "Delete AI tool", Long: "Delete an existing AI tool.", Use: "delete-ai-tool", @@ -1677,7 +2047,57 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}", + Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List AI tool versions", + Long: "Get a list of all versions of an AI tool in the given project.", + Use: "list-ai-tool-versions", + Params: []Param{ + { + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "tool-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "sort", + In: "query", + Description: "A sort to apply to the list of AI Configs.", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "The number of AI Configs to return.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/ai-tools/{toolKey}/versions", SupportsSemanticPatch: false, }) @@ -1698,6 +2118,30 @@ func AddAllResourceCmds( Description: "", Type: "string", }, + { + Name: "sort", + In: "query", + Description: "A sort to apply to the list of AI Configs.", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "The number of AI Configs to return.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", + }, + { + Name: "filter", + In: "query", + Description: "A filter to apply to the list of AI Configs.", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, @@ -2424,7 +2868,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ Short: "List approval requests", - Long: "Get all approval requests.\n\n### Filtering approvals\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`.\n- `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`.\n- `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`.\n- `resourceKind` filters for only approvals that correspond to the specified resource kind. For example: `filter=resourceKind equals flag`. Currently, `flag` and `segment` resource kinds are supported.\n- `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf [\"pending\", \"approved\"]`.\n- `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf [\"pending\", \"scheduled\"]`.\n\nYou can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf [\"pending\",\"approved\"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`.\n\n### Expanding approval response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `flag` includes the flag the approval request belongs to\n- `project` includes the project the approval request belongs to\n- `environments` includes the environments the approval request relates to\n\nFor example, `expand=project,flag` includes the `project` and `flag` fields in the response.\n", + Long: "Get all approval requests.\n\n### Filtering approvals\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`.\n- `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`.\n- `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`.\n- `resourceKind` filters for only approvals that correspond to the specified resource kind. For example: `filter=resourceKind equals flag`. Currently, `flag`, `segment`, and `aiConfig` resource kinds are supported.\n- `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf [\"pending\", \"approved\"]`.\n- `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf [\"pending\", \"scheduled\"]`.\n\nYou can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf [\"pending\",\"approved\"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`.\n\n### Expanding approval response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `flag` includes the flag the approval request belongs to\n- `project` includes the project the approval request belongs to\n- `environments` includes the environments the approval request relates to\n\nFor example, `expand=project,flag` includes the `project` and `flag` fields in the response.\n", Use: "list", Params: []Param{ { @@ -2494,7 +2938,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ Short: "Create approval request", - Long: "Create an approval request.\n\nThis endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.\n\nIf you are creating an approval request for a flag, you can use the following `instructions`:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).\n\nIf you are creating an approval request for a segment, you can use the following read [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment) for details on the available `instructions`.\n", + Long: "Create an approval request.\n\nThis endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.\n\n### Flags\n\nIf you are creating an approval request for a flag, you can use the following `instructions`:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).\n\n### AI Configs\n\nIf you are creating an approval request for an AI Config, you can use the semantic patch instructions listed under [Update AI Config targeting](https://launchdarkly.com/docs/api/ai-configs-beta/patch-ai-config-targeting).\n\n### Segments\n\nIf you are creating an approval request for a segment, you can use the semantic patch instructions listed under [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment).\n", Use: "create", Params: []Param{}, HTTPMethod: "POST", @@ -2507,7 +2951,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ Short: "Apply approval request", - Long: "Apply an approval request that has been approved. This endpoint works with approval requests for either flag or segment changes.", + Long: "Apply an approval request that has been approved. This endpoint works with any approval requests.", Use: "create-apply", Params: []Param{ { @@ -2731,7 +3175,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ApprovalsBetaResourceCmd, client, markdownRenderer, OperationData{ Short: "Update approval request", - Long: "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint works with approval requests for either flag or segment changes.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instruction for updating an approval request.\n\n#### addReviewers\n\nAdds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`.\n\n##### Parameters\n\n- `notifyMemberIds`: (Optional) List of member IDs.\n- `notifyTeamKeys`: (Optional) List of team keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addReviewers\",\n \"notifyMemberIds\": [ \"user-key-123abc\", \"user-key-456def\" ],\n \"notifyTeamKeys\": [ \"team-key-789abc\"]\n }]\n}\n```\n", + Long: "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint works with any approval requests.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instruction for updating an approval request.\n\n#### addReviewers\n\nAdds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`.\n\n##### Parameters\n\n- `notifyMemberIds`: (Optional) List of member IDs.\n- `notifyTeamKeys`: (Optional) List of team keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addReviewers\",\n \"notifyMemberIds\": [ \"user-key-123abc\", \"user-key-456def\" ],\n \"notifyTeamKeys\": [ \"team-key-789abc\"]\n }]\n}\n```\n", Use: "update-request", Params: []Param{ { @@ -3631,7 +4075,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ Short: "Search for context instances", - Long: "\nSearch for context instances.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). To learn more about context instances, read [Context instances](https://launchdarkly.com/docs/home/observability/multi-contexts#context-instances).\n", + Long: "\nSearch for context instances.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/api/contexts#filtering-contexts-and-context-instances). To learn more about context instances, read [Context instances](https://launchdarkly.com/docs/home/observability/multi-contexts#context-instances).\n", Use: "search-instances", Params: []Param{ { @@ -3687,7 +4131,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ Short: "Search for contexts", - Long: "\nSearch for contexts.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://launchdarkly.com/docs/home/observability/contexts#contexts-and-context-kinds).\n", + Long: "\nSearch for contexts.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/api/contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://launchdarkly.com/docs/home/observability/contexts#contexts-and-context-kinds).\n", Use: "search", Params: []Param{ { @@ -4190,7 +4634,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ Short: "Create experiment", - Long: "Create an experiment.\n\nTo run this experiment, you'll need to [create an iteration](https://launchdarkly.com/docs/ld-docs/api/experiments/create-iteration) and then [update the experiment](https://launchdarkly.com/docs/ld-docs/api/experiments/patch-experiment) with the `startIteration` instruction.\n\nTo learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create).\n", + Long: "Create an experiment.\n\nTo run this experiment, you'll need to [create an iteration](https://launchdarkly.com/docs/api/experiments/create-iteration) and then [update the experiment](https://launchdarkly.com/docs/api/experiments/patch-experiment) with the `startIteration` instruction.\n\nTo learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create).\n", Use: "create", Params: []Param{ { @@ -4216,7 +4660,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ Short: "Create iteration", - Long: "Create an experiment iteration.\n\nExperiment iterations let you record experiments in individual blocks of time. Initially, iterations are created with a status of `not_started` and appear in the `draftIteration` field of an experiment. To start or stop an iteration, [update the experiment](https://launchdarkly.com/docs/ld-docs/api/experiments/patch-experiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://launchdarkly.com/docs/home/experimentation/feature#start-experiment-iterations).\n", + Long: "Create an experiment iteration.\n\nExperiment iterations let you record experiments in individual blocks of time. Initially, iterations are created with a status of `not_started` and appear in the `draftIteration` field of an experiment. To start or stop an iteration, [update the experiment](https://launchdarkly.com/docs/api/experiments/patch-experiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://launchdarkly.com/docs/home/experimentation/feature#start-experiment-iterations).\n", Use: "create-iteration", Params: []Param{ { @@ -4284,100 +4728,6 @@ func AddAllResourceCmds( SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experiment results (Deprecated)", - Long: "Get results from an experiment for a particular metric.\n\nLaunchDarkly supports one field for expanding the \"Get experiment results\" response. By default, this field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter with the following field:\n* `traffic` includes the total count of units for each treatment.\n\nFor example, `expand=traffic` includes the `traffic` field for the project in the response.\n", - Use: "get-results", - Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "experiment-key", - In: "path", - Description: "The experiment key", - Type: "string", - }, - { - Name: "metric-key", - In: "path", - Description: "The metric key", - Type: "string", - }, - { - Name: "iteration-id", - In: "query", - Description: "The iteration ID", - Type: "string", - }, - { - Name: "expand", - In: "query", - Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", - Type: "string", - }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metrics/{metricKey}/results", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experiment results for metric group (Deprecated)", - Long: "Get results from an experiment for a particular metric group.", - Use: "get-results-for-metric-group", - Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "experiment-key", - In: "path", - Description: "The experiment key", - Type: "string", - }, - { - Name: "metric-group-key", - In: "path", - Description: "The metric group key", - Type: "string", - }, - { - Name: "iteration-id", - In: "query", - Description: "The iteration ID", - Type: "string", - }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metric-groups/{metricGroupKey}/results", - SupportsSemanticPatch: false, - }) - NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ Short: "Get experimentation settings", Long: "Get current experimentation settings for the given project", @@ -4456,7 +4806,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\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](https://launchdarkly.com/docs/ld-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/ld-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\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](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{ { @@ -5345,7 +5695,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 or not LaunchDarkly tracks events for the feature flag associated with this rule.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for all rules.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ]\n}\n```\n\n#### updateTrackEventsFallthrough\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating flag settings\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating the flag lifecycle\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](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) or a [workflow](https://launchdarkly.com/docs/api/workflows).\n\n### Conflicts\nIf a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.\n\n### Migration flags\nFor migration flags, the cohort information is included in the `rules` property of a flag's response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag's response. You can update the default cohort by updating `fallthrough`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://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 or not LaunchDarkly tracks events for the feature flag associated with this rule.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for all rules.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ]\n}\n```\n\n#### updateTrackEventsFallthrough\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating flag settings\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating the flag lifecycle\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](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{ { @@ -7495,7 +7845,7 @@ func AddAllResourceCmds( { Name: "expand", In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response.", + Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are 'experiments', 'experimentCount', 'metricGroups', 'metricGroupCount', 'eventSources', 'guardedRollouts', 'guardedRolloutCount', and 'lastUsedInEntity'.", Type: "string", }, { @@ -7551,7 +7901,7 @@ func AddAllResourceCmds( { Name: "filter", In: "query", - Description: "A comma-separated list of filters. This endpoint accepts filtering by 'query', 'tags', 'eventKind', 'isNumeric', 'unitAggregationType', 'hasConnections', 'maintainerIds', and 'maintainerTeamKey'. To learn more about the filter syntax, read the 'Filtering metrics' section above.", + Description: "A comma-separated list of filters. This endpoint accepts filtering by 'query', 'tags', 'eventKind', 'isNumeric', 'unitAggregationType', 'hasConnections', 'maintainerIds', 'maintainerTeamKey' and 'view'. To learn more about the filter syntax, read the 'Filtering metrics' section above.", Type: "string", }, }, @@ -8065,7 +8415,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ Short: "Delete release pipeline", - Long: "Deletes a release pipeline.\n\nYou cannot delete the default release pipeline.\n\nIf you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/ld-docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`.\n", + Long: "Deletes a release pipeline.\n\nYou cannot delete the default release pipeline.\n\nIf you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`.\n", Use: "delete", Params: []Param{ { @@ -8192,16 +8542,190 @@ func AddAllResourceCmds( HTTPMethod: "GET", HasBody: false, IsBeta: true, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}", + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create a release pipeline", + Long: "Creates a new release pipeline.\n\nThe first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](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", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/release-pipelines", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update a release pipeline", + Long: "Updates a release pipeline.", + Use: "replace", + 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: true, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}", + 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", + }, + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "policy-key", + In: "path", + Description: "The human-readable key of the release policy", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/release-policies/{policyKey}", + 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", + 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: "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", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/release-policies", + 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", + 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: "policy-key", + In: "path", + Description: "The release policy key", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/release-policies/{policyKey}", + 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", + 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", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/release-policies/order", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create a release pipeline", - Long: "Creates a new release pipeline.\n\nThe first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/ld-docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`.\n\nYou can create up to 20 release pipelines per project.\n", - Use: "create", + 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", Params: []Param{ + { + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, { Name: "project-key", In: "path", @@ -8213,15 +8737,21 @@ func AddAllResourceCmds( HasBody: true, IsBeta: true, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/release-pipelines", + Path: "/api/v2/projects/{projectKey}/release-policies", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update a release pipeline", - Long: "Updates a release pipeline.", - Use: "replace", + 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", Params: []Param{ + { + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, { Name: "project-key", In: "path", @@ -8229,9 +8759,9 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "pipeline-key", + Name: "policy-key", In: "path", - Description: "The release pipeline key", + Description: "The human-readable key of the release policy", Type: "string", }, }, @@ -8239,7 +8769,7 @@ func AddAllResourceCmds( HasBody: true, IsBeta: true, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}", + Path: "/api/v2/projects/{projectKey}/release-policies/{policyKey}", SupportsSemanticPatch: false, }) @@ -8533,7 +9063,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ScheduledChangesResourceCmd, client, markdownRenderer, OperationData{ Short: "Create scheduled changes workflow", - Long: "Create scheduled changes for a feature flag. If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.", + Long: "Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.", Use: "create", Params: []Param{ { @@ -8566,7 +9096,7 @@ func AddAllResourceCmds( IsBeta: false, RequiresBody: true, Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes", - SupportsSemanticPatch: false, + SupportsSemanticPatch: true, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ @@ -8593,18 +9123,248 @@ func AddAllResourceCmds( Type: "string", }, }, - HTTPMethod: "POST", + HTTPMethod: "POST", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create big segment import", + Long: "Start a new import process for a big segment. This is an import for a list-based segment that can include more than 15,000 entries.", + Use: "create-big-import", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "segment-key", + In: "path", + Description: "The segment key", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete segment", + Long: "Delete a segment.", + Use: "delete", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "segment-key", + In: "path", + Description: "The segment key", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}", + 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.", + Use: "get-big-export", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "segment-key", + In: "path", + Description: "The segment key", + Type: "string", + }, + { + Name: "export-id", + In: "path", + Description: "The export ID", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get big segment import", + Long: "Returns information about a big segment import process. This is the import of a list-based segment that can include more than 15,000 entries.", + Use: "get-big-import", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "segment-key", + In: "path", + Description: "The segment key", + Type: "string", + }, + { + Name: "import-id", + In: "path", + Description: "The import ID", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List segment memberships for context instance", + Long: "For a given context instance with attributes, get membership details for all segments. In the request body, pass in the context instance.", + Use: "list-context-instance-membership-by-env", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get expiring targets for segment", + Long: "Get a list of a segment's context targets that are scheduled for removal.", + Use: "list-expiring-targets", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "segment-key", + In: "path", + Description: "The segment key", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get expiring user targets for segment", + Long: "\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nGet a list of a segment's user targets that are scheduled for removal.\n", + Use: "list-expiring-user-targets", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "segment-key", + In: "path", + Description: "The segment key", + Type: "string", + }, + }, + HTTPMethod: "GET", HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports", + Path: "/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create big segment import", - Long: "Start a new import process for a big segment. This is an import for a list-based segment that can include more than 15,000 entries.", - Use: "create-big-import", + Short: "Get segment", + Long: "Get a single segment by key.\u003cbr/\u003e\u003cbr/\u003eSegments can be rule-based, list-based, or synced. Big segments include larger list-based segments and synced segments. Some fields in the response only apply to big segments.", + Use: "get", Params: []Param{ { Name: "project-key", @@ -8625,18 +9385,18 @@ func AddAllResourceCmds( Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports", + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete segment", - Long: "Delete a segment.", - Use: "delete", + Short: "Get big segment membership for context", + Long: "Get the membership status (included/excluded) for a given context in this big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.", + Use: "get-membership-for-context", Params: []Param{ { Name: "project-key", @@ -8656,19 +9416,25 @@ func AddAllResourceCmds( Description: "The segment key", Type: "string", }, + { + Name: "context-key", + In: "path", + Description: "The context key", + Type: "string", + }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}", + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts/{contextKey}", 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.", - Use: "get-big-export", + Short: "Get big segment membership for user", + Long: "\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nGet the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.\n", + Use: "get-membership-for-user", Params: []Param{ { Name: "project-key", @@ -8689,9 +9455,9 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "export-id", + Name: "user-key", In: "path", - Description: "The export ID", + Description: "The user key", Type: "string", }, }, @@ -8699,14 +9465,14 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}", + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get big segment import", - Long: "Returns information about a big segment import process. This is the import of a list-based segment that can include more than 15,000 entries.", - Use: "get-big-import", + 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", + Use: "list", Params: []Param{ { Name: "project-key", @@ -8721,15 +9487,27 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "segment-key", - In: "path", - Description: "The segment key", + Name: "limit", + In: "query", + Description: "The number of segments to return. Defaults to 20.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", + }, + { + Name: "sort", + In: "query", + Description: "Accepts sorting order and fields. Fields can be comma separated. Possible fields are 'creationDate', 'name', 'lastModified'. Example: 'sort=name' sort by names ascending or 'sort=-name,creationDate' sort by names descending and creationDate ascending.", Type: "string", }, { - Name: "import-id", - In: "path", - Description: "The import ID", + Name: "filter", + In: "query", + Description: "Accepts filter by 'excludedKeys', 'external', 'includedKeys', 'query', 'tags', 'unbounded', 'view'. To learn more about the filter syntax, read the 'Filtering segments' section above.", Type: "string", }, }, @@ -8737,14 +9515,14 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}", + Path: "/api/v2/segments/{projectKey}/{environmentKey}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List segment memberships for context instance", - Long: "For a given context instance with attributes, get membership details for all segments. In the request body, pass in the context instance.", - Use: "list-context-instance-membership-by-env", + Short: "Update expiring targets for segment", + Long: "\nUpdate expiring context targets for a segment. Updating a context target expiration uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nIf the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring context targets.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating expiring context targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExpiringTarget\n\nSchedules a date and time when LaunchDarkly will remove a context from segment targeting. The segment must already have the context as an individual target.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n- `value`: The date when the context should expire from the segment targeting, in Unix milliseconds.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n \"value\": 1754092860000\n }]\n}\n```\n\n#### updateExpiringTarget\n\nUpdates the date and time when LaunchDarkly will remove a context from segment targeting.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n- `value`: The new date when the context should expire from the segment targeting, in Unix milliseconds.\n- `version`: (Optional) The version of the expiring target to update. If included, update will fail if version doesn't match current version of the expiring target.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n \"value\": 1754179260000\n }]\n}\n```\n\n#### removeExpiringTarget\n\nRemoves the scheduled expiration for the context in the segment.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n }]\n}\n```\n\n\u003c/details\u003e\n", + Use: "update-expiring-targets", Params: []Param{ { Name: "project-key", @@ -8758,19 +9536,25 @@ func AddAllResourceCmds( Description: "The environment key", Type: "string", }, + { + Name: "segment-key", + In: "path", + Description: "The segment key", + Type: "string", + }, }, - HTTPMethod: "POST", + HTTPMethod: "PATCH", HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate", - SupportsSemanticPatch: false, + Path: "/api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}", + SupportsSemanticPatch: true, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get expiring targets for segment", - Long: "Get a list of a segment's context targets that are scheduled for removal.", - Use: "list-expiring-targets", + Short: "Update expiring user targets for segment", + Long: "\n\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](https://launchdarkly.com/docs/api/segments/patch-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nUpdate expiring user targets for a segment. Updating a user target expiration uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nIf the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating expiring user targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExpireUserTargetDate\n\nSchedules a date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The date when the user should expire from the segment targeting, in Unix milliseconds.\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds.\n- `version`: The segment version.\n\n#### removeExpireUserTargetDate\n\nRemoves the scheduled expiration for the user in the segment.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n\n\u003c/details\u003e\n", + Use: "update-expiring-user-targets", Params: []Param{ { Name: "project-key", @@ -8791,18 +9575,18 @@ func AddAllResourceCmds( Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, + HTTPMethod: "PATCH", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}", - SupportsSemanticPatch: false, + RequiresBody: true, + Path: "/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}", + SupportsSemanticPatch: true, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get expiring user targets for segment", - Long: "\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/ld-docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nGet a list of a segment's user targets that are scheduled for removal.\n", - Use: "list-expiring-user-targets", + Short: "Patch segment", + Long: "Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates).\n\n### Using semantic patches on a segment\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required) The key of the LaunchDarkly environment.\n* `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating segments.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment details and settings\u003c/strong\u003e\u003c/summary\u003e\n\n#### addTags\n\nAdds tags to the segment.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addTags\",\n \"values\": [\"tag1\", \"tag2\"]\n }]\n}\n```\n\n#### removeTags\n\nRemoves tags from the segment.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeTags\",\n \"values\": [\"tag1\", \"tag2\"]\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the segment.\n\n##### Parameters\n\n- `value`: Name of the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated segment name\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment individual targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExcludedTargets\n\nAdds context keys to the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addExcludedUsers\n\nAdds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addExcludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedTargets\n\nAdds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedUsers\n\nAdds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addIncludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedTargets\n\nRemoves context keys from the individual context targets excluded from the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedUsers\n\nRemoves user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedTargets\n\nRemoves context keys from the individual context targets included in the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedUsers\n\nRemoves user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment targeting rules\u003c/strong\u003e\u003c/summary\u003e\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `ruleId`: ID of a rule in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addClauses\",\n \"clauses\": [\n {\n \"attribute\": \"email\",\n \"negate\": false,\n \"op\": \"contains\",\n \"values\": [\"value1\"]\n }\n ],\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n }]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the segment. The rule may contain `clauses`.\n\n##### Parameters\n\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `description`: A description of the rule.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [\n {\n \"attribute\": \"email\",\n \"op\": \"contains\",\n \"negate\": false,\n \"values\": [\"@launchdarkly.com\"]\n }\n ],\n \"description\": \"Targeting rule for LaunchDarkly employees\",\n }]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addValuesToClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n \"values\": [\"beta_testers\"]\n }]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeClauses\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n }]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeRule\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeValuesFromClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n \"values\": [\"beta_testers\"]\n }]\n}\n```\n\n#### reorderRules\n\nRearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules in the segment.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all targeting rules in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n }]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the segment targeting rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateRuleDescription\",\n \"description\": \"New rule description\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n#### updateRuleRolloutAndContextKind\n\nFor a rule that includes a percentage of targets, updates the percentage and the context kind of the targets to include.\n\n##### Parameters\n\n- `ruleId`: The ID of a targeting rule in the segment that includes a percentage of targets.\n- `weight`: The weight, in thousandths of a percent (0-100000).\n- `contextKind`: The context kind.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"weight\": \"20000\",\n \"contextKind\": \"device\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eworking with Big Segments\u003c/strong\u003e\u003c/summary\u003e\n\nA \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\nThe following semantic patch instructions apply only to these [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments).\n\n#### addBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets excluded from the segment. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addBigSegmentExcludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addBigSegmentIncludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets included in the segment. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addBigSegmentIncludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### processBigSegmentImport\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Processes a segment import.\n\n##### Parameters\n\n- `importId`: The ID of the import. The import ID is returned in the `Location` header as part of the [Create big segment import](https://launchdarkly.com/docs/api/segments/create-big-segment-import) request.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"processBigSegmentImport\",\n \"importId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n\n#### removeBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets excluded from the segment.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeBigSegmentExcludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeBigSegmentIncludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets included in the segment.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeBigSegmentIncludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a segment\n\nIf you do not include the header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nFor example, to update the description for a segment with a JSON patch, use the following request body:\n\n```json\n{\n \"patch\": [\n {\n \"op\": \"replace\",\n \"path\": \"/description\",\n \"value\": \"new description\"\n }\n ]\n}\n```\n\nTo update fields in the segment that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. Use `/0` to add the new entry to the beginning of the array. Use `/-` to add the new entry to the end of the array.\n\nFor example, to add a rule to a segment, use the following request body:\n\n```json\n{\n \"patch\":[\n {\n \"op\": \"add\",\n \"path\": \"/rules/0\",\n \"value\": {\n \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }]\n }\n }\n ]\n}\n```\n\nTo add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.\n", + Use: "update", Params: []Param{ { Name: "project-key", @@ -8823,18 +9607,44 @@ func AddAllResourceCmds( Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, + HTTPMethod: "PATCH", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}", + RequiresBody: true, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}", + SupportsSemanticPatch: true, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create segment", + Long: "Create a new segment.", + Use: "create", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/segments/{projectKey}/{environmentKey}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get segment", - Long: "Get a single segment by key.\u003cbr/\u003e\u003cbr/\u003eSegments can be rule-based, list-based, or synced. Big segments include larger list-based segments and synced segments. Some fields in the response only apply to big segments.", - Use: "get", + 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.", + Use: "update-big-context-targets", Params: []Param{ { Name: "project-key", @@ -8855,18 +9665,18 @@ func AddAllResourceCmds( Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, + HTTPMethod: "POST", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}", + RequiresBody: true, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts", SupportsSemanticPatch: false, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get big segment membership for context", - Long: "Get the membership status (included/excluded) for a given context in this big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.", - Use: "get-membership-for-context", + Short: "Update user context targets on a big segment", + Long: "Update user context targets included or excluded in a big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.", + Use: "update-big-targets", Params: []Param{ { Name: "project-key", @@ -8886,10 +9696,54 @@ func AddAllResourceCmds( Description: "The segment key", Type: "string", }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_TagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List tags", + Long: "Get a list of tags.", + Use: "list", + Params: []Param{ { - Name: "context-key", - In: "path", - Description: "The context key", + Name: "kind", + In: "query", + Description: "Fetch tags associated with the specified resource type. Options are 'flag', 'project', 'environment', 'segment', 'metric', 'aiconfig', and 'view'. Returns all types by default.", + Type: "array", + }, + { + Name: "pre", + In: "query", + Description: "Return tags with the specified prefix", + Type: "string", + }, + { + Name: "archived", + In: "query", + Description: "Whether or not to return archived flags", + Type: "boolean", + }, + { + Name: "limit", + In: "query", + Description: "The number of tags to return. Maximum is 1000.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "The index of the first tag to return. Default is 0.", + Type: "integer", + }, + { + Name: "as-of", + In: "query", + Description: "The time to retrieve tags as of. Default is the current time.", Type: "string", }, }, @@ -8897,37 +9751,45 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts/{contextKey}", + Path: "/api/v2/tags", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get big segment membership for user", - Long: "\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/ld-docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nGet the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.\n", - Use: "get-membership-for-user", + NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete team", + Long: "Delete a team by key. To learn more, read [Deleting teams](https://launchdarkly.com/docs/home/account/delete-teams).", + Use: "delete", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", + Name: "team-key", In: "path", - Description: "The environment key", + Description: "The team key", Type: "string", }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/teams/{teamKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get team", + Long: "Fetch a team by key.\n\n### Expanding the teams response\nLaunchDarkly supports several fields for expanding the \"Get team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `roleAttributes` includes a list of the role attributes that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", + Use: "get", + Params: []Param{ { - Name: "segment-key", + Name: "team-key", In: "path", - Description: "The segment key", + Description: "The team key.", Type: "string", }, { - Name: "user-key", - In: "path", - Description: "The user key", + Name: "expand", + In: "query", + Description: "A comma-separated list of properties that can reveal additional information in the response.", Type: "string", }, }, @@ -8935,145 +9797,127 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}", + Path: "/api/v2/teams/{teamKey}", 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", - Use: "list", + NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get team maintainers", + Long: "Fetch the maintainers that have been assigned to the team. To learn more, read [Managing team maintainers](https://launchdarkly.com/docs/home/account/team-maintainers).", + Use: "list-maintainers", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", + Name: "team-key", In: "path", - Description: "The environment key", + Description: "The team key", Type: "string", }, { Name: "limit", In: "query", - Description: "The number of segments to return. Defaults to 20.", + Description: "The number of maintainers to return in the response. Defaults to 20.", Type: "integer", }, { Name: "offset", In: "query", - Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + 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: "sort", - In: "query", - Description: "Accepts sorting order and fields. Fields can be comma separated. Possible fields are 'creationDate', 'name', 'lastModified'. Example: 'sort=name' sort by names ascending or 'sort=-name,creationDate' sort by names descending and creationDate ascending.", - Type: "string", - }, - { - Name: "filter", - In: "query", - Description: "Accepts filter by 'excludedKeys', 'external', 'includedKeys', 'query', 'tags', 'unbounded'. To learn more about the filter syntax, read the 'Filtering segments' section above.", - Type: "string", - }, }, HTTPMethod: "GET", HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}", + Path: "/api/v2/teams/{teamKey}/maintainers", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update expiring targets for segment", - Long: "\nUpdate expiring context targets for a segment. Updating a context target expiration uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nIf the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring context targets.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating expiring context targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExpiringTarget\n\nSchedules a date and time when LaunchDarkly will remove a context from segment targeting. The segment must already have the context as an individual target.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n- `value`: The date when the context should expire from the segment targeting, in Unix milliseconds.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n \"value\": 1754092860000\n }]\n}\n```\n\n#### updateExpiringTarget\n\nUpdates the date and time when LaunchDarkly will remove a context from segment targeting.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n- `value`: The new date when the context should expire from the segment targeting, in Unix milliseconds.\n- `version`: (Optional) The version of the expiring target to update. If included, update will fail if version doesn't match current version of the expiring target.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n \"value\": 1754179260000\n }]\n}\n```\n\n#### removeExpiringTarget\n\nRemoves the scheduled expiration for the context in the segment.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n }]\n}\n```\n\n\u003c/details\u003e\n", - Use: "update-expiring-targets", + NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get team custom roles", + Long: "Fetch the custom roles that have been assigned to the team. To learn more, read [Managing team permissions](https://launchdarkly.com/docs/home/account/team-permissions).", + Use: "list-roles", Params: []Param{ { - Name: "project-key", + Name: "team-key", In: "path", - Description: "The project key", + Description: "The team key", Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", + Name: "limit", + In: "query", + Description: "The number of roles to return in the response. Defaults to 20.", + Type: "integer", }, { - Name: "segment-key", - In: "path", - Description: "The segment key", - Type: "string", + 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", }, }, - HTTPMethod: "PATCH", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}", - SupportsSemanticPatch: true, + RequiresBody: false, + Path: "/api/v2/teams/{teamKey}/roles", + SupportsSemanticPatch: false, }) - NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update expiring user targets for segment", - Long: "\n\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](https://launchdarkly.com/docs/ld-docs/api/segments/patch-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nUpdate expiring user targets for a segment. Updating a user target expiration uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nIf the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating expiring user targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExpireUserTargetDate\n\nSchedules a date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The date when the user should expire from the segment targeting, in Unix milliseconds.\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds.\n- `version`: The segment version.\n\n#### removeExpireUserTargetDate\n\nRemoves the scheduled expiration for the user in the segment.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n\n\u003c/details\u003e\n", - Use: "update-expiring-user-targets", + NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List teams", + Long: "Return a list of teams.\n\nBy default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page.\n\n### Filtering teams\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the teams' names and keys. It is not case-sensitive.\n - A request with `query:abc` returns teams with the string `abc` in their name or key.\n- `nomembers` is a boolean that filters the list of teams who have 0 members\n - A request with `nomembers:true` returns teams that have 0 members\n - A request with `nomembers:false` returns teams that have 1 or more members\n\n### Expanding the teams response\nLaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `roleAttributes` includes a list of the role attributes that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response.\n", + Use: "list", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", + Name: "limit", + In: "query", + Description: "The number of teams to return in the response. Defaults to 20.", + Type: "integer", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next 'limit' items.", + Type: "integer", + }, + { + Name: "filter", + In: "query", + Description: "A comma-separated list of filters. Each filter is constructed as 'field:value'.", Type: "string", }, { - Name: "segment-key", - In: "path", - Description: "The segment key", + Name: "expand", + In: "query", + Description: "A comma-separated list of properties that can reveal additional information in the response.", Type: "string", }, }, - HTTPMethod: "PATCH", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}", - SupportsSemanticPatch: true, + RequiresBody: false, + Path: "/api/v2/teams", + SupportsSemanticPatch: false, }) - NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Patch segment", - Long: "Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates).\n\n### Using semantic patches on a segment\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required) The key of the LaunchDarkly environment.\n* `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating segments.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment details and settings\u003c/strong\u003e\u003c/summary\u003e\n\n#### addTags\n\nAdds tags to the segment.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addTags\",\n \"values\": [\"tag1\", \"tag2\"]\n }]\n}\n```\n\n#### removeTags\n\nRemoves tags from the segment.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeTags\",\n \"values\": [\"tag1\", \"tag2\"]\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the segment.\n\n##### Parameters\n\n- `value`: Name of the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated segment name\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment individual targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExcludedTargets\n\nAdds context keys to the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addExcludedUsers\n\nAdds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addExcludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedTargets\n\nAdds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedUsers\n\nAdds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addIncludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedTargets\n\nRemoves context keys from the individual context targets excluded from the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedUsers\n\nRemoves user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedTargets\n\nRemoves context keys from the individual context targets included in the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedUsers\n\nRemoves user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment targeting rules\u003c/strong\u003e\u003c/summary\u003e\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `ruleId`: ID of a rule in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addClauses\",\n \"clauses\": [\n {\n \"attribute\": \"email\",\n \"negate\": false,\n \"op\": \"contains\",\n \"values\": [\"value1\"]\n }\n ],\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n }]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the segment. The rule may contain `clauses`.\n\n##### Parameters\n\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `description`: A description of the rule.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [\n {\n \"attribute\": \"email\",\n \"op\": \"contains\",\n \"negate\": false,\n \"values\": [\"@launchdarkly.com\"]\n }\n ],\n \"description\": \"Targeting rule for LaunchDarkly employees\",\n }]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addValuesToClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n \"values\": [\"beta_testers\"]\n }]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeClauses\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n }]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeRule\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeValuesFromClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n \"values\": [\"beta_testers\"]\n }]\n}\n```\n\n#### reorderRules\n\nRearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules in the segment.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all targeting rules in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n }]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the segment targeting rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateRuleDescription\",\n \"description\": \"New rule description\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n#### updateRuleRolloutAndContextKind\n\nFor a rule that includes a percentage of targets, updates the percentage and the context kind of the targets to include.\n\n##### Parameters\n\n- `ruleId`: The ID of a targeting rule in the segment that includes a percentage of targets.\n- `weight`: The weight, in thousandths of a percent (0-100000).\n- `contextKind`: The context kind.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"weight\": \"20000\",\n \"contextKind\": \"device\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eworking with Big Segments\u003c/strong\u003e\u003c/summary\u003e\n\nA \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\nThe following semantic patch instructions apply only to these [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments).\n\n#### addBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets excluded from the segment. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addBigSegmentExcludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addBigSegmentIncludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets included in the segment. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addBigSegmentIncludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### processBigSegmentImport\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Processes a segment import.\n\n##### Parameters\n\n- `importId`: The ID of the import. The import ID is returned in the `Location` header as part of the [Create big segment import](https://launchdarkly.com/docs/api/segments/create-big-segment-import) request.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"processBigSegmentImport\",\n \"importId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n\n#### removeBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets excluded from the segment.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeBigSegmentExcludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeBigSegmentIncludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets included in the segment.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeBigSegmentIncludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a segment\n\nIf you do not include the header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nFor example, to update the description for a segment with a JSON patch, use the following request body:\n\n```json\n{\n \"patch\": [\n {\n \"op\": \"replace\",\n \"path\": \"/description\",\n \"value\": \"new description\"\n }\n ]\n}\n```\n\nTo update fields in the segment that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. Use `/0` to add the new entry to the beginning of the array. Use `/-` to add the new entry to the end of the array.\n\nFor example, to add a rule to a segment, use the following request body:\n\n```json\n{\n \"patch\":[\n {\n \"op\": \"add\",\n \"path\": \"/rules/0\",\n \"value\": {\n \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }]\n }\n }\n ]\n}\n```\n\nTo add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.\n", + NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update team", + Long: "Perform a partial update to a team. Updating a team uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams. Several of the instructions require one or more member IDs as parameters. The member ID is returned as part of the [List account members](https://launchdarkly.com/docs/api/account-members/get-members) response. It is the `_id` field of each element in the `items` array.\n\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating teams\u003c/strong\u003e\u003c/summary\u003e\n\n#### addCustomRoles\n\nAdds custom roles to the team. Team members will have these custom roles granted to them.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### addMembers\n\nAdds members to the team.\n\n##### Parameters\n\n- `values`: List of member IDs to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addPermissionGrants\n\nAdds permission grants to members for the team. For example, a permission grant could allow a member to act as a team maintainer. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The members do not have to be team members to have a permission grant for the team.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addPermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addRoleAttribute\n\nAdds a role attribute to a team. Team members will have these role attribute values scoped for all custom roles granted to them.\n\n##### Parameters\n\n- `key`: The role attribute key to add.\n- `values`: List of role attribute values for that key.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"addRoleAttribute\",\n \"key\": \"testAttribute\",\n \"values\": [\"someNewValue\", \"someOtherNewValue\"]\n }\n ]\n}\n```\n\n#### removeCustomRoles\n\nRemoves custom roles from the team. The app will no longer grant these custom roles to the team members.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### removeMembers\n\nRemoves members from the team.\n\n##### Parameters\n\n- `values`: List of member IDs to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removePermissionGrants\n\nRemoves permission grants from members for the team. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The `actionSet` and `actions` must match an existing permission grant.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removePermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removeRoleAttribute\n\nRemoves a role attribute from the team.\n\n##### Parameters\n\n- `key`: The role attribute key to remove.\n\nHere's an example:\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"removeRoleAttribute\",\n \"key\": \"testAttribute\"\n }\n ]\n}\n```\n\n#### replaceMembers\n\nReplaces the existing members of the team with the new members.\n\n##### Parameters\n\n- `values`: List of member IDs of the new members.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### replaceRoleAttributes\n\nReplaces the existing role attributes for the team with new role attributes.\n\n##### Parameters\n\n- `value`: A map of role attribute keys to lists of role attribute values\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceRoleAttributes\",\n \"value\": {\n \"testAttribute\": [ \"someNewValue\", \"someOtherNewValue\" ],\n \"projectRoleAttribute\": [ \"project1\", \"project2\"]\n }\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the team.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated team description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the team.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated team name\"\n }]\n}\n```\n\n#### updateRoleAttribute\n\nUpdates a role attribute on the team. Any existing values for the given key will be replaced with the new values. Team members will have these role attribute values scoped for all custom roles granted to them.\n\n##### Parameters\n\n- `key`: The role attribute key to update.\n- `values`: List of role attribute values for that key.\n\nHere's an example:\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"updateRoleAttribute\",\n \"key\": \"testAttribute\",\n \"values\": [\"someNewValue\", \"someOtherNewValue\"]\n }\n ]\n}\n```\n\n\u003c/details\u003e\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", Use: "update", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", + Name: "team-key", In: "path", - Description: "The environment key", + Description: "The team key", Type: "string", }, { - Name: "segment-key", - In: "path", - Description: "The segment key", + Name: "expand", + In: "query", + Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", Type: "string", }, }, @@ -9081,25 +9925,19 @@ func AddAllResourceCmds( HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}", + Path: "/api/v2/teams/{teamKey}", SupportsSemanticPatch: true, }) - NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create segment", - Long: "Create a new segment.", + NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create team", + Long: "Create a team. To learn more, read [Creating a team](https://launchdarkly.com/docs/home/account/create-teams).\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Create team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", Use: "create", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", + Name: "expand", + In: "query", + Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", Type: "string", }, }, @@ -9107,349 +9945,437 @@ func AddAllResourceCmds( HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/segments/{projectKey}/{environmentKey}", + Path: "/api/v2/teams", SupportsSemanticPatch: false, }) - 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.", - Use: "update-big-context-targets", + NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Add multiple members to team", + Long: "Add multiple members to an existing team by uploading a CSV file of member email addresses. Your CSV file must include email addresses in the first column. You can include data in additional columns, but LaunchDarkly ignores all data outside the first column. Headers are optional. To learn more, read [Manage team members](https://launchdarkly.com/docs/home/account/manage-teams#manage-team-members).\n\n**Members are only added on a `201` response.** A `207` indicates the CSV file contains a combination of valid and invalid entries. A `207` results in no members being added to the team.\n\nOn a `207` response, if an entry contains bad input, the `message` field contains the row number as well as the reason for the error. The `message` field is omitted if the entry is valid.\n\nExample `207` response:\n```json\n{\n \"items\": [\n {\n \"status\": \"success\",\n \"value\": \"new-team-member@acme.com\"\n },\n {\n \"message\": \"Line 2: empty row\",\n \"status\": \"error\",\n \"value\": \"\"\n },\n {\n \"message\": \"Line 3: email already exists in the specified team\",\n \"status\": \"error\",\n \"value\": \"existing-team-member@acme.com\"\n },\n {\n \"message\": \"Line 4: invalid email formatting\",\n \"status\": \"error\",\n \"value\": \"invalid email format\"\n }\n ]\n}\n```\n\nMessage | Resolution\n--- | ---\nEmpty row | This line is blank. Add an email address and try again.\nDuplicate entry | This email address appears in the file twice. Remove the email from the file and try again.\nEmail already exists in the specified team | This member is already on your team. Remove the email from the file and try again.\nInvalid formatting | This email address is not formatted correctly. Fix the formatting and try again.\nEmail does not belong to a LaunchDarkly member | The email address doesn't belong to a LaunchDarkly account member. Invite them to LaunchDarkly, then re-add them to the team.\n\nOn a `400` response, the `message` field may contain errors specific to this endpoint.\n\nExample `400` response:\n```json\n{\n \"code\": \"invalid_request\",\n \"message\": \"Unable to process file\"\n}\n```\n\nMessage | Resolution\n--- | ---\nUnable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again.\nFile exceeds 25mb | Break up your file into multiple files of less than 25mbs each.\nAll emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again.\nAll emails belong to existing team members | All listed members are already on this team. Populate the file with member emails that do not belong to the team and try again.\nFile is empty | The CSV file does not contain any email addresses. Populate the file and try again.\nNo emails belong to members of your LaunchDarkly organization | None of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team.\n", + Use: "create-members", Params: []Param{ { - Name: "project-key", + Name: "team-key", In: "path", - Description: "The project key", + Description: "The team key", Type: "string", }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/teams/{teamKey}/members", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_TeamsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update teams", + Long: "Perform a partial update to multiple teams. Updating teams uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating teams\u003c/strong\u003e\u003c/summary\u003e\n\n#### addMembersToTeams\n\nAdd the members to teams.\n\n##### Parameters\n\n- `memberIDs`: List of member IDs to add.\n- `teamKeys`: List of teams to update.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembersToTeams\",\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\"\n ],\n \"teamKeys\": [\n \"example-team-1\",\n \"example-team-2\"\n ]\n }]\n}\n```\n\n#### addAllMembersToTeams\n\nAdd all members to the team. Members that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `teamKeys`: List of teams to update.\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"never\": true}` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addAllMembersToTeams\",\n \"teamKeys\": [\n \"example-team-1\",\n \"example-team-2\"\n ],\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n\u003c/details\u003e\n", + Use: "update-multiple", + Params: []Param{}, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/teams", + SupportsSemanticPatch: true, + }) + + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create view", + Long: "Create a new view in the given project.", + Use: "create", + Params: []Param{ { - Name: "environment-key", - In: "path", - Description: "The environment key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, { - Name: "segment-key", + Name: "project-key", In: "path", - Description: "The segment key", + Description: "", Type: "string", }, }, HTTPMethod: "POST", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts", + Path: "/api/v2/projects/{projectKey}/views", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update user context targets on a big segment", - Long: "Update user context targets included or excluded in a big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.", - Use: "update-big-targets", + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete view", + Long: "Delete a specific view by its key.", + Use: "delete", 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: "environment-key", + Name: "project-key", In: "path", - Description: "The environment key", + Description: "", Type: "string", }, { - Name: "segment-key", + Name: "view-key", In: "path", - Description: "The segment key", + Description: "", Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users", + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/views/{viewKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_TagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List tags", - Long: "Get a list of tags.", - Use: "list", + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get linked resources", + Long: "Get a list of all linked resources for a given view.", + Use: "list-linked-resources", Params: []Param{ { - Name: "kind", - In: "query", - Description: "Fetch tags associated with the specified resource type. Options are 'flag', 'project', 'environment', 'segment', 'metric', 'aiconfig', and 'view'. Returns all types by default.", - Type: "array", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", }, { - Name: "pre", - In: "query", - Description: "Return tags with the specified prefix", + Name: "project-key", + In: "path", + Description: "", Type: "string", }, { - Name: "archived", - In: "query", - Description: "Whether or not to return archived flags", - Type: "boolean", + Name: "view-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "resource-type", + In: "path", + Description: "", + Type: "string", }, { Name: "limit", In: "query", - Description: "The number of tags to return. Maximum is 1000.", + Description: "The number of views to return.", Type: "integer", }, { Name: "offset", In: "query", - Description: "The index of the first tag to return. Default is 0.", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", Type: "integer", }, { - Name: "as-of", + Name: "sort", In: "query", - Description: "The time to retrieve tags as of. Default is the current time.", + Description: "Field to sort by. Default field is 'linkedAt', default order is ascending.", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/tags", + Path: "/api/v2/projects/{projectKey}/views/{viewKey}/linked/{resourceType}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete team", - Long: "Delete a team by key. To learn more, read [Deleting teams](https://launchdarkly.com/docs/home/account/delete-teams).", - Use: "delete", + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get linked views for a given resource", + Long: "Get a list of all linked views for a resource. Flags, AI configs and metrics are identified by key. Segments are identified by segment ID.", + Use: "list-linked", Params: []Param{ { - Name: "team-key", - In: "path", - Description: "The team 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/teams/{teamKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get team", - Long: "Fetch a team by key.\n\n### Expanding the teams response\nLaunchDarkly supports several fields for expanding the \"Get team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `roleAttributes` includes a list of the role attributes that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", - Use: "get", - Params: []Param{ { - Name: "team-key", + Name: "project-key", In: "path", - Description: "The team key.", + Description: "", Type: "string", }, { - Name: "expand", - In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response.", + Name: "resource-type", + In: "path", + Description: "", Type: "string", }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/teams/{teamKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get team maintainers", - Long: "Fetch the maintainers that have been assigned to the team. To learn more, read [Managing team maintainers](https://launchdarkly.com/docs/home/account/team-maintainers).", - Use: "list-maintainers", - Params: []Param{ { - Name: "team-key", + Name: "resource-key", In: "path", - Description: "The team key", + Description: "", + Type: "string", + }, + { + Name: "environment-id", + In: "query", + Description: "Environment ID. Required when resourceType is 'segments'", Type: "string", }, { Name: "limit", In: "query", - Description: "The number of maintainers to return in the response. Defaults to 20.", + Description: "The number of views to return.", 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: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", Type: "integer", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/teams/{teamKey}/maintainers", + Path: "/api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get team custom roles", - Long: "Fetch the custom roles that have been assigned to the team. To learn more, read [Managing team permissions](https://launchdarkly.com/docs/home/account/team-permissions).", - Use: "list-roles", + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get view", + Long: "Retrieve a specific view by its key.", + Use: "get", Params: []Param{ { - Name: "team-key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", In: "path", - Description: "The team key", + Description: "", + Type: "string", + }, + { + Name: "view-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "sort", + In: "query", + Description: "A sort to apply to the list of views.", Type: "string", }, { Name: "limit", In: "query", - Description: "The number of roles to return in the response. Defaults to 20.", + Description: "The number of views to return.", 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: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", Type: "integer", }, + { + Name: "filter", + In: "query", + Description: "A filter to apply to the list of views.", + Type: "string", + }, + { + Name: "expand", + In: "query", + Description: "A comma-separated list of fields to expand.", + Type: "array", + }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/teams/{teamKey}/roles", + Path: "/api/v2/projects/{projectKey}/views/{viewKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List teams", - Long: "Return a list of teams.\n\nBy default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page.\n\n### Filtering teams\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the teams' names and keys. It is not case-sensitive.\n - A request with `query:abc` returns teams with the string `abc` in their name or key.\n- `nomembers` is a boolean that filters the list of teams who have 0 members\n - A request with `nomembers:true` returns teams that have 0 members\n - A request with `nomembers:false` returns teams that have 1 or more members\n\n### Expanding the teams response\nLaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `roleAttributes` includes a list of the role attributes that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response.\n", + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List views", + Long: "Get a list of all views in the given project.", 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: "sort", + In: "query", + Description: "A sort to apply to the list of views.", + Type: "string", + }, { Name: "limit", In: "query", - Description: "The number of teams to return in the response. Defaults to 20.", + Description: "The number of views to return.", Type: "integer", }, { Name: "offset", In: "query", - Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next 'limit' items.", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", Type: "integer", }, { Name: "filter", In: "query", - Description: "A comma-separated list of filters. Each filter is constructed as 'field:value'.", + Description: "A filter to apply to the list of views.", Type: "string", }, { Name: "expand", In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response.", - Type: "string", + Description: "A comma-separated list of fields to expand.", + Type: "array", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/teams", + Path: "/api/v2/projects/{projectKey}/views", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update team", - Long: "Perform a partial update to a team. Updating a team uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams. Several of the instructions require one or more member IDs as parameters. The member ID is returned as part of the [List account members](https://launchdarkly.com/docs/ld-docs/api/account-members/get-members) response. It is the `_id` field of each element in the `items` array.\n\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating teams\u003c/strong\u003e\u003c/summary\u003e\n\n#### addCustomRoles\n\nAdds custom roles to the team. Team members will have these custom roles granted to them.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### addMembers\n\nAdds members to the team.\n\n##### Parameters\n\n- `values`: List of member IDs to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addPermissionGrants\n\nAdds permission grants to members for the team. For example, a permission grant could allow a member to act as a team maintainer. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The members do not have to be team members to have a permission grant for the team.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addPermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addRoleAttribute\n\nAdds a role attribute to a team. Team members will have these role attribute values scoped for all custom roles granted to them.\n\n##### Parameters\n\n- `key`: The role attribute key to add.\n- `values`: List of role attribute values for that key.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"addRoleAttribute\",\n \"key\": \"testAttribute\",\n \"values\": [\"someNewValue\", \"someOtherNewValue\"]\n }\n ]\n}\n```\n\n#### removeCustomRoles\n\nRemoves custom roles from the team. The app will no longer grant these custom roles to the team members.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### removeMembers\n\nRemoves members from the team.\n\n##### Parameters\n\n- `values`: List of member IDs to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removePermissionGrants\n\nRemoves permission grants from members for the team. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The `actionSet` and `actions` must match an existing permission grant.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removePermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removeRoleAttribute\n\nRemoves a role attribute from the team.\n\n##### Parameters\n\n- `key`: The role attribute key to remove.\n\nHere's an example:\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"removeRoleAttribute\",\n \"key\": \"testAttribute\"\n }\n ]\n}\n```\n\n#### replaceMembers\n\nReplaces the existing members of the team with the new members.\n\n##### Parameters\n\n- `values`: List of member IDs of the new members.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### replaceRoleAttributes\n\nReplaces the existing role attributes for the team with new role attributes.\n\n##### Parameters\n\n- `values`: A map of role attribute keys to lists of role attribute values\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceRoleAttributes\",\n \"values\": {\n \"testAttribute\": [ \"someNewValue\", \"someOtherNewValue\" ],\n \"projectRoleAttribute\": [ \"project1\", \"project2\"]\n }\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the team.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated team description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the team.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated team name\"\n }]\n}\n```\n\n#### updateRoleAttribute\n\nUpdates a role attribute on the team. Any existing values for the given key will be replaced with the new values. Team members will have these role attribute values scoped for all custom roles granted to them.\n\n##### Parameters\n\n- `key`: The role attribute key to update.\n- `values`: List of role attribute values for that key.\n\nHere's an example:\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"updateRoleAttribute\",\n \"key\": \"testAttribute\",\n \"values\": [\"someNewValue\", \"someOtherNewValue\"]\n }\n ]\n}\n```\n\n\u003c/details\u003e\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", - Use: "update", + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Link resource", + Long: "Link one or multiple resources to a view:\n- Link flags using flag keys\n- Link AI configs using AI config keys\n- Link metrics using metric keys\n- Link segments using segment IDs\n", + Use: "link-resource", Params: []Param{ { - Name: "team-key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", In: "path", - Description: "The team key", + Description: "", Type: "string", }, { - Name: "expand", - In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", + Name: "view-key", + In: "path", + Description: "", Type: "string", }, - }, - HTTPMethod: "PATCH", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/teams/{teamKey}", - SupportsSemanticPatch: true, - }) - - NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create team", - Long: "Create a team. To learn more, read [Creating a team](https://launchdarkly.com/docs/home/account/create-teams).\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Create team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", - Use: "create", - Params: []Param{ { - Name: "expand", - In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", + Name: "resource-type", + In: "path", + Description: "", Type: "string", }, }, HTTPMethod: "POST", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/teams", + Path: "/api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Add multiple members to team", - Long: "Add multiple members to an existing team by uploading a CSV file of member email addresses. Your CSV file must include email addresses in the first column. You can include data in additional columns, but LaunchDarkly ignores all data outside the first column. Headers are optional. To learn more, read [Manage team members](https://launchdarkly.com/docs/home/account/manage-teams#manage-team-members).\n\n**Members are only added on a `201` response.** A `207` indicates the CSV file contains a combination of valid and invalid entries. A `207` results in no members being added to the team.\n\nOn a `207` response, if an entry contains bad input, the `message` field contains the row number as well as the reason for the error. The `message` field is omitted if the entry is valid.\n\nExample `207` response:\n```json\n{\n \"items\": [\n {\n \"status\": \"success\",\n \"value\": \"new-team-member@acme.com\"\n },\n {\n \"message\": \"Line 2: empty row\",\n \"status\": \"error\",\n \"value\": \"\"\n },\n {\n \"message\": \"Line 3: email already exists in the specified team\",\n \"status\": \"error\",\n \"value\": \"existing-team-member@acme.com\"\n },\n {\n \"message\": \"Line 4: invalid email formatting\",\n \"status\": \"error\",\n \"value\": \"invalid email format\"\n }\n ]\n}\n```\n\nMessage | Resolution\n--- | ---\nEmpty row | This line is blank. Add an email address and try again.\nDuplicate entry | This email address appears in the file twice. Remove the email from the file and try again.\nEmail already exists in the specified team | This member is already on your team. Remove the email from the file and try again.\nInvalid formatting | This email address is not formatted correctly. Fix the formatting and try again.\nEmail does not belong to a LaunchDarkly member | The email address doesn't belong to a LaunchDarkly account member. Invite them to LaunchDarkly, then re-add them to the team.\n\nOn a `400` response, the `message` field may contain errors specific to this endpoint.\n\nExample `400` response:\n```json\n{\n \"code\": \"invalid_request\",\n \"message\": \"Unable to process file\"\n}\n```\n\nMessage | Resolution\n--- | ---\nUnable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again.\nFile exceeds 25mb | Break up your file into multiple files of less than 25mbs each.\nAll emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again.\nAll emails belong to existing team members | All listed members are already on this team. Populate the file with member emails that do not belong to the team and try again.\nFile is empty | The CSV file does not contain any email addresses. Populate the file and try again.\nNo emails belong to members of your LaunchDarkly organization | None of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team.\n", - Use: "create-members", + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Unlink resource", + Long: "Unlink one or multiple resources from a view:\n- Unlink flags using flag keys\n- Unlink segments using segment IDs\n- Unlink AI configs using AI config keys\n- Unlink metrics using metric keys\n", + Use: "unlink-resource", Params: []Param{ { - Name: "team-key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", In: "path", - Description: "The team key", + Description: "", + Type: "string", + }, + { + Name: "view-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "resource-type", + In: "path", + Description: "", Type: "string", }, }, - HTTPMethod: "POST", + HTTPMethod: "DELETE", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/teams/{teamKey}/members", + Path: "/api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_TeamsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update teams", - Long: "Perform a partial update to multiple teams. Updating teams uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating teams\u003c/strong\u003e\u003c/summary\u003e\n\n#### addMembersToTeams\n\nAdd the members to teams.\n\n##### Parameters\n\n- `memberIDs`: List of member IDs to add.\n- `teamKeys`: List of teams to update.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembersToTeams\",\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\"\n ],\n \"teamKeys\": [\n \"example-team-1\",\n \"example-team-2\"\n ]\n }]\n}\n```\n\n#### addAllMembersToTeams\n\nAdd all members to the team. Members that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `teamKeys`: List of teams to update.\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"never\": true}` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addAllMembersToTeams\",\n \"teamKeys\": [\n \"example-team-1\",\n \"example-team-2\"\n ],\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n\u003c/details\u003e\n", - Use: "update-multiple", - Params: []Param{}, + NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update view", + Long: "Edit an existing view.\n\nThe request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.\n\nHere's an example:\n ```\n {\n \"description\": \"Example updated description\",\n \"tags\": [\"new-tag\"]\n }\n ```\n", + Use: "update", + Params: []Param{ + { + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "view-key", + In: "path", + Description: "", + Type: "string", + }, + }, HTTPMethod: "PATCH", HasBody: true, IsBeta: true, RequiresBody: true, - Path: "/api/v2/teams", - SupportsSemanticPatch: true, + Path: "/api/v2/projects/{projectKey}/views/{viewKey}", + SupportsSemanticPatch: false, }) NewOperationCmd(gen_WebhooksResourceCmd, client, markdownRenderer, OperationData{ @@ -9540,7 +10466,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_WorkflowTemplatesResourceCmd, client, markdownRenderer, OperationData{ Short: "Create workflow template", - Long: "Create a template for a feature flag workflow", + Long: "\u003e ### Workflows are in maintenance mode\n\u003e\n\u003e The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.\n\nCreate a template for a feature flag workflow.\n", Use: "create", Params: []Param{}, HTTPMethod: "POST", @@ -9731,7 +10657,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_WorkflowsResourceCmd, client, markdownRenderer, OperationData{ Short: "Create workflow", - Long: "Create a workflow for a feature flag. You can create a workflow directly, or you can apply a template to create a new workflow.\n\n### Creating a workflow\n\nYou can use the create workflow endpoint to create a workflow directly by adding a `stages` array to the request body.\n\nFor each stage, define the `name`, `conditions` when the stage should be executed, and `action` that describes the stage.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand example\u003c/summary\u003e\n\n_Example request body_\n```json\n{\n \"name\": \"Progressive rollout starting in two days\",\n \"description\": \"Turn flag targeting on and increase feature rollout in 10% increments each day\",\n \"stages\": [\n {\n \"name\": \"10% rollout on day 1\",\n \"conditions\": [\n {\n \"kind\": \"schedule\",\n \"scheduleKind\": \"relative\", // or \"absolute\"\n // If \"scheduleKind\" is \"absolute\", set \"executionDate\";\n // \"waitDuration\" and \"waitDurationUnit\" will be ignored\n \"waitDuration\": 2,\n \"waitDurationUnit\": \"calendarDay\"\n },\n {\n \"kind\": \"ld-approval\",\n \"notifyMemberIds\": [ \"507f1f77bcf86cd799439011\" ],\n \"notifyTeamKeys\": [ \"team-key-123abc\" ]\n }\n ],\n \"action\": {\n \"instructions\": [\n {\n \"kind\": \"turnFlagOn\"\n },\n {\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"rolloutWeights\": {\n \"452f5fb5-7320-4ba3-81a1-8f4324f79d49\": 90000,\n \"fc15f6a4-05d3-4aa4-a997-446be461345d\": 10000\n }\n }\n ]\n }\n }\n ]\n}\n```\n\u003c/details\u003e\n\n### Creating a workflow by applying a workflow template\n\nYou can also create a workflow by applying a workflow template. If you pass a valid workflow template key as the `templateKey` query parameter with the request, the API will attempt to create a new workflow with the stages defined in the workflow template with the corresponding key.\n\n#### Applicability of stages\nTemplates are created in the context of a particular flag in a particular environment in a particular project. However, because workflows created from a template can be applied to any project, environment, and flag, some steps of the workflow may need to be updated in order to be applicable for the target resource.\n\nYou can pass a `dryRun` query parameter to tell the API to return a report of which steps of the workflow template are applicable in the target project/environment/flag, and which will need to be updated. When the `dryRun` query parameter is present the response body includes a `meta` property that holds a list of parameters that could potentially be inapplicable for the target resource. Each of these parameters will include a `valid` field. You will need to update any invalid parameters in order to create the new workflow. You can do this using the `parameters` property, which overrides the workflow template parameters.\n\n#### Overriding template parameters\nYou can use the `parameters` property in the request body to tell the API to override the specified workflow template parameters with new values that are specific to your target project/environment/flag.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand example\u003c/summary\u003e\n\n_Example request body_\n```json\n{\n\t\"name\": \"workflow created from my-template\",\n\t\"description\": \"description of my workflow\",\n\t\"parameters\": [\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3b\",\n\t\t\t\"path\": \"/clauses/0/values\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": [\"updated-segment\"]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3d\",\n\t\t\t\"path\": \"/variationId\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": \"abcd1234-abcd-1234-abcd-1234abcd12\"\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\u003c/details\u003e\n\nIf there are any steps in the template that are not applicable to the target resource, the workflow will not be created, and the `meta` property will be included in the response body detailing which parameters need to be updated.\n", + Long: "\u003e ### Workflows are in maintenance mode\n\u003e\n\u003e The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.\n\nCreate a workflow for a feature flag. You can create a workflow directly, or you can apply a template to create a new workflow.\n\n### Creating a workflow\n\nYou can use the create workflow endpoint to create a workflow directly by adding a `stages` array to the request body.\n\nFor each stage, define the `name`, `conditions` when the stage should be executed, and `action` that describes the stage. For approval stages, only standard LaunchDarkly approvals are permitted. Workflows of `kind` `integration-approval` cannot be used for custom workflows. \n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand example\u003c/summary\u003e\n\n_Example request body_\n```json\n{\n \"name\": \"Progressive rollout starting in two days\",\n \"description\": \"Turn flag targeting on and increase feature rollout in 10% increments each day\",\n \"stages\": [\n {\n \"name\": \"10% rollout on day 1\",\n \"conditions\": [\n {\n \"kind\": \"schedule\",\n \"scheduleKind\": \"relative\", // or \"absolute\"\n // If \"scheduleKind\" is \"absolute\", set \"executionDate\";\n // \"waitDuration\" and \"waitDurationUnit\" will be ignored\n \"waitDuration\": 2,\n \"waitDurationUnit\": \"calendarDay\"\n },\n {\n \"kind\": \"ld-approval\",\n \"notifyMemberIds\": [ \"507f1f77bcf86cd799439011\" ],\n \"notifyTeamKeys\": [ \"team-key-123abc\" ]\n }\n ],\n \"action\": {\n \"instructions\": [\n {\n \"kind\": \"turnFlagOn\"\n },\n {\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"rolloutWeights\": {\n \"452f5fb5-7320-4ba3-81a1-8f4324f79d49\": 90000,\n \"fc15f6a4-05d3-4aa4-a997-446be461345d\": 10000\n }\n }\n ]\n }\n }\n ]\n}\n```\n\u003c/details\u003e\n\n### Creating a workflow by applying a workflow template\n\nYou can also create a workflow by applying a workflow template. If you pass a valid workflow template key as the `templateKey` query parameter with the request, the API will attempt to create a new workflow with the stages defined in the workflow template with the corresponding key.\n\n#### Applicability of stages\nTemplates are created in the context of a particular flag in a particular environment in a particular project. However, because workflows created from a template can be applied to any project, environment, and flag, some steps of the workflow may need to be updated in order to be applicable for the target resource.\n\nYou can pass a `dryRun` query parameter to tell the API to return a report of which steps of the workflow template are applicable in the target project/environment/flag, and which will need to be updated. When the `dryRun` query parameter is present the response body includes a `meta` property that holds a list of parameters that could potentially be inapplicable for the target resource. Each of these parameters will include a `valid` field. You will need to update any invalid parameters in order to create the new workflow. You can do this using the `parameters` property, which overrides the workflow template parameters.\n\n#### Overriding template parameters\nYou can use the `parameters` property in the request body to tell the API to override the specified workflow template parameters with new values that are specific to your target project/environment/flag.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand example\u003c/summary\u003e\n\n_Example request body_\n```json\n{\n\t\"name\": \"workflow created from my-template\",\n\t\"description\": \"description of my workflow\",\n\t\"parameters\": [\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3b\",\n\t\t\t\"path\": \"/clauses/0/values\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": [\"updated-segment\"]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3d\",\n\t\t\t\"path\": \"/variationId\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": \"abcd1234-abcd-1234-abcd-1234abcd12\"\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\u003c/details\u003e\n\nIf there are any steps in the template that are not applicable to the target resource, the workflow will not be created, and the `meta` property will be included in the response body detailing which parameters need to be updated.\n", Use: "create", Params: []Param{ { diff --git a/ld-openapi.json b/ld-openapi.json index bdee83757..1a6f3a9e2 100644 --- a/ld-openapi.json +++ b/ld-openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "LaunchDarkly REST API", - "description": "This documentation describes LaunchDarkly's REST API.\n\nTo access the complete OpenAPI spec directly, use [Get OpenAPI spec](https://launchdarkly.com/docs/api/other/get-openapi-spec).\n\n## Authentication\n\nLaunchDarkly's REST API uses the HTTPS protocol with a minimum TLS version of 1.2.\n\nAll REST API resources are authenticated with either [personal or service access tokens](https://launchdarkly.com/docs/home/account/api), or session cookies. Other authentication mechanisms are not supported. You can manage personal access tokens on your [**Authorization**](https://app.launchdarkly.com/settings/authorization) page in the LaunchDarkly UI.\n\nLaunchDarkly also has SDK keys, mobile keys, and client-side IDs that are used by our server-side SDKs, mobile SDKs, and JavaScript-based SDKs, respectively. **These keys cannot be used to access our REST API**. These keys are environment-specific, and can only perform read-only operations such as fetching feature flag settings.\n\n| Auth mechanism | Allowed resources | Use cases |\n| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- |\n| [Personal or service access tokens](https://launchdarkly.com/docs/home/account/api) | Can be customized on a per-token basis | Building scripts, custom integrations, data export. |\n| SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs |\n| Mobile keys | Can only access read-only resources specific to mobile SDKs, and only for flags marked available to mobile keys. Restricted to a single environment. | Mobile SDKs |\n| Client-side ID | Can only access read-only resources specific to JavaScript-based client-side SDKs, and only for flags marked available to client-side. Restricted to a single environment. | Client-side JavaScript |\n\n> #### Keep your access tokens and SDK keys private\n>\n> Access tokens should _never_ be exposed in untrusted contexts. Never put an access token in client-side JavaScript, or embed it in a mobile application. LaunchDarkly has special mobile keys that you can embed in mobile apps. If you accidentally expose an access token or SDK key, you can reset it from your [**Authorization**](https://app.launchdarkly.com/settings/authorization) page.\n>\n> The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript.\n\n### Authentication using request header\n\nThe preferred way to authenticate with the API is by adding an `Authorization` header containing your access token to your requests. The value of the `Authorization` header must be your access token.\n\nManage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page.\n\n### Authentication using session cookie\n\nFor testing purposes, you can make API calls directly from your web browser. If you are logged in to the LaunchDarkly application, the API will use your existing session to authenticate calls.\n\nDepending on the permissions granted as part of your [role](https://launchdarkly.com/docs/home/account/roles), you may not have permission to perform some API calls. You will receive a `401` response code in that case.\n\n> ### Modifying the Origin header causes an error\n>\n> LaunchDarkly validates that the Origin header for any API request authenticated by a session cookie matches the expected Origin header. The expected Origin header is `https://app.launchdarkly.com`.\n>\n> If the Origin header does not match what's expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly.\n>\n> Any browser extension that intentionally changes the Origin header can cause this problem. For example, the `Allow-Control-Allow-Origin: *` Chrome extension changes the Origin header to `http://evil.com` and causes the app to fail.\n>\n> To prevent this error, do not modify your Origin header.\n>\n> LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage.\n\n## Representations\n\nAll resources expect and return JSON response bodies. Error responses also send a JSON body. To learn more about the error format of the API, read [Errors](https://launchdarkly.com/docs/api#errors).\n\nIn practice this means that you always get a response with a `Content-Type` header set to `application/json`.\n\nIn addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`.\n\n### Summary and detailed representations\n\nWhen you fetch a list of resources, the response includes only the most important attributes of each resource. This is a _summary representation_ of the resource. When you fetch an individual resource, such as a single feature flag, you receive a _detailed representation_ of the resource.\n\nThe best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation.\n\n### Expanding responses\n\nSometimes the detailed representation of a resource does not include all of the attributes of the resource by default. If this is the case, the request method will clearly document this and describe which attributes you can include in an expanded response.\n\nTo include the additional attributes, append the `expand` request parameter to your request and add a comma-separated list of the attributes to include. For example, when you append `?expand=members,maintainers` to the [Get team](https://launchdarkly.com/docs/api/teams/get-team) endpoint, the expanded response includes both of these attributes.\n\n### Links and addressability\n\nThe best way to navigate the API is by following links. These are attributes in representations that link to other resources. The API always uses the same format for links:\n\n- Links to other resources within the API are encapsulated in a `_links` object\n- If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link\n\nEach link has two attributes:\n\n- An `href`, which contains the URL\n- A `type`, which describes the content type\n\nFor example, a feature resource might return the following:\n\n```json\n{\n \"_links\": {\n \"parent\": {\n \"href\": \"/api/features\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/features/sort.order\",\n \"type\": \"application/json\"\n }\n },\n \"_site\": {\n \"href\": \"/features/sort.order\",\n \"type\": \"text/html\"\n }\n}\n```\n\nFrom this, you can navigate to the parent collection of features by following the `parent` link, or navigate to the site page for the feature by following the `_site` link.\n\nCollections are always represented as a JSON object with an `items` attribute containing an array of representations. Like all other representations, collections have `_links` defined at the top level.\n\nPaginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection.\n\n## Updates\n\nResources that accept partial updates use the `PATCH` verb. Most resources support the [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) format. Some resources also support the [JSON merge patch](https://launchdarkly.com/docs/api#updates-using-json-merge-patch) format, and some resources support the [semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch) format, which is a way to specify the modifications to perform as a set of executable instructions. Each resource supports optional [comments](https://launchdarkly.com/docs/api#updates-with-comments) that you can submit with updates. Comments appear in outgoing webhooks, the audit log, and other integrations.\n\nWhen a resource supports both JSON patch and semantic patch, we document both in the request method. However, the specific request body fields and descriptions included in our documentation only match one type of patch or the other.\n\n### Updates using JSON patch\n\n[JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) is a way to specify the modifications to perform on a resource. JSON patch uses paths and a limited set of operations to describe how to transform the current state of the resource into a new state. JSON patch documents are always arrays, where each element contains an operation, a path to the field to update, and the new value.\n\nFor example, in this feature flag representation:\n\n```json\n{\n \"name\": \"New recommendations engine\",\n \"key\": \"engine.enable\",\n \"description\": \"This is the description\",\n ...\n}\n```\nYou can change the feature flag's description with the following patch document:\n\n```json\n[{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }]\n```\n\nYou can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch:\n\n```json\n[\n { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 },\n { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }\n]\n```\n\nThe above patch request tests whether the feature flag's `version` is `10`, and if so, changes the feature flag's description.\n\nAttributes that are not editable, such as a resource's `_links`, have names that start with an underscore.\n\n### Updates using JSON merge patch\n\n[JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) is another format for specifying the modifications to perform on a resource. JSON merge patch is less expressive than JSON patch. However, in many cases it is simpler to construct a merge patch document. For example, you can change a feature flag's description with the following merge patch document:\n\n```json\n{\n \"description\": \"New flag description\"\n}\n```\n\n### Updates using semantic patch\n\nSome resources support the semantic patch format. A semantic patch is a way to specify the modifications to perform on a resource as a set of executable instructions.\n\nSemantic patch allows you to be explicit about intent using precise, custom instructions. In many cases, you can define semantic patch instructions independently of the current state of the resource. This can be useful when defining a change that may be applied at a future date.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header.\n\nHere's how:\n\n```\nContent-Type: application/json; domain-model=launchdarkly.semanticpatch\n```\n\nIf you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch.\n\nThe body of a semantic patch request takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some resources only) The environment key.\n* `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the instruction requires parameters, you must include those parameters as additional fields in the object. The documentation for each resource that supports semantic patch includes the available instructions and any additional parameters.\n\nFor example:\n\n```json\n{\n \"comment\": \"optional comment\",\n \"instructions\": [ {\"kind\": \"turnFlagOn\"} ]\n}\n```\n\nSemantic patches are not applied partially; either all of the instructions are applied or none of them are. If **any** instruction is invalid, the endpoint returns an error and will not change the resource. If all instructions are valid, the request succeeds and the resources are updated if necessary, or left unchanged if they are already in the state you request.\n\n### Updates with comments\n\nYou can submit optional comments with `PATCH` changes.\n\nTo submit a comment along with a JSON patch document, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }]\n}\n```\n\nTo submit a comment along with a JSON merge patch document, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"merge\": { \"description\": \"New flag description\" }\n}\n```\n\nTo submit a comment along with a semantic patch, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"instructions\": [ {\"kind\": \"turnFlagOn\"} ]\n}\n```\n\n## Errors\n\nThe API always returns errors in a common format. Here's an example:\n\n```json\n{\n \"code\": \"invalid_request\",\n \"message\": \"A feature with that key already exists\",\n \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\"\n}\n```\n\nThe `code` indicates the general class of error. The `message` is a human-readable explanation of what went wrong. The `id` is a unique identifier. Use it when you're working with LaunchDarkly Support to debug a problem with a specific API call.\n\n### HTTP status error response codes\n\n| Code | Definition | Description | Possible Solution |\n| ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |\n| 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. |\n| 401 | Invalid access token | Requestor is unauthorized or does not have permission for this API call. | Ensure your API access token is valid and has the appropriate permissions. |\n| 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. |\n| 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. |\n| 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. |\n| 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. |\n| 422 | Unprocessable entity | The API request can not be completed because the update description can not be understood. | Ensure that the request body is correct for the type of patch you are using, either JSON patch or semantic patch.\n| 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. |\n\n## CORS\n\nThe LaunchDarkly API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. If an `Origin` header is given in a request, it will be echoed as an explicitly allowed origin. Otherwise the request returns a wildcard, `Access-Control-Allow-Origin: *`. For more information on CORS, read the [CORS W3C Recommendation](http://www.w3.org/TR/cors). Example CORS headers might look like:\n\n```http\nAccess-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization\nAccess-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH\nAccess-Control-Allow-Origin: *\nAccess-Control-Max-Age: 300\n```\n\nYou can make authenticated CORS calls just as you would make same-origin calls, using either [token or session-based authentication](https://launchdarkly.com/docs/api#authentication). If you are using session authentication, you should set the `withCredentials` property for your `xhr` request to `true`. You should never expose your access tokens to untrusted entities.\n\n## Rate limiting\n\nWe use several rate limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code. Calls to our APIs include headers indicating the current rate limit status. The specific headers returned depend on the API route being called. The limits differ based on the route, authentication mechanism, and other factors. Routes that are not rate limited may not contain any of the headers described below.\n\n> ### Rate limiting and SDKs\n>\n> LaunchDarkly SDKs are never rate limited and do not use the API endpoints defined here. LaunchDarkly uses a different set of approaches, including streaming/server-sent events and a global CDN, to ensure availability to the routes used by LaunchDarkly SDKs.\n\n### Global rate limits\n\nAuthenticated requests are subject to a global limit. This is the maximum number of calls that your account can make to the API per ten seconds. All service and personal access tokens on the account share this limit, so exceeding the limit with one access token will impact other tokens. Calls that are subject to global rate limits may return the headers below:\n\n| Header name | Description |\n| ------------------------------ | -------------------------------------------------------------------------------- |\n| `X-Ratelimit-Global-Remaining` | The maximum number of requests the account is permitted to make per ten seconds. |\n| `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |\n\nWe do not publicly document the specific number of calls that can be made globally. This limit may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limit.\n\n### Route-level rate limits\n\nSome authenticated routes have custom rate limits. These also reset every ten seconds. Any service or personal access tokens hitting the same route share this limit, so exceeding the limit with one access token may impact other tokens. Calls that are subject to route-level rate limits return the headers below:\n\n| Header name | Description |\n| ----------------------------- | ----------------------------------------------------------------------------------------------------- |\n| `X-Ratelimit-Route-Remaining` | The maximum number of requests to the current route the account is permitted to make per ten seconds. |\n| `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |\n\nA _route_ represents a specific URL pattern and verb. For example, the [Delete environment](https://launchdarkly.com/docs/api/environments/delete-environment) endpoint is considered a single route, and each call to delete an environment counts against your route-level rate limit for that route.\n\nWe do not publicly document the specific number of calls that an account can make to each endpoint per ten seconds. These limits may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limits.\n\n### IP-based rate limiting\n\nWe also employ IP-based rate limiting on some API routes. If you hit an IP-based rate limit, your API response will include a `Retry-After` header indicating how long to wait before re-trying the call. Clients must wait at least `Retry-After` seconds before making additional calls to our API, and should employ jitter and backoff strategies to avoid triggering rate limits again.\n\n## OpenAPI (Swagger) and client libraries\n\nWe have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API.\n\nWe auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). You can also use this specification to generate client libraries to interact with our REST API in your language of choice.\n\nOur OpenAPI specification is supported by several API-based tools such as Postman and Insomnia. In many cases, you can directly import our specification to explore our APIs.\n\n## Method overriding\n\nSome firewalls and HTTP clients restrict the use of verbs other than `GET` and `POST`. In those environments, our API endpoints that use `DELETE`, `PATCH`, and `PUT` verbs are inaccessible.\n\nTo avoid this issue, our API supports the `X-HTTP-Method-Override` header, allowing clients to \"tunnel\" `DELETE`, `PATCH`, and `PUT` requests using a `POST` request.\n\nFor example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header.\n\n## Beta resources\n\nWe sometimes release new API resources in **beta** status before we release them with general availability.\n\nResources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nWe try to promote resources into general availability as quickly as possible. This happens after sufficient testing and when we're satisfied that we no longer need to make backwards-incompatible changes.\n\nWe mark beta resources with a \"Beta\" callout in our documentation, pictured below:\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](https://launchdarkly.com/docs/api#beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n### Using beta resources\n\nTo use a beta resource, you must include a header in the request. If you call a beta resource without this header, you receive a `403` response.\n\nUse this header:\n\n```\nLD-API-Version: beta\n```\n\n## Federal environments\n\nThe version of LaunchDarkly that is available on domains controlled by the United States government is different from the version of LaunchDarkly available to the general public. If you are an employee or contractor for a United States federal agency and use LaunchDarkly in your work, you likely use the federal instance of LaunchDarkly.\n\nIf you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`.\n\nTo learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal).\n\n## Versioning\n\nWe try hard to keep our REST API backwards compatible, but we occasionally have to make backwards-incompatible changes in the process of shipping new features. These breaking changes can cause unexpected behavior if you don't prepare for them accordingly.\n\nUpdates to our REST API include support for the latest features in LaunchDarkly. We also release a new version of our REST API every time we make a breaking change. We provide simultaneous support for multiple API versions so you can migrate from your current API version to a new version at your own pace.\n\n### Setting the API version per request\n\nYou can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below:\n\n```\nLD-API-Version: 20240415\n```\n\nThe header value is the version number of the API version you would like to request. The number for each version corresponds to the date the version was released in `yyyymmdd` format. In the example above the version `20240415` corresponds to April 15, 2024.\n\n### Setting the API version per access token\n\nWhen you create an access token, you must specify a specific version of the API to use. This ensures that integrations using this token cannot be broken by version changes.\n\nTokens created before versioning was released have their version set to `20160426`, which is the version of the API that existed before the current versioning scheme, so that they continue working the same way they did before versioning.\n\nIf you would like to upgrade your integration to use a new API version, you can explicitly set the header described above.\n\n> ### Best practice: Set the header for every client or integration\n>\n> We recommend that you set the API version header explicitly in any client or integration you build.\n>\n> Only rely on the access token API version during manual testing.\n\n### API version changelog\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
VersionChangesEnd of life (EOL)
`20240415`\n
  • Changed several endpoints from unpaginated to paginated. Use the `limit` and `offset` query parameters to page through the results.
  • Changed the [list access tokens](https://launchdarkly.com/docs/api/access-tokens/get-tokens) endpoint:
    • Response is now paginated with a default limit of `25`
  • Changed the [list account members](https://launchdarkly.com/docs/api/account-members/get-members) endpoint:
    • The `accessCheck` filter is no longer available
  • Changed the [list custom roles](https://launchdarkly.com/docs/api/custom-roles/get-custom-roles) endpoint:
    • Response is now paginated with a default limit of `20`
  • Changed the [list feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) endpoint:
    • Response is now paginated with a default limit of `20`
    • The `environments` field is now only returned if the request is filtered by environment, using the `filterEnv` query parameter
    • The `followerId`, `hasDataExport`, `status`, `contextKindTargeted`, and `segmentTargeted` filters are no longer available
    • The `compare` query parameter is no longer available
  • Changed the [list segments](https://launchdarkly.com/docs/api/segments/get-segments) endpoint:
    • Response is now paginated with a default limit of `20`
  • Changed the [list teams](https://launchdarkly.com/docs/api/teams/get-teams) endpoint:
    • The `expand` parameter no longer supports including `projects` or `roles`
    • In paginated results, the maximum page size is now 100
  • Changed the [get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) endpoint:
    • Response is now paginated with a default limit of `20`
    • The `_conflicts` field in the response is no longer available
\n
Current
`20220603`\n
  • Changed the [list projects](https://launchdarkly.com/docs/api/projects/get-projects) return value:
    • Response is now paginated with a default limit of `20`.
    • Added support for filter and sort.
    • The project `environments` field is now expandable. This field is omitted by default.
  • Changed the [get project](https://launchdarkly.com/docs/api/projects/get-project) return value:
    • The `environments` field is now expandable. This field is omitted by default.
\n
2025-04-15
`20210729`\n
  • Changed the [create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) return value. It now returns HTTP Status Code `201` instead of `200`.
  • Changed the [get user](https://launchdarkly.com/docs/api/users/get-user) return value. It now returns a user record, not a user.
  • Added additional optional fields to environment, segments, flags, members, and segments, including the ability to create big segments.
  • Added default values for flag variations when new environments are created.
  • Added filtering and pagination for getting flags and members, including `limit`, `number`, `filter`, and `sort` query parameters.
  • Added endpoints for expiring user targets for flags and segments, scheduled changes, access tokens, Relay Proxy configuration, integrations and subscriptions, and approvals.
\n
2023-06-03
`20191212`\n
  • [List feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) now defaults to sending summaries of feature flag configurations, equivalent to setting the query parameter `summary=true`. Summaries omit flag targeting rules and individual user targets from the payload.
  • Added endpoints for flags, flag status, projects, environments, audit logs, members, users, custom roles, segments, usage, streams, events, and data export.
\n
2022-07-29
`20160426`\n
  • Initial versioning of API. Tokens created before versioning have their version set to this.
\n
2020-12-12
\n\nTo learn more about how EOL is determined, read LaunchDarkly's [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/).\n", + "description": "This documentation describes LaunchDarkly's REST API. To access the complete OpenAPI spec directly, use [Get OpenAPI spec](https://launchdarkly.com/docs/api/other/get-openapi-spec).\n\nTo learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home).\n\n## Authentication\n\nLaunchDarkly's REST API uses the HTTPS protocol with a minimum TLS version of 1.2.\n\nAll REST API resources are authenticated with either [personal or service access tokens](https://launchdarkly.com/docs/home/account/api), or session cookies. Other authentication mechanisms are not supported. You can manage personal access tokens on your [**Authorization**](https://app.launchdarkly.com/settings/authorization) page in the LaunchDarkly UI.\n\nLaunchDarkly also has SDK keys, mobile keys, and client-side IDs that are used by our server-side SDKs, mobile SDKs, and JavaScript-based SDKs, respectively. **These keys cannot be used to access our REST API**. These keys are environment-specific, and can only perform read-only operations such as fetching feature flag settings.\n\n| Auth mechanism | Allowed resources | Use cases |\n| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- |\n| [Personal or service access tokens](https://launchdarkly.com/docs/home/account/api) | Can be customized on a per-token basis | Building scripts, custom integrations, data export. |\n| SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs |\n| Mobile keys | Can only access read-only resources specific to mobile SDKs, and only for flags marked available to mobile keys. Restricted to a single environment. | Mobile SDKs |\n| Client-side ID | Can only access read-only resources specific to JavaScript-based client-side SDKs, and only for flags marked available to client-side. Restricted to a single environment. | Client-side JavaScript |\n\n> #### Keep your access tokens and SDK keys private\n>\n> Access tokens should _never_ be exposed in untrusted contexts. Never put an access token in client-side JavaScript, or embed it in a mobile application. LaunchDarkly has special mobile keys that you can embed in mobile apps. If you accidentally expose an access token or SDK key, you can reset it from your [**Authorization**](https://app.launchdarkly.com/settings/authorization) page.\n>\n> The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript.\n\n### Authentication using request header\n\nThe preferred way to authenticate with the API is by adding an `Authorization` header containing your access token to your requests. The value of the `Authorization` header must be your access token.\n\nManage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page.\n\n### Authentication using session cookie\n\nFor testing purposes, you can make API calls directly from your web browser. If you are logged in to the LaunchDarkly application, the API will use your existing session to authenticate calls.\n\nDepending on the permissions granted as part of your [role](https://launchdarkly.com/docs/home/account/roles), you may not have permission to perform some API calls. You will receive a `401` response code in that case.\n\n> ### Modifying the Origin header causes an error\n>\n> LaunchDarkly validates that the Origin header for any API request authenticated by a session cookie matches the expected Origin header. The expected Origin header is `https://app.launchdarkly.com`.\n>\n> If the Origin header does not match what's expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly.\n>\n> Any browser extension that intentionally changes the Origin header can cause this problem. For example, the `Allow-Control-Allow-Origin: *` Chrome extension changes the Origin header to `http://evil.com` and causes the app to fail.\n>\n> To prevent this error, do not modify your Origin header.\n>\n> LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage.\n\n## Representations\n\nAll resources expect and return JSON response bodies. Error responses also send a JSON body. To learn more about the error format of the API, read [Errors](https://launchdarkly.com/docs/api#errors).\n\nIn practice this means that you always get a response with a `Content-Type` header set to `application/json`.\n\nIn addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`.\n\n### Summary and detailed representations\n\nWhen you fetch a list of resources, the response includes only the most important attributes of each resource. This is a _summary representation_ of the resource. When you fetch an individual resource, such as a single feature flag, you receive a _detailed representation_ of the resource.\n\nThe best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation.\n\n### Expanding responses\n\nSometimes the detailed representation of a resource does not include all of the attributes of the resource by default. If this is the case, the request method will clearly document this and describe which attributes you can include in an expanded response.\n\nTo include the additional attributes, append the `expand` request parameter to your request and add a comma-separated list of the attributes to include. For example, when you append `?expand=members,maintainers` to the [Get team](https://launchdarkly.com/docs/api/teams/get-team) endpoint, the expanded response includes both of these attributes.\n\n### Links and addressability\n\nThe best way to navigate the API is by following links. These are attributes in representations that link to other resources. The API always uses the same format for links:\n\n- Links to other resources within the API are encapsulated in a `_links` object\n- If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link\n\nEach link has two attributes:\n\n- An `href`, which contains the URL\n- A `type`, which describes the content type\n\nFor example, a feature resource might return the following:\n\n```json\n{\n \"_links\": {\n \"parent\": {\n \"href\": \"/api/features\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/features/sort.order\",\n \"type\": \"application/json\"\n }\n },\n \"_site\": {\n \"href\": \"/features/sort.order\",\n \"type\": \"text/html\"\n }\n}\n```\n\nFrom this, you can navigate to the parent collection of features by following the `parent` link, or navigate to the site page for the feature by following the `_site` link.\n\nCollections are always represented as a JSON object with an `items` attribute containing an array of representations. Like all other representations, collections have `_links` defined at the top level.\n\nPaginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection.\n\n## Updates\n\nResources that accept partial updates use the `PATCH` verb. Most resources support the [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) format. Some resources also support the [JSON merge patch](https://launchdarkly.com/docs/api#updates-using-json-merge-patch) format, and some resources support the [semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch) format, which is a way to specify the modifications to perform as a set of executable instructions. Each resource supports optional [comments](https://launchdarkly.com/docs/api#updates-with-comments) that you can submit with updates. Comments appear in outgoing webhooks, the audit log, and other integrations.\n\nWhen a resource supports both JSON patch and semantic patch, we document both in the request method. However, the specific request body fields and descriptions included in our documentation only match one type of patch or the other.\n\n### Updates using JSON patch\n\n[JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) is a way to specify the modifications to perform on a resource. JSON patch uses paths and a limited set of operations to describe how to transform the current state of the resource into a new state. JSON patch documents are always arrays, where each element contains an operation, a path to the field to update, and the new value.\n\nFor example, in this feature flag representation:\n\n```json\n{\n \"name\": \"New recommendations engine\",\n \"key\": \"engine.enable\",\n \"description\": \"This is the description\",\n ...\n}\n```\nYou can change the feature flag's description with the following patch document:\n\n```json\n[{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }]\n```\n\nYou can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch:\n\n```json\n[\n { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 },\n { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }\n]\n```\n\nThe above patch request tests whether the feature flag's `version` is `10`, and if so, changes the feature flag's description.\n\nAttributes that are not editable, such as a resource's `_links`, have names that start with an underscore.\n\n### Updates using JSON merge patch\n\n[JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) is another format for specifying the modifications to perform on a resource. JSON merge patch is less expressive than JSON patch. However, in many cases it is simpler to construct a merge patch document. For example, you can change a feature flag's description with the following merge patch document:\n\n```json\n{\n \"description\": \"New flag description\"\n}\n```\n\n### Updates using semantic patch\n\nSome resources support the semantic patch format. A semantic patch is a way to specify the modifications to perform on a resource as a set of executable instructions.\n\nSemantic patch allows you to be explicit about intent using precise, custom instructions. In many cases, you can define semantic patch instructions independently of the current state of the resource. This can be useful when defining a change that may be applied at a future date.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header.\n\nHere's how:\n\n```\nContent-Type: application/json; domain-model=launchdarkly.semanticpatch\n```\n\nIf you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch.\n\nThe body of a semantic patch request takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some resources only) The environment key.\n* `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the instruction requires parameters, you must include those parameters as additional fields in the object. The documentation for each resource that supports semantic patch includes the available instructions and any additional parameters.\n\nFor example:\n\n```json\n{\n \"comment\": \"optional comment\",\n \"instructions\": [ {\"kind\": \"turnFlagOn\"} ]\n}\n```\n\nSemantic patches are not applied partially; either all of the instructions are applied or none of them are. If **any** instruction is invalid, the endpoint returns an error and will not change the resource. If all instructions are valid, the request succeeds and the resources are updated if necessary, or left unchanged if they are already in the state you request.\n\n### Updates with comments\n\nYou can submit optional comments with `PATCH` changes.\n\nTo submit a comment along with a JSON patch document, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }]\n}\n```\n\nTo submit a comment along with a JSON merge patch document, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"merge\": { \"description\": \"New flag description\" }\n}\n```\n\nTo submit a comment along with a semantic patch, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"instructions\": [ {\"kind\": \"turnFlagOn\"} ]\n}\n```\n\n## Errors\n\nThe API always returns errors in a common format. Here's an example:\n\n```json\n{\n \"code\": \"invalid_request\",\n \"message\": \"A feature with that key already exists\",\n \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\"\n}\n```\n\nThe `code` indicates the general class of error. The `message` is a human-readable explanation of what went wrong. The `id` is a unique identifier. Use it when you're working with LaunchDarkly Support to debug a problem with a specific API call.\n\n### HTTP status error response codes\n\n| Code | Definition | Description | Possible Solution |\n| ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |\n| 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. |\n| 401 | Invalid access token | Requestor is unauthorized or does not have permission for this API call. | Ensure your API access token is valid and has the appropriate permissions. |\n| 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. |\n| 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. |\n| 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. |\n| 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. |\n| 422 | Unprocessable entity | The API request can not be completed because the update description can not be understood. | Ensure that the request body is correct for the type of patch you are using, either JSON patch or semantic patch.\n| 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. |\n\n## CORS\n\nThe LaunchDarkly API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. If an `Origin` header is given in a request, it will be echoed as an explicitly allowed origin. Otherwise the request returns a wildcard, `Access-Control-Allow-Origin: *`. For more information on CORS, read the [CORS W3C Recommendation](http://www.w3.org/TR/cors). Example CORS headers might look like:\n\n```http\nAccess-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization\nAccess-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH\nAccess-Control-Allow-Origin: *\nAccess-Control-Max-Age: 300\n```\n\nYou can make authenticated CORS calls just as you would make same-origin calls, using either [token or session-based authentication](https://launchdarkly.com/docs/api#authentication). If you are using session authentication, you should set the `withCredentials` property for your `xhr` request to `true`. You should never expose your access tokens to untrusted entities.\n\n## Rate limiting\n\nWe use several rate limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code. Calls to our APIs include headers indicating the current rate limit status. The specific headers returned depend on the API route being called. The limits differ based on the route, authentication mechanism, and other factors. Routes that are not rate limited may not contain any of the headers described below.\n\n> ### Rate limiting and SDKs\n>\n> LaunchDarkly SDKs are never rate limited and do not use the API endpoints defined here. LaunchDarkly uses a different set of approaches, including streaming/server-sent events and a global CDN, to ensure availability to the routes used by LaunchDarkly SDKs.\n\n### Global rate limits\n\nAuthenticated requests are subject to a global limit. This is the maximum number of calls that your account can make to the API per ten seconds. All service and personal access tokens on the account share this limit, so exceeding the limit with one access token will impact other tokens. Calls that are subject to global rate limits may return the headers below:\n\n| Header name | Description |\n| ------------------------------ | -------------------------------------------------------------------------------- |\n| `X-Ratelimit-Global-Remaining` | The maximum number of requests the account is permitted to make per ten seconds. |\n| `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |\n\nWe do not publicly document the specific number of calls that can be made globally. This limit may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limit.\n\n### Route-level rate limits\n\nSome authenticated routes have custom rate limits. These also reset every ten seconds. Any service or personal access tokens hitting the same route share this limit, so exceeding the limit with one access token may impact other tokens. Calls that are subject to route-level rate limits return the headers below:\n\n| Header name | Description |\n| ----------------------------- | ----------------------------------------------------------------------------------------------------- |\n| `X-Ratelimit-Route-Remaining` | The maximum number of requests to the current route the account is permitted to make per ten seconds. |\n| `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |\n\nA _route_ represents a specific URL pattern and verb. For example, the [Delete environment](https://launchdarkly.com/docs/api/environments/delete-environment) endpoint is considered a single route, and each call to delete an environment counts against your route-level rate limit for that route.\n\nWe do not publicly document the specific number of calls that an account can make to each endpoint per ten seconds. These limits may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limits.\n\n### IP-based rate limiting\n\nWe also employ IP-based rate limiting on some API routes. If you hit an IP-based rate limit, your API response will include a `Retry-After` header indicating how long to wait before re-trying the call. Clients must wait at least `Retry-After` seconds before making additional calls to our API, and should employ jitter and backoff strategies to avoid triggering rate limits again.\n\n## OpenAPI (Swagger) and client libraries\n\nWe have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API.\n\nWe auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). You can also use this specification to generate client libraries to interact with our REST API in your language of choice.\n\nOur OpenAPI specification is supported by several API-based tools such as Postman and Insomnia. In many cases, you can directly import our specification to explore our APIs.\n\n## Method overriding\n\nSome firewalls and HTTP clients restrict the use of verbs other than `GET` and `POST`. In those environments, our API endpoints that use `DELETE`, `PATCH`, and `PUT` verbs are inaccessible.\n\nTo avoid this issue, our API supports the `X-HTTP-Method-Override` header, allowing clients to \"tunnel\" `DELETE`, `PATCH`, and `PUT` requests using a `POST` request.\n\nFor example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header.\n\n## Beta resources\n\nWe sometimes release new API resources in **beta** status before we release them with general availability.\n\nResources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nWe try to promote resources into general availability as quickly as possible. This happens after sufficient testing and when we're satisfied that we no longer need to make backwards-incompatible changes.\n\nWe mark beta resources with a \"Beta\" callout in our documentation, pictured below:\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](https://launchdarkly.com/docs/api#beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n### Using beta resources\n\nTo use a beta resource, you must include a header in the request. If you call a beta resource without this header, you receive a `403` response.\n\nUse this header:\n\n```\nLD-API-Version: beta\n```\n\n## Federal and EU environments\n\nIn addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU).\n\n### Federal environments\n\nThe version of LaunchDarkly that is available on domains controlled by the United States government is different from the version of LaunchDarkly available to the general public. If you are an employee or contractor for a United States federal agency and use LaunchDarkly in your work, you likely use the federal instance of LaunchDarkly.\n\nIf you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`.\n\nTo learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal).\n\n### EU environments\n\nThe version of LaunchDarkly that is available in the EU is different from the version of LaunchDarkly available to other regions. If you are based in the EU, you likely use the EU instance of LaunchDarkly. The LaunchDarkly EU instance complies with EU data residency principles, including the protection and confidentiality of EU customer information.\n\nIf you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`.\n\nTo learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu).\n\n## Versioning\n\nWe try hard to keep our REST API backwards compatible, but we occasionally have to make backwards-incompatible changes in the process of shipping new features. These breaking changes can cause unexpected behavior if you don't prepare for them accordingly.\n\nUpdates to our REST API include support for the latest features in LaunchDarkly. We also release a new version of our REST API every time we make a breaking change. We provide simultaneous support for multiple API versions so you can migrate from your current API version to a new version at your own pace.\n\n### Setting the API version per request\n\nYou can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below:\n\n```\nLD-API-Version: 20240415\n```\n\nThe header value is the version number of the API version you would like to request. The number for each version corresponds to the date the version was released in `yyyymmdd` format. In the example above the version `20240415` corresponds to April 15, 2024.\n\n### Setting the API version per access token\n\nWhen you create an access token, you must specify a specific version of the API to use. This ensures that integrations using this token cannot be broken by version changes.\n\nTokens created before versioning was released have their version set to `20160426`, which is the version of the API that existed before the current versioning scheme, so that they continue working the same way they did before versioning.\n\nIf you would like to upgrade your integration to use a new API version, you can explicitly set the header described above.\n\n> ### Best practice: Set the header for every client or integration\n>\n> We recommend that you set the API version header explicitly in any client or integration you build.\n>\n> Only rely on the access token API version during manual testing.\n\n### API version changelog\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
VersionChangesEnd of life (EOL)
`20240415`\n
  • Changed several endpoints from unpaginated to paginated. Use the `limit` and `offset` query parameters to page through the results.
  • Changed the [list access tokens](https://launchdarkly.com/docs/api/access-tokens/get-tokens) endpoint:
    • Response is now paginated with a default limit of `25`
  • Changed the [list account members](https://launchdarkly.com/docs/api/account-members/get-members) endpoint:
    • The `accessCheck` filter is no longer available
  • Changed the [list custom roles](https://launchdarkly.com/docs/api/custom-roles/get-custom-roles) endpoint:
    • Response is now paginated with a default limit of `20`
  • Changed the [list feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) endpoint:
    • Response is now paginated with a default limit of `20`
    • The `environments` field is now only returned if the request is filtered by environment, using the `filterEnv` query parameter
    • The `followerId`, `hasDataExport`, `status`, `contextKindTargeted`, and `segmentTargeted` filters are no longer available
    • The `compare` query parameter is no longer available
  • Changed the [list segments](https://launchdarkly.com/docs/api/segments/get-segments) endpoint:
    • Response is now paginated with a default limit of `20`
  • Changed the [list teams](https://launchdarkly.com/docs/api/teams/get-teams) endpoint:
    • The `expand` parameter no longer supports including `projects` or `roles`
    • In paginated results, the maximum page size is now 100
  • Changed the [get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) endpoint:
    • Response is now paginated with a default limit of `20`
    • The `_conflicts` field in the response is no longer available
\n
Current
`20220603`\n
  • Changed the [list projects](https://launchdarkly.com/docs/api/projects/get-projects) return value:
    • Response is now paginated with a default limit of `20`.
    • Added support for filter and sort.
    • The project `environments` field is now expandable. This field is omitted by default.
  • Changed the [get project](https://launchdarkly.com/docs/api/projects/get-project) return value:
    • The `environments` field is now expandable. This field is omitted by default.
\n
2025-04-15
`20210729`\n
  • Changed the [create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) return value. It now returns HTTP Status Code `201` instead of `200`.
  • Changed the [get user](https://launchdarkly.com/docs/api/users/get-user) return value. It now returns a user record, not a user.
  • Added additional optional fields to environment, segments, flags, members, and segments, including the ability to create big segments.
  • Added default values for flag variations when new environments are created.
  • Added filtering and pagination for getting flags and members, including `limit`, `number`, `filter`, and `sort` query parameters.
  • Added endpoints for expiring user targets for flags and segments, scheduled changes, access tokens, Relay Proxy configuration, integrations and subscriptions, and approvals.
\n
2023-06-03
`20191212`\n
  • [List feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) now defaults to sending summaries of feature flag configurations, equivalent to setting the query parameter `summary=true`. Summaries omit flag targeting rules and individual user targets from the payload.
  • Added endpoints for flags, flag status, projects, environments, audit logs, members, users, custom roles, segments, usage, streams, events, and data export.
\n
2022-07-29
`20160426`\n
  • Initial versioning of API. Tokens created before versioning have their version set to this.
\n
2020-12-12
\n\nTo learn more about how EOL is determined, read LaunchDarkly's [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/).\n", "contact": { "name": "LaunchDarkly Technical Support Team", "url": "https://support.launchdarkly.com", @@ -63,7 +63,7 @@ }, { "name": "Approvals", - "description": "An account member can request approval on changes to a flag's targeting or variations, or to a segment's targeting. Members may be required to request approval depending on the settings in their LaunchDarkly project. Members can optionally request an approval even if it is not required.\n\nAn approval request prevents a change from being applied without approval from another member. Select up to ten members as reviewers. Reviewers receive an email notification, but anyone with sufficient permissions can review a pending approval request. A change needs at least one approval before you can apply it. To learn more, read [Approvals](https://launchdarkly.com/docs/home/releases/approvals).\n\nChanges that conflict will fail if approved and applied, and the flag or segment will not be updated.\n\nSeveral of the endpoints in the approvals API require an approval request ID. The approval request ID is returned as part of the [Create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) and [List approval requests for a flag](https://launchdarkly.com/docs/api/approvals/get-approvals-for-flag) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. If you created the approval request as part of a [workflow](https://launchdarkly.com/docs/api/workflows), you can also use a workflow ID as the approval request ID. The workflow ID is returned as part of the [Create workflow](https://launchdarkly.com/docs/api/workflows/post-workflow) and [Get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n" + "description": "An account member can request approval on changes to a flag or AI Config's targeting or variations, or to a segment's targeting. Members may be required to request approval depending on the settings in their LaunchDarkly project. Members can optionally request an approval even if it is not required.\n\nAn approval request prevents a change from being applied without approval from another member. Select up to ten members as reviewers. Reviewers receive an email notification, but anyone with sufficient permissions can review a pending approval request. A change needs at least one approval before you can apply it. To learn more, read [Approvals](https://launchdarkly.com/docs/home/releases/approvals).\n\nChanges that conflict will fail if approved and applied, and the flag or segment will not be updated.\n\nSeveral of the endpoints in the approvals API require an approval request ID. The approval request ID is returned as part of the [Create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) and [List approval requests for a flag](https://launchdarkly.com/docs/api/approvals/get-approvals-for-flag) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. If you created the approval request as part of a [workflow](https://launchdarkly.com/docs/api/workflows), you can also use a workflow ID as the approval request ID. The workflow ID is returned as part of the [Create workflow](https://launchdarkly.com/docs/api/workflows/post-workflow) and [Get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n" }, { "name": "Approvals (beta)", @@ -99,7 +99,7 @@ }, { "name": "Experiments", - "description": "> ### Available for subscription customers\n>\n> Experimentation is available to all customers on a Developer, Foundation, or Enterprise subscription. If you're on an older Pro or Enterprise plan, Experimentation is available as an add-on. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To change your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](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\nExperimentation lets you validate the impact of features you roll out to your app or infrastructure. You can measure things like page views, clicks, load time, infrastructure costs, and more. By connecting metrics you create to flags in your LaunchDarkly environment, you can measure the changes in your customers' behavior based on what flags they evaluate. You can run experiments with any type of flag, including boolean, string, number, and JSON flags. To learn more, read [Experimentation](https://launchdarkly.com/docs/home/experimentation).\n\nYou can manage experiments by using the dedicated experiment endpoints described below.\n\nSeveral of the endpoints require a treatment ID or a flag rule ID. Treatment IDs are returned as part of the [Get experiment results](https://launchdarkly.com/docs/api/experiments/get-experiment-results) response. They are the `treatmentId` of each element in the `treatmentResults` array. Winning treatment IDs are also returned as part of the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response. They are the `winningTreatmentId` in the `currentIteration`, the `winningTreatmentId` in the `draftIteration`, and the `winningTreatmentId` in each element of the `previousIterations` array. In the flags object, the rule ID is the ID of the variation or rollout of the flag. Each flag variation ID is returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. It is the `_id` field in each element of the `variations` array.\n" + "description": "> ### Available for subscription customers\n>\n> Experimentation is available to all customers on a Developer, Foundation, or Enterprise subscription. If you're on an older Pro or Enterprise plan, Experimentation is available as an add-on. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To change your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](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\nExperimentation lets you validate the impact of features you roll out to your app or infrastructure. You can measure things like page views, clicks, load time, infrastructure costs, and more. By connecting metrics you create to flags in your LaunchDarkly environment, you can measure the changes in your customers' behavior based on what flags they evaluate. You can run experiments with any type of flag, including boolean, string, number, and JSON flags. To learn more, read [Experimentation](https://launchdarkly.com/docs/home/experimentation).\n\nYou can manage experiments by using the dedicated experiment endpoints described below.\n\nSeveral of the endpoints require a treatment ID or a flag rule ID. Treatment IDs are returned as part of the expanded [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment#expanding-the-experiment-response) response. Winning treatment IDs are also returned as part of the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response. They are the `winningTreatmentId` in the `currentIteration`, the `winningTreatmentId` in the `draftIteration`, and the `winningTreatmentId` in each element of the `previousIterations` array. In the flags object, the rule ID is the ID of the variation or rollout of the flag. Each flag variation ID is returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. It is the `_id` field in each element of the `variations` array.\n" }, { "name": "Feature flags", @@ -197,6 +197,10 @@ "name": "Release pipelines (beta)", "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](https://launchdarkly.com/docs/api#beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nRelease pipelines standardize the release process for feature flags across a series of phases, where each phase consists of one or more environments. When you add a flag to a release pipeline, you create a \"release\" to automate that flag's progress through the pipeline.\n\nYou can use release pipelines to ensure that you correctly roll out the flag in each environment before moving on to the next. A release can use an immediate or guarded rollout to a designated audience, and can require approvals for selected environments. You can also use release pipelines to view the status of ongoing releases across all flags within a project, enforcing a standardized process and ensuring they are following best practices. To learn more, read [Release pipelines](https://launchdarkly.com/docs/home/releases/release-pipelines).\n\nWith the release pipelines API, you can view, create, update, and delete release pipelines.\n\nWith the related [releases API](https://launchdarkly.com/docs/api/releases-beta), you can view and update the active releases for a given flag.\n\nTo add a feature flag to an existing release pipeline, use the [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag) endpoint.\n" }, + { + "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\nRelease policies let you specify your preferred rollout method for a given set of environments.\n" + }, { "name": "Releases (beta)", "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](https://launchdarkly.com/docs/api#beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nRelease pipelines track the progression of a feature flag across a series of phases, where each phase consists of one or more environments. When you add a flag to a release pipeline, you create a \"release\" to track that flag's progress through the pipeline. To learn more, read [Release pipelines](https://launchdarkly.com/docs/home/releases/release-pipelines).\n\nWith the releases API, you can view and update the active releases for a given flag.\n\nWith the related [release pipelines API](https://launchdarkly.com/docs/api/release-pipelines-beta), you can view, create, and delete release pipelines.\n" @@ -233,17 +237,21 @@ "name": "Users (beta)", "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Contexts](https://launchdarkly.com/docs/api/contexts) instead of these endpoints. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](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\nLaunchDarkly creates a record for each user passed in to `variation` calls. This record powers the autocomplete functionality on the feature flag dashboard, as well as the Users page. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts)\n\nLaunchDarkly also offers an API that lets you access this data. You can use the users API to see what user data is available to LaunchDarkly, as well as determine which flag values a user will receive. You can also explicitly set which flag value a user will receive with this API.\n\nUsers are always scoped within both a project and an environment. Each environment has its own set of user records.\n" }, + { + "name": "Views (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](https://launchdarkly.com/docs/api#beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\nThe views API allows you to create, retrieve, and edit views, and link other resources to views.\n\nA view is a resource in LaunchDarkly that you can use to logically group other resources within a project, such as flags or segments. For example, views let you restrict access to sets of flags, so that members of your organization can focus on just the flags they work with.\n\nTo learn more, read [Views](https://launchdarkly.com/docs/home/account/views).\n" + }, { "name": "Webhooks", "description": "The webhooks API lets you build your own integrations that subscribe to activities in LaunchDarkly. When you generate an activity in LaunchDarkly, such as when you change a flag or you create a project, LaunchDarkly sends an HTTP POST payload to the webhook's URL. Use webhooks to update external issue trackers, update support tickets, notify customers of new feature rollouts, and more.\n\nSeveral of the endpoints in the webhooks API require a webhook ID. The webhook ID is returned as part of the [Creates a webhook](https://launchdarkly.com/docs/api/webhooks/post-webhook) and [List webhooks](https://launchdarkly.com/docs/api/webhooks/get-all-webhooks) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\n## Designating the payload\n\nThe webhook payload is identical to an audit log entry. To learn more, read [Get audit log entry](https://launchdarkly.com/docs/api/audit-log/get-audit-log-entry).\n\nHere's a sample payload:\n\n> ### Webhook delivery order\n>\n> Webhooks may not be delivered in chronological order. We recommend using the payload's \"date\" field as a timestamp to reorder webhooks as they are received.\n\n```json\n{\n \"_links\": {\n \"canonical\": {\n \"href\": \"/api/v2/projects/alexis/environments/test\",\n \"type\": \"application/json\"\n },\n \"parent\": {\n \"href\": \"/api/v2/auditlog\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/v2/auditlog/57c0a8e29969090743529965\",\n \"type\": \"application/json\"\n },\n \"site\": {\n \"href\": \"/settings#/projects\",\n \"type\": \"text/html\"\n }\n },\n \"_id\": \"57c0a8e29969090743529965\",\n \"date\": 1472243938774,\n \"accesses\": [\n {\n \"action\": \"updateName\",\n \"resource\": \"proj/alexis:env/test\"\n }\n ],\n \"kind\": \"environment\",\n \"name\": \"Testing\",\n \"description\": \"- Changed the name from ~~Test~~ to *Testing*\",\n \"member\": {\n \"_links\": {\n \"parent\": {\n \"href\": \"/internal/account/members\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/internal/account/members/548f6741c1efad40031b18ae\",\n \"type\": \"application/json\"\n }\n },\n \"_id\": \"548f6741c1efad40031b18ae\",\n \"email\": \"ariel@acme.com\",\n \"firstName\": \"Ariel\",\n \"lastName\": \"Flores\"\n },\n \"titleVerb\": \"changed the name of\",\n \"title\": \"[Ariel Flores](mailto:ariel@acme.com) changed the name of [Testing](https://app.launchdarkly.com/settings#/projects)\",\n \"target\": {\n \"_links\": {\n \"canonical\": {\n \"href\": \"/api/v2/projects/alexis/environments/test\",\n \"type\": \"application/json\"\n },\n \"site\": {\n \"href\": \"/settings#/projects\",\n \"type\": \"text/html\"\n }\n },\n \"name\": \"Testing\",\n \"resources\": [\"proj/alexis:env/test\"]\n }\n}\n```\n\n## Signing the webhook\n\nOptionally, you can define a `secret` when you create a webhook. If you define the secret, the webhook `POST` request will include an `X-LD-Signature header`, whose value will contain an HMAC SHA256 hex digest of the webhook payload, using the `secret` as the key.\n\nCompute the signature of the payload using the same shared secret in your code to verify that the webhook was triggered by LaunchDarkly.\n\n## Understanding connection retries\n\nIf LaunchDarkly receives a non-`2xx` response to a webhook `POST`, it will retry the delivery one time. Webhook delivery is not guaranteed. If you build an integration on webhooks, make sure it is tolerant of delivery failures.\n" }, { "name": "Workflow templates", - "description": "> ### Workflow templates is an Enterprise feature\n>\n> Workflow templates are available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nWorkflow templates allow you to define a set of workflow stages that you can use as a starting point for new workflows. You can create these workflows for any flag in any environment and any project, and you can create as many workflows as you like from a given template.\n\nYou can create workflow templates in two ways:\n* by specifying the desired stages, using the `stages` property of the request body\n* by specifying an existing workflow to save as a template, using the `workflowId` property of the request body\n\nYou can use templates to create a workflow in any project, environment, or flag. However, when you create a template, you must specify a particular project, environment, and flag. This means that when you create a template using the `stages` property, you must also include `projectKey`, `environmentKey`, and `flagKey` properties in the request body. When you create a template from an existing workflow, it will use the project, environment, and flag of the existing workflow, so those properties can be omitted from the request body.\n\nTo learn more, read [Workflows documentation](https://launchdarkly.com/docs/home/releases/workflows) and [Workflows API documentation](https://launchdarkly.com/docs/api/workflows).\n" + "description": "> ### Workflows are in maintenance mode\n>\n> The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.\n\nWorkflow templates allow you to define a set of workflow stages that you can use as a starting point for new workflows. You can create these workflows for any flag in any environment and any project, and you can create as many workflows as you like from a given template.\n\nYou can create workflow templates in two ways:\n* by specifying the desired stages, using the `stages` property of the request body\n* by specifying an existing workflow to save as a template, using the `workflowId` property of the request body\n\nYou can use templates to create a workflow in any project, environment, or flag. However, when you create a template, you must specify a particular project, environment, and flag. This means that when you create a template using the `stages` property, you must also include `projectKey`, `environmentKey`, and `flagKey` properties in the request body. When you create a template from an existing workflow, it will use the project, environment, and flag of the existing workflow, so those properties can be omitted from the request body.\n\nTo learn more, read [Workflows documentation](https://launchdarkly.com/docs/home/releases/workflows) and [Workflows API documentation](https://launchdarkly.com/docs/api/workflows).\n" }, { "name": "Workflows", - "description": "> ### Workflows is an Enterprise feature\n>\n> Workflows is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nA workflow is a set of actions that you can schedule in advance to make changes to a feature flag at a future date and time. You can also include approval requests at different stages of a workflow. To learn more, read [Workflows](https://launchdarkly.com/docs/home/releases/workflows).\n\nThe actions supported are as follows:\n\n- Turning targeting `ON` or `OFF`\n- Setting the default variation\n- Adding targets to a given variation\n- Creating a rule to target by segment\n- Modifying the rollout percentage for rules\n\nYou can create multiple stages of a flag release workflow. Unique stages are defined by their conditions: either approvals and/or scheduled changes.\n\nSeveral of the endpoints in the workflows API require a workflow ID or one or more member IDs. The workflow ID is returned as part of the [Create workflow](https://launchdarkly.com/docs/api/workflows/post-workflow) and [Get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. The member ID is returned as part of the [List account members](https://launchdarkly.com/docs/api/account-members/get-members) response. It is the `_id` field of each element in the `items` array.\n" + "description": "> ### Workflows are in maintenance mode\n>\n> The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.\n\nA workflow is a set of actions that you can schedule in advance to make changes to a feature flag at a future date and time. You can also include approval requests at different stages of a workflow. To learn more, read [Workflows](https://launchdarkly.com/docs/home/releases/workflows).\n\nThe actions supported are as follows:\n\n- Turning targeting `ON` or `OFF`\n- Setting the default variation\n- Adding targets to a given variation\n- Creating a rule to target by segment\n- Modifying the rollout percentage for rules\n\nYou can create multiple stages of a flag release workflow. Unique stages are defined by their conditions: either approvals and/or scheduled changes.\n\nSeveral of the endpoints in the workflows API require a workflow ID or one or more member IDs. The workflow ID is returned as part of the [Create workflow](https://launchdarkly.com/docs/api/workflows/post-workflow) and [Get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. The member ID is returned as part of the [List account members](https://launchdarkly.com/docs/api/account-members/get-members) response. It is the `_id` field of each element in the `items` array.\n" }, { "name": "Other", @@ -1513,7 +1521,7 @@ "Approvals" ], "summary": "List approval requests", - "description": "Get all approval requests.\n\n### Filtering approvals\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`.\n- `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`.\n- `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`.\n- `resourceKind` filters for only approvals that correspond to the specified resource kind. For example: `filter=resourceKind equals flag`. Currently, `flag` and `segment` resource kinds are supported.\n- `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf [\"pending\", \"approved\"]`.\n- `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf [\"pending\", \"scheduled\"]`.\n\nYou can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf [\"pending\",\"approved\"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`.\n\n### Expanding approval response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `flag` includes the flag the approval request belongs to\n- `project` includes the project the approval request belongs to\n- `environments` includes the environments the approval request relates to\n\nFor example, `expand=project,flag` includes the `project` and `flag` fields in the response.\n", + "description": "Get all approval requests.\n\n### Filtering approvals\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`.\n- `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`.\n- `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`.\n- `resourceKind` filters for only approvals that correspond to the specified resource kind. For example: `filter=resourceKind equals flag`. Currently, `flag`, `segment`, and `aiConfig` resource kinds are supported.\n- `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf [\"pending\", \"approved\"]`.\n- `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf [\"pending\", \"scheduled\"]`.\n\nYou can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf [\"pending\",\"approved\"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`.\n\n### Expanding approval response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `flag` includes the flag the approval request belongs to\n- `project` includes the project the approval request belongs to\n- `environments` includes the environments the approval request relates to\n\nFor example, `expand=project,flag` includes the `project` and `flag` fields in the response.\n", "parameters": [ { "name": "filter", @@ -1615,7 +1623,7 @@ "Approvals" ], "summary": "Create approval request", - "description": "Create an approval request.\n\nThis endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.\n\nIf you are creating an approval request for a flag, you can use the following `instructions`:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).\n\nIf you are creating an approval request for a segment, you can use the following read [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment) for details on the available `instructions`.\n", + "description": "Create an approval request.\n\nThis endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.\n\n### Flags\n\nIf you are creating an approval request for a flag, you can use the following `instructions`:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).\n\n### AI Configs\n\nIf you are creating an approval request for an AI Config, you can use the semantic patch instructions listed under [Update AI Config targeting](https://launchdarkly.com/docs/api/ai-configs-beta/patch-ai-config-targeting).\n\n### Segments\n\nIf you are creating an approval request for a segment, you can use the semantic patch instructions listed under [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment).\n", "requestBody": { "content": { "application/json": { @@ -1780,7 +1788,7 @@ "Approvals (beta)" ], "summary": "Update approval request", - "description": "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint works with approval requests for either flag or segment changes.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instruction for updating an approval request.\n\n#### addReviewers\n\nAdds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`.\n\n##### Parameters\n\n- `notifyMemberIds`: (Optional) List of member IDs.\n- `notifyTeamKeys`: (Optional) List of team keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addReviewers\",\n \"notifyMemberIds\": [ \"user-key-123abc\", \"user-key-456def\" ],\n \"notifyTeamKeys\": [ \"team-key-789abc\"]\n }]\n}\n```\n", + "description": "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint works with any approval requests.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instruction for updating an approval request.\n\n#### addReviewers\n\nAdds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`.\n\n##### Parameters\n\n- `notifyMemberIds`: (Optional) List of member IDs.\n- `notifyTeamKeys`: (Optional) List of team keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addReviewers\",\n \"notifyMemberIds\": [ \"user-key-123abc\", \"user-key-456def\" ],\n \"notifyTeamKeys\": [ \"team-key-789abc\"]\n }]\n}\n```\n", "parameters": [ { "name": "id", @@ -1931,7 +1939,7 @@ "Approvals" ], "summary": "Apply approval request", - "description": "Apply an approval request that has been approved. This endpoint works with approval requests for either flag or segment changes.", + "description": "Apply an approval request that has been approved. This endpoint works with any approval requests.", "parameters": [ { "name": "id", @@ -5418,7 +5426,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 or not LaunchDarkly tracks events for the feature flag associated with this rule.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for all rules.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ]\n}\n```\n\n#### updateTrackEventsFallthrough\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for updating flag settings\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for updating the flag lifecycle\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n
\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](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) or a [workflow](https://launchdarkly.com/docs/api/workflows).\n\n### Conflicts\nIf a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.\n\n### Migration flags\nFor migration flags, the cohort information is included in the `rules` property of a flag's response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag's response. You can update the default cohort by updating `fallthrough`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://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 or not LaunchDarkly tracks events for the feature flag associated with this rule.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for all rules.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ]\n}\n```\n\n#### updateTrackEventsFallthrough\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for updating flag settings\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for updating the flag lifecycle\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n
\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](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", @@ -10578,11 +10586,11 @@ { "name": "filter", "in": "query", - "description": "A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, and `maintainerTeamKey`. To learn more about the filter syntax, read the 'Filtering metrics' section above.", + "description": "A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey` and `view`. To learn more about the filter syntax, read the 'Filtering metrics' section above.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, and `maintainerTeamKey`. To learn more about the filter syntax, read the 'Filtering metrics' section above." + "description": "A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey` and `view`. To learn more about the filter syntax, read the 'Filtering metrics' section above." } } ], @@ -10783,11 +10791,11 @@ { "name": "expand", "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response.", + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are `experiments`, `experimentCount`, `metricGroups`, `metricGroupCount`, `eventSources`, `guardedRollouts`, `guardedRolloutCount`, and `lastUsedInEntity`.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response." + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are `experiments`, `experimentCount`, `metricGroups`, `metricGroupCount`, `eventSources`, `guardedRollouts`, `guardedRolloutCount`, and `lastUsedInEntity`." } }, { @@ -12914,7 +12922,7 @@ "Contexts" ], "summary": "Search for context instances", - "description": "\nSearch for context instances.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). To learn more about context instances, read [Context instances](https://launchdarkly.com/docs/home/observability/multi-contexts#context-instances).\n", + "description": "\nSearch for context instances.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/api/contexts#filtering-contexts-and-context-instances). To learn more about context instances, read [Context instances](https://launchdarkly.com/docs/home/observability/multi-contexts#context-instances).\n", "parameters": [ { "name": "projectKey", @@ -13303,7 +13311,7 @@ "Contexts" ], "summary": "Search for contexts", - "description": "\nSearch for contexts.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://launchdarkly.com/docs/home/observability/contexts#contexts-and-context-kinds).\n", + "description": "\nSearch for contexts.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/api/contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://launchdarkly.com/docs/home/observability/contexts#contexts-and-context-kinds).\n", "parameters": [ { "name": "projectKey", @@ -13436,6 +13444,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -13901,7 +13919,7 @@ "Experiments" ], "summary": "Create experiment", - "description": "Create an experiment.\n\nTo run this experiment, you'll need to [create an iteration](https://launchdarkly.com/docs/ld-docs/api/experiments/create-iteration) and then [update the experiment](https://launchdarkly.com/docs/ld-docs/api/experiments/patch-experiment) with the `startIteration` instruction.\n\nTo learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create).\n", + "description": "Create an experiment.\n\nTo run this experiment, you'll need to [create an iteration](https://launchdarkly.com/docs/api/experiments/create-iteration) and then [update the experiment](https://launchdarkly.com/docs/api/experiments/patch-experiment) with the `startIteration` instruction.\n\nTo learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create).\n", "parameters": [ { "name": "projectKey", @@ -14142,7 +14160,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\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](https://launchdarkly.com/docs/ld-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/ld-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\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](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", @@ -14268,7 +14286,7 @@ "Experiments" ], "summary": "Create iteration", - "description": "Create an experiment iteration.\n\nExperiment iterations let you record experiments in individual blocks of time. Initially, iterations are created with a status of `not_started` and appear in the `draftIteration` field of an experiment. To start or stop an iteration, [update the experiment](https://launchdarkly.com/docs/ld-docs/api/experiments/patch-experiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://launchdarkly.com/docs/home/experimentation/feature#start-experiment-iterations).\n", + "description": "Create an experiment iteration.\n\nExperiment iterations let you record experiments in individual blocks of time. Initially, iterations are created with a status of `not_started` and appear in the `draftIteration` field of an experiment. To start or stop an iteration, [update the experiment](https://launchdarkly.com/docs/api/experiments/patch-experiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://launchdarkly.com/docs/home/experimentation/feature#start-experiment-iterations).\n", "parameters": [ { "name": "projectKey", @@ -14317,15 +14335,15 @@ "operationId": "createIteration" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metric-groups/{metricGroupKey}/results": { - "get": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate": { + "post": { "responses": { "200": { - "description": "Experiment results response for metric group", + "description": "Flag evaluation collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricGroupResultsRep" + "$ref": "#/components/schemas/ContextInstanceEvaluations" } } } @@ -14382,10 +14400,10 @@ } }, "tags": [ - "Experiments" + "Contexts" ], - "summary": "Get experiment results for metric group (Deprecated)", - "description": "Get results from an experiment for a particular metric group.", + "summary": "Evaluate flags for context instance", + "description": "Evaluate flags for a context instance, for example, to determine the expected flag variation. **Do not use this API instead of an SDK.** The LaunchDarkly SDKs are specialized for the tasks of evaluating feature flags in your application at scale and generating analytics events based on those evaluations. This API is not designed for that use case. Any evaluations you perform with this API will not be reflected in features such as flag statuses and flag insights. Context instances evaluated by this API will not appear in the Contexts list. To learn more, read [Comparing LaunchDarkly's SDKs and REST API](https://launchdarkly.com/docs/guides/api/comparing-sdk-rest-api).\n\n### Filtering\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `query` filters for a string that matches against the flags' keys and names. It is not case sensitive. For example: `filter=query equals dark-mode`.\n- `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`.\n\nYou can also apply multiple filters at once. For example, setting `filter=query equals dark-mode, tags contains [\"beta\",\"q1\"]` matches flags which match the key or name `dark-mode` and are tagged `beta` and `q1`.\n", "parameters": [ { "name": "projectKey", @@ -14410,51 +14428,73 @@ } }, { - "name": "experimentKey", - "in": "path", - "description": "The experiment key", - "required": true, + "name": "limit", + "in": "query", + "description": "The number of feature flags to return. Defaults to -1, which returns all flags", "schema": { - "type": "string", - "format": "string", - "description": "The experiment key" + "type": "integer", + "format": "int64", + "description": "The number of feature flags to return. Defaults to -1, which returns all flags" } }, { - "name": "metricGroupKey", - "in": "path", - "description": "The metric group key", - "required": true, + "name": "offset", + "in": "query", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." + } + }, + { + "name": "sort", + "in": "query", + "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order", "schema": { "type": "string", "format": "string", - "description": "The metric group key" + "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order" } }, { - "name": "iterationId", + "name": "filter", "in": "query", - "description": "The iteration ID", + "description": "A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above.", "schema": { "type": "string", "format": "string", - "description": "The iteration ID" + "description": "A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above." } } ], - "operationId": "getExperimentResultsForMetricGroup", - "deprecated": true + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContextInstance" + }, + "example": { + "key": "user-key-123abc", + "kind": "user", + "otherAttribute": "other attribute value" + } + } + }, + "required": true + }, + "operationId": "evaluateContextInstance" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metrics/{metricKey}/results": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/followers": { "get": { "responses": { "200": { - "description": "Experiment results response", + "description": "Flags and flag followers response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExperimentBayesianResultsRep" + "$ref": "#/components/schemas/FlagFollowersByProjEnvGetRep" } } } @@ -14498,6 +14538,82 @@ } } } + } + }, + "tags": [ + "Follow flags" + ], + "summary": "Get followers of all flags in a given project and environment", + "description": "Get followers of all flags in a given environment and project", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + } + ], + "operationId": "getFollowersByProjEnv" + } + }, + "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts": { + "get": { + "responses": { + "200": { + "description": "All Holdouts response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HoldoutsCollectionRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, "429": { "description": "Rate limited", @@ -14511,10 +14627,9 @@ } }, "tags": [ - "Experiments" + "Holdouts (beta)" ], - "summary": "Get experiment results (Deprecated)", - "description": "Get results from an experiment for a particular metric.\n\nLaunchDarkly supports one field for expanding the \"Get experiment results\" response. By default, this field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter with the following field:\n* `traffic` includes the total count of units for each treatment.\n\nFor example, `expand=traffic` includes the `traffic` field for the project in the response.\n", + "summary": "Get all holdouts", "parameters": [ { "name": "projectKey", @@ -14539,61 +14654,102 @@ } }, { - "name": "experimentKey", - "in": "path", - "description": "The experiment key", - "required": true, + "name": "limit", + "in": "query", + "description": "The number of holdouts to return in the response. Defaults to 20", "schema": { - "type": "string", - "format": "string", - "description": "The experiment key" + "type": "integer", + "format": "int64", + "description": "The number of holdouts to return in the response. Defaults to 20" } }, { - "name": "metricKey", - "in": "path", - "description": "The metric key", - "required": true, + "name": "offset", + "in": "query", + "description": "Where to start in the list. Use this with pagination. For example, an `offset` of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", "schema": { - "type": "string", - "format": "string", - "description": "The metric key" + "type": "integer", + "format": "int64", + "description": "Where to start in the list. Use this with pagination. For example, an `offset` of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." + } + } + ], + "operationId": "getAllHoldouts" + }, + "post": { + "responses": { + "201": { + "description": "Holdout response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HoldoutRep" + } + } } }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + } + }, + "tags": [ + "Holdouts (beta)" + ], + "summary": "Create holdout", + "description": "Create a new holdout in the specified project.", + "parameters": [ { - "name": "iterationId", - "in": "query", - "description": "The iteration ID", + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The iteration ID" + "description": "The project key" } }, { - "name": "expand", - "in": "query", - "description": "A comma-separated list of fields to expand in the response. Supported fields are explained above.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of fields to expand in the response. Supported fields are explained above." + "description": "The environment key" } } ], - "operationId": "getExperimentResults", - "deprecated": true + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HoldoutPostRequest" + } + } + }, + "required": true + }, + "operationId": "postHoldout" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate": { - "post": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/id/{holdoutId}": { + "get": { "responses": { "200": { - "description": "Flag evaluation collection response", + "description": "Holdout response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextInstanceEvaluations" + "$ref": "#/components/schemas/HoldoutRep" } } } @@ -14650,415 +14806,9 @@ } }, "tags": [ - "Contexts" + "Holdouts (beta)" ], - "summary": "Evaluate flags for context instance", - "description": "Evaluate flags for a context instance, for example, to determine the expected flag variation. **Do not use this API instead of an SDK.** The LaunchDarkly SDKs are specialized for the tasks of evaluating feature flags in your application at scale and generating analytics events based on those evaluations. This API is not designed for that use case. Any evaluations you perform with this API will not be reflected in features such as flag statuses and flag insights. Context instances evaluated by this API will not appear in the Contexts list. To learn more, read [Comparing LaunchDarkly's SDKs and REST API](https://launchdarkly.com/docs/guides/api/comparing-sdk-rest-api).\n\n### Filtering\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `query` filters for a string that matches against the flags' keys and names. It is not case sensitive. For example: `filter=query equals dark-mode`.\n- `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`.\n\nYou can also apply multiple filters at once. For example, setting `filter=query equals dark-mode, tags contains [\"beta\",\"q1\"]` matches flags which match the key or name `dark-mode` and are tagged `beta` and `q1`.\n", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of feature flags to return. Defaults to -1, which returns all flags", - "schema": { - "type": "integer", - "format": "int64", - "description": "The number of feature flags to return. Defaults to -1, which returns all flags" - } - }, - { - "name": "offset", - "in": "query", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", - "schema": { - "type": "integer", - "format": "int64", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." - } - }, - { - "name": "sort", - "in": "query", - "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order" - } - }, - { - "name": "filter", - "in": "query", - "description": "A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContextInstance" - }, - "example": { - "key": "user-key-123abc", - "kind": "user", - "otherAttribute": "other attribute value" - } - } - }, - "required": true - }, - "operationId": "evaluateContextInstance" - } - }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/followers": { - "get": { - "responses": { - "200": { - "description": "Flags and flag followers response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlagFollowersByProjEnvGetRep" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - } - }, - "tags": [ - "Follow flags" - ], - "summary": "Get followers of all flags in a given project and environment", - "description": "Get followers of all flags in a given environment and project", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - } - ], - "operationId": "getFollowersByProjEnv" - } - }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts": { - "get": { - "responses": { - "200": { - "description": "All Holdouts response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HoldoutsCollectionRep" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Holdouts (beta)" - ], - "summary": "Get all holdouts", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of holdouts to return in the response. Defaults to 20", - "schema": { - "type": "integer", - "format": "int64", - "description": "The number of holdouts to return in the response. Defaults to 20" - } - }, - { - "name": "offset", - "in": "query", - "description": "Where to start in the list. Use this with pagination. For example, an `offset` of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", - "schema": { - "type": "integer", - "format": "int64", - "description": "Where to start in the list. Use this with pagination. For example, an `offset` of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." - } - } - ], - "operationId": "getAllHoldouts" - }, - "post": { - "responses": { - "201": { - "description": "Holdout response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HoldoutRep" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - } - }, - "tags": [ - "Holdouts (beta)" - ], - "summary": "Create holdout", - "description": "Create a new holdout in the specified project.", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HoldoutPostRequest" - } - } - }, - "required": true - }, - "operationId": "postHoldout" - } - }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/id/{holdoutId}": { - "get": { - "responses": { - "200": { - "description": "Holdout response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HoldoutRep" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "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": [ - "Holdouts (beta)" - ], - "summary": "Get Holdout by Id", + "summary": "Get Holdout by Id", "parameters": [ { "name": "projectKey", @@ -17377,7 +17127,7 @@ "Scheduled changes" ], "summary": "Create scheduled changes workflow", - "description": "Create scheduled changes for a feature flag. If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.", + "description": "Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.", "parameters": [ { "name": "projectKey", @@ -18032,7 +17782,7 @@ "Workflows" ], "summary": "Create workflow", - "description": "Create a workflow for a feature flag. You can create a workflow directly, or you can apply a template to create a new workflow.\n\n### Creating a workflow\n\nYou can use the create workflow endpoint to create a workflow directly by adding a `stages` array to the request body.\n\nFor each stage, define the `name`, `conditions` when the stage should be executed, and `action` that describes the stage.\n\n
\nClick to expand example\n\n_Example request body_\n```json\n{\n \"name\": \"Progressive rollout starting in two days\",\n \"description\": \"Turn flag targeting on and increase feature rollout in 10% increments each day\",\n \"stages\": [\n {\n \"name\": \"10% rollout on day 1\",\n \"conditions\": [\n {\n \"kind\": \"schedule\",\n \"scheduleKind\": \"relative\", // or \"absolute\"\n // If \"scheduleKind\" is \"absolute\", set \"executionDate\";\n // \"waitDuration\" and \"waitDurationUnit\" will be ignored\n \"waitDuration\": 2,\n \"waitDurationUnit\": \"calendarDay\"\n },\n {\n \"kind\": \"ld-approval\",\n \"notifyMemberIds\": [ \"507f1f77bcf86cd799439011\" ],\n \"notifyTeamKeys\": [ \"team-key-123abc\" ]\n }\n ],\n \"action\": {\n \"instructions\": [\n {\n \"kind\": \"turnFlagOn\"\n },\n {\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"rolloutWeights\": {\n \"452f5fb5-7320-4ba3-81a1-8f4324f79d49\": 90000,\n \"fc15f6a4-05d3-4aa4-a997-446be461345d\": 10000\n }\n }\n ]\n }\n }\n ]\n}\n```\n
\n\n### Creating a workflow by applying a workflow template\n\nYou can also create a workflow by applying a workflow template. If you pass a valid workflow template key as the `templateKey` query parameter with the request, the API will attempt to create a new workflow with the stages defined in the workflow template with the corresponding key.\n\n#### Applicability of stages\nTemplates are created in the context of a particular flag in a particular environment in a particular project. However, because workflows created from a template can be applied to any project, environment, and flag, some steps of the workflow may need to be updated in order to be applicable for the target resource.\n\nYou can pass a `dryRun` query parameter to tell the API to return a report of which steps of the workflow template are applicable in the target project/environment/flag, and which will need to be updated. When the `dryRun` query parameter is present the response body includes a `meta` property that holds a list of parameters that could potentially be inapplicable for the target resource. Each of these parameters will include a `valid` field. You will need to update any invalid parameters in order to create the new workflow. You can do this using the `parameters` property, which overrides the workflow template parameters.\n\n#### Overriding template parameters\nYou can use the `parameters` property in the request body to tell the API to override the specified workflow template parameters with new values that are specific to your target project/environment/flag.\n\n
\nClick to expand example\n\n_Example request body_\n```json\n{\n\t\"name\": \"workflow created from my-template\",\n\t\"description\": \"description of my workflow\",\n\t\"parameters\": [\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3b\",\n\t\t\t\"path\": \"/clauses/0/values\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": [\"updated-segment\"]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3d\",\n\t\t\t\"path\": \"/variationId\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": \"abcd1234-abcd-1234-abcd-1234abcd12\"\n\t\t\t}\n\t\t}\n\t]\n}\n```\n
\n\nIf there are any steps in the template that are not applicable to the target resource, the workflow will not be created, and the `meta` property will be included in the response body detailing which parameters need to be updated.\n", + "description": "> ### Workflows are in maintenance mode\n>\n> The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.\n\nCreate a workflow for a feature flag. You can create a workflow directly, or you can apply a template to create a new workflow.\n\n### Creating a workflow\n\nYou can use the create workflow endpoint to create a workflow directly by adding a `stages` array to the request body.\n\nFor each stage, define the `name`, `conditions` when the stage should be executed, and `action` that describes the stage. For approval stages, only standard LaunchDarkly approvals are permitted. Workflows of `kind` `integration-approval` cannot be used for custom workflows. \n\n
\nClick to expand example\n\n_Example request body_\n```json\n{\n \"name\": \"Progressive rollout starting in two days\",\n \"description\": \"Turn flag targeting on and increase feature rollout in 10% increments each day\",\n \"stages\": [\n {\n \"name\": \"10% rollout on day 1\",\n \"conditions\": [\n {\n \"kind\": \"schedule\",\n \"scheduleKind\": \"relative\", // or \"absolute\"\n // If \"scheduleKind\" is \"absolute\", set \"executionDate\";\n // \"waitDuration\" and \"waitDurationUnit\" will be ignored\n \"waitDuration\": 2,\n \"waitDurationUnit\": \"calendarDay\"\n },\n {\n \"kind\": \"ld-approval\",\n \"notifyMemberIds\": [ \"507f1f77bcf86cd799439011\" ],\n \"notifyTeamKeys\": [ \"team-key-123abc\" ]\n }\n ],\n \"action\": {\n \"instructions\": [\n {\n \"kind\": \"turnFlagOn\"\n },\n {\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"rolloutWeights\": {\n \"452f5fb5-7320-4ba3-81a1-8f4324f79d49\": 90000,\n \"fc15f6a4-05d3-4aa4-a997-446be461345d\": 10000\n }\n }\n ]\n }\n }\n ]\n}\n```\n
\n\n### Creating a workflow by applying a workflow template\n\nYou can also create a workflow by applying a workflow template. If you pass a valid workflow template key as the `templateKey` query parameter with the request, the API will attempt to create a new workflow with the stages defined in the workflow template with the corresponding key.\n\n#### Applicability of stages\nTemplates are created in the context of a particular flag in a particular environment in a particular project. However, because workflows created from a template can be applied to any project, environment, and flag, some steps of the workflow may need to be updated in order to be applicable for the target resource.\n\nYou can pass a `dryRun` query parameter to tell the API to return a report of which steps of the workflow template are applicable in the target project/environment/flag, and which will need to be updated. When the `dryRun` query parameter is present the response body includes a `meta` property that holds a list of parameters that could potentially be inapplicable for the target resource. Each of these parameters will include a `valid` field. You will need to update any invalid parameters in order to create the new workflow. You can do this using the `parameters` property, which overrides the workflow template parameters.\n\n#### Overriding template parameters\nYou can use the `parameters` property in the request body to tell the API to override the specified workflow template parameters with new values that are specific to your target project/environment/flag.\n\n
\nClick to expand example\n\n_Example request body_\n```json\n{\n\t\"name\": \"workflow created from my-template\",\n\t\"description\": \"description of my workflow\",\n\t\"parameters\": [\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3b\",\n\t\t\t\"path\": \"/clauses/0/values\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": [\"updated-segment\"]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3d\",\n\t\t\t\"path\": \"/variationId\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": \"abcd1234-abcd-1234-abcd-1234abcd12\"\n\t\t\t}\n\t\t}\n\t]\n}\n```\n
\n\nIf there are any steps in the template that are not applicable to the target resource, the workflow will not be created, and the `meta` property will be included in the response body detailing which parameters need to be updated.\n", "parameters": [ { "name": "templateKey", @@ -19672,7 +19422,7 @@ "Release pipelines (beta)" ], "summary": "Create a release pipeline", - "description": "Creates a new release pipeline.\n\nThe first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/ld-docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`.\n\nYou can create up to 20 release pipelines per project.\n", + "description": "Creates a new release pipeline.\n\nThe first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](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", "parameters": [ { "name": "projectKey", @@ -19868,7 +19618,7 @@ "Release pipelines (beta)" ], "summary": "Delete release pipeline", - "description": "Deletes a release pipeline.\n\nYou cannot delete the default release pipeline.\n\nIf you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/ld-docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`.\n", + "description": "Deletes a release pipeline.\n\nYou cannot delete the default release pipeline.\n\nIf you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`.\n", "parameters": [ { "name": "projectKey", @@ -20521,11 +20271,11 @@ { "name": "filter", "in": "query", - "description": "Accepts filter by `excludedKeys`, `external`, `includedKeys`, `query`, `tags`, `unbounded`. To learn more about the filter syntax, read the 'Filtering segments' section above.", + "description": "Accepts filter by `excludedKeys`, `external`, `includedKeys`, `query`, `tags`, `unbounded`, `view`. To learn more about the filter syntax, read the 'Filtering segments' section above.", "schema": { "type": "string", "format": "string", - "description": "Accepts filter by `excludedKeys`, `external`, `includedKeys`, `query`, `tags`, `unbounded`. To learn more about the filter syntax, read the 'Filtering segments' section above." + "description": "Accepts filter by `excludedKeys`, `external`, `includedKeys`, `query`, `tags`, `unbounded`, `view`. To learn more about the filter syntax, read the 'Filtering segments' section above." } } ], @@ -21738,7 +21488,7 @@ "Segments" ], "summary": "Get big segment membership for user", - "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/ld-docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nGet the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.\n", + "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nGet the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.\n", "parameters": [ { "name": "projectKey", @@ -22048,7 +21798,7 @@ "Segments" ], "summary": "Get expiring user targets for segment", - "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/ld-docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nGet a list of a segment's user targets that are scheduled for removal.\n", + "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nGet a list of a segment's user targets that are scheduled for removal.\n", "parameters": [ { "name": "projectKey", @@ -22163,7 +21913,7 @@ "Segments" ], "summary": "Update expiring user targets for segment", - "description": "\n> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](https://launchdarkly.com/docs/ld-docs/api/segments/patch-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nUpdate expiring user targets for a segment. Updating a user target expiration uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nIf the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n
\nClick to expand instructions for updating expiring user targets\n\n#### addExpireUserTargetDate\n\nSchedules a date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The date when the user should expire from the segment targeting, in Unix milliseconds.\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds.\n- `version`: The segment version.\n\n#### removeExpireUserTargetDate\n\nRemoves the scheduled expiration for the user in the segment.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n\n
\n", + "description": "\n> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](https://launchdarkly.com/docs/api/segments/patch-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).\n\nUpdate expiring user targets for a segment. Updating a user target expiration uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nIf the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n
\nClick to expand instructions for updating expiring user targets\n\n#### addExpireUserTargetDate\n\nSchedules a date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The date when the user should expire from the segment targeting, in Unix milliseconds.\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds.\n- `version`: The segment version.\n\n#### removeExpireUserTargetDate\n\nRemoves the scheduled expiration for the user in the segment.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n\n
\n", "parameters": [ { "name": "projectKey", @@ -22676,7 +22426,7 @@ "Teams" ], "summary": "Update team", - "description": "Perform a partial update to a team. Updating a team uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams. Several of the instructions require one or more member IDs as parameters. The member ID is returned as part of the [List account members](https://launchdarkly.com/docs/ld-docs/api/account-members/get-members) response. It is the `_id` field of each element in the `items` array.\n\n\n
\nClick to expand instructions for updating teams\n\n#### addCustomRoles\n\nAdds custom roles to the team. Team members will have these custom roles granted to them.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### addMembers\n\nAdds members to the team.\n\n##### Parameters\n\n- `values`: List of member IDs to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addPermissionGrants\n\nAdds permission grants to members for the team. For example, a permission grant could allow a member to act as a team maintainer. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The members do not have to be team members to have a permission grant for the team.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addPermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addRoleAttribute\n\nAdds a role attribute to a team. Team members will have these role attribute values scoped for all custom roles granted to them.\n\n##### Parameters\n\n- `key`: The role attribute key to add.\n- `values`: List of role attribute values for that key.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"addRoleAttribute\",\n \"key\": \"testAttribute\",\n \"values\": [\"someNewValue\", \"someOtherNewValue\"]\n }\n ]\n}\n```\n\n#### removeCustomRoles\n\nRemoves custom roles from the team. The app will no longer grant these custom roles to the team members.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### removeMembers\n\nRemoves members from the team.\n\n##### Parameters\n\n- `values`: List of member IDs to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removePermissionGrants\n\nRemoves permission grants from members for the team. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The `actionSet` and `actions` must match an existing permission grant.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removePermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removeRoleAttribute\n\nRemoves a role attribute from the team.\n\n##### Parameters\n\n- `key`: The role attribute key to remove.\n\nHere's an example:\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"removeRoleAttribute\",\n \"key\": \"testAttribute\"\n }\n ]\n}\n```\n\n#### replaceMembers\n\nReplaces the existing members of the team with the new members.\n\n##### Parameters\n\n- `values`: List of member IDs of the new members.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### replaceRoleAttributes\n\nReplaces the existing role attributes for the team with new role attributes.\n\n##### Parameters\n\n- `values`: A map of role attribute keys to lists of role attribute values\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceRoleAttributes\",\n \"values\": {\n \"testAttribute\": [ \"someNewValue\", \"someOtherNewValue\" ],\n \"projectRoleAttribute\": [ \"project1\", \"project2\"]\n }\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the team.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated team description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the team.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated team name\"\n }]\n}\n```\n\n#### updateRoleAttribute\n\nUpdates a role attribute on the team. Any existing values for the given key will be replaced with the new values. Team members will have these role attribute values scoped for all custom roles granted to them.\n\n##### Parameters\n\n- `key`: The role attribute key to update.\n- `values`: List of role attribute values for that key.\n\nHere's an example:\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"updateRoleAttribute\",\n \"key\": \"testAttribute\",\n \"values\": [\"someNewValue\", \"someOtherNewValue\"]\n }\n ]\n}\n```\n\n
\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", + "description": "Perform a partial update to a team. Updating a team uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams. Several of the instructions require one or more member IDs as parameters. The member ID is returned as part of the [List account members](https://launchdarkly.com/docs/api/account-members/get-members) response. It is the `_id` field of each element in the `items` array.\n\n\n
\nClick to expand instructions for updating teams\n\n#### addCustomRoles\n\nAdds custom roles to the team. Team members will have these custom roles granted to them.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### addMembers\n\nAdds members to the team.\n\n##### Parameters\n\n- `values`: List of member IDs to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addPermissionGrants\n\nAdds permission grants to members for the team. For example, a permission grant could allow a member to act as a team maintainer. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The members do not have to be team members to have a permission grant for the team.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addPermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addRoleAttribute\n\nAdds a role attribute to a team. Team members will have these role attribute values scoped for all custom roles granted to them.\n\n##### Parameters\n\n- `key`: The role attribute key to add.\n- `values`: List of role attribute values for that key.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"addRoleAttribute\",\n \"key\": \"testAttribute\",\n \"values\": [\"someNewValue\", \"someOtherNewValue\"]\n }\n ]\n}\n```\n\n#### removeCustomRoles\n\nRemoves custom roles from the team. The app will no longer grant these custom roles to the team members.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### removeMembers\n\nRemoves members from the team.\n\n##### Parameters\n\n- `values`: List of member IDs to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removePermissionGrants\n\nRemoves permission grants from members for the team. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The `actionSet` and `actions` must match an existing permission grant.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removePermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removeRoleAttribute\n\nRemoves a role attribute from the team.\n\n##### Parameters\n\n- `key`: The role attribute key to remove.\n\nHere's an example:\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"removeRoleAttribute\",\n \"key\": \"testAttribute\"\n }\n ]\n}\n```\n\n#### replaceMembers\n\nReplaces the existing members of the team with the new members.\n\n##### Parameters\n\n- `values`: List of member IDs of the new members.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### replaceRoleAttributes\n\nReplaces the existing role attributes for the team with new role attributes.\n\n##### Parameters\n\n- `value`: A map of role attribute keys to lists of role attribute values\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceRoleAttributes\",\n \"value\": {\n \"testAttribute\": [ \"someNewValue\", \"someOtherNewValue\" ],\n \"projectRoleAttribute\": [ \"project1\", \"project2\"]\n }\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the team.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated team description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the team.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated team name\"\n }]\n}\n```\n\n#### updateRoleAttribute\n\nUpdates a role attribute on the team. Any existing values for the given key will be replaced with the new values. Team members will have these role attribute values scoped for all custom roles granted to them.\n\n##### Parameters\n\n- `key`: The role attribute key to update.\n- `values`: List of role attribute values for that key.\n\nHere's an example:\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"updateRoleAttribute\",\n \"key\": \"testAttribute\",\n \"values\": [\"someNewValue\", \"someOtherNewValue\"]\n }\n ]\n}\n```\n\n
\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", "parameters": [ { "name": "teamKey", @@ -23239,7 +22989,7 @@ "Workflow templates" ], "summary": "Create workflow template", - "description": "Create a template for a feature flag workflow", + "description": "> ### Workflows are in maintenance mode\n>\n> The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.\n\nCreate a template for a feature flag workflow.\n", "requestBody": { "content": { "application/json": { @@ -23833,7 +23583,7 @@ "operationId": "resetToken" } }, - "/api/v2/usage/data-export-events": { + "/api/v2/usage/clientside-contexts": { "get": { "responses": { "200": { @@ -23841,7 +23591,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesIntervalsRep" + "$ref": "#/components/schemas/SeriesListRep" } } } @@ -23900,54 +23650,114 @@ "tags": [ "Account usage (beta)" ], - "summary": "Get data export events usage", - "description": "Get a time-series array of the number of monthly data export events from your account. The granularity is always daily, with a maximum of 31 days.", + "summary": "Get contexts clientside usage", + "description": "Get a detailed time series of the number of context key usages observed by LaunchDarkly in your account, including non-primary context kinds. Use this for breakdowns that go beyond the primary-only aggregation of MAU endpoints. The counts reflect data reported by client-side SDKs.

The supported granularity varies by aggregation type. The maximum time range is 365 days.", "parameters": [ { "name": "from", "in": "query", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month." } }, { "name": "to", "in": "query", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time." } }, { "name": "projectKey", "in": "query", - "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project.", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", "schema": { "type": "string", "format": "string", - "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project." + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key." } }, { "name": "environmentKey", "in": "query", - "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project.", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.", + "schema": { + "type": "string", + "format": "string", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key." + } + }, + { + "name": "contextKind", + "in": "query", + "description": "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.", "schema": { "type": "string", "format": "string", - "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project." + "description": "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind." + } + }, + { + "name": "sdkName", + "in": "query", + "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name." + } + }, + { + "name": "anonymous", + "in": "query", + "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`.", + "schema": { + "type": "string", + "format": "string", + "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "If specified, returns data for each distinct value of the given field. `contextKind` is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkAppId`, `anonymousV2`.", + "schema": { + "type": "string", + "format": "string", + "description": "If specified, returns data for each distinct value of the given field. `contextKind` is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkAppId`, `anonymousV2`." + } + }, + { + "name": "aggregationType", + "in": "query", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`." + } + }, + { + "name": "granularity", + "in": "query", + "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only." } } ], - "operationId": "getDataExportEventsUsage" + "operationId": "getContextsClientsideUsage" } }, - "/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}": { + "/api/v2/usage/data-export-events": { "get": { "responses": { "200": { @@ -23990,22 +23800,22 @@ } } }, - "404": { - "description": "Invalid resource identifier", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } }, - "429": { - "description": "Rate limited", + "503": { + "description": "Service unavailable", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/StatusServiceUnavailable" } } } @@ -24014,77 +23824,94 @@ "tags": [ "Account usage (beta)" ], - "summary": "Get evaluations usage", - "description": "Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", + "summary": "Get data export events usage", + "description": "Get a time series array showing the number of data export events from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.", "parameters": [ + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time." + } + }, { "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, + "in": "query", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key." } }, { "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "in": "query", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.", "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key." } }, { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, + "name": "eventKind", + "in": "query", + "description": "An event kind to filter results by. Can be specified multiple times, one query parameter per event kind.", "schema": { "type": "string", "format": "string", - "description": "The feature flag key" + "description": "An event kind to filter results by. Can be specified multiple times, one query parameter per event kind." } }, { - "name": "from", + "name": "groupBy", "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + "description": "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `environmentId`, `eventKind`.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." + "description": "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `environmentId`, `eventKind`." } }, { - "name": "to", + "name": "aggregationType", "in": "query", - "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp. Defaults to the current time." + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`." } }, { - "name": "tz", + "name": "granularity", "in": "query", - "description": "The timezone to use for breaks between days when returning daily data.", + "description": "Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`.", "schema": { "type": "string", "format": "string", - "description": "The timezone to use for breaks between days when returning daily data." + "description": "Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`." } } ], - "operationId": "getEvaluationsUsage" + "operationId": "getDataExportEventsUsage" } }, - "/api/v2/usage/events/{type}": { + "/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}": { "get": { "responses": { "200": { @@ -24151,28 +23978,50 @@ "tags": [ "Account usage (beta)" ], - "summary": "Get events usage", + "summary": "Get evaluations usage", "description": "Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", "parameters": [ { - "name": "type", + "name": "projectKey", "in": "path", - "description": "The type of event to retrieve. Must be either `received` or `published`.", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The type of event to retrieve. Must be either `received` or `published`." + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" } }, { "name": "from", "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago." + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." } }, { @@ -24184,12 +24033,22 @@ "format": "string", "description": "The series of data returned ends at this timestamp. Defaults to the current time." } + }, + { + "name": "tz", + "in": "query", + "description": "The timezone to use for breaks between days when returning daily data.", + "schema": { + "type": "string", + "format": "string", + "description": "The timezone to use for breaks between days when returning daily data." + } } ], - "operationId": "getEventsUsage" + "operationId": "getEvaluationsUsage" } }, - "/api/v2/usage/experimentation-keys": { + "/api/v2/usage/events/{type}": { "get": { "responses": { "200": { @@ -24197,7 +24056,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesIntervalsRep" + "$ref": "#/components/schemas/SeriesListRep" } } } @@ -24232,22 +24091,22 @@ } } }, - "429": { - "description": "Rate limited", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } }, - "503": { - "description": "Service unavailable", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusServiceUnavailable" + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } @@ -24256,54 +24115,45 @@ "tags": [ "Account usage (beta)" ], - "summary": "Get experimentation keys usage", - "description": "Get a time-series array of the number of monthly experimentation keys from your account. The granularity is always daily, with a maximum of 31 days.", + "summary": "Get events usage", + "description": "Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", "parameters": [ { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." - } - }, - { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "name": "type", + "in": "path", + "description": "The type of event to retrieve. Must be either `received` or `published`.", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + "description": "The type of event to retrieve. Must be either `received` or `published`." } }, { - "name": "projectKey", + "name": "from", "in": "query", - "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project.", + "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", "schema": { "type": "string", "format": "string", - "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project." + "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago." } }, { - "name": "environmentKey", + "name": "to", "in": "query", - "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project.", + "description": "The series of data returned ends at this timestamp. Defaults to the current time.", "schema": { "type": "string", "format": "string", - "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project." + "description": "The series of data returned ends at this timestamp. Defaults to the current time." } } ], - "operationId": "getExperimentationKeysUsage" + "operationId": "getEventsUsage" } }, - "/api/v2/usage/experimentation-units": { + "/api/v2/usage/experimentation-events": { "get": { "responses": { "200": { @@ -24311,7 +24161,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesIntervalsRep" + "$ref": "#/components/schemas/SeriesListRep" } } } @@ -24370,54 +24220,258 @@ "tags": [ "Account usage (beta)" ], - "summary": "Get experimentation units usage", - "description": "Get a time-series array of the number of monthly experimentation units from your account. The granularity is always daily, with a maximum of 31 days.", + "summary": "Get experimentation events usage", + "description": "Get a time series array showing the number of experimentation events from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.", "parameters": [ { "name": "from", "in": "query", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month." } }, { "name": "to", "in": "query", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time." } }, { "name": "projectKey", "in": "query", - "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project.", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", "schema": { "type": "string", "format": "string", - "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project." + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key." } }, { "name": "environmentKey", "in": "query", - "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project.", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.", + "schema": { + "type": "string", + "format": "string", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key." + } + }, + { + "name": "eventKey", + "in": "query", + "description": "An event key to filter results by. Can be specified multiple times, one query parameter per event key.", "schema": { "type": "string", "format": "string", - "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project." + "description": "An event key to filter results by. Can be specified multiple times, one query parameter per event key." + } + }, + { + "name": "eventKind", + "in": "query", + "description": "An event kind to filter results by. Can be specified multiple times, one query parameter per event kind.", + "schema": { + "type": "string", + "format": "string", + "description": "An event kind to filter results by. Can be specified multiple times, one query parameter per event kind." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `environmentId`, `eventKey`, `eventKind`.", + "schema": { + "type": "string", + "format": "string", + "description": "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `environmentId`, `eventKey`, `eventKind`." + } + }, + { + "name": "aggregationType", + "in": "query", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`." + } + }, + { + "name": "granularity", + "in": "query", + "description": "Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`." } } ], - "operationId": "getExperimentationUnitsUsage" + "operationId": "getExperimentationEventsUsage" } }, - "/api/v2/usage/mau": { + "/api/v2/usage/experimentation-keys": { + "get": { + "responses": { + "200": { + "description": "Usage response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesListRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusServiceUnavailable" + } + } + } + } + }, + "tags": [ + "Account usage (beta)" + ], + "summary": "Get experimentation keys usage", + "description": "Get a time series array showing the number of experimentation keys from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.", + "parameters": [ + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time." + } + }, + { + "name": "projectKey", + "in": "query", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", + "schema": { + "type": "string", + "format": "string", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key." + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.", + "schema": { + "type": "string", + "format": "string", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key." + } + }, + { + "name": "experimentId", + "in": "query", + "description": "An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID.", + "schema": { + "type": "string", + "format": "string", + "description": "An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `experimentId`.", + "schema": { + "type": "string", + "format": "string", + "description": "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `experimentId`." + } + }, + { + "name": "aggregationType", + "in": "query", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`." + } + }, + { + "name": "granularity", + "in": "query", + "description": "Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`." + } + } + ], + "operationId": "getExperimentationKeysUsage" + } + }, + "/api/v2/usage/mau": { "get": { "responses": { "200": { @@ -25265,7 +25319,7 @@ "operationId": "getObservabilityTracesUsage" } }, - "/api/v2/usage/service-connections": { + "/api/v2/usage/serverside-contexts": { "get": { "responses": { "200": { @@ -25273,7 +25327,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesIntervalsRep" + "$ref": "#/components/schemas/SeriesListRep" } } } @@ -25332,8 +25386,8 @@ "tags": [ "Account usage (beta)" ], - "summary": "Get service connection usage", - "description": "Get a time-series array of the number of monthly service connections from your account. The granularity is always daily, with a maximum of 31 days.", + "summary": "Get contexts serverside usage", + "description": "Get a detailed time series of the number of context key usages observed by LaunchDarkly in your account, including non-primary context kinds. Use this for breakdowns that go beyond the primary-only aggregation of MAU endpoints. The counts reflect data reported by server-side SDKs.

The supported granularity varies by aggregation type. The maximum time range is 365 days.", "parameters": [ { "name": "from", @@ -25358,28 +25412,88 @@ { "name": "projectKey", "in": "query", - "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project.", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", "schema": { "type": "string", "format": "string", - "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project." + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key." } }, { "name": "environmentKey", "in": "query", - "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project.", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.", "schema": { "type": "string", "format": "string", - "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project." + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key." + } + }, + { + "name": "contextKind", + "in": "query", + "description": "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.", + "schema": { + "type": "string", + "format": "string", + "description": "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind." + } + }, + { + "name": "sdkName", + "in": "query", + "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name." + } + }, + { + "name": "anonymous", + "in": "query", + "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`.", + "schema": { + "type": "string", + "format": "string", + "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "If specified, returns data for each distinct value of the given field. `contextKind` is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkAppId`, `anonymousV2`.", + "schema": { + "type": "string", + "format": "string", + "description": "If specified, returns data for each distinct value of the given field. `contextKind` is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkAppId`, `anonymousV2`." + } + }, + { + "name": "aggregationType", + "in": "query", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`." + } + }, + { + "name": "granularity", + "in": "query", + "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only." } } ], - "operationId": "getServiceConnectionUsage" + "operationId": "getContextsServersideUsage" } }, - "/api/v2/usage/streams/{source}": { + "/api/v2/usage/service-connections": { "get": { "responses": { "200": { @@ -25387,7 +25501,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesListRep" + "$ref": "#/components/schemas/SeriesListRepFloat" } } } @@ -25422,22 +25536,22 @@ } } }, - "404": { - "description": "Invalid resource identifier", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } }, - "429": { - "description": "Rate limited", + "503": { + "description": "Service unavailable", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/StatusServiceUnavailable" } } } @@ -25446,55 +25560,249 @@ "tags": [ "Account usage (beta)" ], - "summary": "Get stream usage", - "description": "Get a time-series array of the number of streaming connections to LaunchDarkly in each time period. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", + "summary": "Get service connections usage", + "description": "Get a time series array showing the number of service connection minutes from your account. The supported granularity varies by aggregation type. The maximum time range is 365 days.", "parameters": [ { - "name": "source", - "in": "path", - "description": "The source of streaming connections to describe. Must be either `client` or `server`.", - "required": true, + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", "schema": { "type": "string", "format": "string", - "description": "The source of streaming connections to describe. Must be either `client` or `server`." + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month." } }, { - "name": "from", + "name": "to", "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time." } }, { - "name": "to", + "name": "projectKey", "in": "query", - "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp. Defaults to the current time." + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key." } }, { - "name": "tz", + "name": "environmentKey", "in": "query", - "description": "The timezone to use for breaks between days when returning daily data.", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.", "schema": { "type": "string", "format": "string", - "description": "The timezone to use for breaks between days when returning daily data." + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key." + } + }, + { + "name": "connectionType", + "in": "query", + "description": "A connection type to filter results by. Can be specified multiple times, one query parameter per connection type.", + "schema": { + "type": "string", + "format": "string", + "description": "A connection type to filter results by. Can be specified multiple times, one query parameter per connection type." + } + }, + { + "name": "relayVersion", + "in": "query", + "description": "A relay version to filter results by. Can be specified multiple times, one query parameter per relay version.", + "schema": { + "type": "string", + "format": "string", + "description": "A relay version to filter results by. Can be specified multiple times, one query parameter per relay version." + } + }, + { + "name": "sdkName", + "in": "query", + "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name." + } + }, + { + "name": "sdkVersion", + "in": "query", + "description": "An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version.", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version." + } + }, + { + "name": "sdkType", + "in": "query", + "description": "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`.", + "schema": { + "type": "string", + "format": "string", + "description": "If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`." + } + }, + { + "name": "aggregationType", + "in": "query", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`." + } + }, + { + "name": "granularity", + "in": "query", + "description": "Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`." } } ], - "operationId": "getStreamUsage" + "operationId": "getServiceConnectionsUsage" } }, - "/api/v2/usage/streams/{source}/bysdkversion": { + "/api/v2/usage/streams/{source}": { + "get": { + "responses": { + "200": { + "description": "Usage response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesListRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Account usage (beta)" + ], + "summary": "Get stream usage", + "description": "Get a time-series array of the number of streaming connections to LaunchDarkly in each time period. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.", + "parameters": [ + { + "name": "source", + "in": "path", + "description": "The source of streaming connections to describe. Must be either `client` or `server`.", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The source of streaming connections to describe. Must be either `client` or `server`." + } + }, + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp. Defaults to the current time." + } + }, + { + "name": "tz", + "in": "query", + "description": "The timezone to use for breaks between days when returning daily data.", + "schema": { + "type": "string", + "format": "string", + "description": "The timezone to use for breaks between days when returning daily data." + } + } + ], + "operationId": "getStreamUsage" + } + }, + "/api/v2/usage/streams/{source}/bysdkversion": { "get": { "responses": { "200": { @@ -25694,6 +26002,190 @@ "operationId": "getStreamUsageSdkversion" } }, + "/api/v2/usage/total-contexts": { + "get": { + "responses": { + "200": { + "description": "Usage response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesListRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusServiceUnavailable" + } + } + } + } + }, + "tags": [ + "Account usage (beta)" + ], + "summary": "Get contexts total usage", + "description": "Get a detailed time series of the number of context key usages observed by LaunchDarkly in your account, including non-primary context kinds. Use this for breakdowns that go beyond the primary-only aggregation of MAU endpoints.

The supported granularity varies by aggregation type. The maximum time range is 365 days.", + "parameters": [ + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time." + } + }, + { + "name": "projectKey", + "in": "query", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.", + "schema": { + "type": "string", + "format": "string", + "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key." + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.", + "schema": { + "type": "string", + "format": "string", + "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key." + } + }, + { + "name": "contextKind", + "in": "query", + "description": "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind.", + "schema": { + "type": "string", + "format": "string", + "description": "A context kind to filter results by. Can be specified multiple times, one query parameter per context kind." + } + }, + { + "name": "sdkName", + "in": "query", + "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name." + } + }, + { + "name": "sdkType", + "in": "query", + "description": "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type." + } + }, + { + "name": "anonymous", + "in": "query", + "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`.", + "schema": { + "type": "string", + "format": "string", + "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "If specified, returns data for each distinct value of the given field. `contextKind` is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkType`, `sdkAppId`, `anonymousV2`.", + "schema": { + "type": "string", + "format": "string", + "description": "If specified, returns data for each distinct value of the given field. `contextKind` is always included as a grouping dimension. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkType`, `sdkAppId`, `anonymousV2`." + } + }, + { + "name": "aggregationType", + "in": "query", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`." + } + }, + { + "name": "granularity", + "in": "query", + "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only." + } + } + ], + "operationId": "getContextsTotalUsage" + } + }, "/api/v2/user-attributes/{projectKey}/{environmentKey}": { "get": { "responses": { @@ -25752,7 +26244,7 @@ "Users (beta)" ], "summary": "Get user attribute names", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get context attribute names\n](https://launchdarkly.com/docs/ld-docs/api/contexts/get-context-attribute-names) instead of this endpoint.\n\nGet all in-use user attributes in the specified environment. The set of in-use attributes typically consists of all attributes seen within the past 30 days.\n", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get context attribute names\n](https://launchdarkly.com/docs/api/contexts/get-context-attribute-names) instead of this endpoint.\n\nGet all in-use user attributes in the specified environment. The set of in-use attributes typically consists of all attributes seen within the past 30 days.\n", "parameters": [ { "name": "projectKey", @@ -25849,7 +26341,7 @@ "Users" ], "summary": "Find users", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for context instances](https://launchdarkly.com/docs/ld-docs/api/contexts/search-context-instances) instead of this endpoint.\n\nSearch users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query.\n\nAn example user attribute filter set is `filter=firstName:Anna,activeTrial:false`. This matches users that have the user attribute `firstName` set to `Anna`, that also have the attribute `activeTrial` set to `false`.\n\nTo paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/ld-docs/api#representations).\n", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for context instances](https://launchdarkly.com/docs/api/contexts/search-context-instances) instead of this endpoint.\n\nSearch users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query.\n\nAn example user attribute filter set is `filter=firstName:Anna,activeTrial:false`. This matches users that have the user attribute `firstName` set to `Anna`, that also have the attribute `activeTrial` set to `false`.\n\nTo paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations).\n", "parameters": [ { "name": "projectKey", @@ -26017,7 +26509,7 @@ "Users" ], "summary": "List users", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for contexts](https://launchdarkly.com/docs/ld-docs/api/contexts/search-contexts) instead of this endpoint.\n\nList all users in the environment. Includes the total count of users. This is useful for exporting all users in the system for further analysis.\n\nEach page displays users up to a set `limit`. The default is 20. To page through, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/ld-docs/api#representations).\n", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for contexts](https://launchdarkly.com/docs/api/contexts/search-contexts) instead of this endpoint.\n\nList all users in the environment. Includes the total count of users. This is useful for exporting all users in the system for further analysis.\n\nEach page displays users up to a set `limit`. The default is 20. To page through, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations).\n", "parameters": [ { "name": "projectKey", @@ -26134,7 +26626,7 @@ "Users" ], "summary": "Get user", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get context instances](https://launchdarkly.com/docs/ld-docs/api/contexts/get-context-instances) instead of this endpoint.\n\nGet a user by key. The `user` object contains all attributes sent in `variation` calls for that key.\n", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get context instances](https://launchdarkly.com/docs/api/contexts/get-context-instances) instead of this endpoint.\n\nGet a user by key. The `user` object contains all attributes sent in `variation` calls for that key.\n", "parameters": [ { "name": "projectKey", @@ -26233,7 +26725,7 @@ "Users" ], "summary": "Delete user", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Delete context instances](https://launchdarkly.com/docs/ld-docs/api/contexts/delete-context-instances) instead of this endpoint.\n\nDelete a user by key.\n", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Delete context instances](https://launchdarkly.com/docs/api/contexts/delete-context-instances) instead of this endpoint.\n\nDelete a user by key.\n", "parameters": [ { "name": "projectKey", @@ -29417,6 +29909,50 @@ "type": "string" }, "style": "simple" + }, + { + "description": "A sort to apply to the list of AI Configs.", + "explode": true, + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The number of AI Configs to return.", + "explode": true, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "explode": true, + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A filter to apply to the list of AI Configs.", + "explode": true, + "in": "query", + "name": "filter", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" } ], "responses": { @@ -29424,10 +29960,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/AITool" - }, - "type": "array" + "$ref": "#/components/schemas/AITools" } } }, @@ -29557,6 +30090,127 @@ ] } }, + "/api/v2/projects/{projectKey}/ai-tools/{toolKey}/versions": { + "get": { + "description": "Get a list of all versions of an AI tool in the given project.", + "operationId": "listAIToolVersions", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "toolKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "A sort to apply to the list of AI Configs.", + "explode": true, + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The number of AI Configs to return.", + "explode": true, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "explode": true, + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AITools" + } + } + }, + "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" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "List AI tool versions", + "tags": [ + "AI Configs (beta)" + ] + } + }, "/api/v2/projects/{projectKey}/ai-tools/{toolKey}": { "delete": { "description": "Delete an existing AI tool.", @@ -30395,1927 +31049,1883 @@ ] } }, - "/api/v2/engineering-insights/charts/deployments/frequency": { + "/api/v2/projects/{projectKey}/views": { "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", + "description": "Get a list of all views in the given project.", + "operationId": "getViews", "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", + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" }, { - "name": "applicationKey", - "in": "query", - "description": "Comma separated list of application keys", + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Comma separated list of application keys" - } + "type": "string" + }, + "style": "simple" }, { - "name": "from", + "description": "A sort to apply to the list of views.", + "explode": true, "in": "query", - "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "name": "sort", + "required": false, "schema": { - "type": "string", - "format": "date-time" - } + "enum": [ + "key", + "name", + "updatedAt" + ], + "type": "string" + }, + "style": "form" }, { - "name": "to", + "description": "The number of views to return.", + "explode": true, "in": "query", - "description": "Unix timestamp in milliseconds. Default value is now.", + "name": "limit", + "required": false, "schema": { - "type": "string", - "format": "date-time" - } + "type": "integer" + }, + "style": "form" }, { - "name": "bucketType", + "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": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.", + "name": "offset", + "required": false, "schema": { - "type": "string", - "format": "string", - "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`." - } + "type": "integer" + }, + "style": "form" }, { - "name": "bucketMs", + "description": "A filter to apply to the list of views.", + "explode": true, "in": "query", - "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).", + "name": "filter", + "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": "A comma-separated list of fields to expand.", + "explode": false, "in": "query", - "description": "Options: `application`, `kind`", - "schema": { - "type": "string", - "format": "string", - "description": "Options: `application`, `kind`" - } - }, - { "name": "expand", - "in": "query", - "description": "Options: `metrics`", + "required": false, "schema": { - "type": "string", - "format": "string", - "description": "Options: `metrics`" - } + "items": { + "enum": [ + "flagsSummary", + "segmentsSummary", + "metricsSummary", + "aiConfigsSummary", + "resourceSummary" + ], + "type": "string" + }, + "type": "array" + }, + "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" + "$ref": "#/components/schemas/Views" } } - } + }, + "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": "List views", "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", + "Views (beta)" + ] + }, + "post": { + "description": "Create a new view in the given project.", + "operationId": "createView", "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" - } - }, - { - "name": "applicationKey", - "in": "query", - "description": "Comma separated list of application keys", - "schema": { - "type": "string", - "format": "string", - "description": "Comma separated list of application keys" - } - }, - { - "name": "groupBy", - "in": "query", - "description": "Property to group results by. Options: `maintainer`", - "schema": { - "type": "string", - "format": "string", - "description": "Property to group results by. Options: `maintainer`" - } - }, - { - "name": "maintainerId", - "in": "query", - "description": "Comma-separated list of individual maintainers to filter results.", - "schema": { - "type": "string", - "format": "string", - "description": "Comma-separated list of individual maintainers to filter results." - } - }, - { - "name": "maintainerTeamKey", - "in": "query", - "description": "Comma-separated list of team maintainer keys to filter results.", - "schema": { - "type": "string", - "format": "string", - "description": "Comma-separated list of team maintainer keys to filter results." - } - }, - { - "name": "expand", - "in": "query", - "description": "Options: `metrics`", - "schema": { - "type": "string", - "format": "string", - "description": "Options: `metrics`" - } + "type": "string" + }, + "style": "simple" } ], - "operationId": "getStaleFlagsChart" - } - }, - "/api/v2/engineering-insights/charts/flags/status": { - "get": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewPost" + } + } + }, + "description": "View object to create", + "required": true + }, "responses": { "200": { - "description": "Chart response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsightsChart" + "$ref": "#/components/schemas/View" } } - } + }, + "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" } } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } + }, + "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": "Create view", "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).", + "Views (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/views/{viewKey}": { + "delete": { + "description": "Delete a specific view by its key.", + "operationId": "deleteView", "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": "my-view", + "explode": false, + "in": "path", + "name": "viewKey", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Comma separated list of application keys" - } + "type": "string" + }, + "style": "simple" } ], - "operationId": "getFlagStatusChart" - } - }, - "/api/v2/engineering-insights/charts/lead-time": { - "get": { "responses": { - "200": { - "description": "Chart response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsightsChart" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationFailedErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } + "204": { + "description": "No content" }, "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": "Delete view", "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).", + "Views (beta)" + ] + }, + "get": { + "description": "Retrieve a specific view by its key.", + "operationId": "getView", "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": "my-view", + "explode": false, + "in": "path", + "name": "viewKey", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Comma separated list of application keys" - } + "type": "string" + }, + "style": "simple" }, { - "name": "from", + "description": "A sort to apply to the list of views.", + "explode": true, "in": "query", - "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "name": "sort", + "required": false, "schema": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds. Default value is 7 days ago." - } + "enum": [ + "key", + "name", + "updatedAt" + ], + "type": "string" + }, + "style": "form" }, { - "name": "to", + "description": "The number of views to return.", + "explode": true, "in": "query", - "description": "Unix timestamp in milliseconds. Default value is now.", + "name": "limit", + "required": false, "schema": { - "type": "integer", - "format": "int64", - "description": "Unix timestamp in milliseconds. Default value is now." - } + "type": "integer" + }, + "style": "form" }, { - "name": "bucketType", + "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": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.", + "name": "offset", + "required": false, "schema": { - "type": "string", - "format": "string", - "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`." - } + "type": "integer" + }, + "style": "form" }, { - "name": "bucketMs", + "description": "A filter to apply to the list of views.", + "explode": true, "in": "query", - "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).", + "name": "filter", + "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": "A comma-separated list of fields to expand.", + "explode": true, "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`.", + "required": false, "schema": { - "type": "string", - "format": "string", - "description": "Options: `metrics`, `percentiles`." - } + "items": { + "enum": [ + "allFlags", + "allSegments", + "allMetrics", + "allAIConfigs", + "allResources", + "flagsSummary", + "segmentsSummary", + "metricsSummary", + "aiConfigsSummary", + "resourceSummary" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" } ], - "operationId": "getLeadTimeChart" - } - }, - "/api/v2/engineering-insights/charts/releases/frequency": { - "get": { "responses": { "200": { - "description": "Chart response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsightsChart" + "$ref": "#/components/schemas/View" } } - } + }, + "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 view", "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).", + "Views (beta)" + ] + }, + "patch": { + "description": "Edit an existing view.\n\nThe request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.\n\nHere's an example:\n ```\n {\n \"description\": \"Example updated description\",\n \"tags\": [\"new-tag\"]\n }\n ```\n", + "operationId": "updateView", "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" - } - }, - { - "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)." - } + "type": "string" + }, + "style": "simple" }, { - "name": "expand", - "in": "query", - "description": "Options: `metrics`", + "example": "my-view", + "explode": false, + "in": "path", + "name": "viewKey", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Options: `metrics`" - } + "type": "string" + }, + "style": "simple" } ], - "operationId": "getReleaseFrequencyChart" - } - }, - "/api/v2/engineering-insights/deployment-events": { - "post": { - "responses": { - "201": { - "description": "Created" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewPatch" + } + } }, - "400": { - "description": "Invalid request", + "description": "A JSON representation of the view including only the fields to update.", + "required": true + }, + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationFailedErrorRep" + "$ref": "#/components/schemas/View" } } - } + }, + "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" }, - "429": { - "description": "Rate limited", + "500": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/Error" } } - } + }, + "description": "Internal server error" } }, + "summary": "Update view", "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" + "Views (beta)" + ] } }, - "/api/v2/engineering-insights/deployments": { - "get": { - "responses": { - "200": { - "description": "Deployment collection response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeploymentCollectionRep" - } + "/api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType}": { + "delete": { + "description": "Unlink one or multiple resources from a view:\n- Unlink flags using flag keys\n- Unlink segments using segment IDs\n- Unlink AI configs using AI config keys\n- Unlink metrics using metric keys\n", + "operationId": "unlinkResource", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "example": "my-view", + "explode": false, + "in": "path", + "name": "viewKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "example": "flags", + "explode": false, + "in": "path", + "name": "resourceType", + "required": true, + "schema": { + "enum": [ + "flags", + "segments", + "aiConfigs", + "metrics" + ], + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewLinkRequest" } } }, - "400": { - "description": "Invalid request", + "description": "The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.", + "required": true + }, + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationFailedErrorRep" + "$ref": "#/components/schemas/UnlinkResourceSuccessResponse" } } - } + }, + "description": "Successful response with unlink details" }, - "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" }, - "429": { - "description": "Rate limited", + "500": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/Error" } } - } + }, + "description": "Internal server error" } }, + "summary": "Unlink resource", "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", + "Views (beta)" + ] + }, + "post": { + "description": "Link one or multiple resources to a view:\n- Link flags using flag keys\n- Link AI configs using AI config keys\n- Link metrics using metric keys\n- Link segments using segment IDs\n", + "operationId": "linkResource", "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": "my-view", + "explode": false, + "in": "path", + "name": "viewKey", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Comma separated list of application keys" - } + "type": "string" + }, + "style": "simple" }, { - "name": "limit", - "in": "query", - "description": "The number of deployments to return. Default is 20. Maximum allowed is 100.", + "example": "flags", + "explode": false, + "in": "path", + "name": "resourceType", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "The number of deployments to return. Default is 20. Maximum allowed is 100." + "enum": [ + "flags", + "segments", + "aiConfigs", + "metrics" + ], + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewLinkRequest" + } } }, + "description": "The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LinkResourceSuccessResponse" + } + } + }, + "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": "Link resource", + "tags": [ + "Views (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/views/{viewKey}/linked/{resourceType}": { + "get": { + "description": "Get a list of all linked resources for a given view.", + "operationId": "getLinkedResources", + "parameters": [ { - "name": "expand", - "in": "query", - "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`", + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`" - } + "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": "my-view", + "explode": false, + "in": "path", + "name": "viewKey", + "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", + "example": "flags", + "explode": false, + "in": "path", + "name": "resourceType", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Identifier used for pagination" - } + "enum": [ + "flags", + "segments", + "aiConfigs", + "metrics" + ], + "type": "string" + }, + "style": "simple" }, { - "name": "before", + "description": "The number of views to return.", + "explode": true, "in": "query", - "description": "Identifier used for pagination", + "name": "limit", + "required": false, "schema": { - "type": "string", - "format": "string", - "description": "Identifier used for pagination" - } + "type": "integer" + }, + "style": "form" }, { - "name": "kind", + "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": "The deployment kind", + "name": "offset", + "required": false, "schema": { - "type": "string", - "format": "string", - "description": "The deployment kind" - } + "type": "integer" + }, + "style": "form" }, { - "name": "status", + "description": "Field to sort by. Default field is `linkedAt`, default order is ascending.", + "explode": true, "in": "query", - "description": "The deployment status", + "name": "sort", + "required": false, "schema": { - "type": "string", - "format": "string", - "description": "The deployment status" - } + "default": "linkedAt", + "enum": [ + "linkedAt", + "name" + ], + "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/ViewLinkedResources" } } - } + }, + "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 linked resources", "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", + "Views (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey}": { + "get": { + "description": "Get a list of all linked views for a resource. Flags, AI configs and metrics are identified by key. Segments are identified by segment ID.", + "operationId": "getLinkedViews", "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": "flags", + "explode": false, + "in": "path", + "name": "resourceType", + "required": true, + "schema": { + "enum": [ + "flags", + "segments", + "aiConfigs", + "metrics" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "my-flag", + "explode": false, + "in": "path", + "name": "resourceKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Environment ID. Required when resourceType is 'segments'", + "example": "6890ff25c3e3830ba1a352e4", + "explode": true, "in": "query", - "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`", + "name": "environmentId", + "required": false, "schema": { - "type": "string", - "format": "string", - "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`" - } + "type": "string" + }, + "style": "form" + }, + { + "description": "The number of views to return.", + "explode": true, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "explode": true, + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" } ], - "operationId": "getDeployment" - }, - "patch": { "responses": { "200": { - "description": "Deployment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeploymentRep" + "$ref": "#/components/schemas/Views" } } - } + }, + "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 linked views for a given resource", "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.", + "Views (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/release-policies": { + "get": { + "description": "Get a list of release policies for the specified project with optional filtering.", + "operationId": "GetReleasePolicies", "parameters": [ { - "name": "deploymentID", - "in": "path", - "description": "The deployment ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The deployment ID" - } + "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": "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" } ], - "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" + "$ref": "#/components/schemas/ReleasePoliciesResponse" } } - } + }, + "description": "List of release policies" }, "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": "List release policies", "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", + "Release policies (beta)" + ] + }, + "post": { + "description": "Create a new release policy for the specified project.", + "operationId": "PostReleasePolicy", "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", + "description": "The project 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" - } - }, - { - "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" - } + "type": "string" + }, + "style": "simple" } ], - "operationId": "getFlagEvents" - } - }, - "/api/v2/engineering-insights/insights/group": { - "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostReleasePolicyRequest" + } + } + }, + "description": "Release policy to create", + "required": true + }, "responses": { "201": { - "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsightGroup" + "$ref": "#/components/schemas/ReleasePolicy" } } - } + }, + "description": "Release policy created 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" + "$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": "Create a release policy", "tags": [ - "Insights scores (beta)" + "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, + "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" + } ], - "summary": "Create insight group", - "description": "Create insight group", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PostInsightGroupParams" + "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 }, - "operationId": "createInsightGroup" - } - }, - "/api/v2/engineering-insights/insights/groups": { - "get": { "responses": { "200": { - "description": "Insight groups collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsightGroupCollection" + "items": { + "$ref": "#/components/schemas/ReleasePolicy" + }, + "type": "array" } } - } + }, + "description": "Release policies updated 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" }, - "429": { - "description": "Rate limited", + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$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": [ - "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", + "Release policies (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/release-policies/{policyKey}": { + "delete": { + "description": "Delete an existing release policy for the specified project.", + "operationId": "DeleteReleasePolicy", "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", + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Sort flag list by field. Prefix field with - to sort in descending order. Allowed fields: name" - } + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" }, { - "name": "query", - "in": "query", - "description": "Filter list of insights groups by name.", + "description": "The project key", + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Filter list of insights groups by name." - } + "type": "string" + }, + "style": "simple" }, { - "name": "expand", - "in": "query", - "description": "Options: `scores`, `environment`, `metadata`", + "description": "The human-readable key of the release policy", + "example": "production-release", + "explode": false, + "in": "path", + "name": "policyKey", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Options: `scores`, `environment`, `metadata`" - } + "type": "string" + }, + "style": "simple" } ], - "operationId": "getInsightGroups" - } - }, - "/api/v2/engineering-insights/insights/groups/{insightGroupKey}": { - "get": { "responses": { - "200": { - "description": "Insight group response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsightGroup" - } - } - } + "204": { + "description": "Release policy 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" + "$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": "Delete a release policy", "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", + "Release policies (beta)" + ] + }, + "get": { + "description": "Retrieve a single release policy by its key for the specified project.", + "operationId": "GetReleasePolicy", "parameters": [ { - "name": "insightGroupKey", + "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", - "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`", + "description": "The release policy key", + "example": "production-release", + "explode": false, + "in": "path", + "name": "policyKey", + "required": true, "schema": { - "type": "string", - "format": "string", - "description": "Options: `scores`, `environment`" - } + "type": "string" + }, + "style": "simple" } ], - "operationId": "getInsightGroup" - }, - "patch": { "responses": { "200": { - "description": "Insight group response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsightGroup" + "$ref": "#/components/schemas/ReleasePolicy" } } - } + }, + "description": "Release policy found" }, "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" - } - } - } - }, - "422": { - "description": "Invalid patch content", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchFailedErrorRep" + "$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 a release policy by key", "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).", + "Release policies (beta)" + ] + }, + "put": { + "description": "Update an existing release policy for the specified project.", + "operationId": "PutReleasePolicy", "parameters": [ { - "name": "insightGroupKey", + "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", - "description": "The insight group key", + "name": "projectKey", "required": true, "schema": { - "type": "string", - "format": "string", - "description": "The insight group key" - } + "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/JSONPatch" - }, - "example": [ - { - "op": "replace", - "path": "/name", - "value": "Prod group" - } - ] + "$ref": "#/components/schemas/PutReleasePolicyRequest" + } } }, + "description": "Release policy data to update", "required": true }, - "operationId": "patchInsightGroup" - }, - "delete": { "responses": { - "204": { - "description": "Action succeeded" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleasePolicy" + } + } + }, + "description": "Release policy updated 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" + "$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 a release policy", "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" + "Release policies (beta)" + ] } }, - "/api/v2/engineering-insights/insights/scores": { + "/api/v2/engineering-insights/charts/deployments/frequency": { "get": { "responses": { "200": { - "description": "Insight score response", + "description": "Chart response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsightScores" + "$ref": "#/components/schemas/InsightsChart" } } } @@ -32350,6 +32960,16 @@ } } }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -32362,16 +32982,15 @@ } }, "tags": [ - "Insights scores (beta)" + "Insights charts (beta)" ], - "summary": "Get insight scores", - "description": "Return insights scores, based on the given parameters. This data is also used in engineering insights metrics views.", + "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": "The project key", - "required": true, "schema": { "type": "string", "format": "string", @@ -32382,7 +33001,6 @@ "name": "environmentKey", "in": "query", "description": "The environment key", - "required": true, "schema": { "type": "string", "format": "string", @@ -32398,20 +33016,78 @@ "format": "string", "description": "Comma separated list of application keys" } + }, + { + "name": "from", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "bucketType", + "in": "query", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`." + } + }, + { + "name": "bucketMs", + "in": "query", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).", + "schema": { + "type": "integer", + "format": "int64", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "Options: `application`, `kind`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `application`, `kind`" + } + }, + { + "name": "expand", + "in": "query", + "description": "Options: `metrics`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `metrics`" + } } ], - "operationId": "getInsightsScores" + "operationId": "getDeploymentFrequencyChart" } }, - "/api/v2/engineering-insights/pull-requests": { + "/api/v2/engineering-insights/charts/flags/stale": { "get": { "responses": { "200": { - "description": "Pull request collection response", + "description": "Chart response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PullRequestCollectionRep" + "$ref": "#/components/schemas/InsightsChart" } } } @@ -32468,10 +33144,10 @@ } }, "tags": [ - "Insights pull requests (beta)" + "Insights charts (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", + "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", @@ -32487,124 +33163,77 @@ { "name": "environmentKey", "in": "query", - "description": "Required if you are using the sort parameter's leadTime option to sort pull requests.", + "description": "The environment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "Required if you are using the sort parameter's leadTime option to sort pull requests." + "description": "The environment key" } }, { "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", + "description": "Comma separated list of application keys", "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." + "description": "Comma separated list of application keys" } }, { - "name": "expand", + "name": "groupBy", "in": "query", - "description": "Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`.", + "description": "Property to group results by. Options: `maintainer`", "schema": { "type": "string", "format": "string", - "description": "Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`." + "description": "Property to group results by. Options: `maintainer`" } }, { - "name": "sort", + "name": "maintainerId", "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": "Comma-separated list of individual maintainers to filter results.", "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" + "description": "Comma-separated list of individual maintainers to filter results." } }, { - "name": "after", + "name": "maintainerTeamKey", "in": "query", - "description": "Identifier used for pagination", + "description": "Comma-separated list of team maintainer keys to filter results.", "schema": { "type": "string", "format": "string", - "description": "Identifier used for pagination" + "description": "Comma-separated list of team maintainer keys to filter results." } }, { - "name": "before", + "name": "expand", "in": "query", - "description": "Identifier used for pagination", + "description": "Options: `metrics`", "schema": { "type": "string", "format": "string", - "description": "Identifier used for pagination" + "description": "Options: `metrics`" } } ], - "operationId": "getPullRequests" + "operationId": "getStaleFlagsChart" } }, - "/api/v2/engineering-insights/repositories": { + "/api/v2/engineering-insights/charts/flags/status": { "get": { "responses": { "200": { - "description": "Repository collection response", + "description": "Chart response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsightsRepositoryCollection" + "$ref": "#/components/schemas/InsightsChart" } } } @@ -32661,34 +33290,56 @@ } }, "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 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": "expand", + "name": "projectKey", "in": "query", - "description": "Expand properties in response. Options: `projects`", + "description": "The project key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "Expand properties in response. Options: `projects`" + "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": "getInsightsRepositories" + "operationId": "getFlagStatusChart" } }, - "/api/v2/engineering-insights/repositories/projects": { - "put": { + "/api/v2/engineering-insights/charts/lead-time": { + "get": { "responses": { "200": { - "description": "Repositories projects response", + "description": "Chart response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsightsRepositoryProjectCollection" + "$ref": "#/components/schemas/InsightsChart" } } } @@ -32745,51 +33396,141 @@ } }, "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 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": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" } }, - "required": true - }, - "operationId": "associateRepositoriesAndProjects" - } - }, - "/api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}": { - "delete": { - "responses": { - "204": { - "description": "Action succeeded" + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationFailedErrorRep" - } - } + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" } }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } + { + "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." } }, - "403": { - "description": "Forbidden", + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds. Default value is now." + } + }, + { + "name": "bucketType", + "in": "query", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`." + } + }, + { + "name": "bucketMs", + "in": "query", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).", + "schema": { + "type": "integer", + "format": "int64", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "Options: `application`, `stage`. Default: `stage`.", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `application`, `stage`. Default: `stage`." + } + }, + { + "name": "expand", + "in": "query", + "description": "Options: `metrics`, `percentiles`.", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `metrics`, `percentiles`." + } + } + ], + "operationId": "getLeadTimeChart" + } + }, + "/api/v2/engineering-insights/charts/releases/frequency": { + "get": { + "responses": { + "200": { + "description": "Chart response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsChart" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -32820,2667 +33561,3207 @@ } }, "tags": [ - "Insights repositories (beta)" + "Insights charts (beta)" ], - "summary": "Remove repository project association", - "description": "Remove repository project association", + "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": "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", + "name": "environmentKey", + "in": "query", + "description": "The environment key", "required": true, "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": "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`)" } - } - } - }, - "AccessAllowedReason": { - "type": "object", - "required": [ - "effect" - ], - "properties": { - "resources": { - "type": "array", - "description": "Resource specifier strings", - "items": { - "type": "string" - }, - "example": [ - "proj/*:env/*;qa_*:/flag/*" - ] }, - "notResources": { - "type": "array", - "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", - "items": { - "type": "string" + { + "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`" } }, - "actions": { - "type": "array", - "description": "Actions to perform on a resource", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" - }, - "example": [ - "*" - ] + { + "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`" + } }, - "notActions": { - "type": "array", - "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" + { + "name": "from", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "schema": { + "type": "string", + "format": "date-time" } }, - "effect": { - "type": "string", - "description": "Whether this statement should allow or deny actions on the resources.", - "example": "allow", - "enum": [ - "allow", - "deny" - ] + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "string", + "format": "date-time" + } }, - "role_name": { - "type": "string" - } - } - }, - "AccessAllowedRep": { - "type": "object", - "required": [ - "action", - "reason" - ], - "properties": { - "action": { - "$ref": "#/components/schemas/ActionIdentifier" + { + "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`." + } }, - "reason": { - "$ref": "#/components/schemas/AccessAllowedReason" - } - } - }, - "AccessDenied": { - "type": "object", - "required": [ - "action", - "reason" - ], - "properties": { - "action": { - "$ref": "#/components/schemas/ActionIdentifier" + { + "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)." + } }, - "reason": { - "$ref": "#/components/schemas/AccessDeniedReason" + { + "name": "expand", + "in": "query", + "description": "Options: `metrics`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `metrics`" + } } - } - }, - "AccessDeniedReason": { - "type": "object", - "required": [ - "effect" ], - "properties": { - "resources": { - "type": "array", - "description": "Resource specifier strings", - "items": { - "type": "string" - }, - "example": [ - "proj/*:env/*;qa_*:/flag/*" - ] + "operationId": "getReleaseFrequencyChart" + } + }, + "/api/v2/engineering-insights/deployment-events": { + "post": { + "responses": { + "201": { + "description": "Created" }, - "notResources": { - "type": "array", - "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", - "items": { - "type": "string" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } } }, - "actions": { - "type": "array", - "description": "Actions to perform on a resource", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" - }, - "example": [ - "*" - ] + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "notActions": { - "type": "array", - "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } } }, - "effect": { - "type": "string", - "description": "Whether this statement should allow or deny actions on the resources.", - "example": "allow", - "enum": [ - "allow", - "deny" - ] + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "role_name": { - "type": "string" + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "AccessTokenPost": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the access token" + }, + "tags": [ + "Insights deployments (beta)" + ], + "summary": "Create deployment event", + "description": "Create deployment event", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostDeploymentEventInput" + } + } }, - "description": { - "type": "string", - "description": "A description for the access token" + "required": true + }, + "operationId": "createDeploymentEvent" + } + }, + "/api/v2/engineering-insights/deployments": { + "get": { + "responses": { + "200": { + "description": "Deployment collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentCollectionRep" + } + } + } }, - "role": { - "type": "string", - "description": "Base role for the token", - "enum": [ - "reader", - "writer", - "admin" - ] + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "customRoleIds": { - "type": "array", - "description": "A list of custom role IDs to use as access limits for the access token", - "items": { - "type": "string" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } } }, - "inlineRole": { - "type": "array", - "description": "A JSON array of statements represented as JSON objects with three attributes: effect, resources, actions. May be used in place of a role.", - "items": { - "$ref": "#/components/schemas/StatementPost" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } } }, - "serviceToken": { - "type": "boolean", - "description": "Whether the token is a service token" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "defaultApiVersion": { - "type": "integer", - "description": "The default API version for this token" + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "ActionIdentifier": { - "type": "string" - }, - "ActionInput": { - "type": "object", - "properties": { - "instructions": { - "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", - "example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}" - } - } - }, - "ActionOutput": { - "type": "object", - "required": [ - "kind", - "instructions" + }, + "tags": [ + "Insights deployments (beta)" ], - "properties": { - "kind": { - "type": "string", - "description": "The type of action for this stage", - "example": "patch" - }, - "instructions": { - "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", - "example": "[{\"kind\": \"turnFlagOn\"}]", - "$ref": "#/components/schemas/Instructions" - } - } - }, - "ActionSpecifier": { - "type": "string" - }, - "AllVariationsSummary": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/VariationSummary" - } - }, - "ApplicationCollectionRep": { - "type": "object", - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "items": { - "type": "array", - "description": "A list of applications", - "items": { - "$ref": "#/components/schemas/ApplicationRep" + "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" } }, - "totalCount": { - "type": "integer", - "description": "The number of applications", - "example": 1 - } - } - }, - "ApplicationFlagCollectionRep": { - "type": "object", - "properties": { - "items": { - "type": "array", - "description": "A list of the flags that have been evaluated by the application", - "items": { - "$ref": "#/components/schemas/FlagListingRep" + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } }, - "totalCount": { - "type": "integer", - "description": "The number of flags that have been evaluated by the application", - "example": 1 - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - } - } - }, - "ApplicationRep": { - "type": "object", - "required": [ - "autoAdded", - "key", - "kind", - "name" - ], - "properties": { - "flags": { - "description": "Details about the flags that have been evaluated by the application", - "$ref": "#/components/schemas/ApplicationFlagCollectionRep" - }, - "_access": { - "description": "Details on the allowed and denied actions for this application", - "$ref": "#/components/schemas/Access" - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } }, - "_version": { - "type": "integer", - "description": "Version of the application" + { + "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." + } }, - "autoAdded": { - "type": "boolean", - "description": "Whether the application was automatically created because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or was created through the LaunchDarkly UI or REST API.", - "example": true + { + "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`" + } }, - "creationDate": { - "description": "Timestamp of when the application version was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + { + "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." + } }, - "description": { - "type": "string", - "description": "The application description", - "example": "The LaunchDarkly Cafe app" + { + "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." + } }, - "key": { - "type": "string", - "description": "The unique identifier of this application", - "example": "com.launchdarkly.cafe" + { + "name": "after", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } }, - "kind": { - "type": "string", - "description": "To distinguish the kind of application", - "example": "mobile", - "enum": [ - "browser", - "mobile", - "server" - ] + { + "name": "before", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } }, - "_maintainer": { - "description": "Associated maintainer member or team info for the application", - "$ref": "#/components/schemas/MaintainerRep" + { + "name": "kind", + "in": "query", + "description": "The deployment kind", + "schema": { + "type": "string", + "format": "string", + "description": "The deployment kind" + } }, - "name": { - "type": "string", - "description": "The name of the application", - "example": "LaunchDarklyCafe" + { + "name": "status", + "in": "query", + "description": "The deployment status", + "schema": { + "type": "string", + "format": "string", + "description": "The deployment status" + } } - } - }, - "ApplicationVersionRep": { - "type": "object", - "required": [ - "autoAdded", - "key", - "name" ], - "properties": { - "_access": { - "description": "Details on the allowed and denied actions for this application version", - "$ref": "#/components/schemas/Access" - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "_version": { - "type": "integer", - "description": "Version of the application version" + "operationId": "getDeployments" + } + }, + "/api/v2/engineering-insights/deployments/{deploymentID}": { + "get": { + "responses": { + "200": { + "description": "Deployment response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentRep" + } + } + } }, - "autoAdded": { - "type": "boolean", - "description": "Whether the application version was automatically created, because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or if the application version was created through the LaunchDarkly UI or REST API. ", - "example": true + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "creationDate": { - "description": "Timestamp of when the application version was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "key": { - "type": "string", - "description": "The unique identifier of this application version", - "example": "2" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "name": { - "type": "string", - "description": "The name of this version", - "example": "01.02.03" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "supported": { - "type": "boolean", - "description": "Whether this version is supported. Only applicable if the application kind is mobile.", - "example": true + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "ApplicationVersionsCollectionRep": { - "type": "object", - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "items": { - "type": "array", - "description": "A list of the versions for this application", - "items": { - "$ref": "#/components/schemas/ApplicationVersionRep" + }, + "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" } }, - "totalCount": { - "type": "integer", - "description": "The number of versions for this application", - "example": 1 + { + "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`" + } } - } - }, - "ApprovalRequestResponse": { - "type": "object", - "required": [ - "_id", - "_version", - "creationDate", - "serviceKind", - "reviewStatus", - "allReviews", - "notifyMemberIds", - "status", - "instructions", - "conflicts", - "_links" ], - "properties": { - "_id": { - "type": "string", - "description": "The ID of this approval request", - "example": "12ab3c45de678910abc12345" - }, - "_version": { - "type": "integer", - "description": "Version of the approval request", - "example": 1 - }, - "creationDate": { - "description": "Timestamp of when the approval request was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "serviceKind": { - "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", - "example": "launchdarkly", - "$ref": "#/components/schemas/ApprovalRequestServiceKind" - }, - "requestorId": { - "type": "string", - "description": "The ID of the member who requested the approval", - "example": "12ab3c45de678910abc12345" - }, - "description": { - "type": "string", - "description": "A human-friendly name for the approval request", - "example": "example: request approval from someone" + "operationId": "getDeployment" + }, + "patch": { + "responses": { + "200": { + "description": "Deployment response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentRep" + } + } + } }, - "reviewStatus": { - "type": "string", - "description": "Current status of the review of this approval request", - "example": "pending", - "enum": [ - "approved", - "declined", - "pending" - ] + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "allReviews": { - "type": "array", - "description": "An array of individual reviews of this approval request", - "items": { - "$ref": "#/components/schemas/ReviewResponse" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } } }, - "notifyMemberIds": { - "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", - "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "appliedDate": { - "description": "Timestamp of when the approval request was applied", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "appliedByMemberId": { - "type": "string", - "description": "The member ID of the member who applied the approval request", - "example": "1234a56b7c89d012345e678f" + "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" + } + ] + } }, - "appliedByServiceTokenId": { - "type": "string", - "description": "The service token ID of the service token which applied the approval request", - "example": "1234a56b7c89d012345e678f" + "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" + } + } + } }, - "status": { - "type": "string", - "description": "Current status of the approval request", - "example": "pending", - "enum": [ - "pending", - "completed", - "failed", - "scheduled" - ] + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag", - "example": "[{\"kind\": \"turnFlagOn\"}]", - "$ref": "#/components/schemas/Instructions" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "conflicts": { - "type": "array", - "description": "Details on any conflicting approval requests", - "items": { - "$ref": "#/components/schemas/Conflict" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } } }, - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "executionDate": { - "description": "Timestamp for when instructions will be executed", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "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" + } }, - "operatingOnId": { - "type": "string", - "description": "ID of scheduled change to edit or delete", - "example": "12ab3c45de678910abc12345" + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } }, - "integrationMetadata": { - "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used", - "$ref": "#/components/schemas/IntegrationMetadata" + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } }, - "source": { - "description": "Details about the source feature flag, if copied", - "$ref": "#/components/schemas/CopiedFromEnv" + { + "name": "query", + "in": "query", + "description": "Filter events by flag key", + "schema": { + "type": "string", + "format": "string", + "description": "Filter events by flag key" + } }, - "customWorkflowMetadata": { - "description": "Details about the custom workflow, if this approval request is part of a custom workflow", - "$ref": "#/components/schemas/CustomWorkflowMeta" + { + "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`" + } }, - "resourceId": { - "type": "string", - "description": "String representation of a resource" + { + "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`)" + } }, - "approvalSettings": { - "description": "The settings for this approval", - "$ref": "#/components/schemas/ApprovalSettings" - } - } - }, - "ApprovalRequestServiceKind": { - "type": "string" - }, - "ApprovalSettings": { - "type": "object", - "required": [ - "required", - "bypassApprovalsForPendingChanges", - "minNumApprovals", - "canReviewOwnRequest", - "canApplyDeclinedChanges", - "serviceKind", - "serviceConfig", - "requiredApprovalTags" - ], - "properties": { - "required": { - "type": "boolean", - "description": "If approvals are required for this environment", - "example": true + { + "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`" + } }, - "bypassApprovalsForPendingChanges": { - "type": "boolean", - "description": "Whether to skip approvals for pending changes", - "example": false + { + "name": "expand", + "in": "query", + "description": "Expand properties in response. Options: `experiments`", + "schema": { + "type": "string", + "format": "string", + "description": "Expand properties in response. Options: `experiments`" + } }, - "minNumApprovals": { - "type": "integer", - "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.", - "example": 1 + { + "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." + } }, - "canReviewOwnRequest": { - "type": "boolean", - "description": "Allow someone who makes an approval request to apply their own change", - "example": false + { + "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." + } }, - "canApplyDeclinedChanges": { - "type": "boolean", - "description": "Allow applying the change as long as at least one person has approved", - "example": true + { + "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." + } }, - "autoApplyApprovedChanges": { - "type": "boolean", - "description": "Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.", - "example": true + { + "name": "after", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } }, - "serviceKind": { - "type": "string", - "description": "Which service to use for managing approvals", - "example": "launchdarkly" + { + "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" + } + } + } }, - "serviceConfig": { - "type": "object", - "additionalProperties": {}, - "example": {} + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "requiredApprovalTags": { - "type": "array", - "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval.", - "items": { - "type": "string" - }, - "example": [ - "require-approval" - ] + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "serviceKindConfigurationId": { - "type": "string", - "description": "Optional field for integration configuration ID of a custom approval integration. This is an Enterprise-only feature.", - "example": "1ef45a85-218f-4428-a8b2-a97e5f56c258" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "resourceKind": { - "type": "string", - "description": "The kind of resource for which the approval settings apply, for example, flag or segment" - } - } - }, - "ApprovalsCapabilityConfig": { - "type": "object", - "properties": { - "additionalFormVariables": { - "type": "array", - "description": "The additional form variables for the approvals capability", - "items": { - "$ref": "#/components/schemas/FormVariable" - }, - "example": "invalid example" - } - } - }, - "AssignedToRep": { - "type": "object", - "properties": { - "membersCount": { - "type": "integer", - "description": "The number of individual members this role is assigned to" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "teamsCount": { - "type": "integer", - "description": "The number of teams this role is assigned to" + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "Audience": { - "type": "object", - "required": [ - "name" + }, + "tags": [ + "Insights scores (beta)" ], - "properties": { - "environment": { - "description": "Details about the environment. When the environment has been deleted, this field is omitted.", - "$ref": "#/components/schemas/EnvironmentSummary" + "summary": "Create insight group", + "description": "Create insight group", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostInsightGroupParams" + } + } }, - "name": { - "type": "string", - "description": "The release phase name", - "example": "Phase 1 - Testing" + "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" + } + } + } }, - "configuration": { - "description": "The configuration for the audience's rollout.", - "$ref": "#/components/schemas/AudienceConfiguration" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "segmentKeys": { - "type": "array", - "description": "A list of segment keys", - "items": { - "type": "string" - }, - "example": [ - "segment-key-123abc" - ] - } - } - }, - "AudienceConfiguration": { - "type": "object", - "required": [ - "releaseStrategy", - "requireApproval" - ], - "properties": { - "releaseStrategy": { - "description": "The release strategy", - "example": "monitoredRelease", - "$ref": "#/components/schemas/ReleaseStrategy" - }, - "requireApproval": { - "type": "boolean", - "description": "Whether or not the audience requires approval", - "example": true - }, - "notifyMemberIds": { - "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", - "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "notifyTeamKeys": { - "type": "array", - "description": "An array of team keys. The members of these teams are notified to review the approval request.", - "items": { - "type": "string" - }, - "example": [ - "example-reviewer-team" - ] + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "releaseGuardianConfiguration": { - "description": "The configuration for the release guardian.", - "$ref": "#/components/schemas/ReleaseGuardianConfiguration" + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "AudiencePost": { - "type": "object", - "required": [ - "environmentKey", - "name" + }, + "tags": [ + "Insights scores (beta)" ], - "properties": { - "environmentKey": { - "type": "string", - "description": "A project-unique key for the environment." + "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": { - "type": "string", - "description": "The audience name" + { + "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`." + } }, - "segmentKeys": { - "type": "array", - "description": "Segments targeted by this audience.", - "items": { - "type": "string" + { + "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" } }, - "configuration": { - "description": "The configuration for the audience's rollout.", - "$ref": "#/components/schemas/AudienceConfiguration" + { + "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`" + } } - } - }, - "AudienceStatus": { - "type": "string" - }, - "Audiences": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Audience" - } - }, - "AuditLogEntryListingRep": { - "type": "object", - "required": [ - "_links", - "_id", - "_accountId", - "date", - "accesses", - "kind", - "name", - "description", - "shortDescription" ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "_id": { - "type": "string", - "description": "The ID of the audit log entry", - "example": "1234a56b7c89d012345e678f" - }, - "_accountId": { - "type": "string", - "description": "The ID of the account to which this audit log entry belongs", - "example": "1234a56b7c89d012345e678f" - }, - "date": { - "description": "Timestamp of the audit log entry", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "accesses": { - "type": "array", - "description": "Details on the actions performed and resources acted on in this audit log entry", - "items": { - "$ref": "#/components/schemas/ResourceAccess" + "operationId": "getInsightGroups" + } + }, + "/api/v2/engineering-insights/insights/groups/{insightGroupKey}": { + "get": { + "responses": { + "200": { + "description": "Insight group response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightGroup" + } + } } }, - "kind": { - "description": "The type of resource this audit log entry refers to", - "example": "flag", - "$ref": "#/components/schemas/ResourceKind" - }, - "name": { - "type": "string", - "description": "The name of the resource this audit log entry refers to", - "example": "Example feature flag" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "description": { - "type": "string", - "description": "Description of the change recorded in the audit log entry", - "example": "Example, turning on the flag for testing" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "shortDescription": { - "type": "string", - "description": "Shorter version of the change recorded in the audit log entry", - "example": "Example, turning on the flag" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "comment": { - "type": "string", - "description": "Optional comment for the audit log entry", - "example": "This is an automated test" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "subject": { - "description": "Details of the subject who initiated the action described in the audit log entry", - "$ref": "#/components/schemas/SubjectDataRep" + "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" + } }, - "member": { - "description": "Details of the member who initiated the action described in the audit log entry", - "$ref": "#/components/schemas/MemberDataRep" + { + "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" + } + } + } }, - "token": { - "description": "Details of the access token that initiated the action described in the audit log entry", - "$ref": "#/components/schemas/TokenSummary" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "app": { - "description": "Details of the authorized application that initiated the action described in the audit log entry", - "$ref": "#/components/schemas/AuthorizedAppDataRep" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "titleVerb": { - "type": "string", - "description": "The action and resource recorded in this audit log entry", - "example": "turned on the flag" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "title": { - "type": "string", - "description": "A description of what occurred, in the format member titleVerb target" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "target": { - "description": "Details of the resource acted upon in this audit log entry", - "example": "[Ariel Flores](mailto:ariel@acme.com) turned on the flag [example-flag](https://app.launchdarkly.com/example-project/production/features/example-flag) in Production", - "$ref": "#/components/schemas/TargetResourceRep" + "422": { + "description": "Invalid patch content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchFailedErrorRep" + } + } + } }, - "parent": { - "$ref": "#/components/schemas/ParentResourceRep" + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "AuditLogEntryListingRepCollection": { - "type": "object", - "required": [ - "items", - "_links" + }, + "tags": [ + "Insights scores (beta)" ], - "properties": { - "items": { - "type": "array", - "description": "An array of audit log entries", - "items": { - "$ref": "#/components/schemas/AuditLogEntryListingRep" + "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" } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" } - } - }, - "AuditLogEntryRep": { - "type": "object", - "required": [ - "_links", - "_id", - "_accountId", - "date", - "accesses", - "kind", - "name", - "description", - "shortDescription" ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "_id": { - "type": "string", - "description": "The ID of the audit log entry", - "example": "1234a56b7c89d012345e678f" - }, - "_accountId": { - "type": "string", - "description": "The ID of the account to which this audit log entry belongs", - "example": "1234a56b7c89d012345e678f" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/name", + "value": "Prod group" + } + ] + } }, - "date": { - "description": "Timestamp of the audit log entry", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "required": true + }, + "operationId": "patchInsightGroup" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" }, - "accesses": { - "type": "array", - "description": "Details on the actions performed and resources acted on in this audit log entry", - "items": { - "$ref": "#/components/schemas/ResourceAccess" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } } }, - "kind": { - "description": "The type of resource this audit log entry refers to", - "example": "flag", - "$ref": "#/components/schemas/ResourceKind" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "name": { - "type": "string", - "description": "The name of the resource this audit log entry refers to", - "example": "Example feature flag" - }, - "description": { - "type": "string", - "description": "Description of the change recorded in the audit log entry", - "example": "Example, turning on the flag for testing" - }, - "shortDescription": { - "type": "string", - "description": "Shorter version of the change recorded in the audit log entry", - "example": "Example, turning on the flag" - }, - "comment": { - "type": "string", - "description": "Optional comment for the audit log entry", - "example": "This is an automated test" - }, - "subject": { - "description": "Details of the subject who initiated the action described in the audit log entry", - "$ref": "#/components/schemas/SubjectDataRep" - }, - "member": { - "description": "Details of the member who initiated the action described in the audit log entry", - "$ref": "#/components/schemas/MemberDataRep" - }, - "token": { - "description": "Details of the access token that initiated the action described in the audit log entry", - "$ref": "#/components/schemas/TokenSummary" - }, - "app": { - "description": "Details of the authorized application that initiated the action described in the audit log entry", - "$ref": "#/components/schemas/AuthorizedAppDataRep" - }, - "titleVerb": { - "type": "string", - "description": "The action and resource recorded in this audit log entry", - "example": "turned on the flag" - }, - "title": { - "type": "string", - "description": "A description of what occurred, in the format member titleVerb target" - }, - "target": { - "description": "Details of the resource acted upon in this audit log entry", - "example": "[Ariel Flores](mailto:ariel@acme.com) turned on the flag [example-flag](https://app.launchdarkly.com/example-project/production/features/example-flag) in Production", - "$ref": "#/components/schemas/TargetResourceRep" - }, - "parent": { - "$ref": "#/components/schemas/ParentResourceRep" - }, - "delta": { - "description": "If the audit log entry has been updated, this is the JSON patch body that was used in the request to update the entity" - }, - "triggerBody": { - "description": "A JSON representation of the external trigger for this audit log entry, if any" - }, - "merge": { - "description": "A JSON representation of the merge information for this audit log entry, if any" - }, - "previousVersion": { - "description": "If the audit log entry has been updated, this is a JSON representation of the previous version of the entity" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "currentVersion": { - "description": "If the audit log entry has been updated, this is a JSON representation of the current version of the entity" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "subentries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AuditLogEntryListingRep" + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } } } - } - }, - "AuditLogEventsHookCapabilityConfigPost": { - "type": "object", - "properties": { - "statements": { - "description": "The set of resources you wish to subscribe to audit log notifications for.", - "$ref": "#/components/schemas/StatementPostList" - } - } - }, - "AuditLogEventsHookCapabilityConfigRep": { - "type": "object", - "properties": { - "statements": { - "type": "array", - "description": "The set of resources you wish to subscribe to audit log notifications for.", - "items": { - "$ref": "#/components/schemas/Statement" + }, + "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" } } - } - }, - "AuthorizedAppDataRep": { - "type": "object", - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + ], + "operationId": "deleteInsightGroup" + } + }, + "/api/v2/engineering-insights/insights/scores": { + "get": { + "responses": { + "200": { + "description": "Insight score response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightScores" + } + } } }, - "_id": { - "type": "string", - "description": "The ID of the authorized application" - }, - "isScim": { - "type": "boolean", - "description": "Whether the application is authorized through SCIM" - }, - "name": { - "type": "string", - "description": "The authorized application name" - }, - "maintainerName": { - "type": "string", - "description": "The name of the maintainer for this authorized application" - } - } - }, - "BayesianBetaBinomialStatsRep": { - "type": "object", - "properties": { - "priorAlpha": { - "type": "number", - "description": "Sum of converted pseudo-units for prior distribution" - }, - "priorBeta": { - "type": "number", - "description": "Sum of non-converted pseudo-units for prior distribution" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "priorMean": { - "type": "number", - "description": "Mean of the prior distribution" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "dataWeight": { - "type": "number", - "description": "The precision weight of the data mean" - } - } - }, - "BayesianNormalStatsRep": { - "type": "object", - "properties": { - "dataWeight": { - "type": "number", - "description": "The precision weight of the data mean" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "priorMean": { - "type": "number", - "description": "Mean of the prior distribution" + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "BigSegmentStoreIntegration": { - "type": "object", - "required": [ - "_links", - "_id", - "integrationKey", - "projectKey", - "environmentKey", - "config", - "on", - "tags", - "name", - "version", - "_status" + }, + "tags": [ + "Insights scores (beta)" ], - "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/BigSegmentStoreIntegrationLinks" - }, - "_id": { - "type": "string", - "description": "The integration ID", - "example": "12ab3c4d5ef1a2345bcde67f" - }, - "integrationKey": { - "type": "string", - "description": "The integration key", - "example": "redis", - "enum": [ - "redis", - "dynamodb" - ] - }, - "projectKey": { - "type": "string", + "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", - "example": "default" + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } }, - "environmentKey": { - "type": "string", + { + "name": "environmentKey", + "in": "query", "description": "The environment key", - "example": "development" - }, - "config": { - "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", - "$ref": "#/components/schemas/FormVariableConfig" - }, - "on": { - "type": "boolean", - "description": "Whether the configuration is turned on", - "example": true + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } }, - "tags": { - "type": "array", - "description": "List of tags for this configuration", - "items": { - "type": "string" - }, - "example": [] + { + "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" + } + } + } }, - "name": { - "type": "string", - "description": "Name of the configuration", - "example": "Development environment configuration" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "version": { - "type": "integer", - "description": "Version of the current configuration", - "example": 1 + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "_access": { - "description": "Details on the allowed and denied actions for this configuration", - "$ref": "#/components/schemas/Access" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "_status": { - "description": "Details on the connection status of the persistent store integration", - "$ref": "#/components/schemas/BigSegmentStoreStatus" - } - } - }, - "BigSegmentStoreIntegrationCollection": { - "type": "object", - "required": [ - "_links", - "items" - ], - "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/BigSegmentStoreIntegrationCollectionLinks" + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "items": { - "type": "array", - "description": "An array of persistent store integration configurations", - "items": { - "$ref": "#/components/schemas/BigSegmentStoreIntegration" + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } } } - } - }, - "BigSegmentStoreIntegrationCollectionLinks": { - "type": "object", - "required": [ - "self" + }, + "tags": [ + "Insights pull requests (beta)" ], - "properties": { - "self": { - "$ref": "#/components/schemas/Link" + "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" + } }, - "parent": { - "$ref": "#/components/schemas/Link" - } - } - }, - "BigSegmentStoreIntegrationLinks": { - "type": "object", - "required": [ - "self", - "parent", - "project", - "environment" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/Link" + { + "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." + } }, - "parent": { - "$ref": "#/components/schemas/Link" + { + "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" + } }, - "project": { - "$ref": "#/components/schemas/Link" + { + "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`." + } }, - "environment": { - "$ref": "#/components/schemas/Link" - } - } - }, - "BigSegmentStoreStatus": { - "type": "object", - "properties": { - "available": { - "type": "boolean", - "description": "Whether the persistent store integration is fully synchronized with the LaunchDarkly environment, and the lastSync occurred within a few minutes", - "example": true + { + "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" + } }, - "potentiallyStale": { - "type": "boolean", - "description": "Whether the persistent store integration may not be fully synchronized with the LaunchDarkly environment. true if the integration could be stale.", - "example": false + { + "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." + } }, - "lastSync": { - "description": "Timestamp of when the most recent successful sync occurred between the persistent store integration and the LaunchDarkly environment.", - "example": "1717263000000", - "$ref": "#/components/schemas/UnixMillis" + { + "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`." + } }, - "lastError": { - "description": "Timestamp of when the most recent synchronization error occurred, if any", - "example": "1714584600000", - "$ref": "#/components/schemas/UnixMillis" + { + "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." + } }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StoreIntegrationError" + { + "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" } } - } - }, - "BigSegmentTarget": { - "type": "object", - "required": [ - "userKey", - "included", - "excluded" ], - "properties": { - "userKey": { - "type": "string", - "description": "The target key" + "operationId": "getPullRequests" + } + }, + "/api/v2/engineering-insights/repositories": { + "get": { + "responses": { + "200": { + "description": "Repository collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsRepositoryCollection" + } + } + } }, - "included": { - "type": "boolean", - "description": "Indicates whether the target is included.
Included targets are always segment members, regardless of segment rules." + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "excluded": { - "type": "boolean", - "description": "Indicates whether the target is excluded.
Segment rules bypass excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly." + "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" + } + } + } } - } - }, - "BooleanDefaults": { - "type": "object", - "properties": { - "trueDisplayName": { - "type": "string", - "description": "The display name for the true variation, displayed in the LaunchDarkly user interface", - "example": "True" + }, + "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" + } + } + } }, - "falseDisplayName": { - "type": "string", - "description": "The display name for the false variation, displayed in the LaunchDarkly user interface", - "example": "False" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "trueDescription": { - "type": "string", - "description": "The description for the true variation", - "example": "serve true" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "falseDescription": { - "type": "string", - "description": "The description for the false variation", - "example": "serve false" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "onVariation": { - "type": "integer", - "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is on and the target did not match any rules", - "example": 0 + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } }, - "offVariation": { - "type": "integer", - "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off", - "example": 1 + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "BooleanFlagDefaults": { - "type": "object", - "required": [ - "trueDisplayName", - "falseDisplayName", - "trueDescription", - "falseDescription", - "onVariation", - "offVariation" + }, + "tags": [ + "Insights repositories (beta)" ], - "properties": { - "trueDisplayName": { - "type": "string", - "description": "The display name for the true variation, displayed in the LaunchDarkly user interface", - "example": "True" + "summary": "Associate repositories with projects", + "description": "Associate repositories with projects", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsRepositoryProjectMappings" + } + } }, - "falseDisplayName": { - "type": "string", - "description": "The display name for the false variation, displayed in the LaunchDarkly user interface", - "example": "False" + "required": true + }, + "operationId": "associateRepositoriesAndProjects" + } + }, + "/api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}": { + "delete": { + "responses": { + "204": { + "description": "Action succeeded" }, - "trueDescription": { - "type": "string", - "description": "The description for the true variation", - "example": "serve true" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } }, - "falseDescription": { - "type": "string", - "description": "The description for the false variation", - "example": "serve false" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "onVariation": { - "type": "integer", - "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is on and the target did not match any rules", - "example": 0 + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } }, - "offVariation": { - "type": "integer", - "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off", - "example": 1 + "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" + } + } + } } - } - }, - "BranchCollectionRep": { - "type": "object", - "required": [ - "_links", - "items" + }, + "tags": [ + "Insights repositories (beta)" ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "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" + } }, - "items": { - "type": "array", - "description": "An array of branches", - "items": { - "$ref": "#/components/schemas/BranchRep" + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" } } - } - }, - "BranchRep": { + ], + "operationId": "deleteRepositoryProject" + } + } + }, + "components": { + "schemas": { + "AIConfigRep": { "type": "object", "required": [ - "name", - "head", - "syncTime", - "_links" + "key", + "name" ], "properties": { - "name": { + "key": { "type": "string", - "description": "The branch name", - "example": "main" + "description": "The key of the AI Config", + "example": "aiconfig-key-123abc" }, - "head": { + "name": { "type": "string", - "description": "An ID representing the branch HEAD. For example, a commit SHA.", - "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" - }, - "updateSequenceId": { - "type": "integer", - "format": "int64", - "description": "An optional ID used to prevent older data from overwriting newer data", - "example": 25 - }, - "syncTime": { - "description": "A timestamp indicating when the branch was last synced", - "example": "1636558831870", - "$ref": "#/components/schemas/UnixMillis" - }, - "references": { - "type": "array", - "description": "An array of flag references found on the branch", - "items": { - "$ref": "#/components/schemas/ReferenceRep" - } - }, - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" + "description": "The name of the AI Config", + "example": "AI Config 1" } } }, - "BulkEditMembersRep": { + "Access": { "type": "object", + "required": [ + "denied", + "allowed" + ], "properties": { - "members": { + "denied": { "type": "array", - "description": "A list of members IDs of the members who were successfully updated.", "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] + "$ref": "#/components/schemas/AccessDenied" + } }, - "errors": { + "allowed": { "type": "array", - "description": "A list of member IDs and errors for the members whose updates failed.", "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "example": [ - { - "507f1f77bcf86cd799439011": "you cannot modify your own role" - } - ] + "$ref": "#/components/schemas/AccessAllowedRep" + } } } }, - "BulkEditTeamsRep": { + "AccessAllowedReason": { "type": "object", + "required": [ + "effect" + ], "properties": { - "memberIDs": { + "resources": { "type": "array", - "description": "A list of member IDs of the members who were added to the teams.", + "description": "Resource specifier strings", "items": { "type": "string" }, "example": [ - "1234a56b7c89d012345e678f" + "proj/*:env/*;qa_*:/flag/*" ] }, - "teamKeys": { + "notResources": { "type": "array", - "description": "A list of team keys of the teams that were successfully updated.", + "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", "items": { "type": "string" + } + }, + "actions": { + "type": "array", + "description": "Actions to perform on a resource", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" }, "example": [ - "example-team-1" + "*" ] }, - "errors": { + "notActions": { "type": "array", - "description": "A list of team keys and errors for the teams whose updates failed.", + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "example": [ - { - "example-team-2": "example failure message" - } - ] - } - } - }, - "CallerIdentityRep": { - "type": "object", - "properties": { - "accountId": { - "type": "string" - }, - "environmentId": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "environmentName": { - "type": "string" - }, - "projectName": { - "type": "string" - }, - "authKind": { - "type": "string" - }, - "tokenKind": { - "type": "string" - }, - "clientId": { - "type": "string" - }, - "tokenName": { - "type": "string" + "$ref": "#/components/schemas/ActionSpecifier" + } }, - "tokenId": { - "type": "string" + "effect": { + "type": "string", + "description": "Whether this statement should allow or deny actions on the resources.", + "example": "allow", + "enum": [ + "allow", + "deny" + ] }, - "memberId": { + "role_name": { "type": "string" - }, - "serviceToken": { - "type": "boolean" } } }, - "CapabilityConfigPost": { + "AccessAllowedRep": { "type": "object", + "required": [ + "action", + "reason" + ], "properties": { - "approvals": { - "description": "The approvals capability configuration for this integration", - "example": "{\"additionalFormVariables\": \"[]\"}", - "$ref": "#/components/schemas/ApprovalsCapabilityConfig" + "action": { + "$ref": "#/components/schemas/ActionIdentifier" }, - "auditLogEventsHook": { - "description": "The audit log events hook capability configuration for the integration", - "example": "{\"key\": \"value\"}", - "$ref": "#/components/schemas/AuditLogEventsHookCapabilityConfigPost" + "reason": { + "$ref": "#/components/schemas/AccessAllowedReason" } } }, - "CapabilityConfigRep": { + "AccessDenied": { "type": "object", + "required": [ + "action", + "reason" + ], "properties": { - "approvals": { - "description": "The approvals capability configuration for this integration", - "$ref": "#/components/schemas/ApprovalsCapabilityConfig" + "action": { + "$ref": "#/components/schemas/ActionIdentifier" }, - "auditLogEventsHook": { - "description": "The audit log events hook capability configuration for the integration", - "example": "{\"policy\": \"value\"}", - "$ref": "#/components/schemas/AuditLogEventsHookCapabilityConfigRep" + "reason": { + "$ref": "#/components/schemas/AccessDeniedReason" } } }, - "Clause": { + "AccessDeniedReason": { "type": "object", "required": [ - "attribute", - "op", - "values", - "negate" + "effect" ], "properties": { - "_id": { - "type": "string" + "resources": { + "type": "array", + "description": "Resource specifier strings", + "items": { + "type": "string" + }, + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ] }, - "attribute": { - "type": "string" + "notResources": { + "type": "array", + "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", + "items": { + "type": "string" + } }, - "op": { - "$ref": "#/components/schemas/Operator" + "actions": { + "type": "array", + "description": "Actions to perform on a resource", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "example": [ + "*" + ] }, - "values": { + "notActions": { "type": "array", - "items": {} + "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" + } }, - "contextKind": { - "type": "string" + "effect": { + "type": "string", + "description": "Whether this statement should allow or deny actions on the resources.", + "example": "allow", + "enum": [ + "allow", + "deny" + ] }, - "negate": { - "type": "boolean" + "role_name": { + "type": "string" } } }, - "Client": { + "AccessTokenPost": { "type": "object", - "required": [ - "_links", - "name", - "_accountId", - "_clientId", - "redirectUri", - "_creationDate" - ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/oauth/clients", - "type": "application/json" - }, - "self": { - "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45", - "type": "application/json" - } - } - }, "name": { "type": "string", - "description": "Client name" + "description": "A human-friendly name for the access token" }, "description": { "type": "string", - "description": "Client description" + "description": "A description for the access token" }, - "_accountId": { + "role": { "type": "string", - "description": "The account ID the client is registered under" + "description": "Base role for the token", + "enum": [ + "reader", + "writer", + "admin" + ] }, - "_clientId": { - "type": "string", - "description": "The client's unique ID" + "customRoleIds": { + "type": "array", + "description": "A list of custom role IDs to use as access limits for the access token", + "items": { + "type": "string" + } }, - "_clientSecret": { - "type": "string", - "description": "The client secret. This will only be shown upon creation." + "inlineRole": { + "type": "array", + "description": "A JSON array of statements represented as JSON objects with three attributes: effect, resources, actions. May be used in place of a role.", + "items": { + "$ref": "#/components/schemas/StatementPost" + } }, - "redirectUri": { - "type": "string", - "description": "The client's redirect URI" + "serviceToken": { + "type": "boolean", + "description": "Whether the token is a service token" }, - "_creationDate": { - "description": "Timestamp of client creation date", - "example": "1494437420312", - "$ref": "#/components/schemas/UnixMillis" + "defaultApiVersion": { + "type": "integer", + "description": "The default API version for this token" } } }, - "ClientCollection": { + "ActionIdentifier": { + "type": "string" + }, + "ActionInput": { + "type": "object", + "properties": { + "instructions": { + "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", + "example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}" + } + } + }, + "ActionOutput": { "type": "object", "required": [ - "_links", - "items" + "kind", + "instructions" ], + "properties": { + "kind": { + "type": "string", + "description": "The type of action for this stage", + "example": "patch" + }, + "instructions": { + "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", + "example": "[{\"kind\": \"turnFlagOn\"}]", + "$ref": "#/components/schemas/Instructions" + } + } + }, + "ActionSpecifier": { + "type": "string" + }, + "AllVariationsSummary": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariationSummary" + } + }, + "ApplicationCollectionRep": { + "type": "object", "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/oauth/clients", - "type": "application/json" - } - } + "description": "The location and content type of related resources" }, "items": { "type": "array", - "description": "List of client objects", + "description": "A list of applications", "items": { - "$ref": "#/components/schemas/Client" + "$ref": "#/components/schemas/ApplicationRep" } + }, + "totalCount": { + "type": "integer", + "description": "The number of applications", + "example": 1 } } }, - "ClientSideAvailability": { + "ApplicationFlagCollectionRep": { "type": "object", "properties": { - "usingMobileKey": { - "type": "boolean" + "items": { + "type": "array", + "description": "A list of the flags that have been evaluated by the application", + "items": { + "$ref": "#/components/schemas/FlagListingRep" + } }, - "usingEnvironmentId": { - "type": "boolean" + "totalCount": { + "type": "integer", + "description": "The number of flags that have been evaluated by the application", + "example": 1 + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "ClientSideAvailabilityPost": { + "ApplicationRep": { "type": "object", "required": [ - "usingEnvironmentId", - "usingMobileKey" + "autoAdded", + "key", + "kind", + "name" ], "properties": { - "usingEnvironmentId": { - "type": "boolean", - "description": "Whether to enable availability for client-side SDKs. Defaults to false.", - "example": true + "flags": { + "description": "Details about the flags that have been evaluated by the application", + "$ref": "#/components/schemas/ApplicationFlagCollectionRep" }, - "usingMobileKey": { + "_access": { + "description": "Details on the allowed and denied actions for this application", + "$ref": "#/components/schemas/Access" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_version": { + "type": "integer", + "description": "Version of the application" + }, + "autoAdded": { "type": "boolean", - "description": "Whether to enable availability for mobile SDKs. Defaults to true.", + "description": "Whether the application was automatically created because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or was created through the LaunchDarkly UI or REST API.", "example": true - } - } - }, - "CompletedBy": { - "type": "object", - "properties": { - "member": { - "description": "The LaunchDarkly member who marked this phase as complete", - "$ref": "#/components/schemas/MemberSummary" }, - "token": { - "description": "The service token used to mark this phase as complete", - "$ref": "#/components/schemas/TokenSummary" + "creationDate": { + "description": "Timestamp of when the application version was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "description": { + "type": "string", + "description": "The application description", + "example": "The LaunchDarkly Cafe app" + }, + "key": { + "type": "string", + "description": "The unique identifier of this application", + "example": "com.launchdarkly.cafe" + }, + "kind": { + "type": "string", + "description": "To distinguish the kind of application", + "example": "mobile", + "enum": [ + "browser", + "mobile", + "server" + ] + }, + "_maintainer": { + "description": "Associated maintainer member or team info for the application", + "$ref": "#/components/schemas/MaintainerRep" + }, + "name": { + "type": "string", + "description": "The name of the application", + "example": "LaunchDarklyCafe" } } }, - "ConditionInput": { + "ApplicationVersionRep": { "type": "object", + "required": [ + "autoAdded", + "key", + "name" + ], "properties": { - "scheduleKind": { - "description": "Whether the scheduled execution of the workflow stage is relative or absolute. If relative, the waitDuration and waitDurationUnit specify when the execution occurs. If absolute, the executionDate specifies when the execution occurs.", - "example": "relative", - "enum": [ - "absolute", - "relative" - ], - "$ref": "#/components/schemas/ScheduleKind" + "_access": { + "description": "Details on the allowed and denied actions for this application version", + "$ref": "#/components/schemas/Access" }, - "executionDate": { - "description": "For workflow stages whose scheduled execution is absolute, the time, in Unix milliseconds, when the stage should start.", - "example": "1706810400000", - "$ref": "#/components/schemas/UnixMillis" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "waitDuration": { + "_version": { "type": "integer", - "description": "For workflow stages whose scheduled execution is relative, how far in the future the stage should start.", - "example": 2 - }, - "waitDurationUnit": { - "description": "For workflow stages whose scheduled execution is relative, the unit of measure for the waitDuration.", - "example": "calendarDay", - "enum": [ - "minute", - "hour", - "calendarDay", - "calendarWeek" - ], - "$ref": "#/components/schemas/DurationUnit" + "description": "Version of the application version" }, - "executeNow": { + "autoAdded": { "type": "boolean", - "description": "Whether the workflow stage should be executed immediately", - "example": false + "description": "Whether the application version was automatically created, because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or if the application version was created through the LaunchDarkly UI or REST API. ", + "example": true }, - "description": { + "creationDate": { + "description": "Timestamp of when the application version was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "key": { "type": "string", - "description": "A description of the approval required for this stage", - "example": "Require example-team approval for final stage" + "description": "The unique identifier of this application version", + "example": "2" }, - "notifyMemberIds": { - "type": "array", - "description": "A list of member IDs for the members to request approval from for this stage", - "items": { - "type": "string" + "name": { + "type": "string", + "description": "The name of this version", + "example": "01.02.03" + }, + "supported": { + "type": "boolean", + "description": "Whether this version is supported. Only applicable if the application kind is mobile.", + "example": true + } + } + }, + "ApplicationVersionsCollectionRep": { + "type": "object", + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - "507f1f77bcf86cd799439011" - ] + "description": "The location and content type of related resources" }, - "notifyTeamKeys": { + "items": { "type": "array", - "description": "A list of team keys for the teams to request approval from for this stage", + "description": "A list of the versions for this application", "items": { - "type": "string" - }, - "example": [ - "example-team" - ] + "$ref": "#/components/schemas/ApplicationVersionRep" + } }, - "kind": { - "description": "The type of condition to meet before executing this stage of the workflow. Use schedule to schedule a workflow stage. Use ld-approval to add an approval request to a workflow stage.", - "example": "schedule", - "$ref": "#/components/schemas/ConditionKind" + "totalCount": { + "type": "integer", + "description": "The number of versions for this application", + "example": 1 } } }, - "ConditionKind": { - "type": "string" - }, - "ConditionOutput": { + "ApprovalRequestResponse": { "type": "object", "required": [ "_id", - "_execution", - "description", - "notifyMemberIds", + "_version", + "creationDate", + "serviceKind", + "reviewStatus", "allReviews", - "reviewStatus" + "notifyMemberIds", + "status", + "instructions", + "conflicts", + "_links" ], "properties": { "_id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "_execution": { - "$ref": "#/components/schemas/ExecutionOutput" + "type": "string", + "description": "The ID of this approval request", + "example": "12ab3c45de678910abc12345" }, - "scheduleKind": { - "$ref": "#/components/schemas/ScheduleKind" + "_version": { + "type": "integer", + "description": "Version of the approval request", + "example": 1 }, - "executionDate": { + "creationDate": { + "description": "Timestamp of when the approval request was created", + "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" }, - "waitDuration": { - "type": "integer" + "serviceKind": { + "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", + "example": "launchdarkly", + "$ref": "#/components/schemas/ApprovalRequestServiceKind" }, - "waitDurationUnit": { - "$ref": "#/components/schemas/DurationUnit" + "requestorId": { + "type": "string", + "description": "The ID of the member who requested the approval", + "example": "12ab3c45de678910abc12345" }, "description": { - "type": "string" + "type": "string", + "description": "A human-friendly name for the approval request", + "example": "example: request approval from someone" + }, + "reviewStatus": { + "type": "string", + "description": "Current status of the review of this approval request", + "example": "pending", + "enum": [ + "approved", + "declined", + "pending" + ] + }, + "allReviews": { + "type": "array", + "description": "An array of individual reviews of this approval request", + "items": { + "$ref": "#/components/schemas/ReviewResponse" + } }, "notifyMemberIds": { "type": "array", + "description": "An array of member IDs. These members are notified to review the approval request.", "items": { "type": "string" - } + }, + "example": [ + "1234a56b7c89d012345e678f" + ] }, - "allReviews": { + "appliedDate": { + "description": "Timestamp of when the approval request was applied", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "appliedByMemberId": { + "type": "string", + "description": "The member ID of the member who applied the approval request", + "example": "1234a56b7c89d012345e678f" + }, + "appliedByServiceTokenId": { + "type": "string", + "description": "The service token ID of the service token which applied the approval request", + "example": "1234a56b7c89d012345e678f" + }, + "status": { + "type": "string", + "description": "Current status of the approval request", + "example": "pending", + "enum": [ + "pending", + "completed", + "failed", + "scheduled" + ] + }, + "instructions": { + "description": "List of instructions in semantic patch format to be applied to the feature flag", + "example": "[{\"kind\": \"turnFlagOn\"}]", + "$ref": "#/components/schemas/Instructions" + }, + "conflicts": { "type": "array", + "description": "Details on any conflicting approval requests", "items": { - "$ref": "#/components/schemas/ReviewOutput" + "$ref": "#/components/schemas/Conflict" } }, - "reviewStatus": { - "type": "string" + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" }, - "appliedDate": { + "executionDate": { + "description": "Timestamp for when instructions will be executed", + "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" - } - } - }, - "Conflict": { - "type": "object", - "properties": { - "instruction": { - "description": "Instruction in semantic patch format to be applied to the feature flag", - "$ref": "#/components/schemas/Instruction" }, - "reason": { + "operatingOnId": { "type": "string", - "description": "Reason why the conflict exists" + "description": "ID of scheduled change to edit or delete", + "example": "12ab3c45de678910abc12345" + }, + "integrationMetadata": { + "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used", + "$ref": "#/components/schemas/IntegrationMetadata" + }, + "source": { + "description": "Details about the source feature flag, if copied", + "$ref": "#/components/schemas/CopiedFromEnv" + }, + "customWorkflowMetadata": { + "description": "Details about the custom workflow, if this approval request is part of a custom workflow", + "$ref": "#/components/schemas/CustomWorkflowMeta" + }, + "resourceId": { + "type": "string", + "description": "String representation of a resource" + }, + "approvalSettings": { + "description": "The settings for this approval", + "$ref": "#/components/schemas/ApprovalSettings" } } }, - "ConflictOutput": { + "ApprovalRequestServiceKind": { + "type": "string" + }, + "ApprovalSettings": { "type": "object", "required": [ - "stageId", - "message" + "required", + "bypassApprovalsForPendingChanges", + "minNumApprovals", + "canReviewOwnRequest", + "canApplyDeclinedChanges", + "serviceKind", + "serviceConfig", + "requiredApprovalTags" ], "properties": { - "stageId": { + "required": { + "type": "boolean", + "description": "If approvals are required for this environment", + "example": true + }, + "bypassApprovalsForPendingChanges": { + "type": "boolean", + "description": "Whether to skip approvals for pending changes", + "example": false + }, + "minNumApprovals": { + "type": "integer", + "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.", + "example": 1 + }, + "canReviewOwnRequest": { + "type": "boolean", + "description": "Allow someone who makes an approval request to apply their own change", + "example": false + }, + "canApplyDeclinedChanges": { + "type": "boolean", + "description": "Allow applying the change as long as at least one person has approved", + "example": true + }, + "autoApplyApprovedChanges": { + "type": "boolean", + "description": "Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.", + "example": true + }, + "serviceKind": { "type": "string", - "description": "The stage ID", - "example": "12ab3c4d5ef1a2345bcde67f" + "description": "Which service to use for managing approvals", + "example": "launchdarkly" }, - "message": { + "serviceConfig": { + "type": "object", + "additionalProperties": {}, + "example": {} + }, + "requiredApprovalTags": { + "type": "array", + "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval.", + "items": { + "type": "string" + }, + "example": [ + "require-approval" + ] + }, + "serviceKindConfigurationId": { "type": "string", - "description": "Message about the conflict" + "description": "Optional field for integration configuration ID of a custom approval integration. This is an Enterprise-only feature.", + "example": "1ef45a85-218f-4428-a8b2-a97e5f56c258" + }, + "resourceKind": { + "type": "string", + "description": "The kind of resource for which the approval settings apply, for example, flag or segment" } } }, - "ContextAttributeName": { + "ApprovalsCapabilityConfig": { "type": "object", - "required": [ - "name", - "weight" - ], "properties": { - "name": { - "type": "string", - "description": "A context attribute's name.", - "example": "/firstName" - }, - "weight": { + "additionalFormVariables": { + "type": "array", + "description": "The additional form variables for the approvals capability", + "items": { + "$ref": "#/components/schemas/FormVariable" + }, + "example": "invalid example" + } + } + }, + "AssignedToRep": { + "type": "object", + "properties": { + "membersCount": { "type": "integer", - "description": "A relative estimate of the number of contexts seen recently that have an attribute with the associated name.", - "example": 2225 + "description": "The number of individual members this role is assigned to" }, - "redacted": { - "type": "boolean", - "description": "Whether or not the attribute has one or more redacted values.", - "example": false + "teamsCount": { + "type": "integer", + "description": "The number of teams this role is assigned to" } } }, - "ContextAttributeNames": { + "Audience": { "type": "object", "required": [ - "kind", - "names" + "name" ], "properties": { - "kind": { + "environment": { + "description": "Details about the environment. When the environment has been deleted, this field is omitted.", + "$ref": "#/components/schemas/EnvironmentSummary" + }, + "name": { "type": "string", - "description": "The kind associated with this collection of context attribute names.", - "example": "user" + "description": "The release phase name", + "example": "Phase 1 - Testing" }, - "names": { + "configuration": { + "description": "The configuration for the audience's rollout.", + "$ref": "#/components/schemas/AudienceConfiguration" + }, + "segmentKeys": { "type": "array", - "description": "A collection of context attribute names.", + "description": "A list of segment keys", "items": { - "$ref": "#/components/schemas/ContextAttributeName" - } + "type": "string" + }, + "example": [ + "segment-key-123abc" + ] } } }, - "ContextAttributeNamesCollection": { + "AudienceConfiguration": { "type": "object", "required": [ - "items" + "releaseStrategy", + "requireApproval" ], "properties": { - "items": { + "releaseStrategy": { + "description": "The release strategy", + "example": "monitoredRelease", + "$ref": "#/components/schemas/ReleaseStrategy" + }, + "requireApproval": { + "type": "boolean", + "description": "Whether or not the audience requires approval", + "example": true + }, + "notifyMemberIds": { "type": "array", - "description": "A collection of context attribute name data grouped by kind.", + "description": "An array of member IDs. These members are notified to review the approval request.", "items": { - "$ref": "#/components/schemas/ContextAttributeNames" - } + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] + }, + "notifyTeamKeys": { + "type": "array", + "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "example-reviewer-team" + ] + }, + "releaseGuardianConfiguration": { + "description": "The configuration for the release guardian.", + "$ref": "#/components/schemas/ReleaseGuardianConfiguration" } } }, - "ContextAttributeValue": { + "AudiencePost": { "type": "object", "required": [ - "name", - "weight" + "environmentKey", + "name" ], "properties": { + "environmentKey": { + "type": "string", + "description": "A project-unique key for the environment." + }, "name": { - "description": "A value for a context attribute.", - "example": "Sandy" + "type": "string", + "description": "The audience name" }, - "weight": { - "type": "integer", - "description": "A relative estimate of the number of contexts seen recently that have a matching value for a given attribute.", - "example": 35 + "segmentKeys": { + "type": "array", + "description": "Segments targeted by this audience.", + "items": { + "type": "string" + } + }, + "configuration": { + "description": "The configuration for the audience's rollout.", + "$ref": "#/components/schemas/AudienceConfiguration" } } }, - "ContextAttributeValues": { + "AudienceStatus": { + "type": "string" + }, + "Audiences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Audience" + } + }, + "AuditLogEntryListingRep": { "type": "object", "required": [ + "_links", + "_id", + "_accountId", + "date", + "accesses", "kind", - "values" + "name", + "description", + "shortDescription" ], "properties": { - "kind": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_id": { "type": "string", - "description": "The kind associated with this collection of context attribute values.", - "example": "user" + "description": "The ID of the audit log entry", + "example": "1234a56b7c89d012345e678f" }, - "values": { + "_accountId": { + "type": "string", + "description": "The ID of the account to which this audit log entry belongs", + "example": "1234a56b7c89d012345e678f" + }, + "date": { + "description": "Timestamp of the audit log entry", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "accesses": { "type": "array", - "description": "A collection of context attribute values.", + "description": "Details on the actions performed and resources acted on in this audit log entry", "items": { - "$ref": "#/components/schemas/ContextAttributeValue" + "$ref": "#/components/schemas/ResourceAccess" } + }, + "kind": { + "description": "The type of resource this audit log entry refers to", + "example": "flag", + "$ref": "#/components/schemas/ResourceKind" + }, + "name": { + "type": "string", + "description": "The name of the resource this audit log entry refers to", + "example": "Example feature flag" + }, + "description": { + "type": "string", + "description": "Description of the change recorded in the audit log entry", + "example": "Example, turning on the flag for testing" + }, + "shortDescription": { + "type": "string", + "description": "Shorter version of the change recorded in the audit log entry", + "example": "Example, turning on the flag" + }, + "comment": { + "type": "string", + "description": "Optional comment for the audit log entry", + "example": "This is an automated test" + }, + "subject": { + "description": "Details of the subject who initiated the action described in the audit log entry", + "$ref": "#/components/schemas/SubjectDataRep" + }, + "member": { + "description": "Details of the member who initiated the action described in the audit log entry", + "$ref": "#/components/schemas/MemberDataRep" + }, + "token": { + "description": "Details of the access token that initiated the action described in the audit log entry", + "$ref": "#/components/schemas/TokenSummary" + }, + "app": { + "description": "Details of the authorized application that initiated the action described in the audit log entry", + "$ref": "#/components/schemas/AuthorizedAppDataRep" + }, + "titleVerb": { + "type": "string", + "description": "The action and resource recorded in this audit log entry", + "example": "turned on the flag" + }, + "title": { + "type": "string", + "description": "A description of what occurred, in the format member titleVerb target" + }, + "target": { + "description": "Details of the resource acted upon in this audit log entry", + "example": "[Ariel Flores](mailto:ariel@acme.com) turned on the flag [example-flag](https://app.launchdarkly.com/example-project/production/features/example-flag) in Production", + "$ref": "#/components/schemas/TargetResourceRep" + }, + "parent": { + "$ref": "#/components/schemas/ParentResourceRep" } } }, - "ContextAttributeValuesCollection": { + "AuditLogEntryListingRepCollection": { "type": "object", "required": [ - "items" + "items", + "_links" ], "properties": { "items": { "type": "array", - "description": "A collection of context attribute value data grouped by kind.", + "description": "An array of audit log entries", "items": { - "$ref": "#/components/schemas/ContextAttributeValues" + "$ref": "#/components/schemas/AuditLogEntryListingRep" } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "ContextInstance": { - "type": "object", - "additionalProperties": {} - }, - "ContextInstanceEvaluation": { + "AuditLogEntryRep": { "type": "object", "required": [ + "_links", + "_id", + "_accountId", + "date", + "accesses", + "kind", "name", - "key", - "_value", - "_links" + "description", + "shortDescription" ], "properties": { - "name": { - "type": "string", - "description": "Name of the flag.", - "example": "My Flag" - }, - "key": { - "type": "string", - "description": "Key of the flag.", - "example": "flag-key-123abc" - }, - "_value": { - "description": "The value of the flag variation that the context receives. If there is no defined default rule, this is null.", - "example": "true" - }, - "reason": { - "description": "Contains information about why that variation was selected.", - "example": "{\"kind\": \"RULE_MATCH\"}", - "$ref": "#/components/schemas/ContextInstanceEvaluationReason" - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", - "type": "application/json" - }, - "site": { - "href": "/my-project/my-environment/features/sort.order/targeting", - "type": "text/html" - } + "description": "The location and content type of related resources" + }, + "_id": { + "type": "string", + "description": "The ID of the audit log entry", + "example": "1234a56b7c89d012345e678f" + }, + "_accountId": { + "type": "string", + "description": "The ID of the account to which this audit log entry belongs", + "example": "1234a56b7c89d012345e678f" + }, + "date": { + "description": "Timestamp of the audit log entry", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "accesses": { + "type": "array", + "description": "Details on the actions performed and resources acted on in this audit log entry", + "items": { + "$ref": "#/components/schemas/ResourceAccess" } - } - } - }, - "ContextInstanceEvaluationReason": { - "type": "object", - "required": [ - "kind" - ], - "properties": { + }, "kind": { + "description": "The type of resource this audit log entry refers to", + "example": "flag", + "$ref": "#/components/schemas/ResourceKind" + }, + "name": { "type": "string", - "description": "Describes the general reason that LaunchDarkly selected this variation.", - "example": "OFF" + "description": "The name of the resource this audit log entry refers to", + "example": "Example feature flag" }, - "ruleIndex": { - "type": "integer", - "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.", - "example": 3 + "description": { + "type": "string", + "description": "Description of the change recorded in the audit log entry", + "example": "Example, turning on the flag for testing" }, - "ruleID": { + "shortDescription": { "type": "string", - "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'.", - "example": "1234567890" + "description": "Shorter version of the change recorded in the audit log entry", + "example": "Example, turning on the flag" }, - "prerequisiteKey": { + "comment": { "type": "string", - "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.", - "example": "someotherflagkey" + "description": "Optional comment for the audit log entry", + "example": "This is an automated test" }, - "inExperiment": { - "type": "boolean", - "description": "Indicates whether the context was evaluated as part of an experiment.", - "example": true + "subject": { + "description": "Details of the subject who initiated the action described in the audit log entry", + "$ref": "#/components/schemas/SubjectDataRep" }, - "errorKind": { + "member": { + "description": "Details of the member who initiated the action described in the audit log entry", + "$ref": "#/components/schemas/MemberDataRep" + }, + "token": { + "description": "Details of the access token that initiated the action described in the audit log entry", + "$ref": "#/components/schemas/TokenSummary" + }, + "app": { + "description": "Details of the authorized application that initiated the action described in the audit log entry", + "$ref": "#/components/schemas/AuthorizedAppDataRep" + }, + "titleVerb": { "type": "string", - "description": "The specific error type if the kind is 'ERROR'.", - "example": "tried to use uninitialized Context" + "description": "The action and resource recorded in this audit log entry", + "example": "turned on the flag" + }, + "title": { + "type": "string", + "description": "A description of what occurred, in the format member titleVerb target" + }, + "target": { + "description": "Details of the resource acted upon in this audit log entry", + "example": "[Ariel Flores](mailto:ariel@acme.com) turned on the flag [example-flag](https://app.launchdarkly.com/example-project/production/features/example-flag) in Production", + "$ref": "#/components/schemas/TargetResourceRep" + }, + "parent": { + "$ref": "#/components/schemas/ParentResourceRep" + }, + "delta": { + "description": "If the audit log entry has been updated, this is the JSON patch body that was used in the request to update the entity" + }, + "triggerBody": { + "description": "A JSON representation of the external trigger for this audit log entry, if any" + }, + "merge": { + "description": "A JSON representation of the merge information for this audit log entry, if any" + }, + "previousVersion": { + "description": "If the audit log entry has been updated, this is a JSON representation of the previous version of the entity" + }, + "currentVersion": { + "description": "If the audit log entry has been updated, this is a JSON representation of the current version of the entity" + }, + "subentries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogEntryListingRep" + } } } }, - "ContextInstanceEvaluations": { + "AuditLogEventsHookCapabilityConfigPost": { "type": "object", - "required": [ - "items", - "_links" - ], "properties": { - "items": { + "statements": { + "description": "The set of resources you wish to subscribe to audit log notifications for.", + "$ref": "#/components/schemas/StatementPostList" + } + } + }, + "AuditLogEventsHookCapabilityConfigRep": { + "type": "object", + "properties": { + "statements": { "type": "array", - "description": "Details on the flag evaluations for this context instance", + "description": "The set of resources you wish to subscribe to audit log notifications for.", "items": { - "$ref": "#/components/schemas/ContextInstanceEvaluation" - }, - "example": [ - { - "_links": { - "self": { - "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", - "type": "application/json" - }, - "site": { - "href": "/my-project/my-environment/features/sort.order/targeting", - "type": "text/html" - } - }, - "_value": true, - "key": "sort.order", - "name": "SortOrder", - "reason": { - "kind": "FALLTHROUGH" - } - }, - { - "_links": { - "self": { - "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", - "type": "application/json" - }, - "site": { - "href": "/my-project/my-environment/features/alternate.page/targeting", - "type": "text/html" - } - }, - "_value": false, - "key": "alternate.page", - "name": "AlternatePage", - "reason": { - "kind": "RULE_MATCH", - "ruleID": "b2530cdf-14c6-4e16-b660-00239e08f19b", - "ruleIndex": 1 - } - } - ] - }, - "totalCount": { - "type": "integer", - "description": "The number of flags", - "example": 2 - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", - "type": "application/json" - } + "$ref": "#/components/schemas/Statement" } } } }, - "ContextInstanceRecord": { + "AuthorizedAppDataRep": { "type": "object", - "required": [ - "id", - "context" - ], "properties": { - "lastSeen": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the last time an evaluation occurred for this context instance", - "example": "2022-04-15T15:00:57.526470334Z" - }, - "id": { - "type": "string", - "description": "The context instance ID", - "example": "b3JnOmxhdW5jaGRhcmtseQ" - }, - "applicationId": { - "type": "string", - "description": "An identifier representing the application where the LaunchDarkly SDK is running", - "example": "GoSDK/1.2" - }, - "anonymousKinds": { - "type": "array", - "description": "A list of the context kinds this context was associated with that the SDK removed because they were marked as anonymous at flag evaluation", - "items": { - "type": "string" - }, - "example": [ - "device", - "privateKind" - ] - }, - "context": { - "description": "The context, including its kind and attributes", - "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}" - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project/environments/my-environment", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"", - "type": "application/json" - }, - "site": { - "href": "/my-project/my-environment/context-instances/organization:launch-darkly:user:henry", - "type": "text/html" - } } }, - "_access": { - "description": "Details on the allowed and denied actions for this context instance", - "$ref": "#/components/schemas/Access" - } - } - }, - "ContextInstanceSearch": { - "type": "object", - "properties": { - "filter": { + "_id": { "type": "string", - "description": "A collection of context instance filters", - "example": "{\"filter\": \"kindKeys:{\"contains\": [\"user:Henry\"]},\"sort\": \"-ts\",\"limit\": 50}" + "description": "The ID of the authorized application" }, - "sort": { - "type": "string", - "description": "Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying ts for this value, or descending order by specifying -ts.", - "example": "-ts" + "isScim": { + "type": "boolean", + "description": "Whether the application is authorized through SCIM" }, - "limit": { - "type": "integer", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", - "example": 10 + "name": { + "type": "string", + "description": "The authorized application name" }, - "continuationToken": { + "maintainerName": { "type": "string", - "description": "Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the next link instead, because this value is an obfuscated string.", - "example": "QAGFKH1313KUGI2351" + "description": "The name of the maintainer for this authorized application" } } }, - "ContextInstanceSegmentMembership": { + "BigSegmentStoreIntegration": { "type": "object", "required": [ + "_links", + "_id", + "integrationKey", + "projectKey", + "environmentKey", + "config", + "on", + "tags", "name", - "key", - "description", - "unbounded", - "external", - "isMember", - "isIndividuallyTargeted", - "isRuleTargeted", - "_links" + "version", + "_status" ], "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the segment", - "example": "Segment Name" + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/BigSegmentStoreIntegrationLinks" }, - "key": { + "_id": { "type": "string", - "description": "A unique key used to reference the segment", - "example": "segment-key-123abc" + "description": "The integration ID", + "example": "12ab3c4d5ef1a2345bcde67f" }, - "description": { + "integrationKey": { "type": "string", - "description": "A description of the segment's purpose", - "example": "Segment description" + "description": "The integration key", + "example": "redis", + "enum": [ + "redis", + "dynamodb" + ] }, - "unbounded": { - "type": "boolean", - "description": "Whether this is an unbounded segment. Unbounded segments, also called big segments, may be list-based segments with more than 15,000 entries, or synced segments.", - "example": false + "projectKey": { + "type": "string", + "description": "The project key", + "example": "default" }, - "external": { + "environmentKey": { "type": "string", - "description": "If the segment is a synced segment, the name of the external source", - "example": "https://amplitude.com/myCohort" + "description": "The environment key", + "example": "development" }, - "isMember": { - "type": "boolean", - "description": "Whether the context is a member of this segment, either by explicit inclusion or by rule matching", - "example": true + "config": { + "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", + "$ref": "#/components/schemas/FormVariableConfig" }, - "isIndividuallyTargeted": { + "on": { "type": "boolean", - "description": "Whether the context is explicitly included in this segment", + "description": "Whether the configuration is turned on", "example": true }, - "isRuleTargeted": { - "type": "boolean", - "description": "Whether the context is captured by this segment's rules. The value of this field is undefined if the context is also explicitly included (isIndividuallyTargeted is true).", - "example": false - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "tags": { + "type": "array", + "description": "List of tags for this configuration", + "items": { + "type": "string" }, - "description": "The location and content type of related resources" + "example": [] + }, + "name": { + "type": "string", + "description": "Name of the configuration", + "example": "Development environment configuration" + }, + "version": { + "type": "integer", + "description": "Version of the current configuration", + "example": 1 + }, + "_access": { + "description": "Details on the allowed and denied actions for this configuration", + "$ref": "#/components/schemas/Access" + }, + "_status": { + "description": "Details on the connection status of the persistent store integration", + "$ref": "#/components/schemas/BigSegmentStoreStatus" } } }, - "ContextInstanceSegmentMemberships": { + "BigSegmentStoreIntegrationCollection": { "type": "object", "required": [ - "items", - "_links" + "_links", + "items" ], "properties": { + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/BigSegmentStoreIntegrationCollectionLinks" + }, "items": { "type": "array", + "description": "An array of persistent store integration configurations", "items": { - "$ref": "#/components/schemas/ContextInstanceSegmentMembership" + "$ref": "#/components/schemas/BigSegmentStoreIntegration" } + } + } + }, + "BigSegmentStoreIntegrationCollectionLinks": { + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "$ref": "#/components/schemas/Link" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "parent": { + "$ref": "#/components/schemas/Link" } } }, - "ContextInstances": { + "BigSegmentStoreIntegrationLinks": { "type": "object", "required": [ - "_environmentId", - "items" + "self", + "parent", + "project", + "environment" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "next": { - "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?limit=2&continuationToken=2022-04-15T15:00:57.526470334Z", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-proj/environments/my-env/context-instances/organization:launch-darkly:user:henry-jacobs?limit=2", - "type": "application/json" - } - } + "self": { + "$ref": "#/components/schemas/Link" }, - "totalCount": { - "type": "integer", - "description": "The number of unique context instances", - "example": 100 + "parent": { + "$ref": "#/components/schemas/Link" }, - "_environmentId": { - "type": "string", - "description": "The environment ID", - "example": "57be1db38b75bf0772d11384" + "project": { + "$ref": "#/components/schemas/Link" }, - "continuationToken": { - "type": "string", - "description": "An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the next link instead.", - "example": "QAGFKH1313KUGI2351" + "environment": { + "$ref": "#/components/schemas/Link" + } + } + }, + "BigSegmentStoreStatus": { + "type": "object", + "properties": { + "available": { + "type": "boolean", + "description": "Whether the persistent store integration is fully synchronized with the LaunchDarkly environment, and the lastSync occurred within a few minutes", + "example": true }, - "items": { + "potentiallyStale": { + "type": "boolean", + "description": "Whether the persistent store integration may not be fully synchronized with the LaunchDarkly environment. true if the integration could be stale.", + "example": false + }, + "lastSync": { + "description": "Timestamp of when the most recent successful sync occurred between the persistent store integration and the LaunchDarkly environment.", + "example": "1717263000000", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastError": { + "description": "Timestamp of when the most recent synchronization error occurred, if any", + "example": "1714584600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "errors": { "type": "array", - "description": "A collection of context instances. Can include multiple versions of context instances that have the same id, but different applicationIds.", "items": { - "$ref": "#/components/schemas/ContextInstanceRecord" + "$ref": "#/components/schemas/StoreIntegrationError" } } } }, - "ContextKindCreatedFrom": { - "type": "string" - }, - "ContextKindRep": { + "BigSegmentTarget": { "type": "object", "required": [ - "key", - "name", - "description", - "version", - "creationDate", - "lastModified", - "createdFrom" + "userKey", + "included", + "excluded" ], "properties": { - "key": { + "userKey": { "type": "string", - "description": "The context kind key", - "example": "organization-key-123abc" - }, - "name": { - "type": "string", - "description": "The context kind name", - "example": "Organization" - }, - "description": { - "type": "string", - "description": "The context kind description", - "example": "An example context kind, to enable targeting based on organization" - }, - "version": { - "type": "integer", - "description": "The context kind version", - "example": 4 - }, - "creationDate": { - "description": "Timestamp of when the context kind was created", - "example": "1668530155141", - "$ref": "#/components/schemas/UnixMillis" - }, - "lastModified": { - "description": "Timestamp of when the context kind was most recently changed", - "example": "1670341705251", - "$ref": "#/components/schemas/UnixMillis" - }, - "lastSeen": { - "description": "Timestamp of when a context of this context kind was most recently evaluated", - "example": "1671563538193", - "$ref": "#/components/schemas/UnixMillis" - }, - "createdFrom": { - "description": "How the context kind was created", - "example": "auto-add", - "enum": [ - "default", - "auto-add", - "manual" - ], - "$ref": "#/components/schemas/ContextKindCreatedFrom" + "description": "The target key" }, - "hideInTargeting": { + "included": { "type": "boolean", - "description": "Alias for archived.", - "example": false + "description": "Indicates whether the target is included.
Included targets are always segment members, regardless of segment rules." }, - "archived": { + "excluded": { "type": "boolean", - "description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting.", - "example": false - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - } - } - }, - "ContextKindsCollectionRep": { - "type": "object", - "required": [ - "items", - "_links" - ], - "properties": { - "items": { - "type": "array", - "description": "An array of context kinds", - "items": { - "$ref": "#/components/schemas/ContextKindRep" - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "description": "Indicates whether the target is excluded.
Segment rules bypass excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly." } } }, - "ContextRecord": { + "BooleanDefaults": { "type": "object", - "required": [ - "context" - ], "properties": { - "lastSeen": { + "trueDisplayName": { "type": "string", - "format": "date-time", - "description": "Timestamp of the last time an evaluation occurred for this context", - "example": "2022-04-15T15:00:57.526470334Z" + "description": "The display name for the true variation, displayed in the LaunchDarkly user interface", + "example": "True" }, - "applicationId": { + "falseDisplayName": { "type": "string", - "description": "An identifier representing the application where the LaunchDarkly SDK is running", - "example": "GoSDK/1.2" - }, - "context": { - "description": "The context, including its kind and attributes", - "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}" + "description": "The display name for the false variation, displayed in the LaunchDarkly user interface", + "example": "False" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project/environments/my-environment", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/environments/my-env/contexts/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"", - "type": "application/json" - }, - "site": { - "href": "/my-project/my-environment/context/organization:launch-darkly:user:henry", - "type": "text/html" - } - } + "trueDescription": { + "type": "string", + "description": "The description for the true variation", + "example": "serve true" }, - "_access": { - "description": "Details on the allowed and denied actions for this context instance", - "$ref": "#/components/schemas/Access" + "falseDescription": { + "type": "string", + "description": "The description for the false variation", + "example": "serve false" }, - "associatedContexts": { + "onVariation": { "type": "integer", - "description": "The total number of associated contexts. Associated contexts are contexts that have appeared in the same context instance, that is, they were part of the same flag evaluation.", + "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is on and the target did not match any rules", "example": 0 + }, + "offVariation": { + "type": "integer", + "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off", + "example": 1 } } }, - "ContextSearch": { + "BooleanFlagDefaults": { "type": "object", + "required": [ + "trueDisplayName", + "falseDisplayName", + "trueDescription", + "falseDescription", + "onVariation", + "offVariation" + ], "properties": { - "filter": { + "trueDisplayName": { "type": "string", - "description": "A collection of context filters", - "example": "*.name startsWith Jo,kind anyOf [\"user\",\"organization\"]" + "description": "The display name for the true variation, displayed in the LaunchDarkly user interface", + "example": "True" }, - "sort": { + "falseDisplayName": { "type": "string", - "description": "Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying ts for this value, or descending order by specifying -ts.", - "example": "-ts" + "description": "The display name for the false variation, displayed in the LaunchDarkly user interface", + "example": "False" }, - "limit": { - "type": "integer", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", - "example": 10 + "trueDescription": { + "type": "string", + "description": "The description for the true variation", + "example": "serve true" }, - "continuationToken": { + "falseDescription": { "type": "string", - "description": "Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the next link instead, because this value is an obfuscated string.", - "example": "QAGFKH1313KUGI2351" + "description": "The description for the false variation", + "example": "serve false" + }, + "onVariation": { + "type": "integer", + "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is on and the target did not match any rules", + "example": 0 + }, + "offVariation": { + "type": "integer", + "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off", + "example": 1 } } }, - "Contexts": { + "BranchCollectionRep": { "type": "object", "required": [ - "_environmentId", + "_links", "items" ], "properties": { @@ -35489,91 +36770,67 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "next": { - "href": "/app.launchdarkly.com/api/v2/projects/my-project/environments/my-environment/contexts?filter=kind:{\"equals\": [\"organization\"]}&limit=2&continuationToken=QAGFKH1313KUGI2351", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-proj/environments/my-env/contexts?filter=kind:{\"equals\": [\"organization\"]}&limit=2&continuationToken=QAGFKH1313KUGI2351", - "type": "application/json" - } - } - }, - "totalCount": { - "type": "integer", - "description": "The number of contexts", - "example": 100 - }, - "_environmentId": { - "type": "string", - "description": "The environment ID where the context was evaluated", - "example": "57be1db38b75bf0772d11384" - }, - "continuationToken": { - "type": "string", - "description": "An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the next link instead.", - "example": "QAGFKH1313KUGI2351" + "description": "The location and content type of related resources" }, "items": { "type": "array", - "description": "A collection of contexts. Can include multiple versions of contexts that have the same kind and key, but different applicationIds.", + "description": "An array of branches", "items": { - "$ref": "#/components/schemas/ContextRecord" + "$ref": "#/components/schemas/BranchRep" } } } }, - "CopiedFromEnv": { + "BranchRep": { "type": "object", "required": [ - "key" + "name", + "head", + "syncTime", + "_links" ], "properties": { - "key": { + "name": { "type": "string", - "description": "Key of feature flag copied", - "example": "source-flag-key-123abc" + "description": "The branch name", + "example": "main" }, - "version": { + "head": { + "type": "string", + "description": "An ID representing the branch HEAD. For example, a commit SHA.", + "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" + }, + "updateSequenceId": { "type": "integer", - "description": "Version of feature flag copied", - "example": 1 + "format": "int64", + "description": "An optional ID used to prevent older data from overwriting newer data", + "example": 25 + }, + "syncTime": { + "description": "A timestamp indicating when the branch was last synced", + "example": "1636558831870", + "$ref": "#/components/schemas/UnixMillis" + }, + "references": { + "type": "array", + "description": "An array of flag references found on the branch", + "items": { + "$ref": "#/components/schemas/ReferenceRep" + } + }, + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" } } }, - "CreateApprovalRequestRequest": { + "BulkEditMembersRep": { "type": "object", - "required": [ - "resourceId", - "description", - "instructions" - ], "properties": { - "resourceId": { - "type": "string", - "description": "String representation of the resource specifier", - "example": "proj/projKey:env/envKey:flag/flagKey" - }, - "comment": { - "type": "string", - "description": "Optional comment describing the approval request", - "example": "optional comment" - }, - "description": { - "type": "string", - "description": "A brief description of the changes you're requesting", - "example": "Requesting to update targeting" - }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](https://launchdarkly.com/docs/ld-docs/api/feature-flags/patch-feature-flag) documentation for details on available instructions.", - "example": "[{\"kind\": \"addUserTargets\", \"values\": [ \"user-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]", - "$ref": "#/components/schemas/Instructions" - }, - "notifyMemberIds": { + "members": { "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", + "description": "A list of members IDs of the members who were successfully updated.", "items": { "type": "string" }, @@ -35581,288 +36838,226 @@ "1234a56b7c89d012345e678f" ] }, - "notifyTeamKeys": { + "errors": { "type": "array", - "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "description": "A list of member IDs and errors for the members whose updates failed.", "items": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "example": [ - "example-reviewer-team" + { + "507f1f77bcf86cd799439011": "you cannot modify your own role" + } ] - }, - "integrationConfig": { - "description": "Additional approval request fields for third-party integration approval systems. If you are using a third-party integration to manage approval requests, these additional fields will be described in the manifest.json for that integration, at https://github.com/launchdarkly/integration-framework.", - "$ref": "#/components/schemas/FormVariableConfig" } } }, - "CreatePhaseInput": { + "BulkEditTeamsRep": { "type": "object", - "required": [ - "audiences", - "name" - ], "properties": { - "audiences": { + "memberIDs": { "type": "array", - "description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment.", + "description": "A list of member IDs of the members who were added to the teams.", "items": { - "$ref": "#/components/schemas/AudiencePost" - } - }, - "name": { - "type": "string", - "description": "The release phase name", - "example": "Phase 1 - Testing" - }, - "configuration": { - "description": "The configuration for the phase's rollout.", - "$ref": "#/components/schemas/PhaseConfiguration" - } - } - }, - "CreateReleaseInput": { - "type": "object", - "required": [ - "releasePipelineKey" - ], - "properties": { - "releaseVariationId": { - "type": "string", - "description": "The variation id to release to across all phases" - }, - "releasePipelineKey": { - "type": "string", - "description": "The key of the release pipeline to attach the flag to" - } - } - }, - "CreateReleasePipelineInput": { - "type": "object", - "required": [ - "key", - "name", - "phases" - ], - "properties": { - "description": { - "type": "string", - "description": "The release pipeline description", - "example": "Standard pipeline to roll out to production" - }, - "key": { - "type": "string", - "description": "The unique identifier of this release pipeline", - "example": "standard-pipeline" - }, - "name": { - "type": "string", - "description": "The name of the release pipeline", - "example": "Standard Pipeline" + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] }, - "phases": { + "teamKeys": { "type": "array", - "description": "A logical grouping of one or more environments that share attributes for rolling out changes", + "description": "A list of team keys of the teams that were successfully updated.", "items": { - "$ref": "#/components/schemas/CreatePhaseInput" - } + "type": "string" + }, + "example": [ + "example-team-1" + ] }, - "tags": { + "errors": { "type": "array", - "description": "A list of tags for this release pipeline", + "description": "A list of team keys and errors for the teams whose updates failed.", "items": { - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } }, "example": [ - "example-tag" + { + "example-team-2": "example failure message" + } ] - }, - "isProjectDefault": { - "type": "boolean", - "description": "Whether or not the newly created pipeline should be set as the default pipeline for this project" - }, - "isLegacy": { - "type": "boolean", - "description": "Whether or not the pipeline is enabled for Release Automation." } } }, - "CreateWorkflowTemplateInput": { + "CallerIdentityRep": { "type": "object", - "required": [ - "key" - ], "properties": { - "key": { + "accountId": { "type": "string" }, - "name": { + "environmentId": { "type": "string" }, - "description": { + "projectId": { "type": "string" }, - "workflowId": { - "$ref": "#/components/schemas/FeatureWorkflowId" + "environmentName": { + "type": "string" }, - "stages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StageInput" - } + "projectName": { + "type": "string" }, - "projectKey": { + "authKind": { "type": "string" }, - "environmentKey": { + "tokenKind": { "type": "string" }, - "flagKey": { + "clientId": { + "type": "string" + }, + "tokenName": { + "type": "string" + }, + "tokenId": { + "type": "string" + }, + "memberId": { "type": "string" + }, + "serviceToken": { + "type": "boolean" } } }, - "CredibleIntervalRep": { + "CapabilityConfigPost": { "type": "object", "properties": { - "upper": { - "type": "number", - "description": "The upper bound", - "example": 0.6713222134386467 + "approvals": { + "description": "The approvals capability configuration for this integration", + "example": "{\"additionalFormVariables\": \"[]\"}", + "$ref": "#/components/schemas/ApprovalsCapabilityConfig" }, - "lower": { - "type": "number", - "description": "The lower bound", - "example": 0.4060771673663068 + "auditLogEventsHook": { + "description": "The audit log events hook capability configuration for the integration", + "example": "{\"key\": \"value\"}", + "$ref": "#/components/schemas/AuditLogEventsHookCapabilityConfigPost" } } }, - "CustomProperties": { + "CapabilityConfigRep": { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/customProperty" + "properties": { + "approvals": { + "description": "The approvals capability configuration for this integration", + "$ref": "#/components/schemas/ApprovalsCapabilityConfig" + }, + "auditLogEventsHook": { + "description": "The audit log events hook capability configuration for the integration", + "example": "{\"policy\": \"value\"}", + "$ref": "#/components/schemas/AuditLogEventsHookCapabilityConfigRep" + } } }, - "CustomRole": { + "Clause": { "type": "object", "required": [ - "_id", - "_links", - "key", - "name", - "policy" + "attribute", + "op", + "values", + "negate" ], "properties": { "_id": { - "type": "string", - "description": "The ID of the custom role", - "example": "1234a56b7c89d012345e678f" + "type": "string" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "attribute": { + "type": "string" }, - "_access": { - "description": "Details on the allowed and denied actions for this custom role", - "$ref": "#/components/schemas/Access" + "op": { + "$ref": "#/components/schemas/Operator" }, - "description": { - "type": "string", - "description": "The description of the custom role", - "example": "This custom role is just an example" - }, - "key": { - "type": "string", - "description": "The key of the custom role", - "example": "example-custom-role" - }, - "name": { - "type": "string", - "description": "The name of the custom role", - "example": "Example custom role" - }, - "policy": { + "values": { "type": "array", - "description": "An array of the policies that comprise this custom role", - "items": { - "$ref": "#/components/schemas/Statement" - } - }, - "basePermissions": { - "description": "Base permissions to use for this role. Only applicable to roles created prior to October 2024.", - "example": "reader", - "$ref": "#/components/schemas/RoleType" - }, - "resourceCategory": { - "description": "The category of resources this role is intended to manage. Can be organization, project, or any. Once set, this field cannot be changed.", - "$ref": "#/components/schemas/ResourceCategory" - }, - "assignedTo": { - "description": "The number of teams and members this role is assigned to", - "$ref": "#/components/schemas/AssignedToRep" + "items": {} }, - "_presetBundleVersion": { - "type": "integer", - "description": "If created from a preset, the preset bundle version" + "contextKind": { + "type": "string" }, - "_presetStatements": { - "type": "array", - "description": "If created from a preset, the read-only statements copied from the preset", - "items": { - "$ref": "#/components/schemas/Statement" - } + "negate": { + "type": "boolean" } } }, - "CustomRolePost": { + "Client": { "type": "object", "required": [ + "_links", "name", - "key", - "policy" + "_accountId", + "_clientId", + "redirectUri", + "_creationDate" ], "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/oauth/clients", + "type": "application/json" + }, + "self": { + "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45", + "type": "application/json" + } + } + }, "name": { "type": "string", - "description": "A human-friendly name for the custom role", - "example": "Ops team" + "description": "Client name" }, - "key": { + "description": { "type": "string", - "description": "The custom role key", - "example": "role-key-123abc" + "description": "Client description" }, - "description": { + "_accountId": { "type": "string", - "description": "Description of custom role", - "example": "An example role for members of the ops team" + "description": "The account ID the client is registered under" }, - "policy": { - "description": "Resource statements for custom role", - "$ref": "#/components/schemas/StatementPostList" + "_clientId": { + "type": "string", + "description": "The client's unique ID" }, - "basePermissions": { - "description": "Base permissions to use for this role. Only applicable to roles created prior to October 2024.", - "example": "reader", - "enum": [ - "reader", - "no_access" - ], - "$ref": "#/components/schemas/RoleType" + "_clientSecret": { + "type": "string", + "description": "The client secret. This will only be shown upon creation." }, - "resourceCategory": { - "description": "The category of resources this role is intended to manage. Can be organization, project, or any. This field is immutable.", - "$ref": "#/components/schemas/ResourceCategory" + "redirectUri": { + "type": "string", + "description": "The client's redirect URI" + }, + "_creationDate": { + "description": "Timestamp of client creation date", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" } } }, - "CustomRoles": { + "ClientCollection": { "type": "object", "required": [ + "_links", "items" ], "properties": { @@ -35871,446 +37066,547 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/oauth/clients", + "type": "application/json" + } + } }, "items": { "type": "array", - "description": "An array of custom roles", + "description": "List of client objects", "items": { - "$ref": "#/components/schemas/CustomRole" + "$ref": "#/components/schemas/Client" } + } + } + }, + "ClientSideAvailability": { + "type": "object", + "properties": { + "usingMobileKey": { + "type": "boolean" }, - "totalCount": { - "type": "integer", - "description": "The total number of custom roles" + "usingEnvironmentId": { + "type": "boolean" } } }, - "CustomWorkflowInput": { + "ClientSideAvailabilityPost": { "type": "object", "required": [ - "name" + "usingEnvironmentId", + "usingMobileKey" ], "properties": { - "maintainerId": { - "description": "The ID of the workflow maintainer. Defaults to the workflow creator.", - "example": "12ab3c45de678910abc12345", - "$ref": "#/components/schemas/ObjectId" - }, - "name": { - "type": "string", - "description": "The workflow name", - "example": "Progressive rollout starting in two days" - }, - "description": { - "type": "string", - "description": "The workflow description", - "example": "Turn flag on for 10% of users each day" + "usingEnvironmentId": { + "type": "boolean", + "description": "Whether to enable availability for client-side SDKs. Defaults to false.", + "example": true }, - "stages": { - "type": "array", - "description": "A list of the workflow stages", - "items": { - "$ref": "#/components/schemas/StageInput" - } + "usingMobileKey": { + "type": "boolean", + "description": "Whether to enable availability for mobile SDKs. Defaults to true.", + "example": true + } + } + }, + "CompletedBy": { + "type": "object", + "properties": { + "member": { + "description": "The LaunchDarkly member who marked this phase as complete", + "$ref": "#/components/schemas/MemberSummary" }, - "templateKey": { - "type": "string", - "description": "The template key" + "token": { + "description": "The service token used to mark this phase as complete", + "$ref": "#/components/schemas/TokenSummary" } } }, - "CustomWorkflowMeta": { + "ConditionInput": { "type": "object", "properties": { - "name": { + "scheduleKind": { + "description": "Whether the scheduled execution of the workflow stage is relative or absolute. If relative, the waitDuration and waitDurationUnit specify when the execution occurs. If absolute, the executionDate specifies when the execution occurs.", + "example": "relative", + "enum": [ + "absolute", + "relative" + ], + "$ref": "#/components/schemas/ScheduleKind" + }, + "executionDate": { + "description": "For workflow stages whose scheduled execution is absolute, the time, in Unix milliseconds, when the stage should start.", + "example": "1706810400000", + "$ref": "#/components/schemas/UnixMillis" + }, + "waitDuration": { + "type": "integer", + "description": "For workflow stages whose scheduled execution is relative, how far in the future the stage should start.", + "example": 2 + }, + "waitDurationUnit": { + "description": "For workflow stages whose scheduled execution is relative, the unit of measure for the waitDuration.", + "example": "calendarDay", + "enum": [ + "minute", + "hour", + "calendarDay", + "calendarWeek" + ], + "$ref": "#/components/schemas/DurationUnit" + }, + "executeNow": { + "type": "boolean", + "description": "Whether the workflow stage should be executed immediately", + "example": false + }, + "description": { "type": "string", - "description": "The name of the workflow stage that required this approval request", - "example": "Example workflow name" + "description": "A description of the approval required for this stage", + "example": "Require example-team approval for final stage" }, - "stage": { - "description": "Details on the stage of the workflow where this approval request is required", - "$ref": "#/components/schemas/CustomWorkflowStageMeta" + "notifyMemberIds": { + "type": "array", + "description": "A list of member IDs for the members to request approval from for this stage", + "items": { + "type": "string" + }, + "example": [ + "507f1f77bcf86cd799439011" + ] + }, + "notifyTeamKeys": { + "type": "array", + "description": "A list of team keys for the teams to request approval from for this stage", + "items": { + "type": "string" + }, + "example": [ + "example-team" + ] + }, + "integrationConfig": { + "description": "Additional approval request fields for third-party integration approval systems. If you are using a third-party integration to manage approval requests, these additional fields will be described in the manifest.json for that integration, at https://github.com/launchdarkly/integration-framework.", + "$ref": "#/components/schemas/FormVariableConfig" + }, + "kind": { + "description": "The type of condition to meet before executing this stage of the workflow. Use schedule to schedule a workflow stage. Use ld-approval to add an approval request to a workflow stage.", + "example": "schedule", + "$ref": "#/components/schemas/ConditionKind" } } }, - "CustomWorkflowOutput": { + "ConditionKind": { + "type": "string" + }, + "ConditionOutput": { "type": "object", "required": [ "_id", - "_version", - "_conflicts", - "_creationDate", - "_maintainerId", - "_links", - "name", - "_execution" + "_execution", + "description", + "notifyMemberIds", + "allReviews", + "reviewStatus" ], "properties": { "_id": { - "type": "string", - "description": "The ID of the workflow", - "example": "12ab3c4d5ef1a2345bcde67f" + "type": "string" }, - "_version": { - "type": "integer", - "description": "The version of the workflow", - "example": 1 + "kind": { + "type": "string" }, - "_conflicts": { - "type": "array", - "description": "Any conflicts that are present in the workflow stages", - "items": { - "$ref": "#/components/schemas/ConflictOutput" - } + "_execution": { + "$ref": "#/components/schemas/ExecutionOutput" }, - "_creationDate": { - "description": "Timestamp of when the workflow was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "scheduleKind": { + "$ref": "#/components/schemas/ScheduleKind" }, - "_maintainerId": { - "type": "string", - "description": "The member ID of the maintainer of the workflow. Defaults to the workflow creator.", - "example": "12ab3c45de678910abc12345" + "executionDate": { + "$ref": "#/components/schemas/UnixMillis" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "waitDuration": { + "type": "integer" }, - "name": { - "type": "string", - "description": "The name of the workflow", - "example": "Progressive rollout starting in two days" + "waitDurationUnit": { + "$ref": "#/components/schemas/DurationUnit" }, "description": { - "type": "string", - "description": "A brief description of the workflow", - "example": "Turn flag on for 10% of customers each day" + "type": "string" }, - "kind": { - "type": "string", - "description": "The kind of workflow", - "example": "custom" + "notifyMemberIds": { + "type": "array", + "items": { + "type": "string" + } }, - "stages": { + "allReviews": { "type": "array", - "description": "The stages that make up the workflow. Each stage contains conditions and actions.", "items": { - "$ref": "#/components/schemas/StageOutput" + "$ref": "#/components/schemas/ReviewOutput" } }, - "_execution": { - "description": "The current execution status of the workflow", - "example": "{\"status\": \"completed\"}", - "$ref": "#/components/schemas/ExecutionOutput" + "reviewStatus": { + "type": "string" }, - "meta": { - "description": "For workflows being created from a workflow template, this value holds any parameters that could potentially be incompatible with the current project, environment, or flag", - "$ref": "#/components/schemas/WorkflowTemplateMetadata" + "appliedDate": { + "$ref": "#/components/schemas/UnixMillis" }, - "templateKey": { + "creationConfig": { + "$ref": "#/components/schemas/FormVariableConfig" + } + } + }, + "Conflict": { + "type": "object", + "properties": { + "instruction": { + "description": "Instruction in semantic patch format to be applied to the feature flag", + "$ref": "#/components/schemas/Instruction" + }, + "reason": { "type": "string", - "description": "For workflows being created from a workflow template, this value is the template's key", - "example": "example-workflow-template" + "description": "Reason why the conflict exists" } } }, - "CustomWorkflowStageMeta": { + "ConflictOutput": { "type": "object", + "required": [ + "stageId", + "message" + ], "properties": { - "index": { - "type": "integer", - "description": "The zero-based index of the workflow stage", - "example": 0 + "stageId": { + "type": "string", + "description": "The stage ID", + "example": "12ab3c4d5ef1a2345bcde67f" }, - "name": { + "message": { "type": "string", - "description": "The name of the workflow stage", - "example": "Stage 1" + "description": "Message about the conflict" } } }, - "CustomWorkflowsListingOutput": { + "ContextAttributeName": { "type": "object", "required": [ - "items", - "totalCount", - "_links" + "name", + "weight" ], "properties": { - "items": { - "type": "array", - "description": "An array of workflows", - "items": { - "$ref": "#/components/schemas/CustomWorkflowOutput" - } + "name": { + "type": "string", + "description": "A context attribute's name.", + "example": "/firstName" }, - "totalCount": { + "weight": { "type": "integer", - "description": "Total number of workflows", - "example": 1 + "description": "A relative estimate of the number of contexts seen recently that have an attribute with the associated name.", + "example": 2225 }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "redacted": { + "type": "boolean", + "description": "Whether or not the attribute has one or more redacted values.", + "example": false } } }, - "DateVersion": { - "type": "integer" - }, - "DefaultClientSideAvailability": { + "ContextAttributeNames": { "type": "object", "required": [ - "usingMobileKey", - "usingEnvironmentId" + "kind", + "names" ], "properties": { - "usingMobileKey": { - "type": "boolean", - "description": "Whether to enable availability for mobile SDKs", - "example": true + "kind": { + "type": "string", + "description": "The kind associated with this collection of context attribute names.", + "example": "user" }, - "usingEnvironmentId": { - "type": "boolean", - "description": "Whether to enable availability for client-side SDKs", - "example": true + "names": { + "type": "array", + "description": "A collection of context attribute names.", + "items": { + "$ref": "#/components/schemas/ContextAttributeName" + } } } }, - "DefaultClientSideAvailabilityPost": { + "ContextAttributeNamesCollection": { "type": "object", "required": [ - "usingEnvironmentId", - "usingMobileKey" + "items" ], "properties": { - "usingEnvironmentId": { - "type": "boolean", - "description": "Whether to enable availability for client-side SDKs.", - "example": true - }, - "usingMobileKey": { - "type": "boolean", - "description": "Whether to enable availability for mobile SDKs.", - "example": true + "items": { + "type": "array", + "description": "A collection of context attribute name data grouped by kind.", + "items": { + "$ref": "#/components/schemas/ContextAttributeNames" + } } } }, - "Defaults": { + "ContextAttributeValue": { "type": "object", "required": [ - "onVariation", - "offVariation" + "name", + "weight" ], "properties": { - "onVariation": { - "type": "integer", - "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is on.", - "example": 0 + "name": { + "description": "A value for a context attribute.", + "example": "Sandy" }, - "offVariation": { + "weight": { "type": "integer", - "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is off.", - "example": 1 + "description": "A relative estimate of the number of contexts seen recently that have a matching value for a given attribute.", + "example": 35 } } }, - "DependentExperimentListRep": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DependentExperimentRep" - } - }, - "DependentExperimentRep": { + "ContextAttributeValues": { "type": "object", "required": [ - "key", - "name", - "environmentId", - "environmentKey", - "creationDate", - "_links" + "kind", + "values" ], "properties": { - "key": { - "type": "string", - "description": "The experiment key", - "example": "experiment-key-123abc" - }, - "name": { + "kind": { "type": "string", - "description": "The experiment name", - "example": "Example experiment" + "description": "The kind associated with this collection of context attribute values.", + "example": "user" }, - "environmentId": { - "type": "string", - "description": "The environment ID", - "example": "1234a56b7c89d012345e678f" - }, - "environmentKey": { - "type": "string", - "description": "The environment key", - "example": "production" - }, - "creationDate": { - "description": "Timestamp of when the experiment was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "archivedDate": { - "description": "Timestamp of when the experiment was archived", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project/environments/my-environment", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/environments/my-environment/experiments/example-experiment", - "type": "application/json" - } + "values": { + "type": "array", + "description": "A collection of context attribute values.", + "items": { + "$ref": "#/components/schemas/ContextAttributeValue" } } } }, - "DependentFlag": { + "ContextAttributeValuesCollection": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "description": "A collection of context attribute value data grouped by kind.", + "items": { + "$ref": "#/components/schemas/ContextAttributeValues" + } + } + } + }, + "ContextInstance": { + "type": "object", + "additionalProperties": {} + }, + "ContextInstanceEvaluation": { "type": "object", "required": [ + "name", "key", - "_links", - "_site" + "_value", + "_links" ], "properties": { "name": { "type": "string", - "description": "The flag name", - "example": "Example dependent flag" + "description": "Name of the flag.", + "example": "My Flag" }, "key": { "type": "string", - "description": "The flag key", - "example": "dependent-flag-key-123abc" + "description": "Key of the flag.", + "example": "flag-key-123abc" + }, + "_value": { + "description": "The value of the flag variation that the context receives. If there is no defined default rule, this is null.", + "example": "true" + }, + "reason": { + "description": "Contains information about why that variation was selected.", + "example": "{\"kind\": \"RULE_MATCH\"}", + "$ref": "#/components/schemas/ContextInstanceEvaluationReason" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - }, - "_site": { - "description": "Details on how to access the dependent flag in the LaunchDarkly UI", - "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }", - "$ref": "#/components/schemas/Link" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", + "type": "application/json" + }, + "site": { + "href": "/my-project/my-environment/features/sort.order/targeting", + "type": "text/html" + } + } } } }, - "DependentFlagEnvironment": { + "ContextInstanceEvaluationReason": { "type": "object", "required": [ - "key", - "_links", - "_site" + "kind" ], "properties": { - "name": { + "kind": { "type": "string", - "description": "The environment name", - "example": "Example environment" + "description": "Describes the general reason that LaunchDarkly selected this variation.", + "example": "OFF" }, - "key": { + "ruleIndex": { + "type": "integer", + "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.", + "example": 3 + }, + "ruleID": { "type": "string", - "description": "The environment key", - "example": "environment-key-123abc" + "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'.", + "example": "1234567890" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "prerequisiteKey": { + "type": "string", + "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.", + "example": "someotherflagkey" }, - "_site": { - "description": "Details on how to access the dependent flag in this environment in the LaunchDarkly UI", - "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }", - "$ref": "#/components/schemas/Link" + "inExperiment": { + "type": "boolean", + "description": "Indicates whether the context was evaluated as part of an experiment.", + "example": true + }, + "errorKind": { + "type": "string", + "description": "The specific error type if the kind is 'ERROR'.", + "example": "tried to use uninitialized Context" } } }, - "DependentFlagsByEnvironment": { + "ContextInstanceEvaluations": { "type": "object", "required": [ "items", - "_links", - "_site" + "_links" ], "properties": { "items": { "type": "array", - "description": "A list of dependent flags, which are flags that use the requested flag as a prerequisite", + "description": "Details on the flag evaluations for this context instance", "items": { - "$ref": "#/components/schemas/DependentFlag" - } + "$ref": "#/components/schemas/ContextInstanceEvaluation" + }, + "example": [ + { + "_links": { + "self": { + "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", + "type": "application/json" + }, + "site": { + "href": "/my-project/my-environment/features/sort.order/targeting", + "type": "text/html" + } + }, + "_value": true, + "key": "sort.order", + "name": "SortOrder", + "reason": { + "kind": "FALLTHROUGH" + } + }, + { + "_links": { + "self": { + "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", + "type": "application/json" + }, + "site": { + "href": "/my-project/my-environment/features/alternate.page/targeting", + "type": "text/html" + } + }, + "_value": false, + "key": "alternate.page", + "name": "AlternatePage", + "reason": { + "kind": "RULE_MATCH", + "ruleID": "b2530cdf-14c6-4e16-b660-00239e08f19b", + "ruleIndex": 1 + } + } + ] + }, + "totalCount": { + "type": "integer", + "description": "The number of flags", + "example": 2 }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - }, - "_site": { - "description": "Details on how to access the prerequisite flag in the LaunchDarkly UI", - "example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }", - "$ref": "#/components/schemas/Link" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", + "type": "application/json" + } + } } } }, - "DependentMetricGroupRep": { + "ContextInstanceRecord": { "type": "object", "required": [ - "key", - "name", - "kind", - "_links" + "id", + "context" ], "properties": { - "key": { + "lastSeen": { "type": "string", - "description": "A unique key to reference the metric group", - "example": "metric-group-key-123abc" + "format": "date-time", + "description": "Timestamp of the last time an evaluation occurred for this context instance", + "example": "2022-04-15T15:00:57.526470334Z" }, - "name": { + "id": { "type": "string", - "description": "A human-friendly name for the metric group", - "example": "My metric group" + "description": "The context instance ID", + "example": "b3JnOmxhdW5jaGRhcmtseQ" }, - "kind": { + "applicationId": { "type": "string", - "description": "The type of the metric group", - "example": "funnel", - "enum": [ - "funnel", - "standard", - "guardrail" + "description": "An identifier representing the application where the LaunchDarkly SDK is running", + "example": "GoSDK/1.2" + }, + "anonymousKinds": { + "type": "array", + "description": "A list of the context kinds this context was associated with that the SDK removed because they were marked as anonymous at flag evaluation", + "items": { + "type": "string" + }, + "example": [ + "device", + "privateKind" ] }, + "context": { + "description": "The context, including its kind and attributes", + "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}" + }, "_links": { "type": "object", "additionalProperties": { @@ -36319,149 +37615,142 @@ "description": "The location and content type of related resources", "example": { "parent": { - "href": "/api/v2/projects/my-project", + "href": "/api/v2/projects/my-project/environments/my-environment", "type": "application/json" }, "self": { - "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", + "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"", "type": "application/json" + }, + "site": { + "href": "/my-project/my-environment/context-instances/organization:launch-darkly:user:henry", + "type": "text/html" } } + }, + "_access": { + "description": "Details on the allowed and denied actions for this context instance", + "$ref": "#/components/schemas/Access" } } }, - "DependentMetricGroupRepWithMetrics": { + "ContextInstanceSearch": { "type": "object", - "required": [ - "key", - "name", - "kind", - "_links" - ], "properties": { - "key": { - "type": "string", - "description": "A unique key to reference the metric group", - "example": "metric-group-key-123abc" - }, - "name": { + "filter": { "type": "string", - "description": "A human-friendly name for the metric group", - "example": "My metric group" + "description": "A collection of context instance filters", + "example": "{\"filter\": \"kindKeys:{\"contains\": [\"user:Henry\"]},\"sort\": \"-ts\",\"limit\": 50}" }, - "kind": { + "sort": { "type": "string", - "description": "The type of the metric group", - "example": "funnel", - "enum": [ - "funnel", - "standard", - "guardrail" - ] + "description": "Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying ts for this value, or descending order by specifying -ts.", + "example": "-ts" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", - "type": "application/json" - } - } + "limit": { + "type": "integer", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + "example": 10 }, - "metrics": { - "type": "array", - "description": "The metrics in the metric group", - "items": { - "$ref": "#/components/schemas/MetricInGroupRep" - } + "continuationToken": { + "type": "string", + "description": "Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the next link instead, because this value is an obfuscated string.", + "example": "QAGFKH1313KUGI2351" } } }, - "DependentMetricOrMetricGroupRep": { + "ContextInstanceSegmentMembership": { "type": "object", "required": [ - "key", - "_versionId", "name", - "kind", - "_links", - "isGroup" + "key", + "description", + "unbounded", + "external", + "isMember", + "isIndividuallyTargeted", + "isRuleTargeted", + "_links" ], "properties": { - "key": { + "name": { "type": "string", - "description": "A unique key to reference the metric or metric group", - "example": "metric-key-123abc" + "description": "A human-friendly name for the segment", + "example": "Segment Name" }, - "_versionId": { + "key": { "type": "string", - "description": "The version ID of the metric or metric group" + "description": "A unique key used to reference the segment", + "example": "segment-key-123abc" }, - "name": { + "description": { "type": "string", - "description": "A human-friendly name for the metric or metric group", - "example": "My metric" + "description": "A description of the segment's purpose", + "example": "Segment description" }, - "kind": { + "unbounded": { + "type": "boolean", + "description": "Whether this is an unbounded segment. Unbounded segments, also called big segments, may be list-based segments with more than 15,000 entries, or synced segments.", + "example": false + }, + "external": { "type": "string", - "description": "If this is a metric, then it represents the kind of event the metric tracks. If this is a metric group, then it represents the group type", - "example": "custom", - "enum": [ - "pageview", - "click", - "custom", - "funnel", - "standard", - "guardrail" - ] + "description": "If the segment is a synced segment, the name of the external source", + "example": "https://amplitude.com/myCohort" }, - "isNumeric": { + "isMember": { "type": "boolean", - "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "description": "Whether the context is a member of this segment, either by explicit inclusion or by rule matching", + "example": true + }, + "isIndividuallyTargeted": { + "type": "boolean", + "description": "Whether the context is explicitly included in this segment", "example": true }, + "isRuleTargeted": { + "type": "boolean", + "description": "Whether the context is captured by this segment's rules. The value of this field is undefined if the context is also explicitly included (isIndividuallyTargeted is true).", + "example": false + }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/metrics/my-project/my-metric", - "type": "application/json" - } - } - }, - "isGroup": { - "type": "boolean", - "description": "Whether this is a metric group or a metric" - }, - "metrics": { + "description": "The location and content type of related resources" + } + } + }, + "ContextInstanceSegmentMemberships": { + "type": "object", + "required": [ + "items", + "_links" + ], + "properties": { + "items": { "type": "array", - "description": "An ordered list of the metrics in this metric group", "items": { - "$ref": "#/components/schemas/MetricInGroupRep" + "$ref": "#/components/schemas/ContextInstanceSegmentMembership" } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "Destination": { + "ContextInstances": { "type": "object", + "required": [ + "_environmentId", + "items" + ], "properties": { - "_id": { - "type": "string", - "description": "The ID of this Data Export destination", - "example": "610addeadbeefaa86ec9a7d4" - }, "_links": { "type": "object", "additionalProperties": { @@ -36469,197 +37758,225 @@ }, "description": "The location and content type of related resources", "example": { - "parent": { - "href": "/api/v2/destinations", + "next": { + "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?limit=2&continuationToken=2022-04-15T15:00:57.526470334Z", "type": "application/json" }, "self": { - "href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4", + "href": "/api/v2/projects/my-proj/environments/my-env/context-instances/organization:launch-darkly:user:henry-jacobs?limit=2", "type": "application/json" } } }, - "name": { - "type": "string", - "description": "A human-readable name for your Data Export destination", - "example": "example-destination" + "totalCount": { + "type": "integer", + "description": "The number of unique context instances", + "example": 100 }, - "kind": { + "_environmentId": { "type": "string", - "description": "The type of Data Export destination", - "example": "google-pubsub", - "enum": [ - "google-pubsub", - "kinesis", - "mparticle", - "segment", - "azure-event-hubs", - "snowflake-v2", - "databricks", - "bigquery" - ] - }, - "version": { - "type": "number", - "example": 1 - }, - "config": { - "description": "An object with the configuration parameters required for the destination type", - "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}" + "description": "The environment ID", + "example": "57be1db38b75bf0772d11384" }, - "on": { - "type": "boolean", - "description": "Whether the export is on, that is, the status of the integration", - "example": true + "continuationToken": { + "type": "string", + "description": "An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the next link instead.", + "example": "QAGFKH1313KUGI2351" }, - "_access": { - "description": "Details on the allowed and denied actions for this Data Export destination", - "$ref": "#/components/schemas/Access" + "items": { + "type": "array", + "description": "A collection of context instances. Can include multiple versions of context instances that have the same id, but different applicationIds.", + "items": { + "$ref": "#/components/schemas/ContextInstanceRecord" + } } } }, - "DestinationPost": { + "ContextKindCreatedFrom": { + "type": "string" + }, + "ContextKindRep": { "type": "object", + "required": [ + "key", + "name", + "description", + "version", + "creationDate", + "lastModified", + "createdFrom" + ], "properties": { - "name": { + "key": { "type": "string", - "description": "A human-readable name for your Data Export destination", - "example": "example-destination" + "description": "The context kind key", + "example": "organization-key-123abc" }, - "kind": { + "name": { "type": "string", - "description": "The type of Data Export destination", - "example": "google-pubsub", + "description": "The context kind name", + "example": "Organization" + }, + "description": { + "type": "string", + "description": "The context kind description", + "example": "An example context kind, to enable targeting based on organization" + }, + "version": { + "type": "integer", + "description": "The context kind version", + "example": 4 + }, + "creationDate": { + "description": "Timestamp of when the context kind was created", + "example": "1668530155141", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastModified": { + "description": "Timestamp of when the context kind was most recently changed", + "example": "1670341705251", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastSeen": { + "description": "Timestamp of when a context of this context kind was most recently evaluated", + "example": "1671563538193", + "$ref": "#/components/schemas/UnixMillis" + }, + "createdFrom": { + "description": "How the context kind was created", + "example": "auto-add", "enum": [ - "google-pubsub", - "kinesis", - "mparticle", - "segment", - "azure-event-hubs", - "snowflake-v2", - "databricks", - "bigquery" - ] + "default", + "auto-add", + "manual" + ], + "$ref": "#/components/schemas/ContextKindCreatedFrom" }, - "config": { - "description": "An object with the configuration parameters required for the destination type", - "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}" + "hideInTargeting": { + "type": "boolean", + "description": "Alias for archived.", + "example": false }, - "on": { + "archived": { "type": "boolean", - "description": "Whether the export is on. Displayed as the integration status in the LaunchDarkly UI.", - "example": true + "description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting.", + "example": false + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "Destinations": { + "ContextKindsCollectionRep": { "type": "object", + "required": [ + "items", + "_links" + ], "properties": { + "items": { + "type": "array", + "description": "An array of context kinds", + "items": { + "$ref": "#/components/schemas/ContextKindRep" + } + }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/destinations", - "type": "application/json" - } - } - }, - "items": { - "type": "array", - "description": "An array of Data Export destinations", - "items": { - "$ref": "#/components/schemas/Destination" - } + "description": "The location and content type of related resources" } } }, - "Distribution": { + "ContextRecord": { "type": "object", + "required": [ + "context" + ], "properties": { - "kind": { + "lastSeen": { "type": "string", - "description": "The type of distribution.", - "example": "normal", - "enum": [ - "normal", - "beta" - ] + "format": "date-time", + "description": "Timestamp of the last time an evaluation occurred for this context", + "example": "2022-04-15T15:00:57.526470334Z" }, - "parameters": { + "applicationId": { + "type": "string", + "description": "An identifier representing the application where the LaunchDarkly SDK is running", + "example": "GoSDK/1.2" + }, + "context": { + "description": "The context, including its kind and attributes", + "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}" + }, + "_links": { "type": "object", "additionalProperties": { - "type": "number" + "$ref": "#/components/schemas/Link" }, - "description": "The parameters of the distribution. The parameters are different for each distribution type. When kind is normal, the parameters of the distribution are 'mu' and 'sigma'. When kind is beta, the parameters of the distribution are 'alpha' and 'beta.'" - } - } - }, - "DurationUnit": { - "type": "string" - }, - "DynamicOptions": { - "type": "object", - "properties": { - "endpoint": { - "$ref": "#/components/schemas/Endpoint" + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project/environments/my-env/contexts/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"", + "type": "application/json" + }, + "site": { + "href": "/my-project/my-environment/context/organization:launch-darkly:user:henry", + "type": "text/html" + } + } }, - "parser": { - "$ref": "#/components/schemas/DynamicOptionsParser" - } - } - }, - "DynamicOptionsParser": { - "type": "object", - "properties": { - "optionsItems": { - "$ref": "#/components/schemas/OptionsArray" + "_access": { + "description": "Details on the allowed and denied actions for this context instance", + "$ref": "#/components/schemas/Access" }, - "optionsPath": { - "type": "string" + "associatedContexts": { + "type": "integer", + "description": "The total number of associated contexts. Associated contexts are contexts that have appeared in the same context instance, that is, they were part of the same flag evaluation.", + "example": 0 } } }, - "Endpoint": { + "ContextSearch": { "type": "object", "properties": { - "headers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HeaderItems" - } + "filter": { + "type": "string", + "description": "A collection of context filters", + "example": "*.name startsWith Jo,kind anyOf [\"user\",\"organization\"]" }, - "hmacSignature": { - "$ref": "#/components/schemas/HMACSignature" + "sort": { + "type": "string", + "description": "Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying ts for this value, or descending order by specifying -ts.", + "example": "-ts" }, - "method": { - "type": "string" + "limit": { + "type": "integer", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + "example": 10 }, - "url": { - "type": "string" + "continuationToken": { + "type": "string", + "description": "Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the next link instead, because this value is an obfuscated string.", + "example": "QAGFKH1313KUGI2351" } } }, - "Environment": { + "Contexts": { "type": "object", "required": [ - "_links", - "_id", - "key", - "name", - "apiKey", - "mobileKey", - "color", - "defaultTtl", - "secureMode", - "defaultTrackEvents", - "requireComments", - "confirmChanges", - "tags", - "critical" + "_environmentId", + "items" ], "properties": { "_links": { @@ -36669,209 +37986,259 @@ }, "description": "The location and content type of related resources", "example": { + "next": { + "href": "/app.launchdarkly.com/api/v2/projects/my-project/environments/my-environment/contexts?filter=kind:{\"equals\": [\"organization\"]}&limit=2&continuationToken=QAGFKH1313KUGI2351", + "type": "application/json" + }, "self": { - "href": "/api/v2/projects/my-project/environments/my-environment", + "href": "/api/v2/projects/my-proj/environments/my-env/contexts?filter=kind:{\"equals\": [\"organization\"]}&limit=2&continuationToken=QAGFKH1313KUGI2351", "type": "application/json" } } }, - "_id": { + "totalCount": { + "type": "integer", + "description": "The number of contexts", + "example": 100 + }, + "_environmentId": { "type": "string", - "description": "The ID for the environment. Use this as the client-side ID for authorization in some client-side SDKs, and to associate LaunchDarkly environments with CDN integrations in edge SDKs.", + "description": "The environment ID where the context was evaluated", "example": "57be1db38b75bf0772d11384" }, - "key": { + "continuationToken": { "type": "string", - "description": "A project-unique key for the new environment", - "example": "environment-key-123abc" + "description": "An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the next link instead.", + "example": "QAGFKH1313KUGI2351" }, - "name": { + "items": { + "type": "array", + "description": "A collection of contexts. Can include multiple versions of contexts that have the same kind and key, but different applicationIds.", + "items": { + "$ref": "#/components/schemas/ContextRecord" + } + } + } + }, + "CopiedFromEnv": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { "type": "string", - "description": "A human-friendly name for the new environment", - "example": "My Environment" + "description": "Key of feature flag copied", + "example": "source-flag-key-123abc" }, - "apiKey": { + "version": { + "type": "integer", + "description": "Version of feature flag copied", + "example": 1 + } + } + }, + "CreateApprovalRequestRequest": { + "type": "object", + "required": [ + "resourceId", + "description", + "instructions" + ], + "properties": { + "resourceId": { "type": "string", - "description": "The SDK key for the environment. Use this for authorization in server-side SDKs.", - "example": "sdk-xxx" + "description": "String representation of the resource specifier", + "example": "proj/projKey:env/envKey:flag/flagKey" }, - "mobileKey": { + "comment": { "type": "string", - "description": "The mobile key for the environment. Use this for authorization in mobile SDKs.", - "example": "mob-xxx" + "description": "Optional comment describing the approval request", + "example": "optional comment" }, - "color": { + "description": { "type": "string", - "description": "The color used to indicate this environment in the UI", - "example": "F5A623" - }, - "defaultTtl": { - "type": "integer", - "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally", - "example": 5 - }, - "secureMode": { - "type": "boolean", - "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user", - "example": true - }, - "defaultTrackEvents": { - "type": "boolean", - "description": "Enables tracking detailed information for new flags by default", - "example": false - }, - "requireComments": { - "type": "boolean", - "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment", - "example": true + "description": "A brief description of the changes you're requesting", + "example": "Requesting to update targeting" }, - "confirmChanges": { - "type": "boolean", - "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes", - "example": true + "instructions": { + "description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](https://launchdarkly.com/docs/ld-docs/api/feature-flags/patch-feature-flag) documentation for details on available instructions.", + "example": "[{\"kind\": \"addUserTargets\", \"values\": [ \"user-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]", + "$ref": "#/components/schemas/Instructions" }, - "tags": { + "notifyMemberIds": { "type": "array", - "description": "A list of tags for this environment", + "description": "An array of member IDs. These members are notified to review the approval request.", "items": { "type": "string" }, "example": [ - "ops" + "1234a56b7c89d012345e678f" ] }, - "approvalSettings": { - "description": "Details on the approval settings for this environment", - "$ref": "#/components/schemas/ApprovalSettings" - }, - "resourceApprovalSettings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ApprovalSettings" + "notifyTeamKeys": { + "type": "array", + "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "items": { + "type": "string" }, - "description": "Details on the approval settings for this environment for each resource kind" + "example": [ + "example-reviewer-team" + ] }, - "critical": { - "type": "boolean", - "description": "Whether the environment is critical", - "example": true + "integrationConfig": { + "description": "Additional approval request fields for third-party integration approval systems. If you are using a third-party integration to manage approval requests, these additional fields will be described in the manifest.json for that integration, at https://github.com/launchdarkly/integration-framework.", + "$ref": "#/components/schemas/FormVariableConfig" } } }, - "EnvironmentPost": { + "CreatePhaseInput": { "type": "object", "required": [ - "name", - "key", - "color" + "audiences", + "name" ], "properties": { + "audiences": { + "type": "array", + "description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment.", + "items": { + "$ref": "#/components/schemas/AudiencePost" + } + }, "name": { "type": "string", - "description": "A human-friendly name for the new environment", - "example": "My Environment" + "description": "The release phase name", + "example": "Phase 1 - Testing" }, - "key": { + "configuration": { + "description": "The configuration for the phase's rollout.", + "$ref": "#/components/schemas/PhaseConfiguration" + } + } + }, + "CreateReleaseInput": { + "type": "object", + "required": [ + "releasePipelineKey" + ], + "properties": { + "releaseVariationId": { "type": "string", - "description": "A project-unique key for the new environment", - "example": "environment-key-123abc" + "description": "The variation id to release to across all phases" }, - "color": { + "releasePipelineKey": { "type": "string", - "description": "A color to indicate this environment in the UI", - "example": "F5A623" - }, - "defaultTtl": { - "type": "integer", - "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally", - "example": 5 - }, - "secureMode": { - "type": "boolean", - "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user", - "example": true + "description": "The key of the release pipeline to attach the flag to" + } + } + }, + "CreateReleasePipelineInput": { + "type": "object", + "required": [ + "key", + "name", + "phases" + ], + "properties": { + "description": { + "type": "string", + "description": "The release pipeline description", + "example": "Standard pipeline to roll out to production" }, - "defaultTrackEvents": { - "type": "boolean", - "description": "Enables tracking detailed information for new flags by default", - "example": false + "key": { + "type": "string", + "description": "The unique identifier of this release pipeline", + "example": "standard-pipeline" }, - "confirmChanges": { - "type": "boolean", - "description": "Requires confirmation for all flag and segment changes via the UI in this environment", - "example": false + "name": { + "type": "string", + "description": "The name of the release pipeline", + "example": "Standard Pipeline" }, - "requireComments": { - "type": "boolean", - "description": "Requires comments for all flag and segment changes via the UI in this environment", - "example": false + "phases": { + "type": "array", + "description": "A logical grouping of one or more environments that share attributes for rolling out changes", + "items": { + "$ref": "#/components/schemas/CreatePhaseInput" + } }, "tags": { "type": "array", - "description": "Tags to apply to the new environment", + "description": "A list of tags for this release pipeline", "items": { "type": "string" }, "example": [ - "ops" + "example-tag" ] }, - "source": { - "description": "Indicates that the new environment created will be cloned from the provided source environment", - "$ref": "#/components/schemas/SourceEnv" + "isProjectDefault": { + "type": "boolean", + "description": "Whether or not the newly created pipeline should be set as the default pipeline for this project" }, - "critical": { + "isLegacy": { "type": "boolean", - "description": "Whether the environment is critical", - "example": true + "description": "Whether or not the pipeline is enabled for Release Automation." } } }, - "EnvironmentSummary": { + "CreateWorkflowTemplateInput": { "type": "object", "required": [ - "_links", - "key", - "name", - "color" + "key" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/projects/my-project/environments/my-environment", - "type": "application/json" - } - } - }, "key": { - "type": "string", - "description": "A project-unique key for the environment", - "example": "environment-key-123abc" + "type": "string" }, "name": { - "type": "string", - "description": "A human-friendly name for the environment", - "example": "My Environment" + "type": "string" }, - "color": { - "type": "string", - "description": "The color used to indicate this environment in the UI", - "example": "F5A623" + "description": { + "type": "string" + }, + "workflowId": { + "$ref": "#/components/schemas/FeatureWorkflowId" + }, + "stages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StageInput" + } + }, + "projectKey": { + "type": "string" + }, + "environmentKey": { + "type": "string" + }, + "flagKey": { + "type": "string" } } }, - "Environments": { + "CustomProperties": { "type": "object", - "required": [ - "items" - ], + "additionalProperties": { + "$ref": "#/components/schemas/customProperty" + } + }, + "CustomRole": { + "type": "object", + "required": [ + "_id", + "_links", + "key", + "name", + "policy" + ], "properties": { + "_id": { + "type": "string", + "description": "The ID of the custom role", + "example": "1234a56b7c89d012345e678f" + }, "_links": { "type": "object", "additionalProperties": { @@ -36879,244 +38246,275 @@ }, "description": "The location and content type of related resources" }, - "totalCount": { + "_access": { + "description": "Details on the allowed and denied actions for this custom role", + "$ref": "#/components/schemas/Access" + }, + "description": { + "type": "string", + "description": "The description of the custom role", + "example": "This custom role is just an example" + }, + "key": { + "type": "string", + "description": "The key of the custom role", + "example": "example-custom-role" + }, + "name": { + "type": "string", + "description": "The name of the custom role", + "example": "Example custom role" + }, + "policy": { + "type": "array", + "description": "An array of the policies that comprise this custom role", + "items": { + "$ref": "#/components/schemas/Statement" + } + }, + "basePermissions": { + "description": "Base permissions to use for this role. Defaults to reader. Recommended to set this to no_access in all cases.", + "example": "reader", + "$ref": "#/components/schemas/RoleType" + }, + "resourceCategory": { + "description": "The category of resources this role is intended to manage. Can be organization, project, or any. Once set, this field cannot be changed.", + "$ref": "#/components/schemas/ResourceCategory" + }, + "assignedTo": { + "description": "The number of teams and members this role is assigned to", + "$ref": "#/components/schemas/AssignedToRep" + }, + "_presetBundleVersion": { "type": "integer", - "description": "The number of environments returned", - "example": 2 + "description": "If created from a preset, the preset bundle version" }, - "items": { + "_presetStatements": { "type": "array", - "description": "An array of environments", + "description": "If created from a preset, the read-only statements copied from the preset", "items": { - "$ref": "#/components/schemas/Environment" + "$ref": "#/components/schemas/Statement" } } } }, - "EvaluationReason": { + "CustomRolePost": { "type": "object", "required": [ - "kind" + "name", + "key", + "policy" ], "properties": { - "kind": { + "name": { "type": "string", - "description": "Describes the general reason that LaunchDarkly selected this variation.", - "example": "OFF" - }, - "ruleIndex": { - "type": "integer", - "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.", - "example": 3 + "description": "A human-friendly name for the custom role", + "example": "Ops team" }, - "ruleID": { + "key": { "type": "string", - "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'.", - "example": "1234567890" + "description": "The custom role key", + "example": "role-key-123abc" }, - "prerequisiteKey": { + "description": { "type": "string", - "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.", - "example": "someotherflagkey" + "description": "Description of custom role", + "example": "An example role for members of the ops team" }, - "inExperiment": { - "type": "boolean", - "description": "Indicates whether the evaluation occurred as part of an experiment.", - "example": true + "policy": { + "description": "Resource statements for custom role", + "$ref": "#/components/schemas/StatementPostList" }, - "errorKind": { - "type": "string", - "description": "The specific error type if the kind is 'ERROR'.", - "example": "USER_NOT_SPECIFIED" + "basePermissions": { + "description": "Base permissions to use for this role. Defaults to reader. Recommended to set this to no_access in all cases.", + "example": "reader", + "enum": [ + "reader", + "no_access" + ], + "$ref": "#/components/schemas/RoleType" + }, + "resourceCategory": { + "description": "The category of resources this role is intended to manage. Can be organization, project, or any. This field is immutable.", + "$ref": "#/components/schemas/ResourceCategory" } } }, - "ExecutionOutput": { + "CustomRoles": { "type": "object", "required": [ - "status" + "items" ], "properties": { - "status": { - "type": "string", - "description": "The status of the execution of this workflow stage", - "example": "completed" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "stopDate": { - "description": "Timestamp of when the workflow was completed.", - "example": "1718467200000", - "$ref": "#/components/schemas/UnixMillis" + "items": { + "type": "array", + "description": "An array of custom roles", + "items": { + "$ref": "#/components/schemas/CustomRole" + } + }, + "totalCount": { + "type": "integer", + "description": "The total number of custom roles" } } }, - "ExpandableApprovalRequestResponse": { + "CustomWorkflowInput": { "type": "object", "required": [ - "_id", - "_version", - "creationDate", - "serviceKind", - "reviewStatus", - "allReviews", - "notifyMemberIds", - "status", - "instructions", - "conflicts", - "_links" + "name" ], "properties": { - "_id": { - "type": "string", - "description": "The ID of this approval request", - "example": "12ab3c45de678910abc12345" - }, - "_version": { - "type": "integer", - "description": "Version of the approval request", - "example": 1 - }, - "creationDate": { - "description": "Timestamp of when the approval request was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "serviceKind": { - "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", - "example": "launchdarkly", - "$ref": "#/components/schemas/ApprovalRequestServiceKind" + "maintainerId": { + "description": "The ID of the workflow maintainer. Defaults to the workflow creator.", + "example": "12ab3c45de678910abc12345", + "$ref": "#/components/schemas/ObjectId" }, - "requestorId": { + "name": { "type": "string", - "description": "The ID of the member who requested the approval", - "example": "12ab3c45de678910abc12345" + "description": "The workflow name", + "example": "Progressive rollout starting in two days" }, "description": { "type": "string", - "description": "A human-friendly name for the approval request", - "example": "example: request approval from someone" - }, - "reviewStatus": { - "type": "string", - "description": "Current status of the review of this approval request", - "example": "pending", - "enum": [ - "approved", - "declined", - "pending" - ] + "description": "The workflow description", + "example": "Turn flag on for 10% of users each day" }, - "allReviews": { + "stages": { "type": "array", - "description": "An array of individual reviews of this approval request", + "description": "A list of the workflow stages", "items": { - "$ref": "#/components/schemas/ReviewResponse" + "$ref": "#/components/schemas/StageInput" } }, - "notifyMemberIds": { - "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", - "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] - }, - "appliedDate": { - "description": "Timestamp of when the approval request was applied", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "appliedByMemberId": { + "templateKey": { "type": "string", - "description": "The member ID of the member who applied the approval request", - "example": "1234a56b7c89d012345e678f" - }, - "appliedByServiceTokenId": { + "description": "The template key" + } + } + }, + "CustomWorkflowMeta": { + "type": "object", + "properties": { + "name": { "type": "string", - "description": "The service token ID of the service token which applied the approval request", - "example": "1234a56b7c89d012345e678f" + "description": "The name of the workflow stage that required this approval request", + "example": "Example workflow name" }, - "status": { + "stage": { + "description": "Details on the stage of the workflow where this approval request is required", + "$ref": "#/components/schemas/CustomWorkflowStageMeta" + } + } + }, + "CustomWorkflowOutput": { + "type": "object", + "required": [ + "_id", + "_version", + "_conflicts", + "_creationDate", + "_maintainerId", + "_links", + "name", + "_execution" + ], + "properties": { + "_id": { "type": "string", - "description": "Current status of the approval request", - "example": "pending", - "enum": [ - "pending", - "completed", - "failed", - "scheduled" - ] + "description": "The ID of the workflow", + "example": "12ab3c4d5ef1a2345bcde67f" }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag", - "example": "[{\"kind\": \"turnFlagOn\"}]", - "$ref": "#/components/schemas/Instructions" + "_version": { + "type": "integer", + "description": "The version of the workflow", + "example": 1 }, - "conflicts": { + "_conflicts": { "type": "array", - "description": "Details on any conflicting approval requests", + "description": "Any conflicts that are present in the workflow stages", "items": { - "$ref": "#/components/schemas/Conflict" + "$ref": "#/components/schemas/ConflictOutput" } }, - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" - }, - "executionDate": { - "description": "Timestamp for when instructions will be executed", + "_creationDate": { + "description": "Timestamp of when the workflow was created", "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" }, - "operatingOnId": { + "_maintainerId": { "type": "string", - "description": "ID of scheduled change to edit or delete", + "description": "The member ID of the maintainer of the workflow. Defaults to the workflow creator.", "example": "12ab3c45de678910abc12345" }, - "integrationMetadata": { - "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used", - "$ref": "#/components/schemas/IntegrationMetadata" - }, - "source": { - "description": "Details about the source feature flag, if copied", - "$ref": "#/components/schemas/CopiedFromEnv" - }, - "customWorkflowMetadata": { - "description": "Details about the custom workflow, if this approval request is part of a custom workflow", - "$ref": "#/components/schemas/CustomWorkflowMeta" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "resourceId": { + "name": { "type": "string", - "description": "String representation of a resource" + "description": "The name of the workflow", + "example": "Progressive rollout starting in two days" }, - "approvalSettings": { - "description": "The settings for this approval", - "$ref": "#/components/schemas/ApprovalSettings" + "description": { + "type": "string", + "description": "A brief description of the workflow", + "example": "Turn flag on for 10% of customers each day" }, - "project": { - "description": "Project the approval request belongs to", - "$ref": "#/components/schemas/Project" + "kind": { + "type": "string", + "description": "The kind of workflow", + "example": "custom" }, - "environments": { + "stages": { "type": "array", - "description": "List of environments the approval impacts", + "description": "The stages that make up the workflow. Each stage contains conditions and actions.", "items": { - "$ref": "#/components/schemas/Environment" + "$ref": "#/components/schemas/StageOutput" } }, - "flag": { - "description": "Flag the approval request belongs to", - "$ref": "#/components/schemas/ExpandedFlagRep" + "_execution": { + "description": "The current execution status of the workflow", + "example": "{\"status\": \"completed\"}", + "$ref": "#/components/schemas/ExecutionOutput" }, - "resource": { - "description": "Resource the approval request belongs to", - "$ref": "#/components/schemas/ExpandedResourceRep" + "meta": { + "description": "For workflows being created from a workflow template, this value holds any parameters that could potentially be incompatible with the current project, environment, or flag", + "$ref": "#/components/schemas/WorkflowTemplateMetadata" + }, + "templateKey": { + "type": "string", + "description": "For workflows being created from a workflow template, this value is the template's key", + "example": "example-workflow-template" } } }, - "ExpandableApprovalRequestsResponse": { + "CustomWorkflowStageMeta": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "description": "The zero-based index of the workflow stage", + "example": 0 + }, + "name": { + "type": "string", + "description": "The name of the workflow stage", + "example": "Stage 1" + } + } + }, + "CustomWorkflowsListingOutput": { "type": "object", "required": [ "items", @@ -37126,14 +38524,14 @@ "properties": { "items": { "type": "array", - "description": "An array of approval requests", + "description": "An array of workflows", "items": { - "$ref": "#/components/schemas/ExpandableApprovalRequestResponse" + "$ref": "#/components/schemas/CustomWorkflowOutput" } }, "totalCount": { "type": "integer", - "description": "Total number of approval requests", + "description": "Total number of workflows", "example": 1 }, "_links": { @@ -37145,98 +38543,112 @@ } } }, - "ExpandedFlagRep": { + "DateVersion": { + "type": "integer" + }, + "DefaultClientSideAvailability": { + "type": "object", + "required": [ + "usingMobileKey", + "usingEnvironmentId" + ], + "properties": { + "usingMobileKey": { + "type": "boolean", + "description": "Whether to enable availability for mobile SDKs", + "example": true + }, + "usingEnvironmentId": { + "type": "boolean", + "description": "Whether to enable availability for client-side SDKs", + "example": true + } + } + }, + "DefaultClientSideAvailabilityPost": { + "type": "object", + "required": [ + "usingEnvironmentId", + "usingMobileKey" + ], + "properties": { + "usingEnvironmentId": { + "type": "boolean", + "description": "Whether to enable availability for client-side SDKs.", + "example": true + }, + "usingMobileKey": { + "type": "boolean", + "description": "Whether to enable availability for mobile SDKs.", + "example": true + } + } + }, + "Defaults": { + "type": "object", + "required": [ + "onVariation", + "offVariation" + ], + "properties": { + "onVariation": { + "type": "integer", + "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is on.", + "example": 0 + }, + "offVariation": { + "type": "integer", + "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is off.", + "example": 1 + } + } + }, + "DependentExperimentListRep": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DependentExperimentRep" + } + }, + "DependentExperimentRep": { "type": "object", "required": [ - "name", - "kind", "key", - "_version", + "name", + "environmentId", + "environmentKey", "creationDate", - "variations", - "temporary", - "tags", - "_links", - "customProperties", - "archived" + "_links" ], "properties": { - "name": { + "key": { "type": "string", - "description": "A human-friendly name for the feature flag", - "example": "My Flag" + "description": "The experiment key", + "example": "experiment-key-123abc" }, - "kind": { + "name": { "type": "string", - "description": "Kind of feature flag", - "example": "boolean", - "enum": [ - "boolean", - "multivariate" - ] + "description": "The experiment name", + "example": "Example experiment" }, - "description": { + "environmentId": { "type": "string", - "description": "Description of the feature flag", - "example": "This flag controls the example widgets" + "description": "The environment ID", + "example": "1234a56b7c89d012345e678f" }, - "key": { + "environmentKey": { "type": "string", - "description": "A unique key used to reference the flag in your code", - "example": "flag-key-123abc" - }, - "_version": { - "type": "integer", - "description": "Version of the feature flag", - "example": 1 + "description": "The environment key", + "example": "production" }, "creationDate": { - "description": "Timestamp of flag creation date", - "example": "1494437420312", + "description": "Timestamp of when the experiment was created", + "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" }, - "includeInSnippet": { - "type": "boolean", - "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK", - "example": true, - "deprecated": true - }, - "clientSideAvailability": { - "description": "Which type of client-side SDKs the feature flag is available to", - "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", - "$ref": "#/components/schemas/ClientSideAvailability" - }, - "variations": { - "type": "array", - "description": "An array of possible variations for the flag", - "items": { - "$ref": "#/components/schemas/Variation" - }, - "example": [ - { - "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05", - "value": true - }, - { - "_id": "a00bf58d-d252-476c-b915-15a74becacb4", - "value": false - } - ] - }, - "temporary": { - "type": "boolean", - "description": "Whether the flag is a temporary flag", - "example": true - }, - "tags": { - "type": "array", - "description": "Tags for the feature flag", - "items": { - "type": "string" - }, - "example": [ - "example-tag" - ] + "archivedDate": { + "description": "Timestamp of when the experiment was archived", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, "_links": { "type": "object", @@ -37246,114 +38658,155 @@ "description": "The location and content type of related resources", "example": { "parent": { - "href": "/api/v2/flags/my-project", + "href": "/api/v2/projects/my-project/environments/my-environment", "type": "application/json" }, "self": { - "href": "/api/v2/flags/my-project/my-flag", + "href": "/api/v2/projects/my-project/environments/my-environment/experiments/example-experiment", "type": "application/json" } } + } + } + }, + "DependentFlag": { + "type": "object", + "required": [ + "key", + "_links", + "_site" + ], + "properties": { + "name": { + "type": "string", + "description": "The flag name", + "example": "Example dependent flag" }, - "maintainerId": { + "key": { "type": "string", - "description": "The ID of the member who maintains the flag", - "example": "569f183514f4432160000007" + "description": "The flag key", + "example": "dependent-flag-key-123abc" }, - "_maintainer": { - "description": "Details on the member who maintains this feature flag", - "$ref": "#/components/schemas/MemberSummary" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "customProperties": { - "description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration.", - "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}", - "$ref": "#/components/schemas/CustomProperties" + "_site": { + "description": "Details on how to access the dependent flag in the LaunchDarkly UI", + "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }", + "$ref": "#/components/schemas/Link" + } + } + }, + "DependentFlagEnvironment": { + "type": "object", + "required": [ + "key", + "_links", + "_site" + ], + "properties": { + "name": { + "type": "string", + "description": "The environment name", + "example": "Example environment" }, - "archived": { - "type": "boolean", - "description": "Boolean indicating if the feature flag is archived", - "example": false + "key": { + "type": "string", + "description": "The environment key", + "example": "environment-key-123abc" }, - "archivedDate": { - "description": "If archived is true, date of archive", - "example": "1494437420312", - "$ref": "#/components/schemas/UnixMillis" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "defaults": { - "description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used.", - "example": "{\"onVariation\":0,\"offVariation\":1}", - "$ref": "#/components/schemas/Defaults" + "_site": { + "description": "Details on how to access the dependent flag in this environment in the LaunchDarkly UI", + "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }", + "$ref": "#/components/schemas/Link" } } }, - "ExpandedResourceRep": { + "DependentFlagsByEnvironment": { "type": "object", "required": [ - "kind" + "items", + "_links", + "_site" ], "properties": { - "kind": { - "type": "string", - "description": "The type of resource", - "example": "flag" - }, - "aiConfig": { - "$ref": "#/components/schemas/AIConfigRep" + "items": { + "type": "array", + "description": "A list of dependent flags, which are flags that use the requested flag as a prerequisite", + "items": { + "$ref": "#/components/schemas/DependentFlag" + } }, - "flag": { - "$ref": "#/components/schemas/ExpandedFlagRep" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "segment": { - "$ref": "#/components/schemas/UserSegment" + "_site": { + "description": "Details on how to access the prerequisite flag in the LaunchDarkly UI", + "example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }", + "$ref": "#/components/schemas/Link" } } }, - "Experiment": { + "DependentMeasuredRolloutRep": { "type": "object", "required": [ - "key", - "name", - "_maintainerId", - "_creationDate", + "_id", + "flagKey", + "flagName", "environmentKey", + "environmentName", + "status", + "creationDate", "_links" ], "properties": { "_id": { "type": "string", - "description": "The experiment ID", - "example": "12ab3c45de678910fgh12345" + "description": "The guarded rollout measured rollout Id", + "example": "885ccadf-181b-4a9a-8414-7ad6f7ba2db0" }, - "key": { + "flagKey": { "type": "string", - "description": "The experiment key", - "example": "experiment-key-123abc" + "description": "The guarded rollout flag key ", + "example": "my-flag" }, - "name": { + "flagName": { "type": "string", - "description": "The experiment name", - "example": "Example experiment" + "description": "The guarded rollout flag name ", + "example": "My Flag" }, - "description": { + "environmentKey": { "type": "string", - "description": "The experiment description", - "example": "An example experiment, used in testing" + "description": "The guarded rollout environment key", + "example": "production" }, - "_maintainerId": { + "environmentName": { "type": "string", - "description": "The ID of the member who maintains this experiment.", - "example": "12ab3c45de678910fgh12345" - }, - "_creationDate": { - "description": "Timestamp of when the experiment was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "description": "The guarded rollout environment name", + "example": "Production" }, - "environmentKey": { - "type": "string" + "status": { + "type": "string", + "description": "The guarded rollout status", + "example": "monitoring" }, - "archivedDate": { - "description": "Timestamp of when the experiment was archived", + "creationDate": { + "description": "Timestamp of when the guarded rollout was created", "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" }, @@ -37364,558 +38817,585 @@ }, "description": "The location and content type of related resources", "example": { - "parent": { - "href": "/api/v2/projects/my-project/environments/my-environment", - "type": "application/json" - }, "self": { - "href": "/api/v2/projects/my-project/environments/my-environment/experiments/my-experiment", + "href": "/api/v2/projects/my-project/flags/my-flag/environments/production/measured-rollouts/885ccadf-181b-4a9a-8414-7ad6f7ba2db0", "type": "application/json" } } - }, - "holdoutId": { - "type": "string", - "description": "The holdout ID", - "example": "f3b74309-d581-44e1-8a2b-bb2933b4fe40" - }, - "currentIteration": { - "description": "Details on the current iteration", - "$ref": "#/components/schemas/IterationRep" - }, - "draftIteration": { - "description": "Details on the current iteration. This iteration may be already started, or may still be a draft.", - "$ref": "#/components/schemas/IterationRep" - }, - "previousIterations": { - "type": "array", - "description": "Details on the previous iterations for this experiment.", - "items": { - "$ref": "#/components/schemas/IterationRep" - } } } }, - "ExperimentAllocationRep": { + "DependentMetricGroupRep": { "type": "object", "required": [ - "defaultVariation", - "canReshuffle" + "key", + "name", + "kind", + "_links" ], "properties": { - "defaultVariation": { - "type": "integer" + "key": { + "type": "string", + "description": "A unique key to reference the metric group", + "example": "metric-group-key-123abc" + }, + "name": { + "type": "string", + "description": "A human-friendly name for the metric group", + "example": "My metric group" + }, + "kind": { + "type": "string", + "description": "The type of the metric group", + "example": "funnel", + "enum": [ + "funnel", + "standard", + "guardrail" + ] }, - "canReshuffle": { - "type": "boolean" - } - } - }, - "ExperimentBayesianResultsRep": { - "type": "object", - "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - }, - "treatmentResults": { - "type": "array", - "description": "Deprecated, use results instead. Only populated when response does not contain results sliced by multiple attributes.", - "items": { - "$ref": "#/components/schemas/TreatmentResultRep" - }, - "deprecated": true - }, - "metricSeen": { - "$ref": "#/components/schemas/MetricSeen" - }, - "probabilityOfMismatch": { - "type": "number", - "description": "The probability of a Sample Ratio Mismatch", - "example": 0.9999999999999738 - }, - "results": { - "type": "array", - "description": "A list of attribute values and their corresponding treatment results", - "items": { - "$ref": "#/components/schemas/SlicedResultsRep" + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", + "type": "application/json" + } } } } }, - "ExperimentCollectionRep": { + "DependentMetricGroupRepWithMetrics": { "type": "object", "required": [ - "items" + "key", + "name", + "kind", + "_links" ], "properties": { - "items": { - "type": "array", - "description": "An array of experiments", - "items": { - "$ref": "#/components/schemas/Experiment" - } + "key": { + "type": "string", + "description": "A unique key to reference the metric group", + "example": "metric-group-key-123abc" }, - "total_count": { - "type": "integer", - "description": "The total number of experiments in this project and environment. Does not include legacy experiments." + "name": { + "type": "string", + "description": "A human-friendly name for the metric group", + "example": "My metric group" + }, + "kind": { + "type": "string", + "description": "The type of the metric group", + "example": "funnel", + "enum": [ + "funnel", + "standard", + "guardrail" + ] }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - } - } - }, - "ExperimentEnabledPeriodRep": { - "type": "object", - "properties": { - "startDate": { - "$ref": "#/components/schemas/UnixMillis" - }, - "stopDate": { - "$ref": "#/components/schemas/UnixMillis" - } - } - }, - "ExperimentEnvironmentSettingRep": { - "type": "object", - "properties": { - "startDate": { - "$ref": "#/components/schemas/UnixMillis" - }, - "stopDate": { - "$ref": "#/components/schemas/UnixMillis" - }, - "enabledPeriods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentEnabledPeriodRep" + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", + "type": "application/json" + } } - } - } - }, - "ExperimentInfoRep": { - "type": "object", - "required": [ - "baselineIdx", - "items" - ], - "properties": { - "baselineIdx": { - "type": "integer" }, - "items": { + "metrics": { "type": "array", + "description": "The metrics in the metric group", "items": { - "$ref": "#/components/schemas/LegacyExperimentRep" + "$ref": "#/components/schemas/MetricInGroupRep" } } } }, - "ExperimentPatchInput": { - "type": "object", - "required": [ - "instructions" - ], - "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the update", - "example": "Optional comment" - }, - "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", - "example": "[{\"kind\": \"updateName\", \"value\": \"Updated experiment name\"}]", - "$ref": "#/components/schemas/Instructions" - } - } - }, - "ExperimentPost": { + "DependentMetricOrMetricGroupRep": { "type": "object", "required": [ - "name", "key", - "iteration" + "_versionId", + "name", + "kind", + "_links", + "isGroup" ], "properties": { - "name": { + "key": { "type": "string", - "description": "The experiment name", - "example": "Example experiment" + "description": "A unique key to reference the metric or metric group", + "example": "metric-key-123abc" }, - "description": { + "_versionId": { "type": "string", - "description": "The experiment description", - "example": "An example experiment, used in testing" + "description": "The version ID of the metric or metric group" }, - "maintainerId": { + "name": { "type": "string", - "description": "The ID of the member who maintains this experiment", - "example": "12ab3c45de678910fgh12345" + "description": "A human-friendly name for the metric or metric group", + "example": "My metric" }, - "key": { + "kind": { "type": "string", - "description": "The experiment key", - "example": "experiment-key-123abc" + "description": "If this is a metric, then it represents the kind of event the metric tracks. If this is a metric group, then it represents the group type", + "example": "custom", + "enum": [ + "pageview", + "click", + "custom", + "funnel", + "standard", + "guardrail" + ] }, - "iteration": { - "description": "Details on the construction of the initial iteration", - "$ref": "#/components/schemas/IterationInput" + "isNumeric": { + "type": "boolean", + "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "example": true }, - "holdoutId": { + "eventKey": { "type": "string", - "description": "The ID of the holdout", - "example": "f3b74309-d581-44e1-8a2b-bb2933b4fe40" + "description": "The event key sent with the metric. Only relevant for custom metrics.", + "example": "event-key-123abc" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/metrics/my-project/my-metric", + "type": "application/json" + } + } + }, + "isGroup": { + "type": "boolean", + "description": "Whether this is a metric group or a metric" + }, + "metrics": { + "type": "array", + "description": "An ordered list of the metrics in this metric group", + "items": { + "$ref": "#/components/schemas/MetricInGroupRep" + } } } }, - "ExpiringTarget": { + "Destination": { "type": "object", - "required": [ - "_id", - "_version", - "expirationDate", - "contextKind", - "contextKey", - "_resourceId" - ], "properties": { "_id": { "type": "string", - "description": "The ID of this expiring target", - "example": "12ab3c45de678910abc12345" - }, - "_version": { - "type": "integer", - "description": "The version of this expiring target", - "example": 1 - }, - "expirationDate": { - "description": "A timestamp for when the target expires", - "example": "1672358400000", - "$ref": "#/components/schemas/UnixMillis" + "description": "The ID of this Data Export destination", + "example": "610addeadbeefaa86ec9a7d4" }, - "contextKind": { - "type": "string", - "description": "The context kind of the context to be removed", - "example": "user" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/destinations", + "type": "application/json" + }, + "self": { + "href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4", + "type": "application/json" + } + } }, - "contextKey": { + "name": { "type": "string", - "description": "A unique key used to represent the context to be removed", - "example": "context-key-123abc" + "description": "A human-readable name for your Data Export destination", + "example": "example-destination" }, - "targetType": { + "kind": { "type": "string", - "description": "A segment's target type, included or excluded. Included when expiring targets are updated on a segment.", - "example": "included" - }, - "variationId": { - "type": "string", - "description": "A unique ID used to represent the flag variation. Included when expiring targets are updated on a feature flag.", - "example": "cc4332e2-bd4d-4fe0-b509-dfd2caf8dd73" + "description": "The type of Data Export destination", + "example": "google-pubsub", + "enum": [ + "google-pubsub", + "kinesis", + "mparticle", + "segment", + "azure-event-hubs", + "snowflake-v2", + "databricks", + "bigquery" + ] }, - "_resourceId": { - "description": "Details on the segment or flag this expiring target belongs to, its environment, and its project", - "$ref": "#/components/schemas/ResourceId" + "version": { + "type": "number", + "example": 1 + }, + "config": { + "description": "An object with the configuration parameters required for the destination type", + "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}" + }, + "on": { + "type": "boolean", + "description": "Whether the export is on, that is, the status of the integration", + "example": true + }, + "_access": { + "description": "Details on the allowed and denied actions for this Data Export destination", + "$ref": "#/components/schemas/Access" } } }, - "ExpiringTargetError": { + "DestinationPost": { "type": "object", - "required": [ - "instructionIndex", - "message" - ], "properties": { - "instructionIndex": { - "type": "integer", - "description": "The index of the PATCH instruction where the error occurred", - "example": 1 + "name": { + "type": "string", + "description": "A human-readable name for your Data Export destination", + "example": "example-destination" }, - "message": { + "kind": { "type": "string", - "description": "The error message related to a failed PATCH instruction", - "example": "example error message" + "description": "The type of Data Export destination", + "example": "google-pubsub", + "enum": [ + "google-pubsub", + "kinesis", + "mparticle", + "segment", + "azure-event-hubs", + "snowflake-v2", + "databricks", + "bigquery" + ] + }, + "config": { + "description": "An object with the configuration parameters required for the destination type", + "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}" + }, + "on": { + "type": "boolean", + "description": "Whether the export is on. Displayed as the integration status in the LaunchDarkly UI.", + "example": true } } }, - "ExpiringTargetGetResponse": { + "Destinations": { "type": "object", - "required": [ - "items" - ], "properties": { - "items": { - "type": "array", - "description": "A list of expiring targets", - "items": { - "$ref": "#/components/schemas/ExpiringTarget" - } - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/destinations", + "type": "application/json" + } + } + }, + "items": { + "type": "array", + "description": "An array of Data Export destinations", + "items": { + "$ref": "#/components/schemas/Destination" + } } } }, - "ExpiringTargetPatchResponse": { + "DurationUnit": { + "type": "string" + }, + "DynamicOptions": { "type": "object", - "required": [ - "items" - ], "properties": { - "items": { - "type": "array", - "description": "A list of the results from each instruction", - "items": { - "$ref": "#/components/schemas/ExpiringTarget" - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "totalInstructions": { - "type": "integer" - }, - "successfulInstructions": { - "type": "integer" + "endpoint": { + "$ref": "#/components/schemas/Endpoint" }, - "failedInstructions": { - "type": "integer" + "parser": { + "$ref": "#/components/schemas/DynamicOptionsParser" + } + } + }, + "DynamicOptionsParser": { + "type": "object", + "properties": { + "optionsItems": { + "$ref": "#/components/schemas/OptionsArray" }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExpiringTargetError" - } + "optionsPath": { + "type": "string" } } }, - "ExpiringUserTargetGetResponse": { + "Endpoint": { "type": "object", - "required": [ - "items" - ], "properties": { - "items": { + "headers": { "type": "array", - "description": "An array of expiring user targets", "items": { - "$ref": "#/components/schemas/ExpiringUserTargetItem" + "$ref": "#/components/schemas/HeaderItems" } }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "hmacSignature": { + "$ref": "#/components/schemas/HMACSignature" + }, + "method": { + "type": "string" + }, + "url": { + "type": "string" } } }, - "ExpiringUserTargetItem": { + "Environment": { "type": "object", "required": [ + "_links", "_id", - "_version", - "expirationDate", - "userKey", - "_resourceId" + "key", + "name", + "apiKey", + "mobileKey", + "color", + "defaultTtl", + "secureMode", + "defaultTrackEvents", + "requireComments", + "confirmChanges", + "tags", + "critical" ], "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + } + } + }, "_id": { "type": "string", - "description": "The ID of this expiring user target", - "example": "12ab3c45de678910fgh12345" + "description": "The ID for the environment. Use this as the client-side ID for authorization in some client-side SDKs, and to associate LaunchDarkly environments with CDN integrations in edge SDKs.", + "example": "57be1db38b75bf0772d11384" }, - "_version": { - "type": "integer", - "description": "The version of this expiring user target", - "example": 1 + "key": { + "type": "string", + "description": "A project-unique key for the new environment", + "example": "environment-key-123abc" }, - "expirationDate": { - "description": "A timestamp for when the user target expires", - "example": "1658192820000", - "$ref": "#/components/schemas/UnixMillis" + "name": { + "type": "string", + "description": "A human-friendly name for the new environment", + "example": "My Environment" }, - "userKey": { + "apiKey": { "type": "string", - "description": "A unique key used to represent the user", - "example": "example-user-key" + "description": "The SDK key for the environment. Use this for authorization in server-side SDKs.", + "example": "sdk-xxx" }, - "targetType": { + "mobileKey": { "type": "string", - "description": "A segment's target type. Included when expiring user targets are updated on a segment.", - "example": "included" + "description": "The mobile key for the environment. Use this for authorization in mobile SDKs.", + "example": "mob-xxx" }, - "variationId": { + "color": { "type": "string", - "description": "A unique key used to represent the flag variation. Included when expiring user targets are updated on a feature flag.", - "example": "ce67d625-a8b9-4fb5-a344-ab909d9d4f4d" + "description": "The color used to indicate this environment in the UI", + "example": "F5A623" }, - "_resourceId": { - "description": "Details on the resource from which the user is expiring", - "$ref": "#/components/schemas/ResourceIDResponse" - } - } - }, - "ExpiringUserTargetPatchResponse": { - "type": "object", - "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "description": "An array of expiring user targets", - "items": { - "$ref": "#/components/schemas/ExpiringUserTargetItem" - } + "defaultTtl": { + "type": "integer", + "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally", + "example": 5 }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "secureMode": { + "type": "boolean", + "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user", + "example": true }, - "totalInstructions": { - "type": "integer", - "description": "The total count of instructions sent in the PATCH request", - "example": 1 + "defaultTrackEvents": { + "type": "boolean", + "description": "Enables tracking detailed information for new flags by default", + "example": false }, - "successfulInstructions": { - "type": "integer", - "description": "The total count of successful instructions sent in the PATCH request", - "example": 1 + "requireComments": { + "type": "boolean", + "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment", + "example": true }, - "failedInstructions": { - "type": "integer", - "description": "The total count of the failed instructions sent in the PATCH request", - "example": 0 + "confirmChanges": { + "type": "boolean", + "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes", + "example": true }, - "errors": { + "tags": { "type": "array", - "description": "An array of error messages for the failed instructions", + "description": "A list of tags for this environment", "items": { - "$ref": "#/components/schemas/ExpiringTargetError" - } + "type": "string" + }, + "example": [ + "ops" + ] + }, + "approvalSettings": { + "description": "Details on the approval settings for this environment", + "$ref": "#/components/schemas/ApprovalSettings" + }, + "resourceApprovalSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ApprovalSettings" + }, + "description": "Details on the approval settings for this environment for each resource kind" + }, + "critical": { + "type": "boolean", + "description": "Whether the environment is critical", + "example": true } } }, - "Export": { + "EnvironmentPost": { "type": "object", "required": [ - "id", - "segmentKey", - "creationTime", - "status", - "sizeBytes", - "size", - "initiator", - "_links" + "name", + "key", + "color" ], "properties": { - "id": { + "name": { "type": "string", - "description": "The export ID", - "example": "1234a567-bcd8-9123-4567-abcd1234567f" + "description": "A human-friendly name for the new environment", + "example": "My Environment" }, - "segmentKey": { + "key": { "type": "string", - "description": "The segment key", - "example": "example-big-segment" - }, - "creationTime": { - "description": "Timestamp of when this export was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "description": "A project-unique key for the new environment", + "example": "environment-key-123abc" }, - "status": { + "color": { "type": "string", - "description": "The export status", - "example": "complete" + "description": "A color to indicate this environment in the UI", + "example": "F5A623" }, - "sizeBytes": { + "defaultTtl": { "type": "integer", - "format": "int64", - "description": "The export size, in bytes", - "example": 18 + "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally", + "example": 5 }, - "size": { - "type": "string", - "description": "The export size, with units", - "example": "18 B" + "secureMode": { + "type": "boolean", + "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user", + "example": true }, - "initiator": { - "description": "Details on the member who initiated the export", - "example": "{\"name\": \"Ariel Flores\", \"email\": \"ariel@acme.com\"}", - "$ref": "#/components/schemas/InitiatorRep" + "defaultTrackEvents": { + "type": "boolean", + "description": "Enables tracking detailed information for new flags by default", + "example": false }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "confirmChanges": { + "type": "boolean", + "description": "Requires confirmation for all flag and segment changes via the UI in this environment", + "example": false + }, + "requireComments": { + "type": "boolean", + "description": "Requires comments for all flag and segment changes via the UI in this environment", + "example": false + }, + "tags": { + "type": "array", + "description": "Tags to apply to the new environment", + "items": { + "type": "string" }, - "description": "The location and content type of related resources, including the location of the exported file" + "example": [ + "ops" + ] + }, + "source": { + "description": "Indicates that the new environment created will be cloned from the provided source environment", + "$ref": "#/components/schemas/SourceEnv" + }, + "critical": { + "type": "boolean", + "description": "Whether the environment is critical", + "example": true } } }, - "Extinction": { + "EnvironmentSummary": { "type": "object", "required": [ - "revision", - "message", - "time", - "flagKey", - "projKey" + "_links", + "key", + "name", + "color" ], "properties": { - "revision": { - "type": "string", - "description": "The identifier for the revision where flag became extinct. For example, a commit SHA.", - "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + } + } }, - "message": { + "key": { "type": "string", - "description": "Description of the extinction. For example, the commit message for the revision.", - "example": "Remove flag for launched feature" - }, - "time": { - "description": "Time of extinction", - "example": "1636558831870", - "$ref": "#/components/schemas/UnixMillis" + "description": "A project-unique key for the environment", + "example": "environment-key-123abc" }, - "flagKey": { + "name": { "type": "string", - "description": "The feature flag key", - "example": "enable-feature" + "description": "A human-friendly name for the environment", + "example": "My Environment" }, - "projKey": { + "color": { "type": "string", - "description": "The project key", - "example": "default" + "description": "The color used to indicate this environment in the UI", + "example": "F5A623" } } }, - "ExtinctionCollectionRep": { + "Environments": { "type": "object", "required": [ - "_links", "items" ], "properties": { @@ -37926,45 +39406,336 @@ }, "description": "The location and content type of related resources" }, + "totalCount": { + "type": "integer", + "description": "The number of environments returned", + "example": 2 + }, "items": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Extinction" - } - }, - "description": "An array of extinction events" + "type": "array", + "description": "An array of environments", + "items": { + "$ref": "#/components/schemas/Environment" + } } } }, - "ExtinctionListPost": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Extinction" - } - }, - "FeatureFlag": { + "EvaluationReason": { "type": "object", "required": [ - "name", - "kind", - "key", - "_version", - "creationDate", - "variations", - "temporary", - "tags", - "_links", - "experiments", - "customProperties", - "archived" + "kind" ], "properties": { - "name": { + "kind": { "type": "string", - "description": "A human-friendly name for the feature flag", - "example": "My Flag" + "description": "Describes the general reason that LaunchDarkly selected this variation.", + "example": "OFF" + }, + "ruleIndex": { + "type": "integer", + "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.", + "example": 3 + }, + "ruleID": { + "type": "string", + "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'.", + "example": "1234567890" + }, + "prerequisiteKey": { + "type": "string", + "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.", + "example": "someotherflagkey" + }, + "inExperiment": { + "type": "boolean", + "description": "Indicates whether the evaluation occurred as part of an experiment.", + "example": true + }, + "errorKind": { + "type": "string", + "description": "The specific error type if the kind is 'ERROR'.", + "example": "USER_NOT_SPECIFIED" + } + } + }, + "EventFilter": { + "type": "object", + "required": [ + "type", + "op", + "values", + "negate" + ], + "properties": { + "type": { + "type": "string", + "description": "Filter type. One of [contextAttribute, eventProperty, group]", + "example": "contextAttribute" + }, + "attribute": { + "type": "string", + "description": "If not a group node, the context attribute name or event property name to filter on", + "example": "country" + }, + "op": { + "description": "The function to perform", + "example": "in", + "$ref": "#/components/schemas/Operator" + }, + "values": { + "type": "array", + "description": "The context attribute / event property values or group member nodes", + "items": {}, + "example": [ + "JP" + ] + }, + "contextKind": { + "type": "string", + "description": "For context attribute filters, the context kind.", + "example": "user" + }, + "negate": { + "type": "boolean", + "description": "If set, then take the inverse of the operator. 'in' becomes 'not in'.", + "example": false + } + } + }, + "ExecutionOutput": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "description": "The status of the execution of this workflow stage", + "example": "completed" + }, + "stopDate": { + "description": "Timestamp of when the workflow was completed.", + "example": "1718467200000", + "$ref": "#/components/schemas/UnixMillis" + } + } + }, + "ExpandableApprovalRequestResponse": { + "type": "object", + "required": [ + "_id", + "_version", + "creationDate", + "serviceKind", + "reviewStatus", + "allReviews", + "notifyMemberIds", + "status", + "instructions", + "conflicts", + "_links" + ], + "properties": { + "_id": { + "type": "string", + "description": "The ID of this approval request", + "example": "12ab3c45de678910abc12345" + }, + "_version": { + "type": "integer", + "description": "Version of the approval request", + "example": 1 + }, + "creationDate": { + "description": "Timestamp of when the approval request was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "serviceKind": { + "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", + "example": "launchdarkly", + "$ref": "#/components/schemas/ApprovalRequestServiceKind" + }, + "requestorId": { + "type": "string", + "description": "The ID of the member who requested the approval", + "example": "12ab3c45de678910abc12345" + }, + "description": { + "type": "string", + "description": "A human-friendly name for the approval request", + "example": "example: request approval from someone" + }, + "reviewStatus": { + "type": "string", + "description": "Current status of the review of this approval request", + "example": "pending", + "enum": [ + "approved", + "declined", + "pending" + ] + }, + "allReviews": { + "type": "array", + "description": "An array of individual reviews of this approval request", + "items": { + "$ref": "#/components/schemas/ReviewResponse" + } + }, + "notifyMemberIds": { + "type": "array", + "description": "An array of member IDs. These members are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] + }, + "appliedDate": { + "description": "Timestamp of when the approval request was applied", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "appliedByMemberId": { + "type": "string", + "description": "The member ID of the member who applied the approval request", + "example": "1234a56b7c89d012345e678f" + }, + "appliedByServiceTokenId": { + "type": "string", + "description": "The service token ID of the service token which applied the approval request", + "example": "1234a56b7c89d012345e678f" + }, + "status": { + "type": "string", + "description": "Current status of the approval request", + "example": "pending", + "enum": [ + "pending", + "completed", + "failed", + "scheduled" + ] + }, + "instructions": { + "description": "List of instructions in semantic patch format to be applied to the feature flag", + "example": "[{\"kind\": \"turnFlagOn\"}]", + "$ref": "#/components/schemas/Instructions" + }, + "conflicts": { + "type": "array", + "description": "Details on any conflicting approval requests", + "items": { + "$ref": "#/components/schemas/Conflict" + } + }, + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" + }, + "executionDate": { + "description": "Timestamp for when instructions will be executed", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "operatingOnId": { + "type": "string", + "description": "ID of scheduled change to edit or delete", + "example": "12ab3c45de678910abc12345" + }, + "integrationMetadata": { + "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used", + "$ref": "#/components/schemas/IntegrationMetadata" + }, + "source": { + "description": "Details about the source feature flag, if copied", + "$ref": "#/components/schemas/CopiedFromEnv" + }, + "customWorkflowMetadata": { + "description": "Details about the custom workflow, if this approval request is part of a custom workflow", + "$ref": "#/components/schemas/CustomWorkflowMeta" + }, + "resourceId": { + "type": "string", + "description": "String representation of a resource" + }, + "approvalSettings": { + "description": "The settings for this approval", + "$ref": "#/components/schemas/ApprovalSettings" + }, + "project": { + "description": "Project the approval request belongs to", + "$ref": "#/components/schemas/Project" + }, + "environments": { + "type": "array", + "description": "List of environments the approval impacts", + "items": { + "$ref": "#/components/schemas/Environment" + } + }, + "flag": { + "description": "Flag the approval request belongs to", + "$ref": "#/components/schemas/ExpandedFlagRep" + }, + "resource": { + "description": "Resource the approval request belongs to", + "$ref": "#/components/schemas/ExpandedResourceRep" + } + } + }, + "ExpandableApprovalRequestsResponse": { + "type": "object", + "required": [ + "items", + "totalCount", + "_links" + ], + "properties": { + "items": { + "type": "array", + "description": "An array of approval requests", + "items": { + "$ref": "#/components/schemas/ExpandableApprovalRequestResponse" + } + }, + "totalCount": { + "type": "integer", + "description": "Total number of approval requests", + "example": 1 + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "ExpandedFlagRep": { + "type": "object", + "required": [ + "name", + "kind", + "key", + "_version", + "creationDate", + "variations", + "temporary", + "tags", + "_links", + "customProperties", + "archived" + ], + "properties": { + "name": { + "type": "string", + "description": "A human-friendly name for the feature flag", + "example": "My Flag" }, "kind": { "type": "string", @@ -38057,36 +39828,13 @@ }, "maintainerId": { "type": "string", - "description": "Associated maintainerId for the feature flag", + "description": "The ID of the member who maintains the flag", "example": "569f183514f4432160000007" }, "_maintainer": { - "description": "Associated maintainer member info for the feature flag", + "description": "Details on the member who maintains this feature flag", "$ref": "#/components/schemas/MemberSummary" }, - "maintainerTeamKey": { - "type": "string", - "description": "The key of the associated team that maintains this feature flag", - "example": "team-1" - }, - "_maintainerTeam": { - "description": "Associated maintainer team info for the feature flag", - "$ref": "#/components/schemas/MaintainerTeam" - }, - "goalIds": { - "type": "array", - "description": "Deprecated, use experiments instead", - "items": { - "type": "string" - }, - "example": [], - "deprecated": true - }, - "experiments": { - "description": "Experimentation data for the feature flag", - "example": "{\"baselineIdx\": 0,\"items\": []}", - "$ref": "#/components/schemas/ExperimentInfoRep" - }, "customProperties": { "description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration.", "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}", @@ -38102,368 +39850,339 @@ "example": "1494437420312", "$ref": "#/components/schemas/UnixMillis" }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the feature flag is deprecated", - "example": false - }, - "deprecatedDate": { - "description": "If deprecated is true, date of deprecation", - "example": "1494437420312", - "$ref": "#/components/schemas/UnixMillis" - }, "defaults": { "description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used.", "example": "{\"onVariation\":0,\"offVariation\":1}", "$ref": "#/components/schemas/Defaults" + } + } + }, + "ExpandedResourceRep": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "description": "The type of resource", + "example": "flag" }, - "_purpose": { - "type": "string" + "aiConfig": { + "$ref": "#/components/schemas/AIConfigRep" }, - "migrationSettings": { - "description": "Migration-related settings for the flag", - "$ref": "#/components/schemas/FlagMigrationSettingsRep" + "flag": { + "$ref": "#/components/schemas/ExpandedFlagRep" }, - "environments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FeatureFlagConfig" - }, - "description": "Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv query parameter.", - "example": { - "my-environment": { - "_environmentName": "My Environment", - "_site": { - "href": "/default/my-environment/features/client-side-flag", - "type": "text/html" - }, - "_summary": { - "prerequisites": 0, - "variations": { - "0": { - "contextTargets": 1, - "isFallthrough": true, - "nullRules": 0, - "rules": 0, - "targets": 1 - }, - "1": { - "isOff": true, - "nullRules": 0, - "rules": 0, - "targets": 0 - } - } - }, - "archived": false, - "contextTargets": [ - { - "contextKind": "device", - "values": [ - "device-key-123abc" - ], - "variation": 0 - } - ], - "fallthrough": { - "variation": 0 - }, - "lastModified": 1627071171347, - "offVariation": 1, - "on": false, - "prerequisites": [], - "rules": [], - "salt": "61eddeadbeef4da1facecafe3a60a397", - "sel": "810edeadbeef4844facecafe438f2999492", - "targets": [ - { - "contextKind": "user", - "values": [ - "user-key-123abc" - ], - "variation": 0 - } - ], - "trackEvents": false, - "trackEventsFallthrough": false, - "version": 1 - } - } + "segment": { + "$ref": "#/components/schemas/UserSegment" } } }, - "FeatureFlagBody": { + "Experiment": { "type": "object", "required": [ + "key", "name", - "key" + "_maintainerId", + "_creationDate", + "environmentKey", + "_links" ], "properties": { - "name": { + "_id": { "type": "string", - "description": "A human-friendly name for the feature flag", - "example": "My flag" + "description": "The experiment ID", + "example": "12ab3c45de678910fgh12345" }, "key": { "type": "string", - "description": "A unique key used to reference the flag in your code", - "example": "flag-key-123abc" + "description": "The experiment key", + "example": "experiment-key-123abc" + }, + "name": { + "type": "string", + "description": "The experiment name", + "example": "Example experiment" }, "description": { "type": "string", - "description": "Description of the feature flag. Defaults to an empty string.", - "example": "This flag controls the example widgets" + "description": "The experiment description", + "example": "An example experiment, used in testing" }, - "includeInSnippet": { - "type": "boolean", - "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK. Defaults to false.", - "deprecated": true + "_maintainerId": { + "type": "string", + "description": "The ID of the member who maintains this experiment.", + "example": "12ab3c45de678910fgh12345" }, - "clientSideAvailability": { - "description": "Which type of client-side SDKs the feature flag is available to", - "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", - "$ref": "#/components/schemas/ClientSideAvailabilityPost" + "_creationDate": { + "description": "Timestamp of when the experiment was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "variations": { - "type": "array", - "description": "An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of true and false will be used.", - "items": { - "$ref": "#/components/schemas/Variation" + "environmentKey": { + "type": "string" + }, + "archivedDate": { + "description": "Timestamp of when the experiment was archived", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - { - "value": true + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" }, - { - "value": false + "self": { + "href": "/api/v2/projects/my-project/environments/my-environment/experiments/my-experiment", + "type": "application/json" } - ] - }, - "temporary": { - "type": "boolean", - "description": "Whether the flag is a temporary flag. Defaults to true.", - "example": false + } }, - "tags": { - "type": "array", - "description": "Tags for the feature flag. Defaults to an empty array.", - "items": { - "type": "string" - }, - "example": [ - "example-tag" - ] - }, - "customProperties": { - "description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration.", - "example": "{ \"jira.issues\": {\"name\": \"Jira issues\", \"value\": [\"is-123\", \"is-456\"]} }", - "$ref": "#/components/schemas/CustomProperties" - }, - "defaults": { - "description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used.", - "example": "{\"onVariation\":0, \"offVariation\":1}", - "$ref": "#/components/schemas/Defaults" - }, - "purpose": { + "holdoutId": { "type": "string", - "description": "Purpose of the flag", - "example": "migration", - "enum": [ - "migration", - "holdout" - ] - }, - "migrationSettings": { - "description": "Settings relevant to flags where purpose is migration", - "$ref": "#/components/schemas/MigrationSettingsPost" + "description": "The holdout ID", + "example": "f3b74309-d581-44e1-8a2b-bb2933b4fe40" }, - "maintainerId": { - "type": "string", - "description": "The ID of the member who maintains this feature flag", - "example": "12ab3c45de678910fgh12345" + "currentIteration": { + "description": "Details on the current iteration", + "$ref": "#/components/schemas/IterationRep" }, - "maintainerTeamKey": { - "type": "string", - "description": "The key of the team that maintains this feature flag", - "example": "team-1" + "draftIteration": { + "description": "Details on the current iteration. This iteration may be already started, or may still be a draft.", + "$ref": "#/components/schemas/IterationRep" }, - "initialPrerequisites": { + "previousIterations": { "type": "array", - "description": "Initial set of prerequisite flags for all environments", + "description": "Details on the previous iterations for this experiment.", "items": { - "$ref": "#/components/schemas/FlagPrerequisitePost" + "$ref": "#/components/schemas/IterationRep" } - }, - "isFlagOn": { - "type": "boolean", - "description": "Whether to automatically turn the flag on across all environments at creation. Defaults to false." } } }, - "FeatureFlagConfig": { + "ExperimentAllocationRep": { "type": "object", "required": [ - "on", - "archived", - "salt", - "sel", - "lastModified", - "version", - "_site", - "_environmentName", - "trackEvents", - "trackEventsFallthrough" + "defaultVariation", + "canReshuffle" ], "properties": { - "on": { - "type": "boolean", - "description": "Whether the flag is on" - }, - "archived": { - "type": "boolean", - "description": "Boolean indicating if the feature flag is archived" + "defaultVariation": { + "type": "integer" }, - "salt": { - "type": "string" + "canReshuffle": { + "type": "boolean" + } + } + }, + "ExperimentCollectionRep": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "description": "An array of experiments", + "items": { + "$ref": "#/components/schemas/Experiment" + } }, - "sel": { - "type": "string" + "total_count": { + "type": "integer", + "description": "The total number of experiments in this project and environment. Does not include legacy experiments." }, - "lastModified": { - "description": "Timestamp of when the flag configuration was most recently modified", + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "ExperimentEnabledPeriodRep": { + "type": "object", + "properties": { + "startDate": { "$ref": "#/components/schemas/UnixMillis" }, - "version": { - "type": "integer", - "description": "Version of the feature flag" - }, - "targets": { - "type": "array", - "description": "An array of the individual targets that will receive a specific variation based on their key. Individual targets with a context kind of 'user' are included here.", - "items": { - "$ref": "#/components/schemas/Target" - } + "stopDate": { + "$ref": "#/components/schemas/UnixMillis" + } + } + }, + "ExperimentEnvironmentSettingRep": { + "type": "object", + "properties": { + "startDate": { + "$ref": "#/components/schemas/UnixMillis" }, - "contextTargets": { - "type": "array", - "description": "An array of the individual targets that will receive a specific variation based on their key. Individual targets with context kinds other than 'user' are included here.", - "items": { - "$ref": "#/components/schemas/Target" - } + "stopDate": { + "$ref": "#/components/schemas/UnixMillis" }, - "rules": { + "enabledPeriods": { "type": "array", - "description": "An array of the rules for how to serve a variation to specific targets based on their attributes", "items": { - "$ref": "#/components/schemas/Rule" + "$ref": "#/components/schemas/ExperimentEnabledPeriodRep" } + } + } + }, + "ExperimentInfoRep": { + "type": "object", + "required": [ + "baselineIdx", + "items" + ], + "properties": { + "baselineIdx": { + "type": "integer" }, - "fallthrough": { - "description": "Details on the variation or rollout to serve as part of the flag's default rule", - "$ref": "#/components/schemas/VariationOrRolloutRep" - }, - "offVariation": { - "type": "integer", - "description": "The ID of the variation to serve when the flag is off" - }, - "prerequisites": { + "items": { "type": "array", - "description": "An array of the prerequisite flags and their variations that are required before this flag takes effect", "items": { - "$ref": "#/components/schemas/Prerequisite" + "$ref": "#/components/schemas/LegacyExperimentRep" } - }, - "_site": { - "description": "Details on how to access the flag configuration in the LaunchDarkly UI", - "$ref": "#/components/schemas/Link" - }, - "_access": { - "description": "Details on the allowed and denied actions for this flag", - "$ref": "#/components/schemas/Access" - }, - "_environmentName": { + } + } + }, + "ExperimentPatchInput": { + "type": "object", + "required": [ + "instructions" + ], + "properties": { + "comment": { "type": "string", - "description": "The environment name" + "description": "Optional comment describing the update", + "example": "Optional comment" }, - "trackEvents": { - "type": "boolean", - "description": "Whether LaunchDarkly tracks events for the feature flag, for all rules" + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", + "example": "[{\"kind\": \"updateName\", \"value\": \"Updated experiment name\"}]", + "$ref": "#/components/schemas/Instructions" + } + } + }, + "ExperimentPost": { + "type": "object", + "required": [ + "name", + "key", + "iteration" + ], + "properties": { + "name": { + "type": "string", + "description": "The experiment name", + "example": "Example experiment" }, - "trackEventsFallthrough": { - "type": "boolean", - "description": "Whether LaunchDarkly tracks events for the feature flag, for the default rule" + "description": { + "type": "string", + "description": "The experiment description", + "example": "An example experiment, used in testing" }, - "_debugEventsUntilDate": { - "$ref": "#/components/schemas/UnixMillis" + "maintainerId": { + "type": "string", + "description": "The ID of the member who maintains this experiment", + "example": "12ab3c45de678910fgh12345" }, - "_summary": { - "description": "A summary of the prerequisites and variations for this flag", - "$ref": "#/components/schemas/FlagSummary" + "key": { + "type": "string", + "description": "The experiment key", + "example": "experiment-key-123abc" }, - "evaluation": { - "description": "Evaluation information for the flag", - "$ref": "#/components/schemas/FlagConfigEvaluation" + "iteration": { + "description": "Details on the construction of the initial iteration", + "$ref": "#/components/schemas/IterationInput" }, - "migrationSettings": { - "description": "Migration-related settings for the flag configuration", - "$ref": "#/components/schemas/FlagConfigMigrationSettingsRep" + "holdoutId": { + "type": "string", + "description": "The ID of the holdout", + "example": "f3b74309-d581-44e1-8a2b-bb2933b4fe40" } } }, - "FeatureFlagScheduledChange": { + "ExpiringTarget": { "type": "object", "required": [ "_id", - "_creationDate", - "_maintainerId", "_version", - "executionDate", - "instructions" + "expirationDate", + "contextKind", + "contextKey", + "_resourceId" ], "properties": { "_id": { - "description": "The ID of this scheduled change", - "example": "12ab3c45de678910abc12345", - "$ref": "#/components/schemas/FeatureWorkflowId" - }, - "_creationDate": { - "description": "Timestamp of when the scheduled change was created", - "example": "1654123897062", - "$ref": "#/components/schemas/UnixMillis" - }, - "_maintainerId": { "type": "string", - "description": "The ID of the scheduled change maintainer", + "description": "The ID of this expiring target", "example": "12ab3c45de678910abc12345" }, "_version": { "type": "integer", - "description": "Version of the scheduled change", + "description": "The version of this expiring target", "example": 1 }, - "executionDate": { - "description": "When the scheduled changes should be executed", - "example": "1636558831870", + "expirationDate": { + "description": "A timestamp for when the target expires", + "example": "1672358400000", "$ref": "#/components/schemas/UnixMillis" }, - "instructions": { - "description": "The actions to perform on the execution date for these scheduled changes", - "example": "[ { \"kind\": \"turnFlagOn\" }]", - "$ref": "#/components/schemas/Instructions" + "contextKind": { + "type": "string", + "description": "The context kind of the context to be removed", + "example": "user" }, - "conflicts": { - "description": "Details on any conflicting scheduled changes" + "contextKey": { + "type": "string", + "description": "A unique key used to represent the context to be removed", + "example": "context-key-123abc" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "targetType": { + "type": "string", + "description": "A segment's target type, included or excluded. Included when expiring targets are updated on a segment.", + "example": "included" + }, + "variationId": { + "type": "string", + "description": "A unique ID used to represent the flag variation. Included when expiring targets are updated on a feature flag.", + "example": "cc4332e2-bd4d-4fe0-b509-dfd2caf8dd73" + }, + "_resourceId": { + "description": "Details on the segment or flag this expiring target belongs to, its environment, and its project", + "$ref": "#/components/schemas/ResourceId" } } }, - "FeatureFlagScheduledChanges": { + "ExpiringTargetError": { + "type": "object", + "required": [ + "instructionIndex", + "message" + ], + "properties": { + "instructionIndex": { + "type": "integer", + "description": "The index of the PATCH instruction where the error occurred", + "example": 1 + }, + "message": { + "type": "string", + "description": "The error message related to a failed PATCH instruction", + "example": "example error message" + } + } + }, + "ExpiringTargetGetResponse": { "type": "object", "required": [ "items" @@ -38471,9 +40190,9 @@ "properties": { "items": { "type": "array", - "description": "Array of scheduled changes", + "description": "A list of expiring targets", "items": { - "$ref": "#/components/schemas/FeatureFlagScheduledChange" + "$ref": "#/components/schemas/ExpiringTarget" } }, "_links": { @@ -38485,116 +40204,122 @@ } } }, - "FeatureFlagStatus": { + "ExpiringTargetPatchResponse": { "type": "object", "required": [ - "name" + "items" ], "properties": { - "name": { - "type": "string", - "description": "Status of the flag", - "example": "inactive", - "enum": [ - "new", - "inactive", - "active", - "launched" - ] + "items": { + "type": "array", + "description": "A list of the results from each instruction", + "items": { + "$ref": "#/components/schemas/ExpiringTarget" + } }, - "lastRequested": { - "type": "string", - "format": "date-time", - "description": "Timestamp of last time flag was requested", - "example": "2020-02-05T18:17:01.514Z" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "default": { - "description": "Default value seen from code" + "totalInstructions": { + "type": "integer" + }, + "successfulInstructions": { + "type": "integer" + }, + "failedInstructions": { + "type": "integer" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExpiringTargetError" + } } } }, - "FeatureFlagStatusAcrossEnvironments": { + "ExpiringUserTargetGetResponse": { "type": "object", "required": [ - "environments", - "key", - "_links" + "items" ], "properties": { - "environments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FeatureFlagStatus" - }, - "description": "Flag status for environment.", - "example": { - "production": { - "lastRequested": "2020-02-05T18:17:01.514Z", - "name": "inactive" - } + "items": { + "type": "array", + "description": "An array of expiring user targets", + "items": { + "$ref": "#/components/schemas/ExpiringUserTargetItem" } }, - "key": { - "type": "string", - "description": "feature flag key", - "example": "flag-key-123abc" - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "example": { - "parent": { - "href": "/api/v2/flag-status", - "type": "application/json" - }, - "self": { - "href": "/api/v2/flag-status/my-project/my-flag", - "type": "application/json" - } - } + "description": "The location and content type of related resources" } } }, - "FeatureFlagStatuses": { + "ExpiringUserTargetItem": { "type": "object", "required": [ - "_links" + "_id", + "_version", + "expirationDate", + "userKey", + "_resourceId" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "example": { - "self": { - "href": "/api/v2/flag-statuses/my-project/my-environment", - "type": "application/json" - } - } + "_id": { + "type": "string", + "description": "The ID of this expiring user target", + "example": "12ab3c45de678910fgh12345" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlagStatusRep" - } + "_version": { + "type": "integer", + "description": "The version of this expiring user target", + "example": 1 + }, + "expirationDate": { + "description": "A timestamp for when the user target expires", + "example": "1658192820000", + "$ref": "#/components/schemas/UnixMillis" + }, + "userKey": { + "type": "string", + "description": "A unique key used to represent the user", + "example": "example-user-key" + }, + "targetType": { + "type": "string", + "description": "A segment's target type. Included when expiring user targets are updated on a segment.", + "example": "included" + }, + "variationId": { + "type": "string", + "description": "A unique key used to represent the flag variation. Included when expiring user targets are updated on a feature flag.", + "example": "ce67d625-a8b9-4fb5-a344-ab909d9d4f4d" + }, + "_resourceId": { + "description": "Details on the resource from which the user is expiring", + "$ref": "#/components/schemas/ResourceIDResponse" } } }, - "FeatureFlags": { + "ExpiringUserTargetPatchResponse": { "type": "object", "required": [ - "items", - "_links" + "items" ], "properties": { "items": { "type": "array", - "description": "An array of feature flags", + "description": "An array of expiring user targets", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "$ref": "#/components/schemas/ExpiringUserTargetItem" } }, "_links": { @@ -38602,387 +40327,253 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/flags/default", - "type": "application/json" - } - } + "description": "The location and content type of related resources" }, - "totalCount": { + "totalInstructions": { "type": "integer", - "description": "The total number of flags", + "description": "The total count of instructions sent in the PATCH request", "example": 1 }, - "totalCountWithDifferences": { + "successfulInstructions": { "type": "integer", - "description": "The number of flags that have differences between environments. Only shown when query parameter compare is true.", - "example": 0 - } - } - }, - "FeatureWorkflowId": { - "type": "string" - }, - "FileRep": { - "type": "object", - "properties": { - "filename": { - "type": "string", - "description": "The imported file name, including the extension", - "example": "bigsegimport.csv" - }, - "status": { - "type": "string", - "description": "The imported file status", - "example": "complete" - } - } - }, - "Filter": { - "type": "object", - "required": [ - "type", - "op", - "values", - "negate" - ], - "properties": { - "type": { - "type": "string", - "description": "Filter type. One of [contextAttribute, eventProperty, group]", - "example": "contextAttribute", - "enum": [ - "group", - "contextAttribute", - "eventProperty" - ] - }, - "attribute": { - "type": "string", - "description": "If not a group node, the context attribute name or event property name to filter on", - "example": "country" + "description": "The total count of successful instructions sent in the PATCH request", + "example": 1 }, - "op": { - "description": "The function to perform", - "example": "in", - "$ref": "#/components/schemas/Operator" + "failedInstructions": { + "type": "integer", + "description": "The total count of the failed instructions sent in the PATCH request", + "example": 0 }, - "values": { + "errors": { "type": "array", - "description": "The context attribute / event property values or group member nodes", - "items": {}, - "example": [ - "JP" - ] - }, - "contextKind": { - "type": "string", - "description": "For context attribute filters, the context kind.", - "example": "user" - }, - "negate": { - "type": "boolean", - "description": "If set, then take the inverse of the operator. 'in' becomes 'not in'.", - "example": false + "description": "An array of error messages for the failed instructions", + "items": { + "$ref": "#/components/schemas/ExpiringTargetError" + } } } }, - "FlagConfigApprovalRequestResponse": { + "Export": { "type": "object", "required": [ - "_id", - "_version", - "creationDate", - "serviceKind", - "reviewStatus", - "allReviews", - "notifyMemberIds", + "id", + "segmentKey", + "creationTime", "status", - "instructions", - "conflicts", + "sizeBytes", + "size", + "initiator", "_links" ], "properties": { - "_id": { + "id": { "type": "string", - "description": "The ID of this approval request", - "example": "12ab3c45de678910abc12345" + "description": "The export ID", + "example": "1234a567-bcd8-9123-4567-abcd1234567f" }, - "_version": { - "type": "integer", - "description": "Version of the approval request", - "example": 1 + "segmentKey": { + "type": "string", + "description": "The segment key", + "example": "example-big-segment" }, - "creationDate": { - "description": "Timestamp of when the approval request was created", + "creationTime": { + "description": "Timestamp of when this export was created", "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" }, - "serviceKind": { - "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", - "example": "launchdarkly", - "$ref": "#/components/schemas/ApprovalRequestServiceKind" - }, - "requestorId": { + "status": { "type": "string", - "description": "The ID of the member who requested the approval", - "example": "12ab3c45de678910abc12345" + "description": "The export status", + "example": "complete" }, - "description": { - "type": "string", - "description": "A human-friendly name for the approval request", - "example": "example: request approval from someone" + "sizeBytes": { + "type": "integer", + "format": "int64", + "description": "The export size, in bytes", + "example": 18 }, - "reviewStatus": { + "size": { "type": "string", - "description": "Current status of the review of this approval request", - "example": "pending", - "enum": [ - "approved", - "declined", - "pending" - ] + "description": "The export size, with units", + "example": "18 B" }, - "allReviews": { - "type": "array", - "description": "An array of individual reviews of this approval request", - "items": { - "$ref": "#/components/schemas/ReviewResponse" - } + "initiator": { + "description": "Details on the member who initiated the export", + "example": "{\"name\": \"Ariel Flores\", \"email\": \"ariel@acme.com\"}", + "$ref": "#/components/schemas/InitiatorRep" }, - "notifyMemberIds": { - "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", - "items": { - "type": "string" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - "1234a56b7c89d012345e678f" - ] - }, - "appliedDate": { - "description": "Timestamp of when the approval request was applied", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "appliedByMemberId": { - "type": "string", - "description": "The member ID of the member who applied the approval request", - "example": "1234a56b7c89d012345e678f" - }, - "appliedByServiceTokenId": { + "description": "The location and content type of related resources, including the location of the exported file" + } + } + }, + "Extinction": { + "type": "object", + "required": [ + "revision", + "message", + "time", + "flagKey", + "projKey" + ], + "properties": { + "revision": { "type": "string", - "description": "The service token ID of the service token which applied the approval request", - "example": "1234a56b7c89d012345e678f" + "description": "The identifier for the revision where flag became extinct. For example, a commit SHA.", + "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" }, - "status": { + "message": { "type": "string", - "description": "Current status of the approval request", - "example": "pending", - "enum": [ - "pending", - "completed", - "failed", - "scheduled" - ] - }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag", - "example": "[{\"kind\": \"turnFlagOn\"}]", - "$ref": "#/components/schemas/Instructions" - }, - "conflicts": { - "type": "array", - "description": "Details on any conflicting approval requests", - "items": { - "$ref": "#/components/schemas/Conflict" - } - }, - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" + "description": "Description of the extinction. For example, the commit message for the revision.", + "example": "Remove flag for launched feature" }, - "executionDate": { - "description": "Timestamp for when instructions will be executed", - "example": "1654104600000", + "time": { + "description": "Time of extinction", + "example": "1636558831870", "$ref": "#/components/schemas/UnixMillis" }, - "operatingOnId": { + "flagKey": { "type": "string", - "description": "ID of scheduled change to edit or delete", - "example": "12ab3c45de678910abc12345" - }, - "integrationMetadata": { - "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used", - "$ref": "#/components/schemas/IntegrationMetadata" - }, - "source": { - "description": "Details about the source feature flag, if copied", - "$ref": "#/components/schemas/CopiedFromEnv" + "description": "The feature flag key", + "example": "enable-feature" }, - "customWorkflowMetadata": { - "description": "Details about the custom workflow, if this approval request is part of a custom workflow", - "$ref": "#/components/schemas/CustomWorkflowMeta" + "projKey": { + "type": "string", + "description": "The project key", + "example": "default" } } }, - "FlagConfigApprovalRequestsResponse": { + "ExtinctionCollectionRep": { "type": "object", "required": [ - "items", - "_links" + "_links", + "items" ], "properties": { - "items": { - "type": "array", - "description": "An array of approval requests", - "items": { - "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" - } - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, "description": "The location and content type of related resources" + }, + "items": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Extinction" + } + }, + "description": "An array of extinction events" } } }, - "FlagConfigEvaluation": { - "type": "object", - "properties": { - "contextKinds": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "FlagConfigMigrationSettingsRep": { - "type": "object", - "properties": { - "checkRatio": { - "type": "integer" - } + "ExtinctionListPost": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Extinction" } }, - "FlagCopyConfigEnvironment": { + "FeatureFlag": { "type": "object", "required": [ - "key" + "name", + "kind", + "key", + "_version", + "creationDate", + "variations", + "temporary", + "tags", + "_links", + "experiments", + "customProperties", + "archived" ], "properties": { + "name": { + "type": "string", + "description": "A human-friendly name for the feature flag", + "example": "My Flag" + }, + "kind": { + "type": "string", + "description": "Kind of feature flag", + "example": "boolean", + "enum": [ + "boolean", + "multivariate" + ] + }, + "description": { + "type": "string", + "description": "Description of the feature flag", + "example": "This flag controls the example widgets" + }, "key": { "type": "string", - "description": "The environment key" + "description": "A unique key used to reference the flag in your code", + "example": "flag-key-123abc" }, - "currentVersion": { + "_version": { "type": "integer", - "description": "Optional flag version. If you include this, the operation only succeeds if the current flag version in the environment matches this version." - } - } - }, - "FlagCopyConfigPost": { - "type": "object", - "required": [ - "source", - "target" - ], - "properties": { - "source": { - "description": "The source environment", - "example": "{\"key\": \"source-env-key-123abc\", \"currentVersion\": 1}", - "$ref": "#/components/schemas/FlagCopyConfigEnvironment" + "description": "Version of the feature flag", + "example": 1 }, - "target": { - "description": "The target environment", - "example": "{\"key\": \"target-env-key-123abc\", \"currentVersion\": 1}", - "$ref": "#/components/schemas/FlagCopyConfigEnvironment" + "creationDate": { + "description": "Timestamp of flag creation date", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" }, - "comment": { - "type": "string", - "description": "Optional comment" + "includeInSnippet": { + "type": "boolean", + "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK", + "example": true, + "deprecated": true }, - "includedActions": { + "clientSideAvailability": { + "description": "Which type of client-side SDKs the feature flag is available to", + "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", + "$ref": "#/components/schemas/ClientSideAvailability" + }, + "variations": { "type": "array", - "description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.", + "description": "An array of possible variations for the flag", "items": { - "type": "string", - "enum": [ - "updateOn", - "updateRules", - "updateFallthrough", - "updateOffVariation", - "updatePrerequisites", - "updateTargets", - "updateFlagConfigMigrationSettings" - ] + "$ref": "#/components/schemas/Variation" }, "example": [ - "updateOn" + { + "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05", + "value": true + }, + { + "_id": "a00bf58d-d252-476c-b915-15a74becacb4", + "value": false + } ] }, - "excludedActions": { + "temporary": { + "type": "boolean", + "description": "Whether the flag is a temporary flag", + "example": true + }, + "tags": { "type": "array", - "description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.", + "description": "Tags for the feature flag", "items": { - "type": "string", - "enum": [ - "updateOn", - "updateRules", - "updateFallthrough", - "updateOffVariation", - "updatePrerequisites", - "updateTargets", - "updateFlagConfigMigrationSettings" - ] + "type": "string" }, "example": [ - "updateOn" + "example-tag" ] - } - } - }, - "FlagFollowersByProjEnvGetRep": { - "type": "object", - "required": [ - "_links" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers", - "type": "application/json" - } - } }, - "items": { - "type": "array", - "description": "An array of flags and their followers", - "items": { - "$ref": "#/components/schemas/followersPerFlag" - } - } - } - }, - "FlagFollowersGetRep": { - "type": "object", - "required": [ - "_links", - "items" - ], - "properties": { "_links": { "type": "object", "additionalProperties": { @@ -38990,240 +40581,435 @@ }, "description": "The location and content type of related resources", "example": { + "parent": { + "href": "/api/v2/flags/my-project", + "type": "application/json" + }, "self": { - "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers", + "href": "/api/v2/flags/my-project/my-flag", "type": "application/json" } } }, - "items": { - "type": "array", - "description": "An array of members who are following this flag", - "items": { - "$ref": "#/components/schemas/FollowFlagMember" - } - } - } - }, - "FlagImportConfigurationPost": { - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "description": "The global configuration settings, as specified by the formVariables in the manifest.json for this configuration.", - "example": "{\"workspaceApiKey\": \"An API key with read permissions in the external feature management system\", \"workspaceId\": \"The ID of the workspace in the external system\", \"environmentId\": \"The ID of the environment in the external system\", \"splitTag\": \"If provided, imports only the flags from the external system with this tag. Leave blank to import all flags.\", \"ldApiKey\": \"An API key with create flag permissions in your LaunchDarkly account\", \"ldTag\": \"A tag to apply to all flags imported to LaunchDarkly\", \"ldMaintainer\": \"The ID of the member who will be the maintainer of the imported flags\"}", - "$ref": "#/components/schemas/FormVariableConfig" + "maintainerId": { + "type": "string", + "description": "Associated maintainerId for the feature flag", + "example": "569f183514f4432160000007" }, - "tags": { + "_maintainer": { + "description": "Associated maintainer member info for the feature flag", + "$ref": "#/components/schemas/MemberSummary" + }, + "maintainerTeamKey": { + "type": "string", + "description": "The key of the associated team that maintains this feature flag", + "example": "team-1" + }, + "_maintainerTeam": { + "description": "Associated maintainer team info for the feature flag", + "$ref": "#/components/schemas/MaintainerTeam" + }, + "goalIds": { "type": "array", - "description": "Tags to associate with the configuration", + "description": "Deprecated, use experiments instead", "items": { "type": "string" }, - "example": [ - "example-tag" - ] + "example": [], + "deprecated": true }, - "name": { - "type": "string", - "description": "Name to identify the configuration", - "example": "Sample configuration" - } - } - }, - "FlagImportIntegration": { - "type": "object", + "experiments": { + "description": "Experimentation data for the feature flag", + "example": "{\"baselineIdx\": 0,\"items\": []}", + "$ref": "#/components/schemas/ExperimentInfoRep" + }, + "customProperties": { + "description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration.", + "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}", + "$ref": "#/components/schemas/CustomProperties" + }, + "archived": { + "type": "boolean", + "description": "Boolean indicating if the feature flag is archived", + "example": false + }, + "archivedDate": { + "description": "If archived is true, date of archive", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the feature flag is deprecated", + "example": false + }, + "deprecatedDate": { + "description": "If deprecated is true, date of deprecation", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" + }, + "defaults": { + "description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used.", + "example": "{\"onVariation\":0,\"offVariation\":1}", + "$ref": "#/components/schemas/Defaults" + }, + "_purpose": { + "type": "string" + }, + "migrationSettings": { + "description": "Migration-related settings for the flag", + "$ref": "#/components/schemas/FlagMigrationSettingsRep" + }, + "environments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FeatureFlagConfig" + }, + "description": "Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv query parameter.", + "example": { + "my-environment": { + "_environmentName": "My Environment", + "_site": { + "href": "/default/my-environment/features/client-side-flag", + "type": "text/html" + }, + "_summary": { + "prerequisites": 0, + "variations": { + "0": { + "contextTargets": 1, + "isFallthrough": true, + "nullRules": 0, + "rules": 0, + "targets": 1 + }, + "1": { + "isOff": true, + "nullRules": 0, + "rules": 0, + "targets": 0 + } + } + }, + "archived": false, + "contextTargets": [ + { + "contextKind": "device", + "values": [ + "device-key-123abc" + ], + "variation": 0 + } + ], + "fallthrough": { + "variation": 0 + }, + "lastModified": 1627071171347, + "offVariation": 1, + "on": false, + "prerequisites": [], + "rules": [], + "salt": "61eddeadbeef4da1facecafe3a60a397", + "sel": "810edeadbeef4844facecafe438f2999492", + "targets": [ + { + "contextKind": "user", + "values": [ + "user-key-123abc" + ], + "variation": 0 + } + ], + "trackEvents": false, + "trackEventsFallthrough": false, + "version": 1 + } + } + } + } + }, + "FeatureFlagBody": { + "type": "object", "required": [ - "_links", - "_id", - "integrationKey", - "projectKey", - "config", - "tags", "name", - "version", - "_status" + "key" ], "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/FlagImportIntegrationLinks" - }, - "_id": { + "name": { "type": "string", - "description": "The integration ID", - "example": "12ab3c4d5ef1a2345bcde67f" + "description": "A human-friendly name for the feature flag", + "example": "My flag" }, - "integrationKey": { + "key": { "type": "string", - "description": "The integration key", - "example": "split", - "enum": [ - "split", - "unleash" - ] + "description": "A unique key used to reference the flag in your code", + "example": "flag-key-123abc" }, - "projectKey": { + "description": { "type": "string", - "description": "The project key", - "example": "default" + "description": "Description of the feature flag. Defaults to an empty string.", + "example": "This flag controls the example widgets" }, - "config": { - "description": "The configuration for the given import integration. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", - "$ref": "#/components/schemas/FormVariableConfig" + "includeInSnippet": { + "type": "boolean", + "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK. Defaults to false.", + "deprecated": true + }, + "clientSideAvailability": { + "description": "Which type of client-side SDKs the feature flag is available to", + "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", + "$ref": "#/components/schemas/ClientSideAvailabilityPost" + }, + "variations": { + "type": "array", + "description": "An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of true and false will be used.", + "items": { + "$ref": "#/components/schemas/Variation" + }, + "example": [ + { + "value": true + }, + { + "value": false + } + ] + }, + "temporary": { + "type": "boolean", + "description": "Whether the flag is a temporary flag. Defaults to true.", + "example": false }, "tags": { "type": "array", - "description": "List of tags for this configuration", + "description": "Tags for the feature flag. Defaults to an empty array.", "items": { "type": "string" }, - "example": [] + "example": [ + "example-tag" + ] }, - "name": { + "customProperties": { + "description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration.", + "example": "{ \"jira.issues\": {\"name\": \"Jira issues\", \"value\": [\"is-123\", \"is-456\"]} }", + "$ref": "#/components/schemas/CustomProperties" + }, + "defaults": { + "description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used.", + "example": "{\"onVariation\":0, \"offVariation\":1}", + "$ref": "#/components/schemas/Defaults" + }, + "purpose": { "type": "string", - "description": "Name of the configuration", - "example": "Development environment configuration" + "description": "Purpose of the flag", + "example": "migration", + "enum": [ + "migration", + "holdout" + ] }, - "version": { - "type": "integer", - "description": "Version of the current configuration", - "example": 1 + "migrationSettings": { + "description": "Settings relevant to flags where purpose is migration", + "$ref": "#/components/schemas/MigrationSettingsPost" }, - "_access": { - "description": "Details on the allowed and denied actions for this configuration", - "$ref": "#/components/schemas/Access" + "maintainerId": { + "type": "string", + "description": "The ID of the member who maintains this feature flag", + "example": "12ab3c45de678910fgh12345" }, - "_status": { - "description": "Details on the status of the import job", - "$ref": "#/components/schemas/FlagImportStatus" - } - } - }, - "FlagImportIntegrationCollection": { - "type": "object", - "required": [ - "_links", - "items" - ], - "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/FlagImportIntegrationCollectionLinks" + "maintainerTeamKey": { + "type": "string", + "description": "The key of the team that maintains this feature flag", + "example": "team-1" }, - "items": { + "initialPrerequisites": { "type": "array", - "description": "An array of flag import configurations", + "description": "Initial set of prerequisite flags for all environments", "items": { - "$ref": "#/components/schemas/FlagImportIntegration" + "$ref": "#/components/schemas/FlagPrerequisitePost" } - } - } - }, - "FlagImportIntegrationCollectionLinks": { - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/Link" }, - "parent": { - "$ref": "#/components/schemas/Link" + "isFlagOn": { + "type": "boolean", + "description": "Whether to automatically turn the flag on across all environments at creation. Defaults to false." } } }, - "FlagImportIntegrationLinks": { + "FeatureFlagConfig": { "type": "object", "required": [ - "self", - "parent", - "project" + "on", + "archived", + "salt", + "sel", + "lastModified", + "version", + "_site", + "_environmentName", + "trackEvents", + "trackEventsFallthrough" ], "properties": { - "self": { - "$ref": "#/components/schemas/Link" + "on": { + "type": "boolean", + "description": "Whether the flag is on" }, - "parent": { - "$ref": "#/components/schemas/Link" + "archived": { + "type": "boolean", + "description": "Boolean indicating if the feature flag is archived" }, - "project": { - "$ref": "#/components/schemas/Link" - } - } - }, - "FlagImportStatus": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "The current status of the import integrations related import job", - "example": "pending", - "enum": [ - "complete", - "importing", - "pending", - "failed", - "partial" - ] + "salt": { + "type": "string" }, - "lastImport": { - "description": "Timestamp of when the most recent successful import occurred.", - "example": "1717263000000", - "$ref": "#/components/schemas/UnixMillis" + "sel": { + "type": "string" }, - "lastError": { - "description": "Timestamp of when the most recent import error occurred, if any", - "example": "1714584600000", + "lastModified": { + "description": "Timestamp of when the flag configuration was most recently modified", "$ref": "#/components/schemas/UnixMillis" }, - "errors": { + "version": { + "type": "integer", + "description": "Version of the feature flag" + }, + "targets": { "type": "array", + "description": "An array of the individual targets that will receive a specific variation based on their key. Individual targets with a context kind of 'user' are included here.", "items": { - "$ref": "#/components/schemas/StatusResponse" + "$ref": "#/components/schemas/Target" + } + }, + "contextTargets": { + "type": "array", + "description": "An array of the individual targets that will receive a specific variation based on their key. Individual targets with context kinds other than 'user' are included here.", + "items": { + "$ref": "#/components/schemas/Target" + } + }, + "rules": { + "type": "array", + "description": "An array of the rules for how to serve a variation to specific targets based on their attributes", + "items": { + "$ref": "#/components/schemas/Rule" + } + }, + "fallthrough": { + "description": "Details on the variation or rollout to serve as part of the flag's default rule", + "$ref": "#/components/schemas/VariationOrRolloutRep" + }, + "offVariation": { + "type": "integer", + "description": "The ID of the variation to serve when the flag is off" + }, + "prerequisites": { + "type": "array", + "description": "An array of the prerequisite flags and their variations that are required before this flag takes effect", + "items": { + "$ref": "#/components/schemas/Prerequisite" } + }, + "_site": { + "description": "Details on how to access the flag configuration in the LaunchDarkly UI", + "$ref": "#/components/schemas/Link" + }, + "_access": { + "description": "Details on the allowed and denied actions for this flag", + "$ref": "#/components/schemas/Access" + }, + "_environmentName": { + "type": "string", + "description": "The environment name" + }, + "trackEvents": { + "type": "boolean", + "description": "Whether LaunchDarkly tracks events for the feature flag, for all rules" + }, + "trackEventsFallthrough": { + "type": "boolean", + "description": "Whether LaunchDarkly tracks events for the feature flag, for the default rule" + }, + "_debugEventsUntilDate": { + "$ref": "#/components/schemas/UnixMillis" + }, + "_summary": { + "description": "A summary of the prerequisites and variations for this flag", + "$ref": "#/components/schemas/FlagSummary" + }, + "evaluation": { + "description": "Evaluation information for the flag", + "$ref": "#/components/schemas/FlagConfigEvaluation" + }, + "migrationSettings": { + "description": "Migration-related settings for the flag configuration", + "$ref": "#/components/schemas/FlagConfigMigrationSettingsRep" } } }, - "FlagInput": { + "FeatureFlagScheduledChange": { "type": "object", "required": [ - "ruleId", - "flagConfigVersion" + "_id", + "_creationDate", + "_maintainerId", + "_version", + "executionDate", + "instructions" ], "properties": { - "ruleId": { + "_id": { + "description": "The ID of this scheduled change", + "example": "12ab3c45de678910abc12345", + "$ref": "#/components/schemas/FeatureWorkflowId" + }, + "_creationDate": { + "description": "Timestamp of when the scheduled change was created", + "example": "1654123897062", + "$ref": "#/components/schemas/UnixMillis" + }, + "_maintainerId": { "type": "string", - "description": "The ID of the variation or rollout of the flag to use. Use \"fallthrough\" for the default targeting behavior when the flag is on.", - "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" + "description": "The ID of the scheduled change maintainer", + "example": "12ab3c45de678910abc12345" }, - "flagConfigVersion": { + "_version": { "type": "integer", - "description": "The flag version", - "example": 12 + "description": "Version of the scheduled change", + "example": 1 }, - "notInExperimentVariationId": { - "type": "string", - "description": "The ID of the variation to route traffic not part of the experiment analysis to. Defaults to variation ID of baseline treatment, if set.", - "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" + "executionDate": { + "description": "When the scheduled changes should be executed", + "example": "1636558831870", + "$ref": "#/components/schemas/UnixMillis" + }, + "instructions": { + "description": "The actions to perform on the execution date for these scheduled changes", + "example": "[ { \"kind\": \"turnFlagOn\" }]", + "$ref": "#/components/schemas/Instructions" + }, + "conflicts": { + "description": "Details on any conflicting scheduled changes" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "FlagLinkCollectionRep": { + "FeatureFlagScheduledChanges": { "type": "object", "required": [ - "items", - "_links" + "items" ], "properties": { "items": { "type": "array", - "description": "An array of flag links", + "description": "Array of scheduled changes", "items": { - "$ref": "#/components/schemas/FlagLinkRep" + "$ref": "#/components/schemas/FeatureFlagScheduledChange" } }, "_links": { @@ -39235,320 +41021,502 @@ } } }, - "FlagLinkMember": { + "FeatureFlagStatus": { "type": "object", "required": [ - "_links", - "_id" + "name" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - }, - "_id": { - "type": "string" + "name": { + "type": "string", + "description": "Status of the flag", + "example": "inactive", + "enum": [ + "new", + "inactive", + "active", + "launched" + ] }, - "firstName": { - "type": "string" + "lastRequested": { + "type": "string", + "format": "date-time", + "description": "Timestamp of last time flag was requested", + "example": "2020-02-05T18:17:01.514Z" }, - "lastName": { - "type": "string" + "default": { + "description": "Default value seen from code" } } }, - "FlagLinkRep": { + "FeatureFlagStatusAcrossEnvironments": { "type": "object", "required": [ - "_links", - "_id", - "_deepLink", - "_timestamp", - "_createdAt" + "environments", + "key", + "_links" ], "properties": { - "_links": { + "environments": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Link" + "$ref": "#/components/schemas/FeatureFlagStatus" }, - "description": "The location and content type of related resources" + "description": "Flag status for environment.", + "example": { + "production": { + "lastRequested": "2020-02-05T18:17:01.514Z", + "name": "inactive" + } + } }, - "_key": { - "type": "string", - "description": "The flag link key", - "example": "flag-link-key-123abc" - }, - "_integrationKey": { - "type": "string", - "description": "The integration key for an integration whose manifest.json includes the flagLink capability, if this is a flag link for an existing integration" - }, - "_id": { - "type": "string", - "description": "The ID of this flag link", - "example": "1234a56b7c89d012345e678f" - }, - "_deepLink": { - "type": "string", - "description": "The URL for the external resource the flag is linked to", - "example": "https://example.com/archives/123123123" - }, - "_timestamp": { - "description": "The time to mark this flag link as associated with the external URL. Defaults to the creation time of the flag link, but can be set to another time during creation.", - "example": "{\"milliseconds\": 1655342199935, \"seconds\": 1655342199, \"rfc3339\": \"2022-06-16T01:16:39Z\", \"simple\": \"2022-06-16 01:16:39\"}", - "$ref": "#/components/schemas/TimestampRep" - }, - "title": { - "type": "string", - "description": "The title of the flag link", - "example": "Example link title" - }, - "description": { + "key": { "type": "string", - "description": "The description of the flag link", - "example": "Example link description" + "description": "feature flag key", + "example": "flag-key-123abc" }, - "_metadata": { + "_links": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/Link" }, - "description": "The metadata required by this integration in order to create a flag link, if this is a flag link for an existing integration. Defined in the integration's manifest.json file under flagLink." - }, - "_createdAt": { - "description": "Timestamp of when the flag link was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "_member": { - "description": "Details on the member associated with this flag link", - "$ref": "#/components/schemas/FlagLinkMember" + "example": { + "parent": { + "href": "/api/v2/flag-status", + "type": "application/json" + }, + "self": { + "href": "/api/v2/flag-status/my-project/my-flag", + "type": "application/json" + } + } } } }, - "FlagListingRep": { + "FeatureFlagStatuses": { "type": "object", "required": [ - "name", - "key" + "_links" ], "properties": { - "name": { - "type": "string", - "description": "The flag name", - "example": "Example flag" - }, - "key": { - "type": "string", - "description": "The flag key", - "example": "flag-key-123abc" - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" + }, + "example": { + "self": { + "href": "/api/v2/flag-statuses/my-project/my-environment", + "type": "application/json" + } } }, - "_site": { - "$ref": "#/components/schemas/Link" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlagStatusRep" + } } } }, - "FlagMigrationSettingsRep": { + "FeatureFlags": { "type": "object", + "required": [ + "items", + "_links" + ], "properties": { - "contextKind": { - "type": "string", - "description": "The context kind targeted by this migration flag. Only applicable for six-stage migrations.", - "example": "device" + "items": { + "type": "array", + "description": "An array of feature flags", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } }, - "stageCount": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/flags/default", + "type": "application/json" + } + } + }, + "totalCount": { "type": "integer", - "description": "The number of stages for this migration flag", - "example": 6 + "description": "The total number of flags", + "example": 1 + }, + "totalCountWithDifferences": { + "type": "integer", + "description": "The number of flags that have differences between environments. Only shown when query parameter compare is true.", + "example": 0 } } }, - "FlagPrerequisitePost": { + "FeatureWorkflowId": { + "type": "string" + }, + "FileRep": { "type": "object", - "required": [ - "key", - "variationId" - ], "properties": { - "key": { + "filename": { "type": "string", - "description": "Flag key of the prerequisite flag" + "description": "The imported file name, including the extension", + "example": "bigsegimport.csv" }, - "variationId": { + "status": { "type": "string", - "description": "ID of a variation of the prerequisite flag" + "description": "The imported file status", + "example": "complete" } } }, - "FlagRep": { + "Filter": { "type": "object", "required": [ - "_links" + "type", + "op", + "values", + "negate" ], "properties": { - "targetingRule": { + "type": { "type": "string", - "description": "The targeting rule", - "example": "fallthrough" + "description": "Filter type. One of [contextAttribute, eventProperty, group]", + "example": "contextAttribute", + "enum": [ + "group", + "contextAttribute", + "eventProperty" + ] }, - "targetingRuleDescription": { + "attribute": { "type": "string", - "description": "The rule description", - "example": "Customers who live in Canada" + "description": "If not a group node, the context attribute name or event property name to filter on", + "example": "country" }, - "targetingRuleClauses": { - "type": "array", - "description": "An array of clauses used for individual targeting based on attributes", - "items": {} + "op": { + "description": "The function to perform", + "example": "in", + "$ref": "#/components/schemas/Operator" }, - "flagConfigVersion": { - "type": "integer", - "description": "The flag version", - "example": 12 + "values": { + "type": "array", + "description": "The context attribute / event property values or group member nodes", + "items": {}, + "example": [ + "JP" + ] }, - "notInExperimentVariationId": { + "contextKind": { "type": "string", - "description": "The ID of the variation to route traffic not part of the experiment analysis to", - "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" + "description": "For context attribute filters, the context kind.", + "example": "user" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/flags/my-project/my-flag", - "type": "application/json" - } - } + "negate": { + "type": "boolean", + "description": "If set, then take the inverse of the operator. 'in' becomes 'not in'.", + "example": false } } }, - "FlagScheduledChangesInput": { + "FlagConfigApprovalRequestResponse": { "type": "object", "required": [ - "instructions" + "_id", + "_version", + "creationDate", + "serviceKind", + "reviewStatus", + "allReviews", + "notifyMemberIds", + "status", + "instructions", + "conflicts", + "_links" ], "properties": { - "comment": { + "_id": { "type": "string", - "description": "Optional comment describing the update to the scheduled changes", - "example": "optional comment" + "description": "The ID of this approval request", + "example": "12ab3c45de678910abc12345" + }, + "_version": { + "type": "integer", + "description": "Version of the approval request", + "example": 1 + }, + "creationDate": { + "description": "Timestamp of when the approval request was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "serviceKind": { + "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", + "example": "launchdarkly", + "$ref": "#/components/schemas/ApprovalRequestServiceKind" + }, + "requestorId": { + "type": "string", + "description": "The ID of the member who requested the approval", + "example": "12ab3c45de678910abc12345" + }, + "description": { + "type": "string", + "description": "A human-friendly name for the approval request", + "example": "example: request approval from someone" + }, + "reviewStatus": { + "type": "string", + "description": "Current status of the review of this approval request", + "example": "pending", + "enum": [ + "approved", + "declined", + "pending" + ] + }, + "allReviews": { + "type": "array", + "description": "An array of individual reviews of this approval request", + "items": { + "$ref": "#/components/schemas/ReviewResponse" + } + }, + "notifyMemberIds": { + "type": "array", + "description": "An array of member IDs. These members are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] + }, + "appliedDate": { + "description": "Timestamp of when the approval request was applied", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "appliedByMemberId": { + "type": "string", + "description": "The member ID of the member who applied the approval request", + "example": "1234a56b7c89d012345e678f" + }, + "appliedByServiceTokenId": { + "type": "string", + "description": "The service token ID of the service token which applied the approval request", + "example": "1234a56b7c89d012345e678f" + }, + "status": { + "type": "string", + "description": "Current status of the approval request", + "example": "pending", + "enum": [ + "pending", + "completed", + "failed", + "scheduled" + ] }, "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", - "example": "[ { \"kind\": \"replaceScheduledChangesInstructions\", \"value\": [ { \"kind\": \"turnFlagOff\" } ] } ]", + "description": "List of instructions in semantic patch format to be applied to the feature flag", + "example": "[{\"kind\": \"turnFlagOn\"}]", "$ref": "#/components/schemas/Instructions" + }, + "conflicts": { + "type": "array", + "description": "Details on any conflicting approval requests", + "items": { + "$ref": "#/components/schemas/Conflict" + } + }, + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" + }, + "executionDate": { + "description": "Timestamp for when instructions will be executed", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "operatingOnId": { + "type": "string", + "description": "ID of scheduled change to edit or delete", + "example": "12ab3c45de678910abc12345" + }, + "integrationMetadata": { + "description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used", + "$ref": "#/components/schemas/IntegrationMetadata" + }, + "source": { + "description": "Details about the source feature flag, if copied", + "$ref": "#/components/schemas/CopiedFromEnv" + }, + "customWorkflowMetadata": { + "description": "Details about the custom workflow, if this approval request is part of a custom workflow", + "$ref": "#/components/schemas/CustomWorkflowMeta" } } }, - "FlagStatusRep": { + "FlagConfigApprovalRequestsResponse": { "type": "object", "required": [ - "name", + "items", "_links" ], "properties": { - "name": { - "type": "string", - "description": "Status of the flag", - "example": "inactive", - "enum": [ - "new", - "inactive", - "active", - "launched" - ] - }, - "lastRequested": { - "type": "string", - "format": "date-time", - "description": "Timestamp of last time flag was requested", - "example": "2020-02-05T18:17:01.514Z" - }, - "default": { - "description": "Default value seen from code" + "items": { + "type": "array", + "description": "An array of approval requests", + "items": { + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + } }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "example": { - "parent": { - "href": "/api/v2/flags/my-project/my-flag", - "type": "application/json" - }, - "self": { - "href": "/api/v2/flag-statuses/my-project/my-flag", - "type": "application/json" - } + "description": "The location and content type of related resources" + } + } + }, + "FlagConfigEvaluation": { + "type": "object", + "properties": { + "contextKinds": { + "type": "array", + "items": { + "type": "string" } } } }, - "FlagSummary": { + "FlagConfigMigrationSettingsRep": { + "type": "object", + "properties": { + "checkRatio": { + "type": "integer" + } + } + }, + "FlagCopyConfigEnvironment": { "type": "object", "required": [ - "variations", - "prerequisites" + "key" ], "properties": { - "variations": { - "description": "A summary of the variations for this flag", - "$ref": "#/components/schemas/AllVariationsSummary" + "key": { + "type": "string", + "description": "The environment key" }, - "prerequisites": { + "currentVersion": { "type": "integer", - "description": "The number of prerequisites for this flag" + "description": "Optional flag version. If you include this, the operation only succeeds if the current flag version in the environment matches this version." } } }, - "FlagTriggerInput": { + "FlagCopyConfigPost": { "type": "object", + "required": [ + "source", + "target" + ], "properties": { + "source": { + "description": "The source environment", + "example": "{\"key\": \"source-env-key-123abc\", \"currentVersion\": 1}", + "$ref": "#/components/schemas/FlagCopyConfigEnvironment" + }, + "target": { + "description": "The target environment", + "example": "{\"key\": \"target-env-key-123abc\", \"currentVersion\": 1}", + "$ref": "#/components/schemas/FlagCopyConfigEnvironment" + }, "comment": { "type": "string", - "description": "Optional comment describing the update", - "example": "optional comment" + "description": "Optional comment" }, - "instructions": { + "includedActions": { "type": "array", - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"trigger_action\"}.", + "description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.", "items": { - "$ref": "#/components/schemas/Instruction" + "type": "string", + "enum": [ + "updateOn", + "updateRules", + "updateFallthrough", + "updateOffVariation", + "updatePrerequisites", + "updateTargets", + "updateFlagConfigMigrationSettings" + ] }, "example": [ - { - "kind": "disableTrigger" - } + "updateOn" + ] + }, + "excludedActions": { + "type": "array", + "description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.", + "items": { + "type": "string", + "enum": [ + "updateOn", + "updateRules", + "updateFallthrough", + "updateOffVariation", + "updatePrerequisites", + "updateTargets", + "updateFlagConfigMigrationSettings" + ] + }, + "example": [ + "updateOn" ] } } }, - "FlagsInput": { + "FlagFollowersByProjEnvGetRep": { "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlagInput" + "required": [ + "_links" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers", + "type": "application/json" + } + } + }, + "items": { + "type": "array", + "description": "An array of flags and their followers", + "items": { + "$ref": "#/components/schemas/followersPerFlag" + } + } } }, - "FollowFlagMember": { + "FlagFollowersGetRep": { "type": "object", "required": [ "_links", - "_id", - "role", - "email" + "items" ], "properties": { "_links": { @@ -39559,609 +41527,564 @@ "description": "The location and content type of related resources", "example": { "self": { - "href": "/api/v2/members/569f183514f4432160000007", + "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers", "type": "application/json" } } }, - "_id": { - "type": "string", - "description": "The member's ID", - "example": "569f183514f4432160000007" - }, - "firstName": { - "type": "string", - "description": "The member's first name", - "example": "Ariel" - }, - "lastName": { - "type": "string", - "description": "The member's last name", - "example": "Flores" - }, - "role": { - "type": "string", - "description": "The member's base role. If the member has no additional roles, this role will be in effect.", - "example": "admin" - }, - "email": { - "type": "string", - "description": "The member's email address", - "example": "ariel@acme.com" + "items": { + "type": "array", + "description": "An array of members who are following this flag", + "items": { + "$ref": "#/components/schemas/FollowFlagMember" + } } } }, - "ForbiddenErrorRep": { + "FlagImportConfigurationPost": { "type": "object", "required": [ - "code", - "message" + "config" ], "properties": { - "code": { - "type": "string", - "description": "Specific error code encountered", - "example": "forbidden" + "config": { + "description": "The global configuration settings, as specified by the formVariables in the manifest.json for this configuration.", + "example": "{\"workspaceApiKey\": \"An API key with read permissions in the external feature management system\", \"workspaceId\": \"The ID of the workspace in the external system\", \"environmentId\": \"The ID of the environment in the external system\", \"splitTag\": \"If provided, imports only the flags from the external system with this tag. Leave blank to import all flags.\", \"ldApiKey\": \"An API key with create flag permissions in your LaunchDarkly account\", \"ldTag\": \"A tag to apply to all flags imported to LaunchDarkly\", \"ldMaintainer\": \"The ID of the member who will be the maintainer of the imported flags\"}", + "$ref": "#/components/schemas/FormVariableConfig" }, - "message": { + "tags": { + "type": "array", + "description": "Tags to associate with the configuration", + "items": { + "type": "string" + }, + "example": [ + "example-tag" + ] + }, + "name": { "type": "string", - "description": "Description of the error", - "example": "Forbidden. Access to the requested resource was denied." + "description": "Name to identify the configuration", + "example": "Sample configuration" } } }, - "FormVariable": { + "FlagImportIntegration": { "type": "object", + "required": [ + "_links", + "_id", + "integrationKey", + "projectKey", + "config", + "tags", + "name", + "version", + "_status" + ], "properties": { - "key": { - "type": "string" - }, - "name": { - "type": "string" + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/FlagImportIntegrationLinks" }, - "type": { - "type": "string" + "_id": { + "type": "string", + "description": "The integration ID", + "example": "12ab3c4d5ef1a2345bcde67f" }, - "description": { - "type": "string" + "integrationKey": { + "type": "string", + "description": "The integration key", + "example": "split", + "enum": [ + "split", + "unleash" + ] }, - "placeholder": { - "type": "string" + "projectKey": { + "type": "string", + "description": "The project key", + "example": "default" }, - "isOptional": { - "type": "boolean" + "config": { + "description": "The configuration for the given import integration. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", + "$ref": "#/components/schemas/FormVariableConfig" }, - "defaultValue": {}, - "allowedValues": { + "tags": { "type": "array", + "description": "List of tags for this configuration", "items": { "type": "string" - } + }, + "example": [] }, - "dynamicOptions": { - "$ref": "#/components/schemas/DynamicOptions" + "name": { + "type": "string", + "description": "Name of the configuration", + "example": "Development environment configuration" + }, + "version": { + "type": "integer", + "description": "Version of the current configuration", + "example": 1 + }, + "_access": { + "description": "Details on the allowed and denied actions for this configuration", + "$ref": "#/components/schemas/Access" + }, + "_status": { + "description": "Details on the status of the import job", + "$ref": "#/components/schemas/FlagImportStatus" } } }, - "FormVariableConfig": { - "type": "object", - "additionalProperties": {} - }, - "GenerateWarehouseDestinationKeyPairPostRep": { + "FlagImportIntegrationCollection": { "type": "object", + "required": [ + "_links", + "items" + ], "properties": { - "public_key": { - "type": "string", - "description": "The public key used by LaunchDarkly" + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/FlagImportIntegrationCollectionLinks" }, - "public_key_pkcs8": { - "type": "string", - "description": "The public key to assign in your Snowflake worksheet" + "items": { + "type": "array", + "description": "An array of flag import configurations", + "items": { + "$ref": "#/components/schemas/FlagImportIntegration" + } } } }, - "HMACSignature": { + "FlagImportIntegrationCollectionLinks": { "type": "object", + "required": [ + "self" + ], "properties": { - "headerName": { - "type": "string" + "self": { + "$ref": "#/components/schemas/Link" }, - "hmacSecretFormVariableKey": { - "type": "string" + "parent": { + "$ref": "#/components/schemas/Link" } } }, - "HeaderItems": { + "FlagImportIntegrationLinks": { "type": "object", + "required": [ + "self", + "parent", + "project" + ], "properties": { - "name": { - "type": "string" + "self": { + "$ref": "#/components/schemas/Link" }, - "value": { - "type": "string" + "parent": { + "$ref": "#/components/schemas/Link" + }, + "project": { + "$ref": "#/components/schemas/Link" } } }, - "HoldoutDetailRep": { + "FlagImportStatus": { "type": "object", - "required": [ - "_id", - "status", - "holdoutAmount", - "createdAt", - "updatedAt", - "baseExperiment" - ], "properties": { - "_id": { - "type": "string" - }, "status": { "type": "string", + "description": "The current status of the import integrations related import job", + "example": "pending", "enum": [ - "created", - "enabled", - "running", - "ended" + "complete", + "importing", + "pending", + "failed", + "partial" ] }, - "description": { - "type": "string" - }, - "holdoutAmount": { - "type": "string", - "description": "The percentage of traffic allocated to this holdout." - }, - "isDirty": { - "type": "boolean", - "description": "Indicates if the holdout experiment is running and if any related experiments are running." - }, - "createdAt": { + "lastImport": { + "description": "Timestamp of when the most recent successful import occurred.", + "example": "1717263000000", "$ref": "#/components/schemas/UnixMillis" }, - "updatedAt": { + "lastError": { + "description": "Timestamp of when the most recent import error occurred, if any", + "example": "1714584600000", "$ref": "#/components/schemas/UnixMillis" }, - "baseExperiment": { - "$ref": "#/components/schemas/Experiment" - }, - "relatedExperiments": { + "errors": { "type": "array", "items": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/StatusResponse" } } } }, - "HoldoutPatchInput": { + "FlagInput": { "type": "object", "required": [ - "instructions" + "ruleId", + "flagConfigVersion" ], "properties": { - "comment": { + "ruleId": { "type": "string", - "description": "Optional comment describing the update", - "example": "Optional comment" + "description": "The ID of the variation or rollout of the flag to use. Use \"fallthrough\" for the default targeting behavior when the flag is on.", + "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" }, - "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", - "example": "[{\"kind\": \"updateName\", \"name\": \"Updated holdout name\"}]", - "$ref": "#/components/schemas/Instructions" + "flagConfigVersion": { + "type": "integer", + "description": "The flag version", + "example": 12 + }, + "notInExperimentVariationId": { + "type": "string", + "description": "The ID of the variation to route traffic not part of the experiment analysis to. Defaults to variation ID of baseline treatment, if set.", + "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" } } }, - "HoldoutPostRequest": { + "FlagLinkCollectionRep": { "type": "object", + "required": [ + "items", + "_links" + ], "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the holdout", - "example": "holdout-one-name" - }, - "key": { - "type": "string", - "description": "A key that identifies the holdout", - "example": "holdout-key" - }, - "description": { - "type": "string", - "description": "Description of the holdout", - "example": "My holdout-one description" - }, - "randomizationunit": { - "type": "string", - "description": "The chosen randomization unit for the holdout base experiment", - "example": "user" - }, - "attributes": { + "items": { "type": "array", - "description": "The attributes that the holdout iteration's results can be sliced by", + "description": "An array of flag links", "items": { - "type": "string" - }, - "example": [ - "country", - "device", - "os" - ] - }, - "holdoutamount": { - "type": "string", - "description": "Audience allocation for the holdout", - "example": "10" - }, - "primarymetrickey": { - "type": "string", - "description": "The key of the primary metric for this holdout", - "example": "metric-key-123abc" + "$ref": "#/components/schemas/FlagLinkRep" + } }, - "metrics": { - "type": "array", - "description": "Details on the metrics for this experiment", - "items": { - "$ref": "#/components/schemas/MetricInput" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "FlagLinkMember": { + "type": "object", + "required": [ + "_links", + "_id" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } }, - "prerequisiteflagkey": { - "type": "string", - "description": "The key of the flag that the holdout is dependent on", - "example": "flag-key-123abc" + "_id": { + "type": "string" }, - "maintainerId": { - "type": "string", - "description": "Maintainer id" + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" } } }, - "HoldoutRep": { + "FlagLinkRep": { "type": "object", "required": [ + "_links", "_id", - "status", - "holdoutAmount", - "createdAt", - "updatedAt", - "baseExperiment" + "_deepLink", + "_timestamp", + "_createdAt" ], "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_key": { + "type": "string", + "description": "The flag link key", + "example": "flag-link-key-123abc" + }, + "_integrationKey": { + "type": "string", + "description": "The integration key for an integration whose manifest.json includes the flagLink capability, if this is a flag link for an existing integration" + }, "_id": { - "type": "string" + "type": "string", + "description": "The ID of this flag link", + "example": "1234a56b7c89d012345e678f" }, - "status": { + "_deepLink": { "type": "string", - "enum": [ - "created", - "enabled", - "running", - "ended" - ] + "description": "The URL for the external resource the flag is linked to", + "example": "https://example.com/archives/123123123" }, - "description": { - "type": "string" + "_timestamp": { + "description": "The time to mark this flag link as associated with the external URL. Defaults to the creation time of the flag link, but can be set to another time during creation.", + "example": "{\"milliseconds\": 1655342199935, \"seconds\": 1655342199, \"rfc3339\": \"2022-06-16T01:16:39Z\", \"simple\": \"2022-06-16 01:16:39\"}", + "$ref": "#/components/schemas/TimestampRep" }, - "holdoutAmount": { + "title": { "type": "string", - "description": "The percentage of traffic allocated to this holdout." + "description": "The title of the flag link", + "example": "Example link title" }, - "createdAt": { - "$ref": "#/components/schemas/UnixMillis" + "description": { + "type": "string", + "description": "The description of the flag link", + "example": "Example link description" }, - "updatedAt": { - "$ref": "#/components/schemas/UnixMillis" + "_metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The metadata required by this integration in order to create a flag link, if this is a flag link for an existing integration. Defined in the integration's manifest.json file under flagLink." }, - "baseExperiment": { - "$ref": "#/components/schemas/Experiment" + "_createdAt": { + "description": "Timestamp of when the flag link was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "experiments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RelatedExperimentRep" - } + "_member": { + "description": "Details on the member associated with this flag link", + "$ref": "#/components/schemas/FlagLinkMember" } } }, - "HoldoutsCollectionRep": { + "FlagListingRep": { "type": "object", + "required": [ + "name", + "key" + ], "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SimpleHoldoutRep" - } + "name": { + "type": "string", + "description": "The flag name", + "example": "Example flag" + }, + "key": { + "type": "string", + "description": "The flag key", + "example": "flag-key-123abc" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/my-project/environments/my-environment/holdouts?limit=20", - "type": "application/json" - } } }, - "total_count": { - "type": "integer", - "description": "The total number of holdouts in this project and environment." + "_site": { + "$ref": "#/components/schemas/Link" } } }, - "HunkRep": { + "FlagMigrationSettingsRep": { "type": "object", - "required": [ - "startingLineNumber" - ], "properties": { - "startingLineNumber": { - "type": "integer", - "description": "Line number of beginning of code reference hunk", - "example": 45 - }, - "lines": { - "type": "string", - "description": "Contextual lines of code that include the referenced feature flag", - "example": "var enableFeature = 'enable-feature';" - }, - "projKey": { - "type": "string", - "description": "The project key", - "example": "default" - }, - "flagKey": { + "contextKind": { "type": "string", - "description": "The feature flag key", - "example": "enable-feature" + "description": "The context kind targeted by this migration flag. Only applicable for six-stage migrations.", + "example": "device" }, - "aliases": { - "type": "array", - "description": "An array of flag key aliases", - "items": { - "type": "string" - }, - "example": [ - "enableFeature", - "EnableFeature" - ] + "stageCount": { + "type": "integer", + "description": "The number of stages for this migration flag", + "example": 6 } } }, - "Import": { + "FlagPrerequisitePost": { "type": "object", "required": [ - "id", - "segmentKey", - "creationTime", - "mode", - "status", - "_links" + "key", + "variationId" ], "properties": { - "id": { + "key": { "type": "string", - "description": "The import ID", - "example": "1234a567-bcd8-9123-4567-abcd1234567f" + "description": "Flag key of the prerequisite flag" }, - "segmentKey": { + "variationId": { "type": "string", - "description": "The segment key", - "example": "example-big-segment" - }, - "creationTime": { - "description": "Timestamp of when this import was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "mode": { + "description": "ID of a variation of the prerequisite flag" + } + } + }, + "FlagRep": { + "type": "object", + "required": [ + "_links" + ], + "properties": { + "targetingRule": { "type": "string", - "description": "The import mode used, either merge or replace", - "example": "replace" + "description": "The targeting rule", + "example": "fallthrough" }, - "status": { + "targetingRuleDescription": { "type": "string", - "description": "The import status", - "example": "complete", - "enum": [ - "preparing", - "pending_approval", - "ready", - "in_progress", - "complete", - "stopped" - ] + "description": "The rule description", + "example": "Customers who live in Canada" }, - "files": { + "targetingRuleClauses": { "type": "array", - "description": "The imported files and their status", - "items": { - "$ref": "#/components/schemas/FileRep" - }, - "example": [ - { - "filename": "bigsegimport.csv", - "status": "complete" - } - ] + "description": "An array of clauses used for individual targeting based on attributes", + "items": {} + }, + "flagConfigVersion": { + "type": "integer", + "description": "The flag version", + "example": 12 + }, + "notInExperimentVariationId": { + "type": "string", + "description": "The ID of the variation to route traffic not part of the experiment analysis to", + "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/flags/my-project/my-flag", + "type": "application/json" + } + } } } }, - "InitiatorRep": { + "FlagScheduledChangesInput": { "type": "object", + "required": [ + "instructions" + ], "properties": { - "name": { + "comment": { "type": "string", - "description": "The name of the member who initiated the export", - "example": "Bob Loblaw" + "description": "Optional comment describing the update to the scheduled changes", + "example": "optional comment" }, - "email": { - "type": "string", - "description": "The email address of the member who initiated the export", - "example": "ariel@acme.com" + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", + "example": "[ { \"kind\": \"replaceScheduledChangesInstructions\", \"value\": [ { \"kind\": \"turnFlagOff\" } ] } ]", + "$ref": "#/components/schemas/Instructions" } } }, - "Instruction": { - "type": "object", - "additionalProperties": {} - }, - "Instructions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Instruction" - } - }, - "Integration": { + "FlagStatusRep": { "type": "object", + "required": [ + "name", + "_links" + ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "_id": { + "name": { "type": "string", - "description": "The ID for this integration audit log subscription", - "example": "1234a56b7c89d012345e678f" + "description": "Status of the flag", + "example": "inactive", + "enum": [ + "new", + "inactive", + "active", + "launched" + ] }, - "kind": { + "lastRequested": { "type": "string", - "description": "The type of integration", - "example": "datadog" + "format": "date-time", + "description": "Timestamp of last time flag was requested", + "example": "2020-02-05T18:17:01.514Z" }, - "name": { - "type": "string", - "description": "A human-friendly name for the integration", - "example": "Example Datadog integration" + "default": { + "description": "Default value seen from code" }, - "config": { + "_links": { "type": "object", - "additionalProperties": {}, - "description": "Details on configuration for an integration of this type. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration." - }, - "statements": { - "type": "array", - "description": "Represents a Custom role policy, defining a resource kinds filter the integration audit log subscription responds to.", - "items": { - "$ref": "#/components/schemas/Statement" - } - }, - "on": { - "type": "boolean", - "description": "Whether the integration is currently active", - "example": true - }, - "tags": { - "type": "array", - "description": "An array of tags for this integration", - "items": { - "type": "string" + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - "testing" - ] - }, - "_access": { - "description": "Details on the allowed and denied actions for this subscription", - "$ref": "#/components/schemas/Access" - }, - "_status": { - "description": "Details on the most recent successes and errors for this integration", - "$ref": "#/components/schemas/IntegrationSubscriptionStatusRep" - }, - "url": { - "type": "string", - "description": "Slack webhook receiver URL. Only used for legacy Slack webhook integrations." - }, - "apiKey": { - "type": "string", - "description": "Datadog API key. Only used for legacy Datadog webhook integrations." + "example": { + "parent": { + "href": "/api/v2/flags/my-project/my-flag", + "type": "application/json" + }, + "self": { + "href": "/api/v2/flag-statuses/my-project/my-flag", + "type": "application/json" + } + } } } }, - "IntegrationConfigurationCollectionRep": { + "FlagSummary": { "type": "object", "required": [ - "items", - "_links" + "variations", + "prerequisites" ], "properties": { - "items": { - "type": "array", - "description": "An array of integration configurations", - "items": { - "$ref": "#/components/schemas/IntegrationConfigurationsRep" - } + "variations": { + "description": "A summary of the variations for this flag", + "$ref": "#/components/schemas/AllVariationsSummary" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "prerequisites": { + "type": "integer", + "description": "The number of prerequisites for this flag" } } }, - "IntegrationConfigurationPost": { + "FlagTriggerInput": { "type": "object", - "required": [ - "name", - "configValues" - ], "properties": { - "name": { + "comment": { "type": "string", - "description": "The name of the integration configuration", - "example": "Example integration configuration" - }, - "enabled": { - "type": "boolean", - "description": "Whether the integration configuration is enabled. If omitted, defaults to true", - "example": true + "description": "Optional comment describing the update", + "example": "optional comment" }, - "tags": { + "instructions": { "type": "array", - "description": "Tags for the integration", + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"trigger_action\"}.", "items": { - "type": "string" + "$ref": "#/components/schemas/Instruction" }, "example": [ - "ops" + { + "kind": "disableTrigger" + } ] - }, - "configValues": { - "type": "object", - "additionalProperties": {}, - "description": "The unique set of fields required to configure the integration. Refer to the formVariables field in the corresponding manifest.json at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.", - "example": { - "optional": "an optional property", - "required": "the required property", - "url": "https://example.com" - } - }, - "capabilityConfig": { - "description": "The capability configuration for the integration", - "example": "{\"auditLogEventsHook\": \"policy\": []\"}", - "$ref": "#/components/schemas/CapabilityConfigPost" } } }, - "IntegrationConfigurationsRep": { + "FlagsInput": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlagInput" + } + }, + "FollowFlagMember": { "type": "object", "required": [ "_links", "_id", - "name" + "role", + "email" ], "properties": { "_links": { @@ -40169,877 +42092,1500 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/members/569f183514f4432160000007", + "type": "application/json" + } + } }, "_id": { "type": "string", - "description": "The unique identifier for this integration configuration" + "description": "The member's ID", + "example": "569f183514f4432160000007" }, - "name": { + "firstName": { "type": "string", - "description": "A human-friendly name for the integration", - "example": "Example Datadog integration" - }, - "_createdAt": { - "description": "The time the integration configuration was created", - "$ref": "#/components/schemas/UnixMillis" + "description": "The member's first name", + "example": "Ariel" }, - "_integrationKey": { + "lastName": { "type": "string", - "description": "The type of integration", - "example": "datadog" - }, - "tags": { - "type": "array", - "description": "An array of tags for this integration", - "items": { - "type": "string" - }, - "example": [ - "testing" - ] - }, - "enabled": { - "type": "boolean", - "description": "Whether the integration is currently active" - }, - "_access": { - "description": "Details on the allowed and denied actions for this integration configuration", - "$ref": "#/components/schemas/Access" + "description": "The member's last name", + "example": "Flores" }, - "configValues": { - "type": "object", - "additionalProperties": {}, - "description": "Details on configuration for an integration of this type. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration." + "role": { + "type": "string", + "description": "The member's base role. If the member has no additional roles, this role will be in effect.", + "example": "admin" }, - "capabilityConfig": { - "description": "The capability configuration for the integration", - "example": "{\"auditLogEventsHook\": \"statements\": []\"}", - "$ref": "#/components/schemas/CapabilityConfigRep" + "email": { + "type": "string", + "description": "The member's email address", + "example": "ariel@acme.com" } } }, - "IntegrationDeliveryConfiguration": { + "ForbiddenErrorRep": { "type": "object", "required": [ - "_links", - "_id", - "integrationKey", - "projectKey", - "environmentKey", - "config", - "on", - "tags", - "name", - "version" + "code", + "message" ], "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/IntegrationDeliveryConfigurationLinks" - }, - "_id": { + "code": { "type": "string", - "description": "The integration ID", - "example": "12ab3c4d5ef1a2345bcde67f" + "description": "Specific error code encountered", + "example": "forbidden" }, - "integrationKey": { + "message": { "type": "string", - "description": "The integration key", - "example": "example-integration-key" + "description": "Description of the error", + "example": "Forbidden. Access to the requested resource was denied." + } + } + }, + "FormVariable": { + "type": "object", + "properties": { + "key": { + "type": "string" }, - "projectKey": { - "type": "string", - "description": "The project key", - "example": "default" + "name": { + "type": "string" }, - "environmentKey": { - "type": "string", - "description": "The environment key", - "example": "development" + "type": { + "type": "string" }, - "config": { - "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", - "$ref": "#/components/schemas/FormVariableConfig" + "description": { + "type": "string" }, - "on": { - "type": "boolean", - "description": "Whether the configuration is turned on", - "example": true + "placeholder": { + "type": "string" }, - "tags": { + "isOptional": { + "type": "boolean" + }, + "defaultValue": {}, + "allowedValues": { "type": "array", - "description": "List of tags for this configuration", "items": { "type": "string" - }, - "example": [] - }, - "name": { - "type": "string", - "description": "Name of the configuration", - "example": "Development environment configuration" - }, - "version": { - "type": "integer", - "description": "Version of the current configuration", - "example": 1 + } }, - "_access": { - "description": "Details on the allowed and denied actions for this configuration", - "$ref": "#/components/schemas/Access" + "dynamicOptions": { + "$ref": "#/components/schemas/DynamicOptions" } } }, - "IntegrationDeliveryConfigurationCollection": { + "FormVariableConfig": { + "type": "object", + "additionalProperties": {} + }, + "GenerateWarehouseDestinationKeyPairPostRep": { "type": "object", - "required": [ - "_links", - "items" - ], "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/IntegrationDeliveryConfigurationCollectionLinks" + "public_key": { + "type": "string", + "description": "The public key used by LaunchDarkly" }, - "items": { - "type": "array", - "description": "An array of integration delivery configurations", - "items": { - "$ref": "#/components/schemas/IntegrationDeliveryConfiguration" - } + "public_key_pkcs8": { + "type": "string", + "description": "The public key to assign in your Snowflake worksheet" } } }, - "IntegrationDeliveryConfigurationCollectionLinks": { + "HMACSignature": { "type": "object", - "required": [ - "self" - ], "properties": { - "self": { - "$ref": "#/components/schemas/Link" + "headerName": { + "type": "string" }, - "parent": { - "$ref": "#/components/schemas/Link" + "hmacSecretFormVariableKey": { + "type": "string" } } }, - "IntegrationDeliveryConfigurationLinks": { + "HeaderItems": { "type": "object", - "required": [ - "self", - "parent", - "project", - "environment" - ], "properties": { - "self": { - "$ref": "#/components/schemas/Link" - }, - "parent": { - "$ref": "#/components/schemas/Link" - }, - "project": { - "$ref": "#/components/schemas/Link" + "name": { + "type": "string" }, - "environment": { - "$ref": "#/components/schemas/Link" + "value": { + "type": "string" } } }, - "IntegrationDeliveryConfigurationPost": { + "HoldoutDetailRep": { "type": "object", "required": [ - "config" + "_id", + "status", + "holdoutAmount", + "createdAt", + "updatedAt", + "baseExperiment" ], "properties": { - "on": { - "type": "boolean", - "description": "Whether the integration configuration is active. Default value is false.", - "example": false + "_id": { + "type": "string" }, - "config": { - "description": "The global integration settings, as specified by the formVariables in the manifest.json for this integration.", - "example": "{\"required\": \"example value for required formVariables property for sample-integration\", \"optional\": \"example value for optional formVariables property for sample-integration\"}", - "$ref": "#/components/schemas/FormVariableConfig" + "status": { + "type": "string", + "enum": [ + "created", + "enabled", + "running", + "ended" + ] }, - "tags": { - "type": "array", - "description": "Tags to associate with the integration", - "items": { - "type": "string" - }, - "example": [ - "example-tag" - ] + "description": { + "type": "string" }, - "name": { + "holdoutAmount": { "type": "string", - "description": "Name to identify the integration", - "example": "Sample integration" - } - } - }, - "IntegrationDeliveryConfigurationResponse": { - "type": "object", - "properties": { - "statusCode": { - "type": "integer", - "description": "The status code returned by the validation", - "example": 200 + "description": "The percentage of traffic allocated to this holdout." }, - "error": { - "type": "string" + "isDirty": { + "type": "boolean", + "description": "Indicates if the holdout experiment is running and if any related experiments are running." }, - "timestamp": { - "description": "Timestamp of when the validation was performed", - "example": "1654104600000", + "createdAt": { "$ref": "#/components/schemas/UnixMillis" }, - "responseBody": { - "type": "string", - "description": "JSON response to the validation request" - } - } - }, - "IntegrationMetadata": { - "type": "object", - "required": [ - "externalId", - "externalStatus", - "externalUrl", - "lastChecked" - ], - "properties": { - "externalId": { - "type": "string" - }, - "externalStatus": { - "$ref": "#/components/schemas/IntegrationStatus" + "updatedAt": { + "$ref": "#/components/schemas/UnixMillis" }, - "externalUrl": { - "type": "string" + "baseExperiment": { + "$ref": "#/components/schemas/Experiment" }, - "lastChecked": { - "$ref": "#/components/schemas/UnixMillis" + "relatedExperiments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Experiment" + } } } }, - "IntegrationStatus": { + "HoldoutPatchInput": { "type": "object", "required": [ - "display", - "value" + "instructions" ], "properties": { - "display": { - "type": "string" + "comment": { + "type": "string", + "description": "Optional comment describing the update", + "example": "Optional comment" }, - "value": { - "type": "string" + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", + "example": "[{\"kind\": \"updateName\", \"name\": \"Updated holdout name\"}]", + "$ref": "#/components/schemas/Instructions" } } }, - "IntegrationStatusRep": { + "HoldoutPostRequest": { "type": "object", "properties": { - "statusCode": { - "type": "integer" + "name": { + "type": "string", + "description": "A human-friendly name for the holdout", + "example": "holdout-one-name" }, - "responseBody": { - "type": "string" + "key": { + "type": "string", + "description": "A key that identifies the holdout", + "example": "holdout-key" }, - "timestamp": { - "$ref": "#/components/schemas/UnixMillis" + "description": { + "type": "string", + "description": "Description of the holdout", + "example": "My holdout-one description" + }, + "randomizationunit": { + "type": "string", + "description": "The chosen randomization unit for the holdout base experiment", + "example": "user" + }, + "attributes": { + "type": "array", + "description": "The attributes that the holdout iteration's results can be sliced by", + "items": { + "type": "string" + }, + "example": [ + "country", + "device", + "os" + ] + }, + "holdoutamount": { + "type": "string", + "description": "Audience allocation for the holdout", + "example": "10" + }, + "primarymetrickey": { + "type": "string", + "description": "The key of the primary metric for this holdout", + "example": "metric-key-123abc" + }, + "metrics": { + "type": "array", + "description": "Details on the metrics for this experiment", + "items": { + "$ref": "#/components/schemas/MetricInput" + } + }, + "prerequisiteflagkey": { + "type": "string", + "description": "The key of the flag that the holdout is dependent on", + "example": "flag-key-123abc" + }, + "maintainerId": { + "type": "string", + "description": "Maintainer id" } } }, - "IntegrationSubscriptionStatusRep": { + "HoldoutRep": { "type": "object", + "required": [ + "_id", + "status", + "holdoutAmount", + "createdAt", + "updatedAt", + "baseExperiment" + ], "properties": { - "successCount": { - "type": "integer" + "_id": { + "type": "string" }, - "lastSuccess": { + "status": { + "type": "string", + "enum": [ + "created", + "enabled", + "running", + "ended" + ] + }, + "description": { + "type": "string" + }, + "holdoutAmount": { + "type": "string", + "description": "The percentage of traffic allocated to this holdout." + }, + "createdAt": { "$ref": "#/components/schemas/UnixMillis" }, - "lastError": { + "updatedAt": { "$ref": "#/components/schemas/UnixMillis" }, - "errorCount": { - "type": "integer" + "baseExperiment": { + "$ref": "#/components/schemas/Experiment" }, - "errors": { + "experiments": { "type": "array", "items": { - "$ref": "#/components/schemas/IntegrationStatusRep" + "$ref": "#/components/schemas/RelatedExperimentRep" } } } }, - "Integrations": { + "HoldoutsCollectionRep": { "type": "object", "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - }, "items": { "type": "array", "items": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/SimpleHoldoutRep" } }, - "key": { - "type": "string" - } - } - }, - "InvalidRequestErrorRep": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "string", - "description": "Specific error code encountered", - "example": "invalid_request" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/my-project/environments/my-environment/holdouts?limit=20", + "type": "application/json" + } + } }, - "message": { - "type": "string", - "description": "Description of the error", - "example": "Invalid request body" + "total_count": { + "type": "integer", + "description": "The total number of holdouts in this project and environment." } } }, - "IterationInput": { + "HunkRep": { "type": "object", "required": [ - "hypothesis", - "metrics", - "treatments", - "flags" + "startingLineNumber" ], "properties": { - "hypothesis": { - "type": "string", - "description": "The expected outcome of this experiment", - "example": "Example hypothesis, the new button placement will increase conversion" - }, - "canReshuffleTraffic": { - "type": "boolean", - "description": "Whether to allow the experiment to reassign traffic to different variations when you increase or decrease the traffic in your experiment audience (true) or keep all traffic assigned to its initial variation (false). Defaults to true.", - "example": true - }, - "metrics": { - "description": "Details on the metrics for this experiment", - "$ref": "#/components/schemas/MetricsInput" + "startingLineNumber": { + "type": "integer", + "description": "Line number of beginning of code reference hunk", + "example": 45 }, - "primarySingleMetricKey": { + "lines": { "type": "string", - "description": "The key of the primary metric for this experiment. Either primarySingleMetricKey or primaryFunnelKey must be present.", - "example": "metric-key-123abc" + "description": "Contextual lines of code that include the referenced feature flag", + "example": "var enableFeature = 'enable-feature';" }, - "primaryFunnelKey": { + "projKey": { "type": "string", - "description": "The key of the primary funnel group for this experiment. Either primarySingleMetricKey or primaryFunnelKey must be present.", - "example": "metric-group-key-123abc" - }, - "treatments": { - "description": "Details on the variations you are testing in the experiment. You establish these variations in feature flags, and then reuse them in experiments.", - "$ref": "#/components/schemas/TreatmentsInput" - }, - "flags": { - "description": "Details on the feature flag and targeting rules for this iteration", - "example": "{\"example-flag-key\": { \"ruleId\": \"e432f62b-55f6-49dd-a02f-eb24acf39d05\", \"flagConfigVersion\": 12, \"notInExperimentVariationId\": \"e432f62b-55f6-49dd-a02f-eb24acf39d05\" }}", - "$ref": "#/components/schemas/FlagsInput" + "description": "The project key", + "example": "default" }, - "randomizationUnit": { + "flagKey": { "type": "string", - "description": "The unit of randomization for this iteration. Defaults to user.", - "example": "user" + "description": "The feature flag key", + "example": "enable-feature" }, - "attributes": { + "aliases": { "type": "array", - "description": "The attributes that this iteration's results can be sliced by", + "description": "An array of flag key aliases", "items": { "type": "string" }, "example": [ - "country", - "device", - "os" + "enableFeature", + "EnableFeature" ] } } }, - "IterationRep": { + "Import": { "type": "object", "required": [ - "hypothesis", + "id", + "segmentKey", + "creationTime", + "mode", "status", - "createdAt" + "_links" ], "properties": { - "_id": { - "type": "string", - "description": "The iteration ID", - "example": "12ab3c45de678910fgh12345" - }, - "hypothesis": { + "id": { "type": "string", - "description": "The expected outcome of this experiment", - "example": "The new button placement will increase conversion" + "description": "The import ID", + "example": "1234a567-bcd8-9123-4567-abcd1234567f" }, - "status": { + "segmentKey": { "type": "string", - "description": "The status of the iteration: not_started, running, stopped", - "example": "running" + "description": "The segment key", + "example": "example-big-segment" }, - "createdAt": { - "description": "Timestamp of when the iteration was created", + "creationTime": { + "description": "Timestamp of when this import was created", "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" }, - "startedAt": { - "description": "Timestamp of when the iteration started", - "example": "1655314200000", - "$ref": "#/components/schemas/UnixMillis" - }, - "endedAt": { - "description": "Timestamp of when the iteration ended", - "example": "1656610200000", - "$ref": "#/components/schemas/UnixMillis" - }, - "winningTreatmentId": { + "mode": { "type": "string", - "description": "The ID of the treatment chosen when the experiment stopped", - "example": "122c9f3e-da26-4321-ba68-e0fc02eced58" + "description": "The import mode used, either merge or replace", + "example": "replace" }, - "winningReason": { + "status": { "type": "string", - "description": "The reason you stopped the experiment", - "example": "We ran this iteration for two weeks and the winning variation was clear" + "description": "The import status", + "example": "complete", + "enum": [ + "preparing", + "pending_approval", + "ready", + "in_progress", + "complete", + "stopped" + ] }, - "canReshuffleTraffic": { - "type": "boolean", - "description": "Whether the experiment may reassign traffic to different variations when the experiment audience changes (true) or must keep all traffic assigned to its initial variation (false).", - "example": true + "files": { + "type": "array", + "description": "The imported files and their status", + "items": { + "$ref": "#/components/schemas/FileRep" + }, + "example": [ + { + "filename": "bigsegimport.csv", + "status": "complete" + } + ] }, - "flags": { + "_links": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/FlagRep" + "$ref": "#/components/schemas/Link" }, - "description": "Details on the flag used in this experiment" + "description": "The location and content type of related resources" + } + } + }, + "InitiatorRep": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the member who initiated the export", + "example": "Bob Loblaw" }, - "primaryMetric": { - "description": "Deprecated, use primarySingleMetric and primaryFunnel instead. Details on the primary metric for this experiment.", - "deprecated": true, - "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep" + "email": { + "type": "string", + "description": "The email address of the member who initiated the export", + "example": "ariel@acme.com" + } + } + }, + "Instruction": { + "type": "object", + "additionalProperties": {} + }, + "Instructions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instruction" + } + }, + "Integration": { + "type": "object", + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "primarySingleMetric": { - "description": "Details on the primary metric for this experiment", - "$ref": "#/components/schemas/MetricV2Rep" + "_id": { + "type": "string", + "description": "The ID for this integration audit log subscription", + "example": "1234a56b7c89d012345e678f" }, - "primaryFunnel": { - "description": "Details on the primary funnel group for this experiment", - "$ref": "#/components/schemas/DependentMetricGroupRepWithMetrics" + "kind": { + "type": "string", + "description": "The type of integration", + "example": "datadog" }, - "randomizationUnit": { + "name": { "type": "string", - "description": "The unit of randomization for this iteration", - "example": "user" + "description": "A human-friendly name for the integration", + "example": "Example Datadog integration" }, - "attributes": { - "type": "array", - "description": "The available attribute filters for this iteration", - "items": { - "type": "string" - } + "config": { + "type": "object", + "additionalProperties": {}, + "description": "Details on configuration for an integration of this type. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration." }, - "treatments": { + "statements": { "type": "array", - "description": "Details on the variations you are testing in the experiment", + "description": "Represents a Custom role policy, defining a resource kinds filter the integration audit log subscription responds to.", "items": { - "$ref": "#/components/schemas/TreatmentRep" + "$ref": "#/components/schemas/Statement" } }, - "secondaryMetrics": { + "on": { + "type": "boolean", + "description": "Whether the integration is currently active", + "example": true + }, + "tags": { "type": "array", - "description": "Deprecated, use metrics instead. Details on the secondary metrics for this experiment.", + "description": "An array of tags for this integration", "items": { - "$ref": "#/components/schemas/MetricV2Rep" + "type": "string" }, - "deprecated": true + "example": [ + "testing" + ] }, - "metrics": { - "type": "array", - "description": "Details on the metrics for this experiment", - "items": { - "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep" - } + "_access": { + "description": "Details on the allowed and denied actions for this subscription", + "$ref": "#/components/schemas/Access" }, - "layerSnapshot": { - "description": "Snapshot of the layer state on iteration stop, if part of a layer. Otherwise omitted.", - "$ref": "#/components/schemas/LayerSnapshotRep" - } - } - }, - "JSONPatch": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PatchOperation" - } - }, - "LastSeenMetadata": { - "type": "object", - "properties": { - "tokenId": { + "_status": { + "description": "Details on the most recent successes and errors for this integration", + "$ref": "#/components/schemas/IntegrationSubscriptionStatusRep" + }, + "url": { "type": "string", - "description": "The ID of the token used in the member's last session", - "example": "5b52207f8ca8e631d31fdb2b" + "description": "Slack webhook receiver URL. Only used for legacy Slack webhook integrations." + }, + "apiKey": { + "type": "string", + "description": "Datadog API key. Only used for legacy Datadog webhook integrations." } } }, - "LayerCollectionRep": { + "IntegrationConfigurationCollectionRep": { "type": "object", "required": [ "items", - "totalCount", "_links" ], "properties": { "items": { "type": "array", - "description": "The layers in the project", + "description": "An array of integration configurations", "items": { - "$ref": "#/components/schemas/LayerRep" + "$ref": "#/components/schemas/IntegrationConfigurationsRep" } }, - "totalCount": { - "type": "integer", - "description": "The total number of layers in the project" - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/projects/my-project/layers", - "type": "application/json" - } - } + "description": "The location and content type of related resources" } } }, - "LayerConfigurationRep": { + "IntegrationConfigurationPost": { "type": "object", "required": [ - "reservations" + "name", + "configValues" ], "properties": { - "reservations": { + "name": { + "type": "string", + "description": "The name of the integration configuration", + "example": "Example integration configuration" + }, + "enabled": { + "type": "boolean", + "description": "Whether the integration configuration is enabled. If omitted, defaults to true", + "example": true + }, + "tags": { "type": "array", - "description": "The experiment reservations for the layer", + "description": "Tags for the integration", "items": { - "$ref": "#/components/schemas/LayerReservationRep" - } - } - } - }, - "LayerPatchInput": { - "type": "object", - "required": [ - "instructions" - ], - "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the update", - "example": "Optional comment" + "type": "string" + }, + "example": [ + "ops" + ] }, - "environmentKey": { - "type": "string", - "description": "The environment key used for making environment specific updates. For example, updating the reservation of an experiment", - "example": "production" + "configValues": { + "type": "object", + "additionalProperties": {}, + "description": "The unique set of fields required to configure the integration. Refer to the formVariables field in the corresponding manifest.json at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.", + "example": { + "optional": "an optional property", + "required": "the required property", + "url": "https://example.com" + } }, - "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", - "example": "[{\"kind\": \"updateName\", \"name\": \"Updated layer name\"}]", - "$ref": "#/components/schemas/Instructions" + "capabilityConfig": { + "description": "The capability configuration for the integration", + "example": "{\"auditLogEventsHook\": \"policy\": []\"}", + "$ref": "#/components/schemas/CapabilityConfigPost" } } }, - "LayerPost": { + "IntegrationConfigurationsRep": { "type": "object", "required": [ - "key", - "name", - "description" + "_links", + "_id", + "name" ], "properties": { - "key": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_id": { "type": "string", - "description": "Unique identifier for the layer", - "example": "checkout-flow" + "description": "The unique identifier for this integration configuration" }, "name": { "type": "string", - "description": "Layer name", - "example": "Checkout Flow" + "description": "A human-friendly name for the integration", + "example": "Example Datadog integration" }, - "description": { + "_createdAt": { + "description": "The time the integration configuration was created", + "$ref": "#/components/schemas/UnixMillis" + }, + "_integrationKey": { "type": "string", - "description": "The checkout flow for the application" + "description": "The type of integration", + "example": "datadog" + }, + "tags": { + "type": "array", + "description": "An array of tags for this integration", + "items": { + "type": "string" + }, + "example": [ + "testing" + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the integration is currently active" + }, + "_access": { + "description": "Details on the allowed and denied actions for this integration configuration", + "$ref": "#/components/schemas/Access" + }, + "configValues": { + "type": "object", + "additionalProperties": {}, + "description": "Details on configuration for an integration of this type. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration." + }, + "capabilityConfig": { + "description": "The capability configuration for the integration", + "example": "{\"auditLogEventsHook\": \"statements\": []\"}", + "$ref": "#/components/schemas/CapabilityConfigRep" } } }, - "LayerRep": { + "IntegrationDeliveryConfiguration": { "type": "object", "required": [ - "key", + "_links", + "_id", + "integrationKey", + "projectKey", + "environmentKey", + "config", + "on", + "tags", "name", - "description", - "createdAt" + "version" ], "properties": { - "key": { - "type": "string", - "description": "The key of the layer", - "example": "checkout-flow" + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/IntegrationDeliveryConfigurationLinks" }, - "name": { + "_id": { "type": "string", - "description": "The name of the layer", - "example": "Checkout Flow" + "description": "The integration ID", + "example": "12ab3c4d5ef1a2345bcde67f" }, - "description": { + "integrationKey": { "type": "string", - "description": "The description of the layer", - "example": "The checkout flow for the application" + "description": "The integration key", + "example": "example-integration-key" }, - "createdAt": { - "description": "The date and time when the layer was created", - "$ref": "#/components/schemas/UnixMillis" + "projectKey": { + "type": "string", + "description": "The project key", + "example": "default" }, - "randomizationUnit": { + "environmentKey": { "type": "string", - "description": "The unit of randomization for the layer", - "example": "user" + "description": "The environment key", + "example": "development" }, - "environments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LayerConfigurationRep" + "config": { + "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", + "$ref": "#/components/schemas/FormVariableConfig" + }, + "on": { + "type": "boolean", + "description": "Whether the configuration is turned on", + "example": true + }, + "tags": { + "type": "array", + "description": "List of tags for this configuration", + "items": { + "type": "string" }, - "description": "The layer configurations for each requested environment" + "example": [] + }, + "name": { + "type": "string", + "description": "Name of the configuration", + "example": "Development environment configuration" + }, + "version": { + "type": "integer", + "description": "Version of the current configuration", + "example": 1 + }, + "_access": { + "description": "Details on the allowed and denied actions for this configuration", + "$ref": "#/components/schemas/Access" } } }, - "LayerReservationRep": { + "IntegrationDeliveryConfigurationCollection": { "type": "object", "required": [ - "experimentKey", - "flagKey", - "reservationPercent" + "_links", + "items" ], "properties": { - "experimentKey": { - "type": "string", - "description": "The key of the experiment", - "example": "checkout-flow-experiment" + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/IntegrationDeliveryConfigurationCollectionLinks" }, - "flagKey": { - "type": "string", - "description": "The key of the flag", - "example": "checkout-flow-flag" + "items": { + "type": "array", + "description": "An array of integration delivery configurations", + "items": { + "$ref": "#/components/schemas/IntegrationDeliveryConfiguration" + } + } + } + }, + "IntegrationDeliveryConfigurationCollectionLinks": { + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "$ref": "#/components/schemas/Link" }, - "reservationPercent": { - "type": "integer", - "description": "The percentage of traffic reserved for the experiment", - "example": 20 + "parent": { + "$ref": "#/components/schemas/Link" } } }, - "LayerSnapshotRep": { + "IntegrationDeliveryConfigurationLinks": { "type": "object", "required": [ - "key", - "name", - "reservationPercent", - "otherReservationPercent" + "self", + "parent", + "project", + "environment" ], "properties": { - "key": { - "type": "string", - "description": "Key of the layer the experiment was part of", - "example": "checkout-flow" + "self": { + "$ref": "#/components/schemas/Link" }, - "name": { - "type": "string", - "description": "Layer name at the time this experiment iteration was stopped", - "example": "Checkout Flow" + "parent": { + "$ref": "#/components/schemas/Link" }, - "reservationPercent": { - "type": "integer", - "description": "Percent of layer traffic that was reserved in the layer for this experiment iteration", - "example": 10 + "project": { + "$ref": "#/components/schemas/Link" }, - "otherReservationPercent": { - "type": "integer", - "description": "Percent of layer traffic that was reserved for other experiments in the same environment, when this experiment iteration was stopped", - "example": 70 + "environment": { + "$ref": "#/components/schemas/Link" } } }, - "LegacyExperimentRep": { + "IntegrationDeliveryConfigurationPost": { "type": "object", + "required": [ + "config" + ], "properties": { - "metricKey": { - "type": "string", - "example": "my-metric" + "on": { + "type": "boolean", + "description": "Whether the integration configuration is active. Default value is false.", + "example": false }, - "_metric": { - "$ref": "#/components/schemas/MetricListingRep" + "config": { + "description": "The global integration settings, as specified by the formVariables in the manifest.json for this integration.", + "example": "{\"required\": \"example value for required formVariables property for sample-integration\", \"optional\": \"example value for optional formVariables property for sample-integration\"}", + "$ref": "#/components/schemas/FormVariableConfig" }, - "environments": { + "tags": { "type": "array", + "description": "Tags to associate with the integration", "items": { "type": "string" }, "example": [ - "production", - "test", - "my-environment" + "example-tag" ] }, - "_environmentSettings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ExperimentEnvironmentSettingRep" - } + "name": { + "type": "string", + "description": "Name to identify the integration", + "example": "Sample integration" } } }, - "Link": { + "IntegrationDeliveryConfigurationResponse": { "type": "object", "properties": { - "href": { - "type": "string" + "statusCode": { + "type": "integer", + "description": "The status code returned by the validation", + "example": 200 }, - "type": { + "error": { "type": "string" + }, + "timestamp": { + "description": "Timestamp of when the validation was performed", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "responseBody": { + "type": "string", + "description": "JSON response to the validation request" } } }, - "MaintainerRep": { + "IntegrationMetadata": { "type": "object", + "required": [ + "externalId", + "externalStatus", + "externalUrl", + "lastChecked" + ], "properties": { - "member": { - "description": "Details on the member who maintains this resource", - "$ref": "#/components/schemas/MemberSummary" + "externalId": { + "type": "string" }, - "team": { - "description": "Details on the team that maintains this resource", - "$ref": "#/components/schemas/MemberTeamSummaryRep" + "externalStatus": { + "$ref": "#/components/schemas/IntegrationStatus" + }, + "externalUrl": { + "type": "string" + }, + "lastChecked": { + "$ref": "#/components/schemas/UnixMillis" } } }, - "MaintainerTeam": { + "IntegrationStatus": { "type": "object", "required": [ - "key", - "name" + "display", + "value" ], "properties": { - "key": { - "type": "string", - "description": "The key of the maintainer team", - "example": "team-key-123abc" + "display": { + "type": "string" }, - "name": { - "type": "string", - "description": "A human-friendly name for the maintainer team", - "example": "Example team" + "value": { + "type": "string" + } + } + }, + "IntegrationStatusRep": { + "type": "object", + "properties": { + "statusCode": { + "type": "integer" + }, + "responseBody": { + "type": "string" + }, + "timestamp": { + "$ref": "#/components/schemas/UnixMillis" + } + } + }, + "IntegrationSubscriptionStatusRep": { + "type": "object", + "properties": { + "successCount": { + "type": "integer" + }, + "lastSuccess": { + "$ref": "#/components/schemas/UnixMillis" + }, + "lastError": { + "$ref": "#/components/schemas/UnixMillis" + }, + "errorCount": { + "type": "integer" }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationStatusRep" + } + } + } + }, + "Integrations": { + "type": "object", + "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/teams", - "type": "application/json" - }, - "roles": { - "href": "/api/v2/teams/example-team/roles", - "type": "application/json" - }, - "self": { - "href": "/api/v2/teams/example-team", - "type": "application/json" - } } + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } + }, + "key": { + "type": "string" } } }, - "Member": { + "InvalidRequestErrorRep": { "type": "object", "required": [ - "_links", - "_id", - "role", - "email", - "_pendingInvite", - "_verified", - "customRoles", - "mfa", - "_lastSeen", - "creationDate" + "code", + "message" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "_id": { + "code": { "type": "string", - "description": "The member's ID", - "example": "507f1f77bcf86cd799439011" + "description": "Specific error code encountered", + "example": "invalid_request" }, - "firstName": { + "message": { "type": "string", - "description": "The member's first name", - "example": "Ariel" - }, - "lastName": { + "description": "Description of the error", + "example": "Invalid request body" + } + } + }, + "IterationInput": { + "type": "object", + "required": [ + "hypothesis", + "metrics", + "treatments", + "flags" + ], + "properties": { + "hypothesis": { "type": "string", - "description": "The member's last name", - "example": "Flores" + "description": "The expected outcome of this experiment", + "example": "Example hypothesis, the new button placement will increase conversion" }, - "role": { - "type": "string", - "description": "The member's base role. If the member has no additional roles, this role will be in effect.", - "example": "reader" + "canReshuffleTraffic": { + "type": "boolean", + "description": "Whether to allow the experiment to reassign traffic to different variations when you increase or decrease the traffic in your experiment audience (true) or keep all traffic assigned to its initial variation (false). Defaults to true.", + "example": true }, - "email": { - "type": "string", - "description": "The member's email address", - "example": "ariel@acme.com" + "metrics": { + "description": "Details on the metrics for this experiment", + "$ref": "#/components/schemas/MetricsInput" + }, + "primarySingleMetricKey": { + "type": "string", + "description": "The key of the primary metric for this experiment. Either primarySingleMetricKey or primaryFunnelKey must be present.", + "example": "metric-key-123abc" + }, + "primaryFunnelKey": { + "type": "string", + "description": "The key of the primary funnel group for this experiment. Either primarySingleMetricKey or primaryFunnelKey must be present.", + "example": "metric-group-key-123abc" + }, + "treatments": { + "description": "Details on the variations you are testing in the experiment. You establish these variations in feature flags, and then reuse them in experiments.", + "$ref": "#/components/schemas/TreatmentsInput" + }, + "flags": { + "description": "Details on the feature flag and targeting rules for this iteration", + "example": "{\"example-flag-key\": { \"ruleId\": \"e432f62b-55f6-49dd-a02f-eb24acf39d05\", \"flagConfigVersion\": 12, \"notInExperimentVariationId\": \"e432f62b-55f6-49dd-a02f-eb24acf39d05\" }}", + "$ref": "#/components/schemas/FlagsInput" + }, + "randomizationUnit": { + "type": "string", + "description": "The unit of randomization for this iteration. Defaults to user.", + "example": "user" + }, + "attributes": { + "type": "array", + "description": "The attributes that this iteration's results can be sliced by", + "items": { + "type": "string" + }, + "example": [ + "country", + "device", + "os" + ] + } + } + }, + "IterationRep": { + "type": "object", + "required": [ + "hypothesis", + "status", + "createdAt" + ], + "properties": { + "_id": { + "type": "string", + "description": "The iteration ID", + "example": "12ab3c45de678910fgh12345" + }, + "hypothesis": { + "type": "string", + "description": "The expected outcome of this experiment", + "example": "The new button placement will increase conversion" + }, + "status": { + "type": "string", + "description": "The status of the iteration: not_started, running, stopped", + "example": "running" + }, + "createdAt": { + "description": "Timestamp of when the iteration was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "startedAt": { + "description": "Timestamp of when the iteration started", + "example": "1655314200000", + "$ref": "#/components/schemas/UnixMillis" + }, + "endedAt": { + "description": "Timestamp of when the iteration ended", + "example": "1656610200000", + "$ref": "#/components/schemas/UnixMillis" + }, + "winningTreatmentId": { + "type": "string", + "description": "The ID of the treatment chosen when the experiment stopped", + "example": "122c9f3e-da26-4321-ba68-e0fc02eced58" + }, + "winningReason": { + "type": "string", + "description": "The reason you stopped the experiment", + "example": "We ran this iteration for two weeks and the winning variation was clear" + }, + "canReshuffleTraffic": { + "type": "boolean", + "description": "Whether the experiment may reassign traffic to different variations when the experiment audience changes (true) or must keep all traffic assigned to its initial variation (false).", + "example": true + }, + "flags": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlagRep" + }, + "description": "Details on the flag used in this experiment" + }, + "reallocationFrequencyMillis": { + "type": "integer", + "description": "The cadence (in milliseconds) to update the allocation. Only present for multi-armed bandits.", + "example": 3600000 + }, + "version": { + "type": "integer", + "description": "The current version that the iteration is on", + "example": 0 + }, + "primaryMetric": { + "description": "Deprecated, use primarySingleMetric and primaryFunnel instead. Details on the primary metric for this experiment.", + "deprecated": true, + "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep" + }, + "primarySingleMetric": { + "description": "Details on the primary metric for this experiment", + "$ref": "#/components/schemas/MetricV2Rep" + }, + "primaryFunnel": { + "description": "Details on the primary funnel group for this experiment", + "$ref": "#/components/schemas/DependentMetricGroupRepWithMetrics" + }, + "randomizationUnit": { + "type": "string", + "description": "The unit of randomization for this iteration", + "example": "user" + }, + "attributes": { + "type": "array", + "description": "The available attribute filters for this iteration", + "items": { + "type": "string" + } + }, + "treatments": { + "type": "array", + "description": "Details on the variations you are testing in the experiment", + "items": { + "$ref": "#/components/schemas/TreatmentRep" + } + }, + "secondaryMetrics": { + "type": "array", + "description": "Deprecated, use metrics instead. Details on the secondary metrics for this experiment.", + "items": { + "$ref": "#/components/schemas/MetricV2Rep" + }, + "deprecated": true + }, + "metrics": { + "type": "array", + "description": "Details on the metrics for this experiment", + "items": { + "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep" + } + }, + "layerSnapshot": { + "description": "Snapshot of the layer state on iteration stop, if part of a layer. Otherwise omitted.", + "$ref": "#/components/schemas/LayerSnapshotRep" + } + } + }, + "JSONPatch": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PatchOperation" + } + }, + "LastSeenMetadata": { + "type": "object", + "properties": { + "tokenId": { + "type": "string", + "description": "The ID of the token used in the member's last session", + "example": "5b52207f8ca8e631d31fdb2b" + } + } + }, + "LayerCollectionRep": { + "type": "object", + "required": [ + "items", + "totalCount", + "_links" + ], + "properties": { + "items": { + "type": "array", + "description": "The layers in the project", + "items": { + "$ref": "#/components/schemas/LayerRep" + } + }, + "totalCount": { + "type": "integer", + "description": "The total number of layers in the project" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/my-project/layers", + "type": "application/json" + } + } + } + } + }, + "LayerConfigurationRep": { + "type": "object", + "required": [ + "reservations" + ], + "properties": { + "reservations": { + "type": "array", + "description": "The experiment reservations for the layer", + "items": { + "$ref": "#/components/schemas/LayerReservationRep" + } + } + } + }, + "LayerPatchInput": { + "type": "object", + "required": [ + "instructions" + ], + "properties": { + "comment": { + "type": "string", + "description": "Optional comment describing the update", + "example": "Optional comment" + }, + "environmentKey": { + "type": "string", + "description": "The environment key used for making environment specific updates. For example, updating the reservation of an experiment", + "example": "production" + }, + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", + "example": "[{\"kind\": \"updateName\", \"name\": \"Updated layer name\"}]", + "$ref": "#/components/schemas/Instructions" + } + } + }, + "LayerPost": { + "type": "object", + "required": [ + "key", + "name", + "description" + ], + "properties": { + "key": { + "type": "string", + "description": "Unique identifier for the layer", + "example": "checkout-flow" + }, + "name": { + "type": "string", + "description": "Layer name", + "example": "Checkout Flow" + }, + "description": { + "type": "string", + "description": "The checkout flow for the application" + } + } + }, + "LayerRep": { + "type": "object", + "required": [ + "key", + "name", + "description", + "createdAt" + ], + "properties": { + "key": { + "type": "string", + "description": "The key of the layer", + "example": "checkout-flow" + }, + "name": { + "type": "string", + "description": "The name of the layer", + "example": "Checkout Flow" + }, + "description": { + "type": "string", + "description": "The description of the layer", + "example": "The checkout flow for the application" + }, + "createdAt": { + "description": "The date and time when the layer was created", + "$ref": "#/components/schemas/UnixMillis" + }, + "randomizationUnit": { + "type": "string", + "description": "The unit of randomization for the layer", + "example": "user" + }, + "environments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LayerConfigurationRep" + }, + "description": "The layer configurations for each requested environment" + } + } + }, + "LayerReservationRep": { + "type": "object", + "required": [ + "experimentKey", + "flagKey", + "reservationPercent" + ], + "properties": { + "experimentKey": { + "type": "string", + "description": "The key of the experiment", + "example": "checkout-flow-experiment" + }, + "flagKey": { + "type": "string", + "description": "The key of the flag", + "example": "checkout-flow-flag" + }, + "reservationPercent": { + "type": "integer", + "description": "The percentage of traffic reserved for the experiment", + "example": 20 + } + } + }, + "LayerSnapshotRep": { + "type": "object", + "required": [ + "key", + "name", + "reservationPercent", + "otherReservationPercent" + ], + "properties": { + "key": { + "type": "string", + "description": "Key of the layer the experiment was part of", + "example": "checkout-flow" + }, + "name": { + "type": "string", + "description": "Layer name at the time this experiment iteration was stopped", + "example": "Checkout Flow" + }, + "reservationPercent": { + "type": "integer", + "description": "Percent of layer traffic that was reserved in the layer for this experiment iteration", + "example": 10 + }, + "otherReservationPercent": { + "type": "integer", + "description": "Percent of layer traffic that was reserved for other experiments in the same environment, when this experiment iteration was stopped", + "example": 70 + } + } + }, + "LegacyExperimentRep": { + "type": "object", + "properties": { + "metricKey": { + "type": "string", + "example": "my-metric" + }, + "_metric": { + "$ref": "#/components/schemas/MetricListingRep" + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "production", + "test", + "my-environment" + ] + }, + "_environmentSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ExperimentEnvironmentSettingRep" + } + } + } + }, + "Link": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "MaintainerRep": { + "type": "object", + "properties": { + "member": { + "description": "Details on the member who maintains this resource", + "$ref": "#/components/schemas/MemberSummary" + }, + "team": { + "description": "Details on the team that maintains this resource", + "$ref": "#/components/schemas/MemberTeamSummaryRep" + } + } + }, + "MaintainerTeam": { + "type": "object", + "required": [ + "key", + "name" + ], + "properties": { + "key": { + "type": "string", + "description": "The key of the maintainer team", + "example": "team-key-123abc" + }, + "name": { + "type": "string", + "description": "A human-friendly name for the maintainer team", + "example": "Example team" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/teams", + "type": "application/json" + }, + "roles": { + "href": "/api/v2/teams/example-team/roles", + "type": "application/json" + }, + "self": { + "href": "/api/v2/teams/example-team", + "type": "application/json" + } + } + } + } + }, + "Member": { + "type": "object", + "required": [ + "_links", + "_id", + "role", + "email", + "_pendingInvite", + "_verified", + "customRoles", + "mfa", + "_lastSeen", + "creationDate" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_id": { + "type": "string", + "description": "The member's ID", + "example": "507f1f77bcf86cd799439011" + }, + "firstName": { + "type": "string", + "description": "The member's first name", + "example": "Ariel" + }, + "lastName": { + "type": "string", + "description": "The member's last name", + "example": "Flores" + }, + "role": { + "type": "string", + "description": "The member's base role. If the member has no additional roles, this role will be in effect.", + "example": "reader" + }, + "email": { + "type": "string", + "description": "The member's email address", + "example": "ariel@acme.com" }, "_pendingInvite": { "type": "boolean", @@ -41386,7 +43932,7 @@ } } }, - "MetricDataSourceRef": { + "MetricDataSourceRefRep": { "type": "object", "properties": { "key": { @@ -41394,11 +43940,17 @@ }, "environmentKey": { "type": "string" - } - } - }, - "MetricEventDefaultRep": { - "type": "object", + }, + "_name": { + "type": "string" + }, + "_integrationKey": { + "type": "string" + } + } + }, + "MetricEventDefaultRep": { + "type": "object", "properties": { "disabled": { "type": "boolean", @@ -41619,29 +44171,6 @@ } } }, - "MetricGroupResultsRep": { - "type": "object", - "required": [ - "_links", - "metrics" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "metrics": { - "type": "array", - "description": "An ordered list of the metrics in this metric group, and each of their results", - "items": { - "$ref": "#/components/schemas/MetricInGroupResultsRep" - } - } - } - }, "MetricInGroupRep": { "type": "object", "required": [ @@ -41690,6 +44219,11 @@ "average" ] }, + "eventKey": { + "type": "string", + "description": "The event key sent with the metric. Only relevant for custom metrics.", + "example": "event-key-123abc" + }, "_links": { "type": "object", "additionalProperties": { @@ -41720,23 +44254,6 @@ } } }, - "MetricInGroupResultsRep": { - "type": "object", - "required": [ - "metric", - "results" - ], - "properties": { - "metric": { - "description": "Metric metadata", - "$ref": "#/components/schemas/MetricInGroupRep" - }, - "results": { - "description": "The results of this metric", - "$ref": "#/components/schemas/ExperimentBayesianResultsRep" - } - } - }, "MetricInMetricGroupInput": { "type": "object", "required": [ @@ -41803,6 +44320,16 @@ "description": "The number of metric groups using this metric", "example": 0 }, + "activeExperimentCount": { + "type": "integer", + "description": "The number of active experiments using this metric", + "example": 2 + }, + "activeGuardedRolloutCount": { + "type": "integer", + "description": "The number of active guarded rollouts using this metric", + "example": 1 + }, "_id": { "type": "string", "description": "The ID of this metric", @@ -41813,6 +44340,11 @@ "description": "The version ID of the metric", "example": "version-id-123abc" }, + "_version": { + "type": "integer", + "description": "Version of the metric", + "example": 1 + }, "key": { "type": "string", "description": "A unique key to reference the metric", @@ -41963,7 +44495,16 @@ "$ref": "#/components/schemas/MetricEventDefaultRep" }, "dataSource": { - "$ref": "#/components/schemas/MetricDataSourceRef" + "$ref": "#/components/schemas/MetricDataSourceRefRep" + }, + "archived": { + "type": "boolean", + "description": "Whether the metric version is archived" + }, + "archivedAt": { + "description": "Timestamp when the metric version was archived", + "example": "1609459200000", + "$ref": "#/components/schemas/UnixMillis" }, "selector": { "type": "string", @@ -42093,7 +44634,11 @@ "$ref": "#/components/schemas/MetricEventDefaultRep" }, "dataSource": { - "$ref": "#/components/schemas/MetricDataSourceRef" + "$ref": "#/components/schemas/MetricDataSourceRefRep" + }, + "filters": { + "description": "Filters for the metric to exclude certain events from being included. This is only supported for custom metrics.", + "$ref": "#/components/schemas/EventFilter" } } }, @@ -42120,6 +44665,16 @@ "description": "The number of metric groups using this metric", "example": 0 }, + "activeExperimentCount": { + "type": "integer", + "description": "The number of active experiments using this metric", + "example": 2 + }, + "activeGuardedRolloutCount": { + "type": "integer", + "description": "The number of active guarded rollouts using this metric", + "example": 1 + }, "_id": { "type": "string", "description": "The ID of this metric", @@ -42130,6 +44685,11 @@ "description": "The version ID of the metric", "example": "version-id-123abc" }, + "_version": { + "type": "integer", + "description": "Version of the metric", + "example": 1 + }, "key": { "type": "string", "description": "A unique key to reference the metric", @@ -42280,7 +44840,16 @@ "$ref": "#/components/schemas/MetricEventDefaultRep" }, "dataSource": { - "$ref": "#/components/schemas/MetricDataSourceRef" + "$ref": "#/components/schemas/MetricDataSourceRefRep" + }, + "archived": { + "type": "boolean", + "description": "Whether the metric version is archived" + }, + "archivedAt": { + "description": "Timestamp when the metric version was archived", + "example": "1609459200000", + "$ref": "#/components/schemas/UnixMillis" }, "selector": { "type": "string", @@ -42302,6 +44871,14 @@ "$ref": "#/components/schemas/DependentMetricGroupRep" } }, + "lastUsedInExperiment": { + "description": "The most recent experiment that used this metric", + "$ref": "#/components/schemas/DependentExperimentRep" + }, + "lastUsedInGuardedRollout": { + "description": "The most recent guarded rollout that used this metric", + "$ref": "#/components/schemas/DependentMeasuredRolloutRep" + }, "isActive": { "type": "boolean", "description": "Whether the metric is active", @@ -42313,27 +44890,6 @@ "items": { "$ref": "#/components/schemas/FlagListingRep" } - }, - "_version": { - "type": "integer", - "description": "Version of the metric", - "example": 1 - } - } - }, - "MetricSeen": { - "type": "object", - "properties": { - "ever": { - "type": "boolean", - "description": "Whether the metric has received an event for this iteration", - "example": true - }, - "timestamp": { - "type": "integer", - "format": "int64", - "description": "Timestamp of when the metric most recently received an event for this iteration", - "example": 1657129307 } } }, @@ -42385,6 +44941,11 @@ "average" ] }, + "eventKey": { + "type": "string", + "description": "The event key sent with the metric. Only relevant for custom metrics.", + "example": "event-key-123abc" + }, "_links": { "type": "object", "additionalProperties": { @@ -42832,7 +45393,7 @@ "$ref": "#/components/schemas/UnixMillis" }, "instructions": { - "description": "The actions to perform on the execution date for these scheduled changes. This should be an array with a single object that looks like {\"kind\": \"scheduled_action\"}. Supported scheduled actions are turnFlagOn and turnFlagOff.", + "description": "The actions to perform on the execution date for these scheduled changes. This should be an array with a single object that looks like {\"kind\": \"scheduled_action\"}. Supported scheduled actions include any semantic patch instructions available when updating a feature flag.", "example": "[ { \"kind\": \"turnFlagOn\" }]", "$ref": "#/components/schemas/Instructions" } @@ -42973,7 +45534,7 @@ } }, "namingConvention": { - "description": "The flag key convention for this project", + "description": "The flag key convention for this project. Omit this field if you don't want to enforce any conventions for flag keys.", "$ref": "#/components/schemas/NamingConvention" } } @@ -43185,8 +45746,7 @@ "RandomizationUnitInput": { "type": "object", "required": [ - "randomizationUnit", - "standardRandomizationUnit" + "randomizationUnit" ], "properties": { "randomizationUnit": { @@ -43201,15 +45761,8 @@ }, "standardRandomizationUnit": { "type": "string", - "description": "One of LaunchDarkly's fixed set of standard randomization units.", - "enum": [ - "guest", - "guestTime", - "organization", - "request", - "user", - "userTime" - ] + "description": "(deprecated) This field is deprecated and will be removed. Use randomizationUnit instead.", + "example": "user" } } }, @@ -43221,11 +45774,6 @@ "description": "The unit of randomization. Defaults to user.", "example": "user" }, - "standardRandomizationUnit": { - "type": "string", - "description": "One of LaunchDarkly's fixed set of standard randomization units.", - "example": "user" - }, "default": { "type": "boolean", "description": "Whether this randomization unit is the default for experiments", @@ -43314,36 +45862,6 @@ } } }, - "RelativeDifferenceRep": { - "type": "object", - "properties": { - "upper": { - "type": "number", - "description": "An upper bound of the relative difference between the treatment and the fromTreatmentId", - "example": 0.42655970355712425 - }, - "lower": { - "type": "number", - "description": "A lower bound of the relative difference between the treatment and the fromTreatmentId", - "example": -0.13708601934659803 - }, - "fromTreatmentId": { - "type": "string", - "description": "The treatment ID of the treatment against which the relative difference is calculated", - "example": "92b8354e-360e-4d67-8f13-fa6a46ca8077" - }, - "variance": { - "type": "number", - "description": "Variance of the relative difference", - "example": 4.23 - }, - "varianceReduction": { - "type": "number", - "description": "The reduction in variance resulting from CUPED", - "example": 0.1 - } - } - }, "RelayAutoConfigCollectionRep": { "type": "object", "required": [ @@ -44444,48 +46962,43 @@ } } }, - "Series": { + "SeriesListRep": { "type": "object", "required": [ - "time", - "value" + "_links", + "metadata", + "series" ], "properties": { - "time": { - "type": "integer", - "format": "int64", - "description": "The timestamp", - "example": 1676332800000 + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" }, - "value": { - "type": "number", - "description": "The value for the given timestamp", - "example": 92 - } - } - }, - "SeriesIntervalsRep": { - "type": "object", - "required": [ - "series", - "_links" - ], - "properties": { - "series": { + "metadata": { "type": "array", - "description": "An array of timestamps and values for a given meter", + "description": "Metadata about each series", "items": { - "$ref": "#/components/schemas/Series" + "$ref": "#/components/schemas/SeriesMetadataRep" } }, - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" + "series": { + "type": "array", + "description": "An array of data points with timestamps. Each element of the array is an object with a 'time' field, whose value is the timestamp, and one or more key fields. If there are multiple key fields, they are labeled '0', '1', and so on, and are explained in the metadata.", + "items": { + "$ref": "#/components/schemas/SeriesTimeSliceRep" + }, + "example": [ + { + "0": 11, + "1": 15, + "time": 1677888000000 + } + ] } } }, - "SeriesListRep": { + "SeriesListRepFloat": { "type": "object", "required": [ "_links", @@ -44509,7 +47022,7 @@ "type": "array", "description": "An array of data points with timestamps. Each element of the array is an object with a 'time' field, whose value is the timestamp, and one or more key fields. If there are multiple key fields, they are labeled '0', '1', and so on, and are explained in the metadata.", "items": { - "$ref": "#/components/schemas/SeriesTimeSliceRep" + "$ref": "#/components/schemas/SeriesTimeSliceRepFloat" }, "example": [ { @@ -44531,6 +47044,12 @@ "type": "integer" } }, + "SeriesTimeSliceRepFloat": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, "SimpleHoldoutRep": { "type": "object", "properties": { @@ -44560,28 +47079,6 @@ } } }, - "SlicedResultsRep": { - "type": "object", - "properties": { - "attribute": { - "type": "string", - "description": "An attribute that results are sliced by", - "example": "country" - }, - "attributeValue": { - "type": "string", - "description": "Attribute Value for 'attribute'", - "example": "Canada" - }, - "treatmentResults": { - "type": "array", - "description": "A list of the results for each treatment", - "items": { - "$ref": "#/components/schemas/TreatmentResultRep" - } - } - } - }, "SourceEnv": { "type": "object", "properties": { @@ -45586,115 +48083,6 @@ } } }, - "TreatmentResultRep": { - "type": "object", - "properties": { - "treatmentId": { - "type": "string", - "description": "The ID of the treatment", - "example": "92b8354e-360e-4d67-8f13-fa6a46ca8077" - }, - "treatmentName": { - "type": "string", - "description": "The name of the treatment", - "example": "variation 25% off" - }, - "mean": { - "type": "number", - "description": "The average value of the variation in this sample. It doesn't capture the uncertainty in the measurement, so it should not be the only measurement you use to make decisions.", - "example": 0.5432525951557093 - }, - "dataMean": { - "type": "number", - "description": "The mean of the data, with no priors effecting the result.", - "example": 2.464845 - }, - "dataStdDev": { - "type": "number", - "description": "The standard deviation of the data, with no priors effecting the result.", - "example": 1e-7 - }, - "credibleInterval": { - "description": "The range of the metric's values that you should have 90% confidence in.", - "example": "{\"lower\": 0.4060771673663068, \"upper\": 0.6713222134386467}", - "$ref": "#/components/schemas/CredibleIntervalRep" - }, - "pBest": { - "type": "number", - "description": "The likelihood that this variation has the biggest effect on the primary metric. The variation with the highest probability is likely the best of the variations you're testing", - "example": 0.6083 - }, - "relativeDifferences": { - "type": "array", - "description": "Estimates of the relative difference between this treatment's mean and the mean of each other treatment", - "items": { - "$ref": "#/components/schemas/RelativeDifferenceRep" - }, - "example": [ - { - "fromTreatmentId": "92b8354e-360e-4d67-8f13-fa6a46ca8077", - "lower": -0.13708601934659803, - "upper": 0.42655970355712425 - } - ] - }, - "units": { - "type": "integer", - "format": "int64", - "description": "The number of units exposed to this treatment that have event values, including those that are configured to default to 0", - "example": 76 - }, - "traffic": { - "type": "integer", - "format": "int64", - "description": "The number of units exposed to this treatment.", - "example": 332 - }, - "eventValuesSum": { - "type": "number", - "description": "The sum of the event values for the units exposed to this treatment.", - "example": 6234 - }, - "distribution": { - "description": "The posterior distribution of the mean of the metric in this variation.", - "$ref": "#/components/schemas/Distribution" - }, - "correlation": { - "type": "number", - "description": "The outcome-covariate correlation" - }, - "standardDeviationRatio": { - "type": "number", - "description": "The ratio of the outcome SD to covariate SD" - }, - "covariateImbalance": { - "type": "number", - "description": "The imbalance between the covariate mean for the arm and the covariate mean for the experiment" - }, - "varianceReduction": { - "type": "number", - "description": "The reduction in variance resulting from CUPED", - "example": 0.1 - }, - "model": { - "type": "string", - "description": "The model used to calculate the results. Parameters specific to this model will be defined under the field under the same name", - "example": "bayesianNormal", - "enum": [ - "bayesianNormal", - "bayesianBeta" - ] - }, - "bayesianNormal": { - "description": "The statistical parameters relevant to the Bayesian Normal model", - "$ref": "#/components/schemas/BayesianNormalStatsRep" - }, - "bayesianBeta": { - "description": "The statistical parameters relevant to the Bayesian Beta-Binomial model", - "$ref": "#/components/schemas/BayesianBetaBinomialStatsRep" - } - } - }, "TreatmentsInput": { "type": "array", "items": { @@ -47990,11 +50378,11 @@ "type": "type" } }, - "totalCount": 9, + "totalCount": 2, "items": [ { "mode": "completion", - "createdAt": 2, + "createdAt": 9, "_maintainer": { "kind": "kind" }, @@ -48100,6 +50488,18 @@ }, "variations": [ { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48110,7 +50510,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48132,6 +50546,18 @@ "key": "key" }, { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48142,7 +50568,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48172,11 +50612,11 @@ "tags", "tags" ], - "updatedAt": 7 + "updatedAt": 3 }, { "mode": "completion", - "createdAt": 2, + "createdAt": 9, "_maintainer": { "kind": "kind" }, @@ -48282,6 +50722,18 @@ }, "variations": [ { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48292,7 +50744,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48314,6 +50780,18 @@ "key": "key" }, { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48324,7 +50802,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48354,7 +50846,7 @@ "tags", "tags" ], - "updatedAt": 7 + "updatedAt": 3 } ] }, @@ -48381,7 +50873,7 @@ "AIConfig": { "example": { "mode": "completion", - "createdAt": 2, + "createdAt": 9, "_maintainer": { "kind": "kind" }, @@ -48487,6 +50979,18 @@ }, "variations": [ { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48497,7 +51001,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48519,6 +51037,18 @@ "key": "key" }, { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48529,7 +51059,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48559,7 +51103,7 @@ "tags", "tags" ], - "updatedAt": 7 + "updatedAt": 3 }, "properties": { "_access": { @@ -48581,7 +51125,8 @@ "default": "completion", "enum": [ "agent", - "completion" + "completion", + "judge" ], "type": "string" }, @@ -48655,7 +51200,8 @@ "default": "completion", "enum": [ "agent", - "completion" + "completion", + "judge" ], "type": "string" }, @@ -48710,6 +51256,18 @@ }, "AIConfigVariation": { "example": { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48720,7 +51278,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48797,6 +51369,21 @@ "_publishedAt": { "format": "int64", "type": "integer" + }, + "tools": { + "items": { + "$ref": "#/components/schemas/VariationTool" + }, + "type": "array" + }, + "judgeConfiguration": { + "$ref": "#/components/schemas/JudgeConfiguration" + }, + "judgingConfigKeys": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ @@ -48814,6 +51401,18 @@ "totalCount": 0, "items": [ { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48824,7 +51423,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48846,6 +51459,18 @@ "key": "key" }, { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", "color": "color", "_links": { @@ -48856,7 +51481,21 @@ }, "description": "description", "modelConfigKey": "modelConfigKey", + "judgingConfigKeys": [ + "judgingConfigKeys", + "judgingConfigKeys" + ], "version": 1, + "tools": [ + { + "version": 2, + "key": "key" + }, + { + "version": 2, + "key": "key" + } + ], "createdAt": 6, "_publishedAt": 5, "_archivedAt": 5, @@ -48898,7 +51537,23 @@ }, "AIConfigVariationPost": { "example": { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", + "toolKeys": [ + "toolKeys", + "toolKeys" + ], "name": "name", "description": "description", "messages": [ @@ -48914,6 +51569,16 @@ "comment": "comment", "model": "{}", "modelConfigKey": "modelConfigKey", + "tools": [ + { + "version": 0, + "key": "key" + }, + { + "version": 0, + "key": "key" + } + ], "key": "key" }, "properties": { @@ -48946,6 +51611,23 @@ }, "modelConfigKey": { "type": "string" + }, + "tools": { + "description": "List of tools to use for this variation. The latest version of the tool will be used.", + "items": { + "$ref": "#/components/schemas/VariationToolPost" + }, + "type": "array" + }, + "toolKeys": { + "description": "List of tool keys to use for this variation. The latest version of the tool will be used.", + "items": { + "type": "string" + }, + "type": "array" + }, + "judgeConfiguration": { + "$ref": "#/components/schemas/JudgeConfiguration" } }, "required": [ @@ -48957,7 +51639,23 @@ }, "AIConfigVariationPatch": { "example": { + "judgeConfiguration": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, "instructions": "instructions", + "toolKeys": [ + "toolKeys", + "toolKeys" + ], "name": "name", "description": "description", "messages": [ @@ -48974,7 +51672,17 @@ "model": "{}", "published": true, "state": "state", - "modelConfigKey": "modelConfigKey" + "modelConfigKey": "modelConfigKey", + "tools": [ + { + "version": 0, + "key": "key" + }, + { + "version": 0, + "key": "key" + } + ] }, "properties": { "comment": { @@ -49010,8 +51718,73 @@ "state": { "description": "One of 'archived', 'published'", "type": "string" + }, + "tools": { + "description": "List of tools to use for this variation. The latest version of the tool will be used.", + "items": { + "$ref": "#/components/schemas/VariationToolPost" + }, + "type": "array" + }, + "toolKeys": { + "description": "List of tool keys to use for this variation. The latest version of the tool will be used.", + "items": { + "type": "string" + }, + "type": "array" + }, + "judgeConfiguration": { + "$ref": "#/components/schemas/JudgeConfiguration" + } + }, + "type": "object" + }, + "JudgeConfiguration": { + "example": { + "judges": [ + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + } + ] + }, + "properties": { + "judges": { + "description": "List of judges for this variation. When updating, this replaces all existing judge attachments, and if empty, removes all judge attachments.\n", + "items": { + "$ref": "#/components/schemas/JudgeAttachment" + }, + "type": "array" + } + }, + "type": "object" + }, + "JudgeAttachment": { + "example": { + "samplingRate": 0.7061401, + "judgeConfigKey": "judgeConfigKey" + }, + "properties": { + "judgeConfigKey": { + "description": "Key of the judge AI config", + "type": "string" + }, + "samplingRate": { + "description": "Sampling rate for this judge attachment (0.0 to 1.0)", + "format": "float", + "maximum": 1, + "minimum": 0, + "type": "number" } }, + "required": [ + "judgeConfigKey", + "samplingRate" + ], "type": "object" }, "Message": { @@ -49558,16 +52331,16 @@ ], "_environmentSettings": { "key": { - "startDate": 1, - "stopDate": 6, + "startDate": 6, + "stopDate": 7, "enabledPeriods": [ { - "startDate": 7, - "stopDate": 1 + "startDate": 1, + "stopDate": 4 }, { - "startDate": 7, - "stopDate": 1 + "startDate": 1, + "stopDate": 4 } ] } @@ -49597,10 +52370,13 @@ } }, "description": "description", + "activeExperimentCount": 2, + "activeGuardedRolloutCount": 1, "randomizationUnits": [ "user" ], "guardedRolloutCount": 0, + "archived": true, "urls": [ null, null @@ -49700,6 +52476,7 @@ "type": "type" }, "selector": "selector", + "_version": 1, "key": "metric-key-123abc", "percentileValue": 95, "kind": "custom", @@ -49721,6 +52498,7 @@ "disabled": true, "value": 0 }, + "archivedAt": 1, "maintainerId": "569fdeadbeef1644facecafe", "unit": "unit", "successCriteria": "HigherThanBaseline", @@ -49737,6 +52515,8 @@ "category": "Error monitoring", "analysisType": "mean", "dataSource": { + "_name": "_name", + "_integrationKey": "_integrationKey", "key": "key", "environmentKey": "environmentKey" } @@ -49751,16 +52531,16 @@ ], "_environmentSettings": { "key": { - "startDate": 1, - "stopDate": 6, + "startDate": 6, + "stopDate": 7, "enabledPeriods": [ { - "startDate": 7, - "stopDate": 1 + "startDate": 1, + "stopDate": 4 }, { - "startDate": 7, - "stopDate": 1 + "startDate": 1, + "stopDate": 4 } ] } @@ -49790,10 +52570,13 @@ } }, "description": "description", + "activeExperimentCount": 2, + "activeGuardedRolloutCount": 1, "randomizationUnits": [ "user" ], "guardedRolloutCount": 0, + "archived": true, "urls": [ null, null @@ -49893,6 +52676,7 @@ "type": "type" }, "selector": "selector", + "_version": 1, "key": "metric-key-123abc", "percentileValue": 95, "kind": "custom", @@ -49914,6 +52698,7 @@ "disabled": true, "value": 0 }, + "archivedAt": 1, "maintainerId": "569fdeadbeef1644facecafe", "unit": "unit", "successCriteria": "HigherThanBaseline", @@ -49930,6 +52715,8 @@ "category": "Error monitoring", "analysisType": "mean", "dataSource": { + "_name": "_name", + "_integrationKey": "_integrationKey", "key": "key", "environmentKey": "environmentKey" } @@ -49938,7 +52725,7 @@ ] }, "name": "name", - "_version": 4, + "_version": 5, "key": "key", "tags": [ "tags", @@ -50711,7 +53498,110 @@ "AITool": { "example": { "schema": "{}", - "name": "name", + "createdAt": 6, + "_maintainer": { + "kind": "kind" + }, + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, "description": "description", "version": 0, "key": "key" @@ -50720,8 +53610,14 @@ "key": { "type": "string" }, - "name": { - "type": "string" + "_access": { + "$ref": "#/components/schemas/AiConfigsAccess" + }, + "_links": { + "$ref": "#/components/schemas/ParentAndSelfLinks" + }, + "_maintainer": { + "$ref": "#/components/schemas/AIConfig__maintainer" }, "description": { "type": "string" @@ -50731,100 +53627,421 @@ }, "version": { "type": "integer" + }, + "createdAt": { + "format": "int64", + "type": "integer" } }, "required": [ + "createdAt", "key", - "name", "schema", "version" ], "type": "object" }, - "AIToolPost": { - "example": { - "schema": "{}", - "name": "name", - "description": "description", - "key": "key" - }, - "properties": { - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "schema": { - "type": "object" - } - }, - "required": [ - "key", - "name", - "schema" - ], - "type": "object" - }, - "AIToolPatch": { + "AITools": { "example": { - "schema": "{}", - "name": "name", - "description": "description" - }, - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" + "_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" + } }, - "schema": { - "type": "object" - } - }, - "type": "object" - }, - "AccessRep": { - "$ref": "#/components/schemas/AiConfigsAccess" - }, - "AiConfigsAccess": { - "example": { - "allowed": [ + "totalCount": 1, + "items": [ { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" + "schema": "{}", + "createdAt": 6, + "_maintainer": { + "kind": "kind" + }, + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } ], - "actions": [ - "*" + "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" + } ] }, - "action": "action" + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "version": 0, + "key": "key" }, { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" + "schema": "{}", + "createdAt": 6, + "_maintainer": { + "kind": "kind" + }, + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "version": 0, + "key": "key" + } + ] + }, + "properties": { + "_links": { + "$ref": "#/components/schemas/PaginatedLinks" + }, + "items": { + "items": { + "$ref": "#/components/schemas/AITool" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "AIToolPost": { + "example": { + "schema": "{}", + "maintainerId": "maintainerId", + "maintainerTeamKey": "maintainerTeamKey", + "description": "description", + "key": "key" + }, + "properties": { + "key": { + "type": "string" + }, + "maintainerId": { + "type": "string" + }, + "maintainerTeamKey": { + "type": "string" + }, + "description": { + "type": "string" + }, + "schema": { + "type": "object" + } + }, + "required": [ + "key", + "schema" + ], + "type": "object" + }, + "AIToolPatch": { + "example": { + "schema": "{}", + "maintainerId": "maintainerId", + "maintainerTeamKey": "maintainerTeamKey", + "description": "description" + }, + "properties": { + "maintainerId": { + "type": "string" + }, + "maintainerTeamKey": { + "type": "string" + }, + "description": { + "type": "string" + }, + "schema": { + "type": "object" + } + }, + "type": "object" + }, + "VariationToolPost": { + "example": { + "version": 0, + "key": "key" + }, + "properties": { + "key": { + "description": "The key of the tool to use.", + "type": "string" + }, + "version": { + "description": "The version of the tool.", + "type": "integer" + } + }, + "required": [ + "key", + "version" + ], + "type": "object" + }, + "VariationTool": { + "example": { + "version": 2, + "key": "key" + }, + "properties": { + "key": { + "description": "The key of the tool to use.", + "type": "string" + }, + "version": { + "description": "The version of the tool.", + "type": "integer" + } + }, + "required": [ + "key", + "version" + ], + "type": "object" + }, + "AccessRep": { + "$ref": "#/components/schemas/AiConfigsAccess" + }, + "AiConfigsAccess": { + "example": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" ], "effect": "allow", "resources": [ @@ -51131,16 +54348,16 @@ ], "_environmentSettings": { "key": { - "startDate": 1, - "stopDate": 6, + "startDate": 6, + "stopDate": 7, "enabledPeriods": [ { - "startDate": 7, - "stopDate": 1 + "startDate": 1, + "stopDate": 4 }, { - "startDate": 7, - "stopDate": 1 + "startDate": 1, + "stopDate": 4 } ] } @@ -51170,10 +54387,13 @@ } }, "description": "description", + "activeExperimentCount": 2, + "activeGuardedRolloutCount": 1, "randomizationUnits": [ "user" ], "guardedRolloutCount": 0, + "archived": true, "urls": [ null, null @@ -51273,6 +54493,7 @@ "type": "type" }, "selector": "selector", + "_version": 1, "key": "metric-key-123abc", "percentileValue": 95, "kind": "custom", @@ -51294,6 +54515,7 @@ "disabled": true, "value": 0 }, + "archivedAt": 1, "maintainerId": "569fdeadbeef1644facecafe", "unit": "unit", "successCriteria": "HigherThanBaseline", @@ -51310,6 +54532,8 @@ "category": "Error monitoring", "analysisType": "mean", "dataSource": { + "_name": "_name", + "_integrationKey": "_integrationKey", "key": "key", "environmentKey": "environmentKey" } @@ -51324,16 +54548,16 @@ ], "_environmentSettings": { "key": { - "startDate": 1, - "stopDate": 6, + "startDate": 6, + "stopDate": 7, "enabledPeriods": [ { - "startDate": 7, - "stopDate": 1 + "startDate": 1, + "stopDate": 4 }, { - "startDate": 7, - "stopDate": 1 + "startDate": 1, + "stopDate": 4 } ] } @@ -51363,10 +54587,13 @@ } }, "description": "description", + "activeExperimentCount": 2, + "activeGuardedRolloutCount": 1, "randomizationUnits": [ "user" ], "guardedRolloutCount": 0, + "archived": true, "urls": [ null, null @@ -51466,6 +54693,7 @@ "type": "type" }, "selector": "selector", + "_version": 1, "key": "metric-key-123abc", "percentileValue": 95, "kind": "custom", @@ -51487,6 +54715,7 @@ "disabled": true, "value": 0 }, + "archivedAt": 1, "maintainerId": "569fdeadbeef1644facecafe", "unit": "unit", "successCriteria": "HigherThanBaseline", @@ -51503,6 +54732,8 @@ "category": "Error monitoring", "analysisType": "mean", "dataSource": { + "_name": "_name", + "_integrationKey": "_integrationKey", "key": "key", "environmentKey": "environmentKey" } @@ -51511,79 +54742,10145 @@ ] }, "properties": { - "baselineIdx": { - "type": "integer" + "baselineIdx": { + "type": "integer" + }, + "items": { + "items": { + "$ref": "#/components/schemas/AiConfigsLegacyExperimentRep" + }, + "type": "array" + } + }, + "required": [ + "baselineIdx", + "items" + ], + "type": "object" + }, + "AiConfigsLegacyExperimentRep": { + "example": { + "metricKey": "my-metric", + "environments": [ + "production", + "test", + "my-environment" + ], + "_environmentSettings": { + "key": { + "startDate": 6, + "stopDate": 7, + "enabledPeriods": [ + { + "startDate": 1, + "stopDate": 4 + }, + { + "startDate": 1, + "stopDate": 4 + } + ] + } + }, + "_metric": { + "_maintainer": { + "firstName": "Ariel", + "lastName": "Flores", + "role": "admin", + "_links": { + "self": { + "href": "/api/v2/members/569f183514f4432160000007", + "type": "application/json" + } + }, + "_id": "569f183514f4432160000007", + "email": "ariel@acme.com" + }, + "_links": { + "parent": { + "href": "/api/v2/metrics/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/metrics/my-project/my-metric", + "type": "application/json" + } + }, + "description": "description", + "activeExperimentCount": 2, + "activeGuardedRolloutCount": 1, + "randomizationUnits": [ + "user" + ], + "guardedRolloutCount": 0, + "archived": true, + "urls": [ + null, + null + ], + "_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" + } + ] + }, + "_site": { + "href": "href", + "type": "type" + }, + "selector": "selector", + "_version": 1, + "key": "metric-key-123abc", + "percentileValue": 95, + "kind": "custom", + "_attachedFlagCount": 0, + "metricGroupCount": 0, + "filters": { + "op": "op", + "negate": false, + "values": [ + "JP" + ], + "contextKind": "user", + "attribute": "country", + "type": "contextAttribute" + }, + "_creationDate": 1, + "tags": [], + "eventDefault": { + "disabled": true, + "value": 0 + }, + "archivedAt": 1, + "maintainerId": "569fdeadbeef1644facecafe", + "unit": "unit", + "successCriteria": "HigherThanBaseline", + "_versionId": "version-id-123abc", + "isNumeric": true, + "eventKey": "Order placed", + "experimentCount": 0, + "name": "My metric", + "_id": "5902deadbeef667524a01290", + "lastModified": { + "date": "2021-08-05T19:46:31.148Z" + }, + "unitAggregationType": "average", + "category": "Error monitoring", + "analysisType": "mean", + "dataSource": { + "_name": "_name", + "_integrationKey": "_integrationKey", + "key": "key", + "environmentKey": "environmentKey" + } + } + }, + "properties": { + "metricKey": { + "example": "my-metric", + "type": "string" + }, + "_metric": { + "$ref": "#/components/schemas/AiConfigsMetricListingRep" + }, + "environments": { + "example": [ + "production", + "test", + "my-environment" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "_environmentSettings": { + "additionalProperties": { + "$ref": "#/components/schemas/AiConfigsExperimentEnvironmentSettingRep" + }, + "type": "object" + } + }, + "type": "object" + }, + "AiConfigsMetricListingRep": { + "example": { + "_maintainer": { + "firstName": "Ariel", + "lastName": "Flores", + "role": "admin", + "_links": { + "self": { + "href": "/api/v2/members/569f183514f4432160000007", + "type": "application/json" + } + }, + "_id": "569f183514f4432160000007", + "email": "ariel@acme.com" + }, + "_links": { + "parent": { + "href": "/api/v2/metrics/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/metrics/my-project/my-metric", + "type": "application/json" + } + }, + "description": "description", + "activeExperimentCount": 2, + "activeGuardedRolloutCount": 1, + "randomizationUnits": [ + "user" + ], + "guardedRolloutCount": 0, + "archived": true, + "urls": [ + null, + null + ], + "_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" + } + ] + }, + "_site": { + "href": "href", + "type": "type" + }, + "selector": "selector", + "_version": 1, + "key": "metric-key-123abc", + "percentileValue": 95, + "kind": "custom", + "_attachedFlagCount": 0, + "metricGroupCount": 0, + "filters": { + "op": "op", + "negate": false, + "values": [ + "JP" + ], + "contextKind": "user", + "attribute": "country", + "type": "contextAttribute" + }, + "_creationDate": 1, + "tags": [], + "eventDefault": { + "disabled": true, + "value": 0 + }, + "archivedAt": 1, + "maintainerId": "569fdeadbeef1644facecafe", + "unit": "unit", + "successCriteria": "HigherThanBaseline", + "_versionId": "version-id-123abc", + "isNumeric": true, + "eventKey": "Order placed", + "experimentCount": 0, + "name": "My metric", + "_id": "5902deadbeef667524a01290", + "lastModified": { + "date": "2021-08-05T19:46:31.148Z" + }, + "unitAggregationType": "average", + "category": "Error monitoring", + "analysisType": "mean", + "dataSource": { + "_name": "_name", + "_integrationKey": "_integrationKey", + "key": "key", + "environmentKey": "environmentKey" + } + }, + "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" + }, + "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" + ], + "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/AiConfigsLink" + }, + "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/AiConfigsLink" + }, + "_access": { + "$ref": "#/components/schemas/AiConfigsAccess" + }, + "tags": { + "description": "Tags for the metric", + "example": [], + "items": { + "type": "string" + }, + "type": "array" + }, + "_creationDate": { + "format": "int64", + "type": "integer" + }, + "lastModified": { + "$ref": "#/components/schemas/AiConfigsModification" + }, + "maintainerId": { + "description": "The ID of the member who maintains this metric", + "example": "569fdeadbeef1644facecafe", + "type": "string" + }, + "_maintainer": { + "$ref": "#/components/schemas/AiConfigsMemberSummary" + }, + "description": { + "description": "Description of the metric", + "type": "string" + }, + "category": { + "description": "The category of the metric", + "example": "Error monitoring", + "type": "string" + }, + "isNumeric": { + "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "example": true, + "type": "boolean" + }, + "successCriteria": { + "description": "For custom metrics, the success criteria", + "enum": [ + "HigherThanBaseline", + "LowerThanBaseline" + ], + "type": "string" + }, + "unit": { + "description": "For numeric custom metrics, the unit of measure", + "type": "string" + }, + "eventKey": { + "description": "For custom metrics, the event key to use in your code", + "example": "Order placed", + "type": "string" + }, + "randomizationUnits": { + "description": "An array of randomization units allowed for this metric", + "example": [ + "user" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "filters": { + "$ref": "#/components/schemas/AiConfigsFilter" + }, + "unitAggregationType": { + "description": "The method by which multiple unit event values are aggregated", + "enum": [ + "average", + "sum" + ], + "example": "average", + "type": "string" + }, + "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/AiConfigsMetricEventDefaultRep" + }, + "dataSource": { + "$ref": "#/components/schemas/AiConfigsMetricDataSourceRefRep" + }, + "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/UrlMatcher" + }, + "type": "array" + } + }, + "required": [ + "_creationDate", + "_id", + "_links", + "_versionId", + "key", + "kind", + "name", + "tags" + ], + "type": "object" + }, + "AiConfigsLink": { + "example": { + "href": "href", + "type": "type" + }, + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "AiConfigsModification": { + "example": { + "date": "2021-08-05T19:46:31.148Z" + }, + "properties": { + "date": { + "example": "2021-08-05T19:46:31.148Z", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "AiConfigsMemberSummary": { + "example": { + "firstName": "Ariel", + "lastName": "Flores", + "role": "admin", + "_links": { + "self": { + "href": "/api/v2/members/569f183514f4432160000007", + "type": "application/json" + } + }, + "_id": "569f183514f4432160000007", + "email": "ariel@acme.com" + }, + "properties": { + "_links": { + "additionalProperties": { + "$ref": "#/components/schemas/AiConfigsLink" + }, + "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" + }, + "role": { + "description": "The member's base role. If the member has no additional roles, this role will be in effect.", + "example": "admin", + "type": "string" + }, + "email": { + "description": "The member's email address", + "example": "ariel@acme.com", + "type": "string" + } + }, + "required": [ + "_id", + "_links", + "email", + "role" + ], + "type": "object" + }, + "AiConfigsFilter": { + "example": { + "op": "op", + "negate": false, + "values": [ + "JP" + ], + "contextKind": "user", + "attribute": "country", + "type": "contextAttribute" + }, + "properties": { + "type": { + "description": "Filter type. One of [contextAttribute, eventProperty, group]", + "enum": [ + "group", + "contextAttribute", + "eventProperty" + ], + "example": "contextAttribute", + "type": "string" + }, + "attribute": { + "description": "If not a group node, the context attribute name or event property name to filter on", + "example": "country", + "type": "string" + }, + "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": [ + "negate", + "op", + "type", + "values" + ], + "type": "object" + }, + "AiConfigsMetricEventDefaultRep": { + "example": { + "disabled": true, + "value": 0 + }, + "properties": { + "disabled": { + "description": "Whether to disable defaulting missing unit events when calculating results. Defaults to false", + "type": "boolean" + }, + "value": { + "description": "The default value applied to missing unit events. Set to 0 when disabled is false. No other values are currently supported.", + "example": 0, + "type": "number" + } + }, + "type": "object" + }, + "AiConfigsMetricDataSourceRefRep": { + "example": { + "_name": "_name", + "_integrationKey": "_integrationKey", + "key": "key", + "environmentKey": "environmentKey" + }, + "properties": { + "key": { + "type": "string" + }, + "environmentKey": { + "type": "string" + }, + "_name": { + "type": "string" + }, + "_integrationKey": { + "type": "string" + } + }, + "type": "object" + }, + "AiConfigsExperimentEnvironmentSettingRep": { + "example": { + "startDate": 6, + "stopDate": 7, + "enabledPeriods": [ + { + "startDate": 1, + "stopDate": 4 + }, + { + "startDate": 1, + "stopDate": 4 + } + ] + }, + "properties": { + "startDate": { + "format": "int64", + "type": "integer" + }, + "stopDate": { + "format": "int64", + "type": "integer" + }, + "enabledPeriods": { + "items": { + "$ref": "#/components/schemas/AiConfigsExperimentEnabledPeriodRep" + }, + "type": "array" + } + }, + "type": "object" + }, + "AiConfigsExperimentEnabledPeriodRep": { + "example": { + "startDate": 1, + "stopDate": 4 + }, + "properties": { + "startDate": { + "format": "int64", + "type": "integer" + }, + "stopDate": { + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "AIConfig__maintainer": { + "example": { + "kind": "kind" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/MaintainerMember" + }, + { + "$ref": "#/components/schemas/AiConfigsMaintainerTeam" + } + ], + "properties": { + "kind": { + "type": "string" + } + }, + "required": [ + "kind" + ] + }, + "AIConfigTargetingVariation_value": { + "oneOf": [ + { + "$ref": "#/components/schemas/AIConfigTargetingVariationBoolean" + }, + { + "$ref": "#/components/schemas/AIConfigTargetingVariationJSON" + }, + { + "$ref": "#/components/schemas/AIConfigTargetingVariationNumber" + }, + { + "$ref": "#/components/schemas/AIConfigTargetingVariationString" + } + ] + }, + "AnnouncementResponse": { + "description": "Announcement response", + "example": { + "severity": "info", + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "startTime": 1731439812, + "_id": "1234567890", + "isDismissible": true, + "endTime": 1731439880, + "title": "System Maintenance Notice", + "message": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", + "_status": "active" + }, + "properties": { + "_id": { + "description": "The ID of the announcement", + "example": "1234567890", + "type": "string" + }, + "isDismissible": { + "description": "true if the announcement is dismissible", + "example": true, + "type": "boolean" + }, + "title": { + "description": "The title of the announcement", + "example": "System Maintenance Notice", + "type": "string" + }, + "message": { + "description": "The message of the announcement", + "example": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", + "type": "string" + }, + "startTime": { + "description": "The start time of the announcement. This is a Unix timestamp in milliseconds.", + "example": 1731439812, + "format": "int64", + "type": "integer" + }, + "endTime": { + "description": "The end time of the announcement. This is a Unix timestamp in milliseconds.", + "example": 1731439880, + "format": "int64", + "type": "integer" + }, + "severity": { + "description": "The severity of the announcement", + "enum": [ + "info", + "warning", + "critical" + ], + "type": "string", + "x-enumNames": [ + "Informational", + "Warning", + "Critical" + ] + }, + "_status": { + "description": "The status of the announcement", + "enum": [ + "active", + "inactive", + "scheduled" + ], + "type": "string", + "x-enumNames": [ + "Active", + "Inactive", + "Scheduled" + ] + }, + "_access": { + "$ref": "#/components/schemas/AnnouncementAccessRep" + }, + "_links": { + "$ref": "#/components/schemas/AnnouncementResponse__links" + } + }, + "required": [ + "_id", + "_links", + "_status", + "isDismissible", + "message", + "severity", + "startTime", + "title" + ], + "type": "object" + }, + "CreateAnnouncementBody": { + "description": "Create announcement request body", + "example": { + "severity": "warning", + "startTime": 1731439812, + "isDismissible": true, + "endTime": 1731439880, + "title": "System Maintenance Notice", + "message": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**." + }, + "properties": { + "isDismissible": { + "description": "true if the announcement is dismissible", + "example": true, + "type": "boolean" + }, + "title": { + "description": "The title of the announcement", + "example": "System Maintenance Notice", + "type": "string" + }, + "message": { + "description": "The message of the announcement", + "example": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", + "type": "string" + }, + "startTime": { + "description": "The start time of the announcement. This is a Unix timestamp in milliseconds.", + "example": 1731439812, + "format": "int64", + "type": "integer" + }, + "endTime": { + "description": "The end time of the announcement. This is a Unix timestamp in milliseconds.", + "example": 1731439880, + "format": "int64", + "type": "integer" + }, + "severity": { + "description": "The severity of the announcement", + "enum": [ + "info", + "warning", + "critical" + ], + "example": "warning", + "type": "string", + "x-enumNames": [ + "Informational", + "Warning", + "Critical" + ] + } + }, + "required": [ + "isDismissible", + "message", + "severity", + "startTime", + "title" + ], + "type": "object" + }, + "AnnouncementLink": { + "example": { + "href": "href", + "type": "type" + }, + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "AnnouncementPaginatedLinks": { + "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/AnnouncementLink" + }, + "last": { + "$ref": "#/components/schemas/AnnouncementLink" + }, + "next": { + "$ref": "#/components/schemas/AnnouncementLink" + }, + "prev": { + "$ref": "#/components/schemas/AnnouncementLink" + }, + "self": { + "$ref": "#/components/schemas/AnnouncementLink" + } + }, + "required": [ + "self" + ], + "type": "object" + }, + "AnnouncementJSONPatch": { + "items": { + "$ref": "#/components/schemas/AnnouncementPatchOperation" + }, + "type": "array" + }, + "AnnouncementPatchOperation": { + "example": { + "op": "replace", + "path": "/exampleField", + "value": "new example value" + }, + "properties": { + "op": { + "description": "The type of operation to perform", + "example": "replace", + "type": "string" + }, + "path": { + "description": "A JSON Pointer string specifying the part of the document to operate on", + "example": "/exampleField", + "type": "string" + }, + "value": { + "description": "A JSON value used in \"add\", \"replace\", and \"test\" operations", + "example": "new example value" + } + }, + "required": [ + "op", + "path" + ], + "type": "object" + }, + "AnnouncementAccessRep": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnouncementAccess" + } + ], + "example": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "x-go-type": "reps.AccessRep" + }, + "AnnouncementAccess": { + "properties": { + "denied": { + "items": { + "$ref": "#/components/schemas/AnnouncementAccessDenied" + }, + "type": "array" + }, + "allowed": { + "items": { + "$ref": "#/components/schemas/AnnouncementAccessAllowedRep" + }, + "type": "array" + } + }, + "required": [ + "allowed", + "denied" + ], + "type": "object" + }, + "AnnouncementAccessDenied": { + "example": { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + "properties": { + "action": { + "type": "string" + }, + "reason": { + "$ref": "#/components/schemas/AnnouncementAccessDeniedReason" + } + }, + "required": [ + "action", + "reason" + ], + "type": "object" + }, + "AnnouncementAccessDeniedReason": { + "example": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "properties": { + "resources": { + "description": "Resource specifier strings", + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "items": { + "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" + }, + "notActions": { + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "type": "array" + }, + "effect": { + "description": "Whether this statement should allow or deny actions on the resources.", + "enum": [ + "allow", + "deny" + ], + "example": "allow", + "type": "string" + }, + "role_name": { + "type": "string" + } + }, + "required": [ + "effect" + ], + "type": "object" + }, + "AnnouncementAccessAllowedRep": { + "example": { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + "properties": { + "action": { + "type": "string" + }, + "reason": { + "$ref": "#/components/schemas/AnnouncementAccessAllowedReason" + } + }, + "required": [ + "action", + "reason" + ], + "type": "object" + }, + "AnnouncementAccessAllowedReason": { + "example": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "properties": { + "resources": { + "description": "Resource specifier strings", + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "items": { + "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" + }, + "notActions": { + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "type": "array" + }, + "effect": { + "description": "Whether this statement should allow or deny actions on the resources.", + "enum": [ + "allow", + "deny" + ], + "example": "allow", + "type": "string" + }, + "role_name": { + "type": "string" + } + }, + "required": [ + "effect" + ], + "type": "object" + }, + "getAnnouncementsPublic_200_response": { + "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" + } + }, + "items": [ + { + "severity": "info", + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "startTime": 1731439812, + "_id": "1234567890", + "isDismissible": true, + "endTime": 1731439880, + "title": "System Maintenance Notice", + "message": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", + "_status": "active" + }, + { + "severity": "info", + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "startTime": 1731439812, + "_id": "1234567890", + "isDismissible": true, + "endTime": 1731439880, + "title": "System Maintenance Notice", + "message": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", + "_status": "active" + } + ] + }, + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/AnnouncementResponse" + }, + "type": "array" + }, + "_links": { + "$ref": "#/components/schemas/AnnouncementPaginatedLinks" + } + }, + "required": [ + "_links", + "items" + ], + "type": "object" + }, + "AnnouncementResponse__links": { + "example": { + "parent": { + "href": "href", + "type": "type" + } + }, + "properties": { + "parent": { + "$ref": "#/components/schemas/AnnouncementLink" + } + }, + "required": [ + "parent" + ], + "type": "object" + }, + "ApprovalRequestSetting": { + "description": "Configuration that controls how changes to a resource are gated by approvals.", + "properties": { + "required": { + "description": "If approvals are required for this environment", + "example": true, + "type": "boolean" + }, + "bypassApprovalsForPendingChanges": { + "description": "Whether to skip approvals for pending changes", + "example": false, + "type": "boolean" + }, + "minNumApprovals": { + "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.\n", + "example": 1, + "format": "int", + "type": "integer" + }, + "canReviewOwnRequest": { + "description": "Allow someone who makes an approval request to apply their own change", + "example": false, + "type": "boolean" + }, + "canApplyDeclinedChanges": { + "description": "Allow applying the change as long as at least one person has approved", + "example": true, + "type": "boolean" + }, + "autoApplyApprovedChanges": { + "description": "Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.\n", + "example": true, + "nullable": true, + "type": "boolean" + }, + "serviceKind": { + "description": "Which service to use for managing approvals", + "example": "launchdarkly", + "type": "string" + }, + "serviceConfig": { + "additionalProperties": true, + "description": "Arbitrary service-specific configuration", + "example": {}, + "type": "object" + }, + "requiredApprovalTags": { + "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval.\n", + "example": [ + "require-approval" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "serviceKindConfigurationId": { + "description": "Optional integration configuration ID of a custom approval integration. This is an Enterprise-only feature.\n", + "example": "1ef45a85-218f-4428-a8b2-a97e5f56c258", + "nullable": true, + "type": "string" + } + }, + "required": [ + "bypassApprovalsForPendingChanges", + "canApplyDeclinedChanges", + "canReviewOwnRequest", + "minNumApprovals", + "required", + "requiredApprovalTags", + "serviceConfig", + "serviceKind" + ], + "type": "object" + }, + "ApprovalRequestSettingWithEnvs": { + "allOf": [ + { + "properties": { + "environments": { + "additionalProperties": { + "$ref": "#/components/schemas/ApprovalRequestSetting" + }, + "description": "Environment-specific overrides.", + "type": "object" + }, + "_default": { + "$ref": "#/components/schemas/ApprovalRequestSetting" + }, + "_strict": { + "$ref": "#/components/schemas/ApprovalRequestSetting" + } + }, + "type": "object" + } + ] + }, + "ApprovalRequestSettings": { + "additionalProperties": { + "$ref": "#/components/schemas/ApprovalRequestSettingWithEnvs" + }, + "type": "object" + }, + "ApprovalRequestSettingsPatch": { + "example": { + "resourceKind": "resourceKind", + "serviceKind": "launchdarkly", + "canReviewOwnRequest": false, + "requiredApprovalTags": [ + "require-approval" + ], + "serviceConfig": {}, + "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258", + "bypassApprovalsForPendingChanges": false, + "canApplyDeclinedChanges": true, + "minNumApprovals": 1, + "autoApplyApprovedChanges": true, + "required": true, + "environmentKey": "environmentKey" + }, + "properties": { + "autoApplyApprovedChanges": { + "description": "Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.\n", + "example": true, + "nullable": true, + "type": "boolean" + }, + "bypassApprovalsForPendingChanges": { + "description": "Whether to skip approvals for pending changes", + "example": false, + "type": "boolean" + }, + "canApplyDeclinedChanges": { + "description": "Allow applying the change as long as at least one person has approved", + "example": true, + "type": "boolean" + }, + "canReviewOwnRequest": { + "description": "Allow someone who makes an approval request to apply their own change", + "example": false, + "type": "boolean" + }, + "environmentKey": { + "type": "string" + }, + "minNumApprovals": { + "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.\n", + "example": 1, + "format": "int", + "type": "integer" + }, + "required": { + "description": "If approvals are required for this environment", + "example": true, + "type": "boolean" + }, + "requiredApprovalTags": { + "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval.\n", + "example": [ + "require-approval" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "resourceKind": { + "type": "string" + }, + "serviceConfig": { + "additionalProperties": true, + "description": "Arbitrary service-specific configuration", + "example": {}, + "type": "object" + }, + "serviceKind": { + "description": "Which service to use for managing approvals", + "example": "launchdarkly", + "type": "string" + }, + "serviceKindConfigurationId": { + "description": "Optional integration configuration ID of a custom approval integration. This is an Enterprise-only feature.\n", + "example": "1ef45a85-218f-4428-a8b2-a97e5f56c258", + "nullable": true, + "type": "string" + } + }, + "required": [ + "environmentKey", + "resourceKind" + ], + "type": "object" + }, + "Views": { + "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": 0, + "items": [ + { + "metricsExpanded": { + "totalCount": 6, + "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" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", + "_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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + } + }, + { + "metricsExpanded": { + "totalCount": 6, + "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" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", + "_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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + } + } + ] + }, + "properties": { + "_links": { + "$ref": "#/components/schemas/ViewsPaginatedLinks" + }, + "items": { + "items": { + "$ref": "#/components/schemas/View" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "View": { + "example": { + "metricsExpanded": { + "totalCount": 6, + "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" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", + "_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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + } + }, + "properties": { + "_access": { + "$ref": "#/components/schemas/ViewsAccessRep" + }, + "_links": { + "$ref": "#/components/schemas/ParentAndSelfLinks" + }, + "id": { + "description": "Unique ID of this view", + "format": "string", + "type": "string" + }, + "accountId": { + "description": "ID of the account that owns this view", + "type": "string" + }, + "projectId": { + "description": "ID of the project this view belongs to", + "type": "string" + }, + "projectKey": { + "description": "Key of the project this view belongs to", + "type": "string" + }, + "key": { + "description": "Unique key for the view within the account/project", + "type": "string" + }, + "name": { + "description": "Human-readable name for the view", + "type": "string" + }, + "description": { + "description": "Optional detailed description of the view", + "type": "string" + }, + "generateSdkKeys": { + "description": "Whether to generate SDK keys for this view. Defaults to false.", + "type": "boolean" + }, + "version": { + "description": "Version number for tracking changes", + "type": "integer" + }, + "tags": { + "description": "Tags associated with this view", + "items": { + "type": "string" + }, + "type": "array" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "updatedAt": { + "format": "int64", + "type": "integer" + }, + "archived": { + "default": false, + "description": "Whether this view is archived", + "type": "boolean" + }, + "archivedAt": { + "format": "int64", + "type": "integer" + }, + "deletedAt": { + "format": "int64", + "type": "integer" + }, + "deleted": { + "default": false, + "description": "Whether this view is deleted", + "type": "boolean" + }, + "maintainer": { + "$ref": "#/components/schemas/Maintainer" + }, + "flagsSummary": { + "$ref": "#/components/schemas/FlagsSummary" + }, + "segmentsSummary": { + "$ref": "#/components/schemas/SegmentsSummary" + }, + "metricsSummary": { + "$ref": "#/components/schemas/MetricsSummary" + }, + "aiConfigsSummary": { + "$ref": "#/components/schemas/AIConfigsSummary" + }, + "resourceSummary": { + "$ref": "#/components/schemas/ResourceSummary" + }, + "flagsExpanded": { + "$ref": "#/components/schemas/ExpandedLinkedFlags" + }, + "segmentsExpanded": { + "$ref": "#/components/schemas/ExpandedLinkedSegments" + }, + "metricsExpanded": { + "$ref": "#/components/schemas/ExpandedLinkedMetrics" + }, + "aiConfigsExpanded": { + "$ref": "#/components/schemas/ExpandedLinkedAIConfigs" + }, + "resourcesExpanded": { + "$ref": "#/components/schemas/ExpandedLinkedResources" + } + }, + "required": [ + "accountId", + "archived", + "createdAt", + "deleted", + "description", + "generateSdkKeys", + "id", + "key", + "name", + "projectId", + "projectKey", + "tags", + "updatedAt", + "version" + ], + "type": "object" + }, + "Maintainer": { + "example": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "maintainerMember": { + "$ref": "#/components/schemas/ViewsMaintainerMember" + }, + "maintainerTeam": { + "$ref": "#/components/schemas/ViewsMaintainerTeam" + } + }, + "required": [ + "id", + "kind" + ], + "type": "object" + }, + "ViewsMaintainerMember": { + "example": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "properties": { + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + } + }, + "required": [ + "email", + "id", + "role" + ], + "type": "object" + }, + "ViewsMaintainerTeam": { + "example": { + "name": "name", + "id": "id", + "key": "key" + }, + "properties": { + "id": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "key", + "name" + ], + "type": "object" + }, + "ViewPost": { + "example": { + "maintainerId": "maintainerId", + "name": "name", + "generateSdkKeys": false, + "maintainerTeamKey": "maintainerTeamKey", + "description": "", + "key": "key", + "tags": [ + "tags", + "tags" + ] + }, + "properties": { + "key": { + "description": "Unique key for the view within the account/project", + "type": "string" + }, + "name": { + "description": "Human-readable name for the view", + "type": "string" + }, + "description": { + "default": "", + "description": "Optional detailed description of the view", + "type": "string" + }, + "generateSdkKeys": { + "default": false, + "description": "Whether to generate SDK keys for this view", + "type": "boolean" + }, + "maintainerId": { + "description": "Member ID of the maintainer for this view. Only one of `maintainerId` or `maintainerTeamKey` can be specified.", + "type": "string" + }, + "maintainerTeamKey": { + "description": "Key of the maintainer team for this view. Only one of `maintainerId` or `maintainerTeamKey` can be specified.", + "type": "string" + }, + "tags": { + "description": "Tags associated with this view", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "key", + "name" + ], + "type": "object" + }, + "ViewPatch": { + "example": { + "archived": true, + "maintainerId": "maintainerId", + "name": "name", + "generateSdkKeys": true, + "maintainerTeamKey": "maintainerTeamKey", + "description": "description", + "tags": [ + "tags", + "tags" + ] + }, + "properties": { + "name": { + "description": "Human-readable name for the view", + "type": "string" + }, + "description": { + "description": "Optional detailed description of the view", + "type": "string" + }, + "generateSdkKeys": { + "description": "Whether to generate SDK keys for this view", + "type": "boolean" + }, + "maintainerId": { + "description": "Member ID of the maintainer for this view. Only one of `maintainerId` or `maintainerTeamKey` can be specified.", + "type": "string" + }, + "maintainerTeamKey": { + "description": "Key of the maintainer team for this view. Only one of `maintainerId` or `maintainerTeamKey` can be specified.", + "type": "string" + }, + "tags": { + "description": "Tags associated with this view", + "items": { + "type": "string" + }, + "type": "array" + }, + "archived": { + "description": "Whether or not the view is archived", + "type": "boolean" + } + }, + "type": "object" + }, + "ViewLinkedResources": { + "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": 5, + "items": [ + { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "resourceDetails": { + "view": { + "metricsExpanded": { + "totalCount": 6, + "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" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", + "_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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + } + }, + "flag": { + "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", + "tags": [ + "tags", + "tags" + ] + }, + "metric": { + "_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" + }, + "segment": { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + "aiConfig": { + "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 + } + }, + "linkedAt": 1, + "environmentKey": "environmentKey", + "resourceType": "flag" + }, + { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "resourceDetails": { + "view": { + "metricsExpanded": { + "totalCount": 6, + "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" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", + "_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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + } + }, + "flag": { + "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", + "tags": [ + "tags", + "tags" + ] + }, + "metric": { + "_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" + }, + "segment": { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + "aiConfig": { + "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 + } + }, + "linkedAt": 1, + "environmentKey": "environmentKey", + "resourceType": "flag" + } + ] + }, + "properties": { + "_links": { + "$ref": "#/components/schemas/ViewsPaginatedLinks" + }, + "items": { + "items": { + "$ref": "#/components/schemas/ViewLinkedResource" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "ViewLinkedResource": { + "example": { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "resourceDetails": { + "view": { + "metricsExpanded": { + "totalCount": 6, + "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" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", + "_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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + } + }, + "flag": { + "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", + "tags": [ + "tags", + "tags" + ] + }, + "metric": { + "_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" + }, + "segment": { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + "aiConfig": { + "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 + } + }, + "linkedAt": 1, + "environmentKey": "environmentKey", + "resourceType": "flag" + }, + "properties": { + "_links": { + "$ref": "#/components/schemas/ParentAndSelfLinks" + }, + "resourceKey": { + "description": "Key of the resource (flag, segment, AI config or metric)", + "type": "string" + }, + "environmentId": { + "description": "Environment ID of the resource (only present for segments)", + "type": "string" + }, + "environmentKey": { + "description": "Environment Key of the resource (only present for segments)", + "type": "string" + }, + "resourceType": { + "enum": [ + "flag", + "segment", + "metric", + "aiConfig" + ], + "type": "string" + }, + "linkedAt": { + "format": "int64", + "type": "integer" + }, + "resourceDetails": { + "$ref": "#/components/schemas/ViewLinkedResourceDetails" + } + }, + "required": [ + "_links", + "linkedAt", + "resourceKey", + "resourceType" + ], + "type": "object" + }, + "ViewLinkRequest": { + "oneOf": [ + { + "$ref": "#/components/schemas/ViewLinkRequestKeys" + }, + { + "$ref": "#/components/schemas/ViewLinkRequestSegmentIdentifiers" + } + ], + "type": "object" + }, + "FailedResourceLink": { + "example": { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "errorMessage": "errorMessage", + "resourceType": "flag" + }, + "properties": { + "resourceKey": { + "description": "The key of the resource that failed to link.", + "type": "string" + }, + "environmentId": { + "description": "Environment ID of the resource (only present for segments)", + "type": "string" + }, + "resourceType": { + "description": "The type of the resource that failed to link.", + "enum": [ + "flag", + "segment", + "metric", + "aiConfig" + ], + "type": "string" + }, + "errorMessage": { + "description": "The reason why linking this resource failed.", + "type": "string" + } + }, + "required": [ + "errorMessage", + "resourceKey", + "resourceType" + ], + "type": "object" + }, + "LinkResourceSuccessResponse": { + "example": { + "linkedResources": { + "_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": 5, + "items": [ + { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "resourceDetails": { + "view": { + "metricsExpanded": { + "totalCount": 6, + "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" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", + "_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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + } + }, + "flag": { + "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", + "tags": [ + "tags", + "tags" + ] + }, + "metric": { + "_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" + }, + "segment": { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + "aiConfig": { + "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 + } + }, + "linkedAt": 1, + "environmentKey": "environmentKey", + "resourceType": "flag" + }, + { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "resourceDetails": { + "view": { + "metricsExpanded": { + "totalCount": 6, + "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" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", + "_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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + } + }, + "flag": { + "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", + "tags": [ + "tags", + "tags" + ] + }, + "metric": { + "_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" + }, + "segment": { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + "aiConfig": { + "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 + } + }, + "linkedAt": 1, + "environmentKey": "environmentKey", + "resourceType": "flag" + } + ] + }, + "failedResources": [ + { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "errorMessage": "errorMessage", + "resourceType": "flag" + }, + { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "errorMessage": "errorMessage", + "resourceType": "flag" + } + ], + "successCount": 0, + "failureCount": 6 + }, + "properties": { + "successCount": { + "description": "The number of resources successfully linked.", + "type": "integer" + }, + "failureCount": { + "description": "The number of resources that failed to link.", + "type": "integer" + }, + "linkedResources": { + "$ref": "#/components/schemas/ViewLinkedResources" + }, + "failedResources": { + "description": "Details of resources that failed to link.", + "items": { + "$ref": "#/components/schemas/FailedResourceLink" + }, + "type": "array" + } + }, + "required": [ + "failureCount", + "successCount" + ], + "type": "object" + }, + "UnlinkResourceSuccessResponse": { + "example": { + "failedResources": [ + { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "errorMessage": "errorMessage", + "resourceType": "flag" + }, + { + "environmentId": "environmentId", + "resourceKey": "resourceKey", + "errorMessage": "errorMessage", + "resourceType": "flag" + } + ], + "successCount": 0, + "failureCount": 6 + }, + "properties": { + "successCount": { + "description": "The number of resources successfully unlinked.", + "type": "integer" + }, + "failureCount": { + "description": "The number of resources that failed to unlink.", + "type": "integer" + }, + "failedResources": { + "description": "Details of resources that failed to unlink.", + "items": { + "$ref": "#/components/schemas/FailedResourceLink" + }, + "type": "array" + } + }, + "required": [ + "failureCount", + "successCount" + ], + "type": "object" + }, + "ViewsSelfLink": { + "example": { + "self": { + "href": "href", + "type": "type" + } + }, + "properties": { + "self": { + "$ref": "#/components/schemas/CoreLink" + } + }, + "required": [ + "self" + ], + "type": "object" + }, + "ViewsPaginatedLinks": { + "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/ViewsLink" + }, + "last": { + "$ref": "#/components/schemas/ViewsLink" + }, + "next": { + "$ref": "#/components/schemas/ViewsLink" + }, + "prev": { + "$ref": "#/components/schemas/ViewsLink" + }, + "self": { + "$ref": "#/components/schemas/ViewsLink" + } + }, + "required": [ + "self" + ], + "type": "object" + }, + "FlagsSummary": { + "example": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "properties": { + "count": { + "type": "integer" + }, + "linkedFlags": { + "$ref": "#/components/schemas/ExpandedDirectlyLinkedFlags" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "ResourceSummary": { + "example": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "properties": { + "flagCount": { + "type": "integer" + }, + "segmentCount": { + "type": "integer" + }, + "metricCount": { + "type": "integer" + }, + "aiConfigCount": { + "type": "integer" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "flagCount", + "totalCount" + ], + "type": "object" + }, + "SegmentsSummary": { + "example": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "properties": { + "count": { + "type": "integer" + }, + "linkedSegments": { + "$ref": "#/components/schemas/ExpandedDirectlyLinkedSegments" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "AIConfigsSummary": { + "example": { + "count": 4 + }, + "properties": { + "count": { + "type": "integer" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "MetricsSummary": { + "example": { + "count": 2 + }, + "properties": { + "count": { + "type": "integer" + } + }, + "required": [ + "count" + ], + "type": "object" + }, + "ExpandedDirectlyLinkedFlags": { + "example": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedDirectlyLinkedFlag" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "ExpandedDirectlyLinkedSegments": { + "example": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedDirectlyLinkedSegment" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "ExpandedLinkedFlags": { + "description": "Details on linked flags for a view - requires passing the 'allFlags' expand field", + "example": { + "totalCount": 4, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] + }, + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedFlag" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "ExpandedLinkedSegments": { + "description": "Details on linked segments for a view - requires passing the 'allSegments' expand field", + "example": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + }, + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedSegment" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "ExpandedLinkedAIConfigs": { + "example": { + "totalCount": 6, + "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 + } + ] + }, + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedAIConfig" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "ExpandedLinkedMetrics": { + "example": { + "totalCount": 6, + "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" + } + ] + }, + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedMetric" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "ExpandedLinkedResources": { + "description": "Details on linked resources for a view - requires passing the 'allResources' expand field", + "example": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "properties": { + "items": { + "$ref": "#/components/schemas/ExpandedLinkedResourcesItems" + }, + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "ExpandedDirectlyLinkedFlag": { + "example": { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/ViewsSelfLink" + } + }, + "required": [ + "key", + "links", + "name" + ], + "type": "object" + }, + "ExpandedDirectlyLinkedSegment": { + "example": { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "environmentId": { + "type": "string" + }, + "links": { + "$ref": "#/components/schemas/ViewsSelfLink" + } + }, + "required": [ + "environmentId", + "key", + "links", + "name" + ], + "type": "object" + }, + "ExpandedFlag": { + "description": "Flag representation for Views API - contains only fields actually used by the Views service", + "example": { + "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", + "tags": [ + "tags", + "tags" + ] + }, + "properties": { + "key": { + "description": "A unique key used to reference the flag", + "type": "string" + }, + "name": { + "description": "A human-friendly name for the flag", + "type": "string" + }, + "description": { + "description": "Description of the flag", + "type": "string" + }, + "creationDate": { + "description": "Creation date in milliseconds", + "format": "int64", + "type": "integer" + }, + "version": { + "description": "Version of the flag", + "type": "integer" + }, + "archived": { + "description": "Whether the flag is archived", + "type": "boolean" + }, + "tags": { + "description": "Tags for the flag", + "items": { + "type": "string" + }, + "type": "array" + }, + "temporary": { + "description": "Whether the flag is temporary", + "type": "boolean" + }, + "includeInSnippet": { + "description": "Whether to include in snippet", + "type": "boolean" + }, + "_links": { + "$ref": "#/components/schemas/ParentAndSelfLinks" + } + }, + "required": [ + "key", + "name" + ], + "type": "object", + "x-go-type": "reps2.FlagGlobalAttributesRep", + "x-go-type-import": { + "path": "github.com/launchdarkly/gonfalon/internal/reps2", + "name": "reps2" + } + }, + "ExpandedAIConfig": { + "description": "AI Config representation for Views API - contains only fields actually used by the Views service", + "example": { + "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 + }, + "properties": { + "key": { + "description": "A unique key used to reference the AI config", + "type": "string" + }, + "name": { + "description": "A human-friendly name for the AI config", + "type": "string" + }, + "tags": { + "description": "Tags for the AI config", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "Description of the AI config", + "type": "string" + }, + "version": { + "description": "Version of the AI config", + "type": "integer" + }, + "createdAt": { + "description": "Creation date in milliseconds", + "format": "int64", + "type": "integer" + }, + "updatedAt": { + "description": "Last modification date in milliseconds", + "format": "int64", + "type": "integer" + }, + "flagKey": { + "description": "Key of the flag that this AI config is attached to", + "type": "string" + }, + "_links": { + "$ref": "#/components/schemas/ParentAndSelfLinks" + } + }, + "type": "object", + "x-go-type": "domain.ExternalAIConfigRep", + "x-go-type-import": { + "path": "github.com/launchdarkly/gonfalon/internal/ai/ai_configs/domain", + "name": "domain" + } + }, + "ExpandedSegment": { + "description": "Segment representation for Views API - contains only fields actually used by the Views service", + "example": { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + "properties": { + "key": { + "description": "A unique key used to reference the segment", + "type": "string" + }, + "name": { + "description": "A human-friendly name for the segment", + "type": "string" + }, + "environmentId": { + "description": "Environment ID of the segment", + "type": "string" + }, + "environmentKey": { + "description": "Environment key of the segment", + "type": "string" + }, + "description": { + "description": "Description of the segment", + "type": "string" + }, + "creationDate": { + "description": "Creation date in milliseconds", + "format": "int64", + "type": "integer" + }, + "lastModifiedDate": { + "description": "Last modification date in milliseconds", + "format": "int64", + "type": "integer" + }, + "deleted": { + "description": "Whether the segment is deleted", + "type": "boolean" + }, + "tags": { + "description": "Tags for the segment", + "items": { + "type": "string" + }, + "type": "array" + }, + "unbounded": { + "description": "Whether the segment is unbounded", + "type": "boolean" + }, + "version": { + "description": "Version of the segment", + "type": "integer" + }, + "generation": { + "description": "Generation of the segment", + "type": "integer" + }, + "_links": { + "$ref": "#/components/schemas/ParentAndSelfLinks" + } + }, + "required": [ + "key", + "name" + ], + "type": "object" + }, + "ExpandedMetric": { + "description": "Metric representation for Views API - contains only fields actually used by the Views service", + "example": { + "_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" + }, + "properties": { + "key": { + "description": "A unique key used to reference the metric", + "type": "string" + }, + "name": { + "description": "A human-friendly name for the metric", + "type": "string" + }, + "creationDate": { + "description": "Creation date in milliseconds", + "format": "int64", + "type": "integer" + }, + "lastModified": { + "description": "Last modification date in milliseconds", + "format": "int64", + "type": "integer" + }, + "isActive": { + "description": "Whether the metric is active", + "type": "boolean" + }, + "eventKey": { + "description": "Event key for the metric", + "type": "string" + }, + "_id": { + "description": "ID of the metric", + "type": "string" + }, + "_versionId": { + "description": "Version ID of the metric", + "type": "string" + }, + "kind": { + "description": "Kind of the Metric", + "type": "string" + }, + "category": { + "description": "Category of the Metric", + "type": "string" + }, + "description": { + "description": "Description of the Metric", + "type": "string" + }, + "isNumeric": { + "type": "boolean" + }, + "lastSeen": { + "description": "Last seen date in milliseconds", + "format": "int64", + "type": "integer" + }, + "_links": { + "$ref": "#/components/schemas/ParentAndSelfLinks" + } + }, + "type": "object", + "x-go-type": "metrics.MetricExpandable", + "x-go-type-import": { + "path": "github.com/launchdarkly/gonfalon/internal/shared/metrics", + "name": "metrics" + } + }, + "ViewsAccessRep": { + "allOf": [ + { + "$ref": "#/components/schemas/ViewsAccess" + } + ], + "example": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "x-go-type": "reps.AccessRep" + }, + "ViewsLink": { + "example": { + "href": "href", + "type": "type" + }, + "properties": { + "href": { + "type": "string" }, - "items": { + "type": { + "type": "string" + } + }, + "type": "object" + }, + "ViewsAccess": { + "properties": { + "denied": { "items": { - "$ref": "#/components/schemas/AiConfigsLegacyExperimentRep" + "$ref": "#/components/schemas/ViewsAccessDenied" + }, + "type": "array" + }, + "allowed": { + "items": { + "$ref": "#/components/schemas/ViewsAccessAllowedRep" }, "type": "array" } }, "required": [ - "baselineIdx", - "items" + "allowed", + "denied" ], "type": "object" }, - "AiConfigsLegacyExperimentRep": { + "ViewsAccessDenied": { "example": { - "metricKey": "my-metric", - "environments": [ - "production", - "test", - "my-environment" + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + "properties": { + "action": { + "type": "string" + }, + "reason": { + "$ref": "#/components/schemas/ViewsAccessDeniedReason" + } + }, + "required": [ + "action", + "reason" + ], + "type": "object" + }, + "ViewsAccessDeniedReason": { + "example": { + "role_name": "role_name", + "notActions": [ + null, + null ], - "_environmentSettings": { - "key": { - "startDate": 1, - "stopDate": 6, - "enabledPeriods": [ + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "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" + }, + "notActions": { + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "type": "array" + }, + "effect": { + "description": "Whether this statement should allow or deny actions on the resources.", + "enum": [ + "allow", + "deny" + ], + "example": "allow", + "type": "string" + }, + "role_name": { + "type": "string" + } + }, + "required": [ + "effect" + ], + "type": "object" + }, + "ViewsAccessAllowedRep": { + "example": { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + "properties": { + "action": { + "type": "string" + }, + "reason": { + "$ref": "#/components/schemas/ViewsAccessAllowedReason" + } + }, + "required": [ + "action", + "reason" + ], + "type": "object" + }, + "ViewsAccessAllowedReason": { + "example": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "properties": { + "resources": { + "description": "Resource specifier strings", + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "items": { + "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" + }, + "notActions": { + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "type": "array" + }, + "effect": { + "description": "Whether this statement should allow or deny actions on the resources.", + "enum": [ + "allow", + "deny" + ], + "example": "allow", + "type": "string" + }, + "role_name": { + "type": "string" + } + }, + "required": [ + "effect" + ], + "type": "object" + }, + "ViewLinkedResourceDetails": { + "example": { + "view": { + "metricsExpanded": { + "totalCount": 6, + "items": [ { - "startDate": 7, - "stopDate": 1 + "_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" }, { - "startDate": 7, - "stopDate": 1 + "_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" } ] - } - }, - "_metric": { - "_maintainer": { - "firstName": "Ariel", - "lastName": "Flores", - "role": "admin", - "_links": { - "self": { - "href": "/api/v2/members/569f183514f4432160000007", - "type": "application/json" - } - }, - "_id": "569f183514f4432160000007", - "email": "ariel@acme.com" }, "_links": { "parent": { - "href": "/api/v2/metrics/my-project", - "type": "application/json" + "href": "href", + "type": "type" }, "self": { - "href": "/api/v2/metrics/my-project/my-metric", - "type": "application/json" + "href": "href", + "type": "type" } }, "description": "description", - "randomizationUnits": [ - "user" - ], - "guardedRolloutCount": 0, - "urls": [ - null, - null - ], + "maintainer": { + "kind": "kind", + "maintainerMember": { + "firstName": "firstName", + "lastName": "lastName", + "role": "role", + "id": "id", + "email": "email" + }, + "id": "id", + "maintainerTeam": { + "name": "name", + "id": "id", + "key": "key" + } + }, + "metricsSummary": { + "count": 2 + }, + "createdAt": 6, + "archived": false, + "projectKey": "projectKey", "_access": { "allowed": [ { @@ -51605,784 +64902,1361 @@ "*" ] }, - "action": "action" + "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" + } + ] + }, + "generateSdkKeys": true, + "flagsSummary": { + "count": 2, + "linkedFlags": { + "totalCount": 7, + "items": [ + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + } + }, + "id": "id", + "aiConfigsSummary": { + "count": 4 + }, + "key": "key", + "updatedAt": 1, + "resourcesExpanded": { + "totalCount": 7, + "items": { + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } + } + }, + "resourceSummary": { + "flagCount": 7, + "metricCount": 1, + "totalCount": 6, + "segmentCount": 1, + "aiConfigCount": 1 + }, + "version": 0, + "tags": [ + "tags", + "tags" + ], + "accountId": "accountId", + "archivedAt": 5, + "deletedAt": 5, + "deleted": false, + "name": "name", + "segmentsSummary": { + "linkedSegments": { + "totalCount": 3, + "items": [ + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + }, + { + "environmentId": "environmentId", + "name": "name", + "links": { + "self": { + "href": "href", + "type": "type" + } + }, + "key": "key" + } + ] + }, + "count": 9 + }, + "aiConfigsExpanded": { + "totalCount": 6, + "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 + } + ] + }, + "segmentsExpanded": { + "totalCount": 8, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" }, { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } }, - "action": "action" + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" } - ], - "denied": [ + ] + }, + "projectId": "projectId", + "flagsExpanded": { + "totalCount": 4, + "items": [ { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] + "archived": true, + "temporary": true, + "includeInSnippet": true, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } }, - "action": "action" + "name": "name", + "description": "description", + "creationDate": 7, + "version": 1, + "key": "key", + "tags": [ + "tags", + "tags" + ] }, { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] + "archived": true, + "temporary": true, + "includeInSnippet": true, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } }, - "action": "action" + "name": "name", + "description": "description", + "creationDate": 7, + "version": 1, + "key": "key", + "tags": [ + "tags", + "tags" + ] } ] - }, - "_site": { - "href": "href", - "type": "type" - }, - "selector": "selector", - "key": "metric-key-123abc", - "percentileValue": 95, - "kind": "custom", - "_attachedFlagCount": 0, - "metricGroupCount": 0, - "filters": { - "op": "op", - "negate": false, - "values": [ - "JP" - ], - "contextKind": "user", - "attribute": "country", - "type": "contextAttribute" - }, - "_creationDate": 1, - "tags": [], - "eventDefault": { - "disabled": true, - "value": 0 - }, - "maintainerId": "569fdeadbeef1644facecafe", - "unit": "unit", - "successCriteria": "HigherThanBaseline", - "_versionId": "version-id-123abc", - "isNumeric": true, - "eventKey": "Order placed", - "experimentCount": 0, - "name": "My metric", - "_id": "5902deadbeef667524a01290", - "lastModified": { - "date": "2021-08-05T19:46:31.148Z" - }, - "unitAggregationType": "average", - "category": "Error monitoring", - "analysisType": "mean", - "dataSource": { - "key": "key", - "environmentKey": "environmentKey" } - } - }, - "properties": { - "metricKey": { - "example": "my-metric", - "type": "string" - }, - "_metric": { - "$ref": "#/components/schemas/AiConfigsMetricListingRep" - }, - "environments": { - "example": [ - "production", - "test", - "my-environment" - ], - "items": { - "type": "string" - }, - "type": "array" }, - "_environmentSettings": { - "additionalProperties": { - "$ref": "#/components/schemas/AiConfigsExperimentEnvironmentSettingRep" - }, - "type": "object" - } - }, - "type": "object" - }, - "AiConfigsMetricListingRep": { - "example": { - "_maintainer": { - "firstName": "Ariel", - "lastName": "Flores", - "role": "admin", + "flag": { + "archived": true, + "temporary": true, + "includeInSnippet": true, "_links": { + "parent": { + "href": "href", + "type": "type" + }, "self": { - "href": "/api/v2/members/569f183514f4432160000007", - "type": "application/json" + "href": "href", + "type": "type" } }, - "_id": "569f183514f4432160000007", - "email": "ariel@acme.com" - }, - "_links": { - "parent": { - "href": "/api/v2/metrics/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/metrics/my-project/my-metric", - "type": "application/json" - } + "name": "name", + "description": "description", + "creationDate": 7, + "version": 1, + "key": "key", + "tags": [ + "tags", + "tags" + ] }, - "description": "description", - "randomizationUnits": [ - "user" - ], - "guardedRolloutCount": 0, - "urls": [ - null, - null - ], - "_access": { - "allowed": [ - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" + "metric": { + "_links": { + "parent": { + "href": "href", + "type": "type" }, - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" + "self": { + "href": "href", + "type": "type" } - ], - "denied": [ - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" + }, + "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" + }, + "segment": { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" }, - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" + "self": { + "href": "href", + "type": "type" } - ] - }, - "_site": { - "href": "href", - "type": "type" - }, - "selector": "selector", - "key": "metric-key-123abc", - "percentileValue": 95, - "kind": "custom", - "_attachedFlagCount": 0, - "metricGroupCount": 0, - "filters": { - "op": "op", - "negate": false, - "values": [ - "JP" - ], - "contextKind": "user", - "attribute": "country", - "type": "contextAttribute" - }, - "_creationDate": 1, - "tags": [], - "eventDefault": { - "disabled": true, - "value": 0 - }, - "maintainerId": "569fdeadbeef1644facecafe", - "unit": "unit", - "successCriteria": "HigherThanBaseline", - "_versionId": "version-id-123abc", - "isNumeric": true, - "eventKey": "Order placed", - "experimentCount": 0, - "name": "My metric", - "_id": "5902deadbeef667524a01290", - "lastModified": { - "date": "2021-08-05T19:46:31.148Z" - }, - "unitAggregationType": "average", - "category": "Error monitoring", - "analysisType": "mean", - "dataSource": { - "key": "key", - "environmentKey": "environmentKey" - } - }, - "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" - }, - "_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" - }, - "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" + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" ], - "example": "custom", - "type": "string" - }, - "_attachedFlagCount": { - "description": "The number of feature flags currently attached to this metric", - "example": 0, - "type": "integer" + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" }, - "_links": { - "additionalProperties": { - "$ref": "#/components/schemas/AiConfigsLink" - }, - "description": "The location and content type of related resources", - "example": { + "aiConfig": { + "createdAt": 2, + "_links": { "parent": { - "href": "/api/v2/metrics/my-project", - "type": "application/json" + "href": "href", + "type": "type" }, "self": { - "href": "/api/v2/metrics/my-project/my-metric", - "type": "application/json" + "href": "href", + "type": "type" } }, - "type": "object" - }, - "_site": { - "$ref": "#/components/schemas/AiConfigsLink" - }, - "_access": { - "$ref": "#/components/schemas/AiConfigsAccess" - }, - "tags": { - "description": "Tags for the metric", - "example": [], - "items": { - "type": "string" - }, - "type": "array" - }, - "_creationDate": { - "format": "int64", - "type": "integer" - }, - "lastModified": { - "$ref": "#/components/schemas/AiConfigsModification" - }, - "maintainerId": { - "description": "The ID of the member who maintains this metric", - "example": "569fdeadbeef1644facecafe", - "type": "string" - }, - "_maintainer": { - "$ref": "#/components/schemas/AiConfigsMemberSummary" - }, - "description": { - "description": "Description of the metric", - "type": "string" - }, - "category": { - "description": "The category of the metric", - "example": "Error monitoring", - "type": "string" - }, - "isNumeric": { - "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", - "example": true, - "type": "boolean" - }, - "successCriteria": { - "description": "For custom metrics, the success criteria", - "enum": [ - "HigherThanBaseline", - "LowerThanBaseline" + "name": "name", + "description": "description", + "version": 1, + "key": "key", + "flagKey": "flagKey", + "tags": [ + "tags", + "tags" ], - "type": "string" + "updatedAt": 6 + } + }, + "properties": { + "view": { + "$ref": "#/components/schemas/View" }, - "unit": { - "description": "For numeric custom metrics, the unit of measure", - "type": "string" + "flag": { + "$ref": "#/components/schemas/ExpandedFlag" }, - "eventKey": { - "description": "For custom metrics, the event key to use in your code", - "example": "Order placed", - "type": "string" + "segment": { + "$ref": "#/components/schemas/ExpandedSegment" }, - "randomizationUnits": { - "description": "An array of randomization units allowed for this metric", - "example": [ - "user" - ], + "aiConfig": { + "$ref": "#/components/schemas/ExpandedAIConfig" + }, + "metric": { + "$ref": "#/components/schemas/ExpandedMetric" + } + }, + "title": "ViewLinkedResourceDetails", + "type": "object" + }, + "ViewLinkRequestKeys": { + "example": { + "keys": [ + "keys", + "keys" + ], + "comment": "" + }, + "properties": { + "keys": { + "description": "Keys of the resources (flags, segments, AI configs) to link/unlink", "items": { "type": "string" }, "type": "array" }, - "filters": { - "$ref": "#/components/schemas/AiConfigsFilter" - }, - "unitAggregationType": { - "description": "The method by which multiple unit event values are aggregated", - "enum": [ - "average", - "sum" - ], - "example": "average", + "comment": { + "default": "", + "description": "Optional comment for the link/unlink operation", "type": "string" - }, - "analysisType": { - "description": "The method for analyzing metric events", - "enum": [ - "mean", - "percentile" - ], - "example": "mean", + } + }, + "required": [ + "keys" + ], + "title": "ViewLinkRequestKeys", + "type": "object" + }, + "ViewLinkRequestSegmentIdentifier": { + "properties": { + "environmentId": { "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/AiConfigsMetricEventDefaultRep" - }, - "dataSource": { - "$ref": "#/components/schemas/AiConfigsMetricDataSourceRef" - }, - "selector": { - "description": "For click metrics, the CSS selectors", + "segmentKey": { "type": "string" - }, - "urls": { + } + }, + "required": [ + "environmentId", + "segmentKey" + ], + "title": "ViewLinkRequestSegmentIdentifier", + "type": "object" + }, + "ViewLinkRequestSegmentIdentifiers": { + "properties": { + "segmentIdentifiers": { + "description": "Identifiers of the segments to link/unlink (environmentId and segmentKey)", "items": { - "$ref": "#/components/schemas/UrlMatcher" + "$ref": "#/components/schemas/ViewLinkRequestSegmentIdentifier" }, "type": "array" + }, + "comment": { + "default": "", + "description": "Optional comment for the link/unlink operation", + "type": "string" } }, "required": [ - "_creationDate", - "_id", - "_links", - "_versionId", - "key", - "kind", - "name", - "tags" + "segmentIdentifiers" ], + "title": "ViewLinkRequestSegmentIdentifiers", "type": "object" }, - "AiConfigsLink": { + "ExpandedLinkedResourcesFlags": { "example": { - "href": "href", - "type": "type" + "totalCount": 5, + "items": [ + { + "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", + "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", + "tags": [ + "tags", + "tags" + ] + } + ] }, "properties": { - "href": { - "type": "string" + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedFlag" + }, + "type": "array" }, - "type": { - "type": "string" + "totalCount": { + "type": "integer" } }, + "required": [ + "items", + "totalCount" + ], + "title": "ExpandedLinkedResourcesFlags", "type": "object" }, - "AiConfigsModification": { + "ExpandedLinkedResourcesSegments": { "example": { - "date": "2021-08-05T19:46:31.148Z" + "totalCount": 6, + "items": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] }, "properties": { - "date": { - "example": "2021-08-05T19:46:31.148Z", - "format": "date-time", - "type": "string" + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedSegment" + }, + "type": "array" + }, + "totalCount": { + "type": "integer" } }, + "required": [ + "items", + "totalCount" + ], + "title": "ExpandedLinkedResourcesSegments", "type": "object" }, - "AiConfigsMemberSummary": { + "ExpandedLinkedResourcesAIConfigs": { "example": { - "firstName": "Ariel", - "lastName": "Flores", - "role": "admin", - "_links": { - "self": { - "href": "/api/v2/members/569f183514f4432160000007", - "type": "application/json" + "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 } - }, - "_id": "569f183514f4432160000007", - "email": "ariel@acme.com" + ] }, "properties": { - "_links": { - "additionalProperties": { - "$ref": "#/components/schemas/AiConfigsLink" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/members/569f183514f4432160000007", - "type": "application/json" - } + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedAIConfig" }, - "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" - }, - "role": { - "description": "The member's base role. If the member has no additional roles, this role will be in effect.", - "example": "admin", - "type": "string" + "type": "array" }, - "email": { - "description": "The member's email address", - "example": "ariel@acme.com", - "type": "string" + "totalCount": { + "type": "integer" } }, "required": [ - "_id", - "_links", - "email", - "role" + "items", + "totalCount" ], + "title": "ExpandedLinkedResourcesAIConfigs", "type": "object" }, - "AiConfigsFilter": { + "ExpandedLinkedResourcesMetrics": { "example": { - "op": "op", - "negate": false, - "values": [ - "JP" - ], - "contextKind": "user", - "attribute": "country", - "type": "contextAttribute" + "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" + } + ] }, "properties": { - "type": { - "description": "Filter type. One of [contextAttribute, eventProperty, group]", - "enum": [ - "group", - "contextAttribute", - "eventProperty" - ], - "example": "contextAttribute", - "type": "string" - }, - "attribute": { - "description": "If not a group node, the context attribute name or event property name to filter on", - "example": "country", - "type": "string" - }, - "op": { - "type": "string" - }, - "values": { - "description": "The context attribute / event property values or group member nodes", - "example": [ - "JP" - ], - "items": {}, + "items": { + "items": { + "$ref": "#/components/schemas/ExpandedMetric" + }, "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" + "totalCount": { + "type": "integer" } }, "required": [ - "negate", - "op", - "type", - "values" + "items", + "totalCount" ], + "title": "ExpandedLinkedResourcesMetrics", "type": "object" }, - "AiConfigsMetricEventDefaultRep": { + "ExpandedLinkedResourcesItems": { "example": { - "disabled": true, - "value": 0 + "flags": { + "totalCount": 5, + "items": [ + { + "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", + "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", + "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" + }, + { + "_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": [ + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + }, + { + "generation": 6, + "lastModifiedDate": 9, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "description": "description", + "creationDate": 5, + "version": 9, + "environmentKey": "environmentKey", + "tags": [ + "tags", + "tags" + ], + "environmentId": "environmentId", + "deleted": true, + "name": "name", + "unbounded": true, + "key": "key" + } + ] + } }, "properties": { - "disabled": { - "description": "Whether to disable defaulting missing unit events when calculating results. Defaults to false", - "type": "boolean" + "flags": { + "$ref": "#/components/schemas/ExpandedLinkedResourcesFlags" }, - "value": { - "description": "The default value applied to missing unit events. Set to 0 when disabled is false. No other values are currently supported.", - "example": 0, - "type": "number" + "segments": { + "$ref": "#/components/schemas/ExpandedLinkedResourcesSegments" + }, + "aiConfigs": { + "$ref": "#/components/schemas/ExpandedLinkedResourcesAIConfigs" + }, + "metrics": { + "$ref": "#/components/schemas/ExpandedLinkedResourcesMetrics" } }, + "required": [ + "flags" + ], + "title": "ExpandedLinkedResourcesItems", "type": "object" }, - "AiConfigsMetricDataSourceRef": { + "PostReleasePolicyRequest": { "example": { - "key": "key", - "environmentKey": "environmentKey" + "releaseMethod": "guarded-release", + "scope": { + "environmentKeys": [ + "production", + "staging" + ] + }, + "progressiveReleaseConfig": "{}", + "name": "Production Release", + "guardedReleaseConfig": { + "minSampleSize": 100, + "rollbackOnRegression": true + }, + "key": "production-release" }, "properties": { - "key": { + "scope": { + "$ref": "#/components/schemas/ReleasePolicyScope" + }, + "releaseMethod": { + "$ref": "#/components/schemas/ReleaseMethod" + }, + "guardedReleaseConfig": { + "$ref": "#/components/schemas/GuardedReleaseConfig" + }, + "progressiveReleaseConfig": { + "description": "Configuration for progressive releases", + "type": "object" + }, + "name": { + "description": "The name of the release policy", + "example": "Production Release", + "maxLength": 256, "type": "string" }, - "environmentKey": { + "key": { + "description": "The human-readable key of the release policy", + "example": "production-release", "type": "string" } }, + "required": [ + "key", + "name", + "releaseMethod" + ], "type": "object" }, - "AiConfigsExperimentEnvironmentSettingRep": { + "PutReleasePolicyRequest": { "example": { - "startDate": 1, - "stopDate": 6, - "enabledPeriods": [ - { - "startDate": 7, - "stopDate": 1 - }, - { - "startDate": 7, - "stopDate": 1 - } - ] - }, - "properties": { - "startDate": { - "format": "int64", - "type": "integer" - }, - "stopDate": { - "format": "int64", - "type": "integer" + "releaseMethod": "guarded-release", + "scope": { + "environmentKeys": [ + "production", + "staging" + ] }, - "enabledPeriods": { - "items": { - "$ref": "#/components/schemas/AiConfigsExperimentEnabledPeriodRep" - }, - "type": "array" + "progressiveReleaseConfig": "{}", + "name": "Production Release", + "guardedReleaseConfig": { + "minSampleSize": 100, + "rollbackOnRegression": true } }, - "type": "object" - }, - "AiConfigsExperimentEnabledPeriodRep": { - "example": { - "startDate": 7, - "stopDate": 1 - }, "properties": { - "startDate": { - "format": "int64", - "type": "integer" + "scope": { + "$ref": "#/components/schemas/ReleasePolicyScope" }, - "stopDate": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "AIConfig__maintainer": { - "example": { - "kind": "kind" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/MaintainerMember" + "releaseMethod": { + "$ref": "#/components/schemas/ReleaseMethod" }, - { - "$ref": "#/components/schemas/AiConfigsMaintainerTeam" - } - ], - "properties": { - "kind": { + "guardedReleaseConfig": { + "$ref": "#/components/schemas/GuardedReleaseConfig" + }, + "progressiveReleaseConfig": { + "description": "Configuration for progressive releases", + "type": "object" + }, + "name": { + "description": "The name of the release policy", + "example": "Production Release", + "maxLength": 256, "type": "string" } }, "required": [ - "kind" - ] - }, - "AIConfigTargetingVariation_value": { - "oneOf": [ - { - "$ref": "#/components/schemas/AIConfigTargetingVariationBoolean" - }, - { - "$ref": "#/components/schemas/AIConfigTargetingVariationJSON" - }, - { - "$ref": "#/components/schemas/AIConfigTargetingVariationNumber" - }, - { - "$ref": "#/components/schemas/AIConfigTargetingVariationString" - } - ] + "name", + "releaseMethod" + ], + "type": "object" }, - "AnnouncementResponse": { - "description": "Announcement response", + "ReleasePolicy": { "example": { - "severity": "info", + "releaseMethod": "guarded-release", "_access": { "allowed": [ { @@ -52473,261 +66347,369 @@ } ] }, - "_links": { - "parent": { - "href": "href", - "type": "type" - } + "scope": { + "environmentKeys": [ + "production", + "staging" + ] }, - "startTime": 1731439812, - "_id": "1234567890", - "isDismissible": true, - "endTime": 1731439880, - "title": "System Maintenance Notice", - "message": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", - "_status": "active" + "progressiveReleaseConfig": "{}", + "name": "Production Release", + "rank": 1, + "_id": "550e8400-e29b-41d4-a716-446655440000", + "guardedReleaseConfig": { + "minSampleSize": 100, + "rollbackOnRegression": true + }, + "key": "production-release" }, "properties": { - "_id": { - "description": "The ID of the announcement", - "example": "1234567890", - "type": "string" - }, - "isDismissible": { - "description": "true if the announcement is dismissible", - "example": true, - "type": "boolean" - }, - "title": { - "description": "The title of the announcement", - "example": "System Maintenance Notice", - "type": "string" + "_access": { + "$ref": "#/components/schemas/ReleasePoliciesAccessRep" }, - "message": { - "description": "The message of the announcement", - "example": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", + "_id": { + "description": "The unique identifier of the release policy", + "example": "550e8400-e29b-41d4-a716-446655440000", "type": "string" }, - "startTime": { - "description": "The start time of the announcement. This is a Unix timestamp in milliseconds.", - "example": 1731439812, - "format": "int64", - "type": "integer" + "scope": { + "$ref": "#/components/schemas/ReleasePolicyScope" }, - "endTime": { - "description": "The end time of the announcement. This is a Unix timestamp in milliseconds.", - "example": 1731439880, - "format": "int64", + "rank": { + "description": "The rank/priority of the release policy", + "example": 1, "type": "integer" }, - "severity": { - "description": "The severity of the announcement", - "enum": [ - "info", - "warning", - "critical" - ], - "type": "string", - "x-enumNames": [ - "Informational", - "Warning", - "Critical" - ] - }, - "_status": { - "description": "The status of the announcement", - "enum": [ - "active", - "inactive", - "scheduled" - ], - "type": "string", - "x-enumNames": [ - "Active", - "Inactive", - "Scheduled" - ] + "releaseMethod": { + "$ref": "#/components/schemas/ReleaseMethod" }, - "_access": { - "$ref": "#/components/schemas/AnnouncementAccessRep" + "guardedReleaseConfig": { + "$ref": "#/components/schemas/GuardedReleaseConfig" }, - "_links": { - "$ref": "#/components/schemas/AnnouncementResponse__links" - } - }, - "required": [ - "_id", - "_links", - "_status", - "isDismissible", - "message", - "severity", - "startTime", - "title" - ], - "type": "object" - }, - "CreateAnnouncementBody": { - "description": "Create announcement request body", - "example": { - "severity": "warning", - "startTime": 1731439812, - "isDismissible": true, - "endTime": 1731439880, - "title": "System Maintenance Notice", - "message": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**." - }, - "properties": { - "isDismissible": { - "description": "true if the announcement is dismissible", - "example": true, - "type": "boolean" + "progressiveReleaseConfig": { + "description": "Configuration for progressive releases", + "type": "object" }, - "title": { - "description": "The title of the announcement", - "example": "System Maintenance Notice", + "name": { + "description": "The name of the release policy", + "example": "Production Release", + "maxLength": 256, "type": "string" }, - "message": { - "description": "The message of the announcement", - "example": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", + "key": { + "description": "The human-readable key of the release policy", + "example": "production-release", "type": "string" - }, - "startTime": { - "description": "The start time of the announcement. This is a Unix timestamp in milliseconds.", - "example": 1731439812, - "format": "int64", - "type": "integer" - }, - "endTime": { - "description": "The end time of the announcement. This is a Unix timestamp in milliseconds.", - "example": 1731439880, - "format": "int64", - "type": "integer" - }, - "severity": { - "description": "The severity of the announcement", - "enum": [ - "info", - "warning", - "critical" - ], - "example": "warning", - "type": "string", - "x-enumNames": [ - "Informational", - "Warning", - "Critical" - ] } }, "required": [ - "isDismissible", - "message", - "severity", - "startTime", - "title" + "_id", + "key", + "name", + "rank", + "releaseMethod" ], "type": "object" }, - "AnnouncementLink": { + "ReleasePolicyScope": { "example": { - "href": "href", - "type": "type" + "environmentKeys": [ + "production", + "staging" + ] }, "properties": { - "href": { - "type": "string" - }, - "type": { - "type": "string" + "environmentKeys": { + "description": "List of environment keys this policy applies to", + "example": [ + "production", + "staging" + ], + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "AnnouncementPaginatedLinks": { + "GuardedReleaseConfig": { + "description": "Configuration for guarded releases", "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" - } + "minSampleSize": 100, + "rollbackOnRegression": true }, "properties": { - "first": { - "$ref": "#/components/schemas/AnnouncementLink" - }, - "last": { - "$ref": "#/components/schemas/AnnouncementLink" - }, - "next": { - "$ref": "#/components/schemas/AnnouncementLink" - }, - "prev": { - "$ref": "#/components/schemas/AnnouncementLink" + "minSampleSize": { + "description": "The minimum number of samples required to make a decision", + "example": 100, + "type": "integer" }, - "self": { - "$ref": "#/components/schemas/AnnouncementLink" + "rollbackOnRegression": { + "description": "Whether to roll back on regression", + "example": true, + "type": "boolean" } }, "required": [ - "self" + "rollbackOnRegression" ], "type": "object" }, - "AnnouncementJSONPatch": { - "items": { - "$ref": "#/components/schemas/AnnouncementPatchOperation" - }, - "type": "array" - }, - "AnnouncementPatchOperation": { + "ReleasePoliciesResponse": { "example": { - "op": "replace", - "path": "/exampleField", - "value": "new example value" + "totalCount": 42, + "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" + }, + { + "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" + ] + }, + "progressiveReleaseConfig": "{}", + "name": "Production Release", + "rank": 1, + "_id": "550e8400-e29b-41d4-a716-446655440000", + "guardedReleaseConfig": { + "minSampleSize": 100, + "rollbackOnRegression": true + }, + "key": "production-release" + }, + { + "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" + ] + }, + "progressiveReleaseConfig": "{}", + "name": "Production Release", + "rank": 1, + "_id": "550e8400-e29b-41d4-a716-446655440000", + "guardedReleaseConfig": { + "minSampleSize": 100, + "rollbackOnRegression": true + }, + "key": "production-release" + } + ] }, "properties": { - "op": { - "description": "The type of operation to perform", - "example": "replace", - "type": "string" - }, - "path": { - "description": "A JSON Pointer string specifying the part of the document to operate on", - "example": "/exampleField", - "type": "string" + "items": { + "description": "List of release policies", + "items": { + "$ref": "#/components/schemas/ReleasePolicy" + }, + "type": "array" }, - "value": { - "description": "A JSON value used in \"add\", \"replace\", and \"test\" operations", - "example": "new example value" + "totalCount": { + "description": "Total number of release policies", + "example": 42, + "type": "integer" } }, "required": [ - "op", - "path" + "items", + "totalCount" ], "type": "object" }, - "AnnouncementAccessRep": { + "ReleaseMethod": { + "description": "The release method for this policy", + "enum": [ + "guarded-release", + "progressive-release" + ], + "type": "string" + }, + "ReleasePoliciesAccessRep": { "allOf": [ { - "$ref": "#/components/schemas/AnnouncementAccess" + "$ref": "#/components/schemas/ReleasePoliciesAccess" } ], "example": { @@ -52822,17 +66804,17 @@ }, "x-go-type": "reps.AccessRep" }, - "AnnouncementAccess": { + "ReleasePoliciesAccess": { "properties": { "denied": { "items": { - "$ref": "#/components/schemas/AnnouncementAccessDenied" + "$ref": "#/components/schemas/ReleasePoliciesAccessDenied" }, "type": "array" }, "allowed": { "items": { - "$ref": "#/components/schemas/AnnouncementAccessAllowedRep" + "$ref": "#/components/schemas/ReleasePoliciesAccessAllowedRep" }, "type": "array" } @@ -52843,7 +66825,7 @@ ], "type": "object" }, - "AnnouncementAccessDenied": { + "ReleasePoliciesAccessDenied": { "example": { "reason": { "role_name": "role_name", @@ -52870,7 +66852,7 @@ "type": "string" }, "reason": { - "$ref": "#/components/schemas/AnnouncementAccessDeniedReason" + "$ref": "#/components/schemas/ReleasePoliciesAccessDeniedReason" } }, "required": [ @@ -52879,7 +66861,7 @@ ], "type": "object" }, - "AnnouncementAccessDeniedReason": { + "ReleasePoliciesAccessDeniedReason": { "example": { "role_name": "role_name", "notActions": [ @@ -52951,7 +66933,7 @@ ], "type": "object" }, - "AnnouncementAccessAllowedRep": { + "ReleasePoliciesAccessAllowedRep": { "example": { "reason": { "role_name": "role_name", @@ -52978,7 +66960,7 @@ "type": "string" }, "reason": { - "$ref": "#/components/schemas/AnnouncementAccessAllowedReason" + "$ref": "#/components/schemas/ReleasePoliciesAccessAllowedReason" } }, "required": [ @@ -52987,7 +66969,7 @@ ], "type": "object" }, - "AnnouncementAccessAllowedReason": { + "ReleasePoliciesAccessAllowedReason": { "example": { "role_name": "role_name", "notActions": [ @@ -53059,472 +67041,6 @@ ], "type": "object" }, - "getAnnouncementsPublic_200_response": { - "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" - } - }, - "items": [ - { - "severity": "info", - "_access": { - "allowed": [ - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" - }, - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" - } - ], - "denied": [ - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" - }, - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" - } - ] - }, - "_links": { - "parent": { - "href": "href", - "type": "type" - } - }, - "startTime": 1731439812, - "_id": "1234567890", - "isDismissible": true, - "endTime": 1731439880, - "title": "System Maintenance Notice", - "message": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", - "_status": "active" - }, - { - "severity": "info", - "_access": { - "allowed": [ - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" - }, - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" - } - ], - "denied": [ - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" - }, - { - "reason": { - "role_name": "role_name", - "notActions": [ - null, - null - ], - "notResources": [ - "notResources", - "notResources" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*;qa_*:/flag/*" - ], - "actions": [ - "*" - ] - }, - "action": "action" - } - ] - }, - "_links": { - "parent": { - "href": "href", - "type": "type" - } - }, - "startTime": 1731439812, - "_id": "1234567890", - "isDismissible": true, - "endTime": 1731439880, - "title": "System Maintenance Notice", - "message": "**Important Update:**\n\nPlease be aware of the upcoming maintenance scheduled for *October 31st, 2024*. The system will be unavailable from **12:00 AM** to **4:00 AM**.", - "_status": "active" - } - ] - }, - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AnnouncementResponse" - }, - "type": "array" - }, - "_links": { - "$ref": "#/components/schemas/AnnouncementPaginatedLinks" - } - }, - "required": [ - "_links", - "items" - ], - "type": "object" - }, - "AnnouncementResponse__links": { - "example": { - "parent": { - "href": "href", - "type": "type" - } - }, - "properties": { - "parent": { - "$ref": "#/components/schemas/AnnouncementLink" - } - }, - "required": [ - "parent" - ], - "type": "object" - }, - "ApprovalRequestSetting": { - "description": "Configuration that controls how changes to a resource are gated by approvals.", - "properties": { - "required": { - "description": "If approvals are required for this environment", - "example": true, - "type": "boolean" - }, - "bypassApprovalsForPendingChanges": { - "description": "Whether to skip approvals for pending changes", - "example": false, - "type": "boolean" - }, - "minNumApprovals": { - "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.\n", - "example": 1, - "format": "int", - "type": "integer" - }, - "canReviewOwnRequest": { - "description": "Allow someone who makes an approval request to apply their own change", - "example": false, - "type": "boolean" - }, - "canApplyDeclinedChanges": { - "description": "Allow applying the change as long as at least one person has approved", - "example": true, - "type": "boolean" - }, - "autoApplyApprovedChanges": { - "description": "Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.\n", - "example": true, - "nullable": true, - "type": "boolean" - }, - "serviceKind": { - "description": "Which service to use for managing approvals", - "example": "launchdarkly", - "type": "string" - }, - "serviceConfig": { - "additionalProperties": true, - "description": "Arbitrary service-specific configuration", - "example": {}, - "type": "object" - }, - "requiredApprovalTags": { - "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval.\n", - "example": [ - "require-approval" - ], - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceKindConfigurationId": { - "description": "Optional integration configuration ID of a custom approval integration. This is an Enterprise-only feature.\n", - "example": "1ef45a85-218f-4428-a8b2-a97e5f56c258", - "nullable": true, - "type": "string" - } - }, - "required": [ - "bypassApprovalsForPendingChanges", - "canApplyDeclinedChanges", - "canReviewOwnRequest", - "minNumApprovals", - "required", - "requiredApprovalTags", - "serviceConfig", - "serviceKind" - ], - "type": "object" - }, - "ApprovalRequestSettingWithEnvs": { - "allOf": [ - { - "properties": { - "environments": { - "additionalProperties": { - "$ref": "#/components/schemas/ApprovalRequestSetting" - }, - "description": "Environment-specific overrides.", - "type": "object" - }, - "_default": { - "$ref": "#/components/schemas/ApprovalRequestSetting" - }, - "_strict": { - "$ref": "#/components/schemas/ApprovalRequestSetting" - } - }, - "type": "object" - } - ] - }, - "ApprovalRequestSettings": { - "additionalProperties": { - "$ref": "#/components/schemas/ApprovalRequestSettingWithEnvs" - }, - "type": "object" - }, - "ApprovalRequestSettingsPatch": { - "example": { - "resourceKind": "resourceKind", - "serviceKind": "launchdarkly", - "canReviewOwnRequest": false, - "requiredApprovalTags": [ - "require-approval" - ], - "serviceConfig": {}, - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258", - "bypassApprovalsForPendingChanges": false, - "canApplyDeclinedChanges": true, - "minNumApprovals": 1, - "autoApplyApprovedChanges": true, - "required": true, - "environmentKey": "environmentKey" - }, - "properties": { - "autoApplyApprovedChanges": { - "description": "Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.\n", - "example": true, - "nullable": true, - "type": "boolean" - }, - "bypassApprovalsForPendingChanges": { - "description": "Whether to skip approvals for pending changes", - "example": false, - "type": "boolean" - }, - "canApplyDeclinedChanges": { - "description": "Allow applying the change as long as at least one person has approved", - "example": true, - "type": "boolean" - }, - "canReviewOwnRequest": { - "description": "Allow someone who makes an approval request to apply their own change", - "example": false, - "type": "boolean" - }, - "environmentKey": { - "type": "string" - }, - "minNumApprovals": { - "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.\n", - "example": 1, - "format": "int", - "type": "integer" - }, - "required": { - "description": "If approvals are required for this environment", - "example": true, - "type": "boolean" - }, - "requiredApprovalTags": { - "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval.\n", - "example": [ - "require-approval" - ], - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceKind": { - "type": "string" - }, - "serviceConfig": { - "additionalProperties": true, - "description": "Arbitrary service-specific configuration", - "example": {}, - "type": "object" - }, - "serviceKind": { - "description": "Which service to use for managing approvals", - "example": "launchdarkly", - "type": "string" - }, - "serviceKindConfigurationId": { - "description": "Optional integration configuration ID of a custom approval integration. This is an Enterprise-only feature.\n", - "example": "1ef45a85-218f-4428-a8b2-a97e5f56c258", - "nullable": true, - "type": "string" - } - }, - "required": [ - "environmentKey", - "resourceKind" - ], - "type": "object" - }, "DeploymentCollectionRep": { "type": "object", "required": [