diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 40c344d..f2ebb69 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -30,7 +30,6 @@ docs/AIConfigVariationPatch.md docs/AIConfigVariationPost.md docs/AIConfigVariationsResponse.md docs/AIConfigs.md -docs/AIConfigsApi.md docs/AIConfigsSummary.md docs/AITool.md docs/AIToolPatch.md @@ -47,6 +46,13 @@ docs/AccountMembersApi.md docs/AccountUsageBetaApi.md docs/ActionInput.md docs/ActionOutput.md +docs/AdaptiveTrigger.md +docs/AdaptiveTriggerInstruction.md +docs/AdaptiveTriggerResourceKind.md +docs/AdaptiveTriggerTask.md +docs/AdaptiveTriggers.md +docs/AdaptiveTriggersApi.md +docs/AdaptiveTriggersPaginatedLinks.md docs/AgentControlApi.md docs/AgentGraph.md docs/AgentGraphEdge.md @@ -149,7 +155,9 @@ docs/BulkEditTeamsRep.md docs/CallerIdentityRep.md docs/CapabilityConfigPost.md docs/CapabilityConfigRep.md +docs/Classifier.md docs/Clause.md +docs/CleanupBehavior.md docs/Client.md docs/ClientCollection.md docs/ClientSideAvailability.md @@ -170,11 +178,8 @@ docs/ContextAttributeValuesCollection.md docs/ContextInstanceEvaluation.md docs/ContextInstanceEvaluationReason.md docs/ContextInstanceEvaluations.md -docs/ContextInstanceRecord.md -docs/ContextInstanceSearch.md docs/ContextInstanceSegmentMembership.md docs/ContextInstanceSegmentMemberships.md -docs/ContextInstances.md docs/ContextKindEnvironmentObservation.md docs/ContextKindRep.md docs/ContextKindsCollectionRep.md @@ -188,13 +193,14 @@ docs/CoreLink.md docs/CountBucket.md docs/CountBucketsResult.md docs/CovariateInfoRep.md +docs/CreateAdaptiveTriggerRequest.md docs/CreateAnnouncementBody.md docs/CreateApprovalRequestRequest.md docs/CreateCopyFlagConfigApprovalRequestRequest.md docs/CreateFlagConfigApprovalRequestRequest.md docs/CreateIpAllowlistEntryRequest.md docs/CreatePhaseInput.md -docs/CreateReleaseInput.md +docs/CreatePipelineReleaseInput.md docs/CreateReleasePipelineInput.md docs/CreateWorkflowTemplateInput.md docs/CustomProperty.md @@ -208,6 +214,14 @@ docs/CustomWorkflowOutput.md docs/CustomWorkflowStageMeta.md docs/CustomWorkflowsListingOutput.md docs/DataExportDestinationsApi.md +docs/DataExportProjectIdentityIncompleteError.md +docs/DataExportProjectIdentityIncompleteErrorRep.md +docs/DataExportProjectRankComponentsRep.md +docs/DataExportProjectRankRep.md +docs/DataExportProjectRankingPageRep.md +docs/DataExportProjectRankingRep.md +docs/DataExportProjectRankingScopeRep.md +docs/DataExportSeriesListRep.md docs/DefaultClientSideAvailability.md docs/DefaultClientSideAvailabilityPost.md docs/Defaults.md @@ -216,20 +230,43 @@ docs/DependentExperimentRep.md docs/DependentFlag.md docs/DependentFlagEnvironment.md docs/DependentFlagsByEnvironment.md -docs/DependentMeasuredRolloutRep.md docs/DependentMetricGroupRep.md docs/DependentMetricGroupRepWithMetrics.md docs/DependentMetricOrMetricGroupRep.md +docs/DependentReleasePhaseRep.md docs/DeploymentCollectionRep.md docs/DeploymentRep.md docs/Destination.md docs/DestinationPost.md docs/Destinations.md +docs/DynamicOptionFiltersItems.md docs/DynamicOptions.md docs/DynamicOptionsParser.md +docs/DynamicOptionsSource.md docs/Endpoint.md docs/Environment.md docs/EnvironmentPost.md +docs/EnvironmentRelease.md +docs/EnvironmentReleaseAdvancementMode.md +docs/EnvironmentReleaseClause.md +docs/EnvironmentReleaseCollection.md +docs/EnvironmentReleaseExistingRulePhaseInput.md +docs/EnvironmentReleaseLink.md +docs/EnvironmentReleaseMetricInput.md +docs/EnvironmentReleaseNewRulePhaseInput.md +docs/EnvironmentReleasePhase.md +docs/EnvironmentReleasePhaseInput.md +docs/EnvironmentReleaseResolution.md +docs/EnvironmentReleaseStepInput.md +docs/EnvironmentReleasesAccess.md +docs/EnvironmentReleasesAccessAllowedRep.md +docs/EnvironmentReleasesAccessDenied.md +docs/EnvironmentReleasesBetaApi.md +docs/EnvironmentReleasesFilter.md +docs/EnvironmentReleasesMemberSummary.md +docs/EnvironmentReleasesMetricDenominatorRep.md +docs/EnvironmentReleasesMetricListingRep.md +docs/EnvironmentReleasesModification.md docs/EnvironmentSummary.md docs/Environments.md docs/EnvironmentsApi.md @@ -268,6 +305,7 @@ docs/ExperimentEnvironmentSettingRep.md docs/ExperimentInfoRep.md docs/ExperimentPatchInput.md docs/ExperimentPost.md +docs/ExperimentationLink.md docs/ExperimentsApi.md docs/ExpiringTarget.md docs/ExpiringTargetError.md @@ -477,6 +515,7 @@ docs/NewMemberForm.md docs/NotFoundErrorRep.md docs/OAuth2ClientsApi.md docs/OauthClientPost.md +docs/ObservabilityAlertSource.md docs/OptionsArray.md docs/OtherApi.md docs/PaginatedLinks.md @@ -500,6 +539,14 @@ docs/PermissionGrantInput.md docs/PersistentStoreIntegrationsBetaApi.md docs/Phase.md docs/PhaseInfo.md +docs/PipelineRelease.md +docs/PipelineReleaseAudience.md +docs/PipelineReleaseAudienceConfigInput.md +docs/PipelineReleaseGuardianConfiguration.md +docs/PipelineReleaseGuardianConfigurationInput.md +docs/PipelineReleasePhase.md +docs/PipelineReleaseProgression.md +docs/PipelineReleaseProgressionCollection.md docs/PostApprovalRequestApplyRequest.md docs/PostApprovalRequestReviewRequest.md docs/PostDeploymentEventInput.md @@ -541,15 +588,14 @@ docs/RelayAutoConfigCollectionRep.md docs/RelayAutoConfigPost.md docs/RelayAutoConfigRep.md docs/RelayProxyConfigurationsApi.md -docs/Release.md -docs/ReleaseAudience.md -docs/ReleaseGuardianConfiguration.md -docs/ReleaseGuardianConfigurationInput.md +docs/ReleaseHealthCheckFailure.md +docs/ReleaseHealthCheckKind.md docs/ReleaseMethod.md -docs/ReleasePhase.md +docs/ReleaseMetric.md +docs/ReleaseMetricStatus.md docs/ReleasePipeline.md docs/ReleasePipelineCollection.md -docs/ReleasePipelinesBetaApi.md +docs/ReleasePipelinesDeprecatedApi.md docs/ReleasePoliciesAccess.md docs/ReleasePoliciesAccessAllowedReason.md docs/ReleasePoliciesAccessAllowedRep.md @@ -561,10 +607,10 @@ docs/ReleasePoliciesResponse.md docs/ReleasePolicy.md docs/ReleasePolicyScope.md docs/ReleasePolicyStage.md -docs/ReleaseProgression.md -docs/ReleaseProgressionCollection.md -docs/ReleaserAudienceConfigInput.md -docs/ReleasesBetaApi.md +docs/ReleaseStatus.md +docs/ReleaseStatusReason.md +docs/ReleaseStep.md +docs/ReleaseType.md docs/RepositoryCollectionRep.md docs/RepositoryPost.md docs/RepositoryRep.md @@ -589,6 +635,8 @@ docs/SdkKeyKind.md docs/SdkKeyListItem.md docs/SdkKeyPatch.md docs/SdkKeyPost.md +docs/SdkKeyViewsPut.md +docs/SdkKeys.md docs/SdkKeysEnvironmentSummary.md docs/SdkKeysForGetSdkKeys.md docs/SdkKeysSelfLink.md @@ -613,6 +661,8 @@ docs/SourceFlag.md docs/StageInput.md docs/StageOutput.md docs/StaleFlagData.md +docs/StartEnvironmentReleaseBadRequest.md +docs/StartEnvironmentReleaseRequest.md docs/Statement.md docs/StatementPost.md docs/StatisticCollectionRep.md @@ -621,6 +671,7 @@ docs/StatisticsRoot.md docs/StatusConflictErrorRep.md docs/StatusResponse.md docs/StatusServiceUnavailable.md +docs/StopEnvironmentReleaseRequest.md docs/StoreIntegrationError.md docs/SubjectDataRep.md docs/SubscriptionPost.md @@ -658,6 +709,7 @@ docs/TrustPolicyDetails.md docs/TrustPolicyStatement.md docs/UnauthorizedErrorRep.md docs/UnlinkResourceSuccessResponse.md +docs/UpdateAdaptiveTriggerRequest.md docs/UpdatePhaseStatusInput.md docs/UpdateReleasePipelineInput.md docs/UpsertContextKindPayload.md @@ -707,7 +759,7 @@ docs/ViewsAccessAllowedRep.md docs/ViewsAccessDenied.md docs/ViewsAccessDeniedReason.md docs/ViewsAccessRep.md -docs/ViewsBetaApi.md +docs/ViewsApi.md docs/ViewsLink.md docs/ViewsMaintainerMember.md docs/ViewsMaintainerTeam.md diff --git a/README.md b/README.md index a07bc3d..dba9e63 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This REST API is for custom integrations, data export, or automating your featur This client library is only compatible with the latest version of our REST API. Previous versions of this client library are compatible with earlier versions of our REST API. When you create an access token, you can set the REST API version associated with the token. By default, API requests you send using the token will use the specified API version. To learn more, read [Versioning](https://apidocs.launchdarkly.com/#section/Overview/Versioning). View our [sample code](#sample-code) for example usage. -## launchdarkly-api-typescript@24.0.0 +## launchdarkly-api-typescript@25.0.0 This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments: @@ -44,7 +44,7 @@ navigate to the folder of your consuming project and run one of the following co _published:_ ``` -npm install launchdarkly-api-typescript@24.0.0 --save +npm install launchdarkly-api-typescript@25.0.0 --save ``` _unPublished (not recommended):_ @@ -59,14 +59,12 @@ All URIs are relative to *https://app.launchdarkly.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AIConfigsApi* | [**listAIToolReferences**](docs/AIConfigsApi.md#listaitoolreferences) | **GET** /api/v2/projects/{projectKey}/ai-tools/{toolKey}/references | List AI tool references -*AIConfigsApi* | [**listAgentOptimizationRuns**](docs/AIConfigsApi.md#listagentoptimizationruns) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs | List agent optimization runs *AccessTokensApi* | [**deleteToken**](docs/AccessTokensApi.md#deletetoken) | **DELETE** /api/v2/tokens/{id} | Delete access token *AccessTokensApi* | [**getToken**](docs/AccessTokensApi.md#gettoken) | **GET** /api/v2/tokens/{id} | Get access token *AccessTokensApi* | [**getTokens**](docs/AccessTokensApi.md#gettokens) | **GET** /api/v2/tokens | List access tokens *AccessTokensApi* | [**patchToken**](docs/AccessTokensApi.md#patchtoken) | **PATCH** /api/v2/tokens/{id} | Patch access token *AccessTokensApi* | [**postToken**](docs/AccessTokensApi.md#posttoken) | **POST** /api/v2/tokens | Create access token -*AccessTokensApi* | [**resetToken**](docs/AccessTokensApi.md#resettoken) | **POST** /api/v2/tokens/{id}/reset | Reset access token +*AccessTokensApi* | [**resetToken**](docs/AccessTokensApi.md#resettoken) | **POST** /api/v2/tokens/{id}/reset | Reset access token (legacy) *AccountMembersApi* | [**deleteMember**](docs/AccountMembersApi.md#deletemember) | **DELETE** /api/v2/members/{id} | Delete account member *AccountMembersApi* | [**getMember**](docs/AccountMembersApi.md#getmember) | **GET** /api/v2/members/{id} | Get account member *AccountMembersApi* | [**getMembers**](docs/AccountMembersApi.md#getmembers) | **GET** /api/v2/members | List account members @@ -79,6 +77,7 @@ Class | Method | HTTP request | Description *AccountUsageBetaApi* | [**getContextsServersideUsage**](docs/AccountUsageBetaApi.md#getcontextsserversideusage) | **GET** /api/v2/usage/serverside-contexts | Get contexts serverside usage *AccountUsageBetaApi* | [**getContextsTotalUsage**](docs/AccountUsageBetaApi.md#getcontextstotalusage) | **GET** /api/v2/usage/total-contexts | Get contexts total usage *AccountUsageBetaApi* | [**getDataExportEventsUsage**](docs/AccountUsageBetaApi.md#getdataexporteventsusage) | **GET** /api/v2/usage/data-export-events | Get data export events usage +*AccountUsageBetaApi* | [**getDataExportProjectRanking**](docs/AccountUsageBetaApi.md#getdataexportprojectranking) | **GET** /api/v2/usage/data-export-events/projects/ranking | Rank Streaming usage by project *AccountUsageBetaApi* | [**getEvaluationsUsage**](docs/AccountUsageBetaApi.md#getevaluationsusage) | **GET** /api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey} | Get evaluations usage *AccountUsageBetaApi* | [**getEventsUsage**](docs/AccountUsageBetaApi.md#geteventsusage) | **GET** /api/v2/usage/events/{type} | Get events usage *AccountUsageBetaApi* | [**getExperimentationEventsUsage**](docs/AccountUsageBetaApi.md#getexperimentationeventsusage) | **GET** /api/v2/usage/experimentation-events | Get experimentation events usage @@ -101,6 +100,13 @@ Class | Method | HTTP request | Description *AccountUsageBetaApi* | [**getStreamUsageSdkversion**](docs/AccountUsageBetaApi.md#getstreamusagesdkversion) | **GET** /api/v2/usage/streams/{source}/sdkversions | Get stream usage SDK versions *AccountUsageBetaApi* | [**getVegaAIUsage**](docs/AccountUsageBetaApi.md#getvegaaiusage) | **GET** /api/v2/usage/vega-ai | Get Vega AI usage *AccountUsageBetaApi* | [**getWarehouseExportUsage**](docs/AccountUsageBetaApi.md#getwarehouseexportusage) | **GET** /api/v2/usage/warehouse-export | Get warehouse Data Export usage +*AdaptiveTriggersApi* | [**deleteAdaptiveTrigger**](docs/AdaptiveTriggersApi.md#deleteadaptivetrigger) | **DELETE** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} | Delete an adaptive trigger +*AdaptiveTriggersApi* | [**getAdaptiveTrigger**](docs/AdaptiveTriggersApi.md#getadaptivetrigger) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} | Get an adaptive trigger +*AdaptiveTriggersApi* | [**listAdaptiveTriggers**](docs/AdaptiveTriggersApi.md#listadaptivetriggers) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers | List adaptive triggers +*AdaptiveTriggersApi* | [**patchAdaptiveTrigger**](docs/AdaptiveTriggersApi.md#patchadaptivetrigger) | **PATCH** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} | Update an adaptive trigger +*AdaptiveTriggersApi* | [**postAdaptiveTrigger**](docs/AdaptiveTriggersApi.md#postadaptivetrigger) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers | Create an adaptive trigger +*AdaptiveTriggersApi* | [**postDisableAdaptiveTrigger**](docs/AdaptiveTriggersApi.md#postdisableadaptivetrigger) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/disable | Disable an adaptive trigger +*AdaptiveTriggersApi* | [**postEnableAdaptiveTrigger**](docs/AdaptiveTriggersApi.md#postenableadaptivetrigger) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/enable | Enable an adaptive trigger *AgentControlApi* | [**deleteAIConfig**](docs/AgentControlApi.md#deleteaiconfig) | **DELETE** /api/v2/projects/{projectKey}/ai-configs/{configKey} | Delete AI Config *AgentControlApi* | [**deleteAIConfigVariation**](docs/AgentControlApi.md#deleteaiconfigvariation) | **DELETE** /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} | Delete AI Config variation *AgentControlApi* | [**deleteAITool**](docs/AgentControlApi.md#deleteaitool) | **DELETE** /api/v2/projects/{projectKey}/ai-tools/{toolKey} | Delete AI tool @@ -124,11 +130,13 @@ Class | Method | HTTP request | Description *AgentControlApi* | [**getAgentSkill**](docs/AgentControlApi.md#getagentskill) | **GET** /api/v2/projects/{projectKey}/ai-configs/skills/{skillKey} | Get an agent skill *AgentControlApi* | [**getModelConfig**](docs/AgentControlApi.md#getmodelconfig) | **GET** /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey} | Get AI model config *AgentControlApi* | [**getPromptSnippet**](docs/AgentControlApi.md#getpromptsnippet) | **GET** /api/v2/projects/{projectKey}/ai-configs/prompt-snippets/{snippetKey} | Get a prompt snippet +*AgentControlApi* | [**listAIToolReferences**](docs/AgentControlApi.md#listaitoolreferences) | **GET** /api/v2/projects/{projectKey}/ai-tools/{toolKey}/references | List AI tool references *AgentControlApi* | [**listAIToolVersions**](docs/AgentControlApi.md#listaitoolversions) | **GET** /api/v2/projects/{projectKey}/ai-tools/{toolKey}/versions | List AI tool versions *AgentControlApi* | [**listAITools**](docs/AgentControlApi.md#listaitools) | **GET** /api/v2/projects/{projectKey}/ai-tools | List AI tools *AgentControlApi* | [**listAgentGraphs**](docs/AgentControlApi.md#listagentgraphs) | **GET** /api/v2/projects/{projectKey}/agent-graphs | List agent graphs -*AgentControlApi* | [**listAgentOptimizationResults**](docs/AgentControlApi.md#listagentoptimizationresults) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/results | List agent optimization runs +*AgentControlApi* | [**listAgentOptimizationResults**](docs/AgentControlApi.md#listagentoptimizationresults) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/results | List latest agent optimization result per run *AgentControlApi* | [**listAgentOptimizationResultsByRunId**](docs/AgentControlApi.md#listagentoptimizationresultsbyrunid) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs/{runId}/results | List agent optimization results for a run +*AgentControlApi* | [**listAgentOptimizationRuns**](docs/AgentControlApi.md#listagentoptimizationruns) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs | List agent optimization runs *AgentControlApi* | [**listAgentOptimizations**](docs/AgentControlApi.md#listagentoptimizations) | **GET** /api/v2/projects/{projectKey}/agent-optimizations | List agent optimizations *AgentControlApi* | [**listAgentSkillReferences**](docs/AgentControlApi.md#listagentskillreferences) | **GET** /api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}/references | List agent skill references *AgentControlApi* | [**listAgentSkillVersions**](docs/AgentControlApi.md#listagentskillversions) | **GET** /api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}/versions | List agent skill versions @@ -205,15 +213,12 @@ Class | Method | HTTP request | Description *CodeReferencesApi* | [**postRepository**](docs/CodeReferencesApi.md#postrepository) | **POST** /api/v2/code-refs/repositories | Create repository *CodeReferencesApi* | [**putBranch**](docs/CodeReferencesApi.md#putbranch) | **PUT** /api/v2/code-refs/repositories/{repo}/branches/{branch} | Upsert branch *ContextSettingsApi* | [**putContextFlagSetting**](docs/ContextSettingsApi.md#putcontextflagsetting) | **PUT** /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey} | Update flag settings for context -*ContextsApi* | [**deleteContextInstances**](docs/ContextsApi.md#deletecontextinstances) | **DELETE** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id} | Delete context instances *ContextsApi* | [**evaluateContextInstance**](docs/ContextsApi.md#evaluatecontextinstance) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate | Evaluate flags for context instance *ContextsApi* | [**getContextAttributeNames**](docs/ContextsApi.md#getcontextattributenames) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes | Get context attribute names *ContextsApi* | [**getContextAttributeValues**](docs/ContextsApi.md#getcontextattributevalues) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName} | Get context attribute values -*ContextsApi* | [**getContextInstances**](docs/ContextsApi.md#getcontextinstances) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id} | Get context instances *ContextsApi* | [**getContextKindsByProjectKey**](docs/ContextsApi.md#getcontextkindsbyprojectkey) | **GET** /api/v2/projects/{projectKey}/context-kinds | Get context kinds *ContextsApi* | [**getContexts**](docs/ContextsApi.md#getcontexts) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key} | Get contexts *ContextsApi* | [**putContextKind**](docs/ContextsApi.md#putcontextkind) | **PUT** /api/v2/projects/{projectKey}/context-kinds/{key} | Create or update context kind -*ContextsApi* | [**searchContextInstances**](docs/ContextsApi.md#searchcontextinstances) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search | Search for context instances *ContextsApi* | [**searchContexts**](docs/ContextsApi.md#searchcontexts) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search | Search for contexts *CustomRolesApi* | [**deleteCustomRole**](docs/CustomRolesApi.md#deletecustomrole) | **DELETE** /api/v2/roles/{customRoleKey} | Delete custom role *CustomRolesApi* | [**getCustomRole**](docs/CustomRolesApi.md#getcustomrole) | **GET** /api/v2/roles/{customRoleKey} | Get custom role @@ -230,6 +235,10 @@ Class | Method | HTTP request | Description *DataExportDestinationsApi* | [**postGenerateTrustPolicy**](docs/DataExportDestinationsApi.md#postgeneratetrustpolicy) | **POST** /api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-trust-policy | Generate trust policy *DataExportDestinationsApi* | [**postGenerateWarehouseDestinationKeyPair**](docs/DataExportDestinationsApi.md#postgeneratewarehousedestinationkeypair) | **POST** /api/v2/destinations/generate-warehouse-destination-key-pair | Generate Snowflake destination key pair *DataExportDestinationsApi* | [**postGenerateWarehouseDestinationSetupScript**](docs/DataExportDestinationsApi.md#postgeneratewarehousedestinationsetupscript) | **POST** /api/v2/destinations/projects/{projKey}/environments/{envKey}/kinds/{kind}/setup | Generate warehouse destination setup script +*EnvironmentReleasesBetaApi* | [**getEnvironmentRelease**](docs/EnvironmentReleasesBetaApi.md#getenvironmentrelease) | **GET** /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId} | Get an environment release +*EnvironmentReleasesBetaApi* | [**listEnvironmentReleases**](docs/EnvironmentReleasesBetaApi.md#listenvironmentreleases) | **GET** /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases | List environment releases +*EnvironmentReleasesBetaApi* | [**startEnvironmentRelease**](docs/EnvironmentReleasesBetaApi.md#startenvironmentrelease) | **POST** /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases | Start an environment release +*EnvironmentReleasesBetaApi* | [**stopEnvironmentRelease**](docs/EnvironmentReleasesBetaApi.md#stopenvironmentrelease) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId}/stop | Stop an environment release *EnvironmentsApi* | [**deleteEnvironment**](docs/EnvironmentsApi.md#deleteenvironment) | **DELETE** /api/v2/projects/{projectKey}/environments/{environmentKey} | Delete environment *EnvironmentsApi* | [**getEnvironment**](docs/EnvironmentsApi.md#getenvironment) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey} | Get environment *EnvironmentsApi* | [**getEnvironmentsByProject**](docs/EnvironmentsApi.md#getenvironmentsbyproject) | **GET** /api/v2/projects/{projectKey}/environments | List environments @@ -369,28 +378,30 @@ Class | Method | HTTP request | Description *RelayProxyConfigurationsApi* | [**patchRelayAutoConfig**](docs/RelayProxyConfigurationsApi.md#patchrelayautoconfig) | **PATCH** /api/v2/account/relay-auto-configs/{id} | Update a Relay Proxy config *RelayProxyConfigurationsApi* | [**postRelayAutoConfig**](docs/RelayProxyConfigurationsApi.md#postrelayautoconfig) | **POST** /api/v2/account/relay-auto-configs | Create a new Relay Proxy config *RelayProxyConfigurationsApi* | [**resetRelayAutoConfig**](docs/RelayProxyConfigurationsApi.md#resetrelayautoconfig) | **POST** /api/v2/account/relay-auto-configs/{id}/reset | Reset Relay Proxy configuration key -*ReleasePipelinesBetaApi* | [**deleteReleasePipeline**](docs/ReleasePipelinesBetaApi.md#deletereleasepipeline) | **DELETE** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Delete release pipeline -*ReleasePipelinesBetaApi* | [**getAllReleasePipelines**](docs/ReleasePipelinesBetaApi.md#getallreleasepipelines) | **GET** /api/v2/projects/{projectKey}/release-pipelines | Get all release pipelines -*ReleasePipelinesBetaApi* | [**getAllReleaseProgressionsForReleasePipeline**](docs/ReleasePipelinesBetaApi.md#getallreleaseprogressionsforreleasepipeline) | **GET** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}/releases | Get release progressions for release pipeline -*ReleasePipelinesBetaApi* | [**getReleasePipelineByKey**](docs/ReleasePipelinesBetaApi.md#getreleasepipelinebykey) | **GET** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Get release pipeline by key -*ReleasePipelinesBetaApi* | [**postReleasePipeline**](docs/ReleasePipelinesBetaApi.md#postreleasepipeline) | **POST** /api/v2/projects/{projectKey}/release-pipelines | Create a release pipeline -*ReleasePipelinesBetaApi* | [**putReleasePipeline**](docs/ReleasePipelinesBetaApi.md#putreleasepipeline) | **PUT** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Update a release pipeline +*ReleasePipelinesDeprecatedApi* | [**createReleaseForFlag**](docs/ReleasePipelinesDeprecatedApi.md#createreleaseforflag) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/release | Create a new release for flag +*ReleasePipelinesDeprecatedApi* | [**deleteReleaseByFlagKey**](docs/ReleasePipelinesDeprecatedApi.md#deletereleasebyflagkey) | **DELETE** /api/v2/flags/{projectKey}/{flagKey}/release | Delete a release for flag +*ReleasePipelinesDeprecatedApi* | [**deleteReleasePipeline**](docs/ReleasePipelinesDeprecatedApi.md#deletereleasepipeline) | **DELETE** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Delete release pipeline +*ReleasePipelinesDeprecatedApi* | [**getAllReleasePipelines**](docs/ReleasePipelinesDeprecatedApi.md#getallreleasepipelines) | **GET** /api/v2/projects/{projectKey}/release-pipelines | Get all release pipelines +*ReleasePipelinesDeprecatedApi* | [**getAllReleaseProgressionsForReleasePipeline**](docs/ReleasePipelinesDeprecatedApi.md#getallreleaseprogressionsforreleasepipeline) | **GET** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}/releases | Get release progressions for release pipeline +*ReleasePipelinesDeprecatedApi* | [**getReleaseByFlagKey**](docs/ReleasePipelinesDeprecatedApi.md#getreleasebyflagkey) | **GET** /api/v2/flags/{projectKey}/{flagKey}/release | Get release for flag +*ReleasePipelinesDeprecatedApi* | [**getReleasePipelineByKey**](docs/ReleasePipelinesDeprecatedApi.md#getreleasepipelinebykey) | **GET** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Get release pipeline by key +*ReleasePipelinesDeprecatedApi* | [**patchReleaseByFlagKey**](docs/ReleasePipelinesDeprecatedApi.md#patchreleasebyflagkey) | **PATCH** /api/v2/flags/{projectKey}/{flagKey}/release | Patch release for flag +*ReleasePipelinesDeprecatedApi* | [**postReleasePipeline**](docs/ReleasePipelinesDeprecatedApi.md#postreleasepipeline) | **POST** /api/v2/projects/{projectKey}/release-pipelines | Create a release pipeline +*ReleasePipelinesDeprecatedApi* | [**putReleasePipeline**](docs/ReleasePipelinesDeprecatedApi.md#putreleasepipeline) | **PUT** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Update a release pipeline +*ReleasePipelinesDeprecatedApi* | [**updatePhaseStatus**](docs/ReleasePipelinesDeprecatedApi.md#updatephasestatus) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId} | Update phase status for release *ReleasePoliciesBetaApi* | [**deleteReleasePolicy**](docs/ReleasePoliciesBetaApi.md#deletereleasepolicy) | **DELETE** /api/v2/projects/{projectKey}/release-policies/{policyKey} | Delete a release policy *ReleasePoliciesBetaApi* | [**getReleasePolicies**](docs/ReleasePoliciesBetaApi.md#getreleasepolicies) | **GET** /api/v2/projects/{projectKey}/release-policies | List release policies *ReleasePoliciesBetaApi* | [**getReleasePolicy**](docs/ReleasePoliciesBetaApi.md#getreleasepolicy) | **GET** /api/v2/projects/{projectKey}/release-policies/{policyKey} | Get a release policy by key *ReleasePoliciesBetaApi* | [**postReleasePoliciesOrder**](docs/ReleasePoliciesBetaApi.md#postreleasepoliciesorder) | **POST** /api/v2/projects/{projectKey}/release-policies/order | Update the order of existing release policies *ReleasePoliciesBetaApi* | [**postReleasePolicy**](docs/ReleasePoliciesBetaApi.md#postreleasepolicy) | **POST** /api/v2/projects/{projectKey}/release-policies | Create a release policy *ReleasePoliciesBetaApi* | [**putReleasePolicy**](docs/ReleasePoliciesBetaApi.md#putreleasepolicy) | **PUT** /api/v2/projects/{projectKey}/release-policies/{policyKey} | Update a release policy -*ReleasesBetaApi* | [**createReleaseForFlag**](docs/ReleasesBetaApi.md#createreleaseforflag) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/release | Create a new release for flag -*ReleasesBetaApi* | [**deleteReleaseByFlagKey**](docs/ReleasesBetaApi.md#deletereleasebyflagkey) | **DELETE** /api/v2/flags/{projectKey}/{flagKey}/release | Delete a release for flag -*ReleasesBetaApi* | [**getReleaseByFlagKey**](docs/ReleasesBetaApi.md#getreleasebyflagkey) | **GET** /api/v2/flags/{projectKey}/{flagKey}/release | Get release for flag -*ReleasesBetaApi* | [**patchReleaseByFlagKey**](docs/ReleasesBetaApi.md#patchreleasebyflagkey) | **PATCH** /api/v2/flags/{projectKey}/{flagKey}/release | Patch release for flag -*ReleasesBetaApi* | [**updatePhaseStatus**](docs/ReleasesBetaApi.md#updatephasestatus) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId} | Update phase status for release *SDKKeysBetaApi* | [**deleteSdkKeyByKey**](docs/SDKKeysBetaApi.md#deletesdkkeybykey) | **DELETE** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey} | Delete SDK key +*SDKKeysBetaApi* | [**getProjectSdkKeys**](docs/SDKKeysBetaApi.md#getprojectsdkkeys) | **GET** /api/v2/projects/{projectKey}/sdk-keys | Get all project SDK keys *SDKKeysBetaApi* | [**getSdkKeyByKey**](docs/SDKKeysBetaApi.md#getsdkkeybykey) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey} | Get SDK key *SDKKeysBetaApi* | [**getSdkKeys**](docs/SDKKeysBetaApi.md#getsdkkeys) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys | Get all environment SDK keys *SDKKeysBetaApi* | [**patchSdkKeyByKey**](docs/SDKKeysBetaApi.md#patchsdkkeybykey) | **PATCH** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey} | Update SDK key *SDKKeysBetaApi* | [**postSdkKey**](docs/SDKKeysBetaApi.md#postsdkkey) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys | Create SDK key +*SDKKeysBetaApi* | [**putSdkKeyViews**](docs/SDKKeysBetaApi.md#putsdkkeyviews) | **PUT** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}/views | Replace SDK key views *ScheduledChangesApi* | [**deleteFlagConfigScheduledChanges**](docs/ScheduledChangesApi.md#deleteflagconfigscheduledchanges) | **DELETE** /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id} | Delete scheduled changes workflow *ScheduledChangesApi* | [**getFeatureFlagScheduledChange**](docs/ScheduledChangesApi.md#getfeatureflagscheduledchange) | **GET** /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id} | Get a scheduled change *ScheduledChangesApi* | [**getFlagConfigScheduledChanges**](docs/ScheduledChangesApi.md#getflagconfigscheduledchanges) | **GET** /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes | List scheduled changes @@ -432,15 +443,15 @@ Class | Method | HTTP request | Description *UsersApi* | [**getSearchUsers**](docs/UsersApi.md#getsearchusers) | **GET** /api/v2/user-search/{projectKey}/{environmentKey} | Find users *UsersApi* | [**getUser**](docs/UsersApi.md#getuser) | **GET** /api/v2/users/{projectKey}/{environmentKey}/{userKey} | Get user *UsersApi* | [**getUsers**](docs/UsersApi.md#getusers) | **GET** /api/v2/users/{projectKey}/{environmentKey} | List users -*ViewsBetaApi* | [**createView**](docs/ViewsBetaApi.md#createview) | **POST** /api/v2/projects/{projectKey}/views | Create view -*ViewsBetaApi* | [**deleteView**](docs/ViewsBetaApi.md#deleteview) | **DELETE** /api/v2/projects/{projectKey}/views/{viewKey} | Delete view -*ViewsBetaApi* | [**getLinkedResources**](docs/ViewsBetaApi.md#getlinkedresources) | **GET** /api/v2/projects/{projectKey}/views/{viewKey}/linked/{resourceType} | Get linked resources -*ViewsBetaApi* | [**getLinkedViews**](docs/ViewsBetaApi.md#getlinkedviews) | **GET** /api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey} | Get linked views for a given resource -*ViewsBetaApi* | [**getView**](docs/ViewsBetaApi.md#getview) | **GET** /api/v2/projects/{projectKey}/views/{viewKey} | Get view -*ViewsBetaApi* | [**getViews**](docs/ViewsBetaApi.md#getviews) | **GET** /api/v2/projects/{projectKey}/views | List views -*ViewsBetaApi* | [**linkResource**](docs/ViewsBetaApi.md#linkresource) | **POST** /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} | Link resource -*ViewsBetaApi* | [**unlinkResource**](docs/ViewsBetaApi.md#unlinkresource) | **DELETE** /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} | Unlink resource -*ViewsBetaApi* | [**updateView**](docs/ViewsBetaApi.md#updateview) | **PATCH** /api/v2/projects/{projectKey}/views/{viewKey} | Update view +*ViewsApi* | [**createView**](docs/ViewsApi.md#createview) | **POST** /api/v2/projects/{projectKey}/views | Create view +*ViewsApi* | [**deleteView**](docs/ViewsApi.md#deleteview) | **DELETE** /api/v2/projects/{projectKey}/views/{viewKey} | Delete view +*ViewsApi* | [**getLinkedResources**](docs/ViewsApi.md#getlinkedresources) | **GET** /api/v2/projects/{projectKey}/views/{viewKey}/linked/{resourceType} | Get linked resources +*ViewsApi* | [**getLinkedViews**](docs/ViewsApi.md#getlinkedviews) | **GET** /api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey} | Get linked views for a given resource +*ViewsApi* | [**getView**](docs/ViewsApi.md#getview) | **GET** /api/v2/projects/{projectKey}/views/{viewKey} | Get view +*ViewsApi* | [**getViews**](docs/ViewsApi.md#getviews) | **GET** /api/v2/projects/{projectKey}/views | List views +*ViewsApi* | [**linkResource**](docs/ViewsApi.md#linkresource) | **POST** /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} | Link resource +*ViewsApi* | [**unlinkResource**](docs/ViewsApi.md#unlinkresource) | **DELETE** /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} | Unlink resource +*ViewsApi* | [**updateView**](docs/ViewsApi.md#updateview) | **PATCH** /api/v2/projects/{projectKey}/views/{viewKey} | Update view *WebhooksApi* | [**deleteWebhook**](docs/WebhooksApi.md#deletewebhook) | **DELETE** /api/v2/webhooks/{id} | Delete webhook *WebhooksApi* | [**getAllWebhooks**](docs/WebhooksApi.md#getallwebhooks) | **GET** /api/v2/webhooks | List webhooks *WebhooksApi* | [**getWebhook**](docs/WebhooksApi.md#getwebhook) | **GET** /api/v2/webhooks/{id} | Get webhook @@ -494,6 +505,12 @@ Class | Method | HTTP request | Description - [AccessTokenPost](docs/AccessTokenPost.md) - [ActionInput](docs/ActionInput.md) - [ActionOutput](docs/ActionOutput.md) + - [AdaptiveTrigger](docs/AdaptiveTrigger.md) + - [AdaptiveTriggerInstruction](docs/AdaptiveTriggerInstruction.md) + - [AdaptiveTriggerResourceKind](docs/AdaptiveTriggerResourceKind.md) + - [AdaptiveTriggerTask](docs/AdaptiveTriggerTask.md) + - [AdaptiveTriggers](docs/AdaptiveTriggers.md) + - [AdaptiveTriggersPaginatedLinks](docs/AdaptiveTriggersPaginatedLinks.md) - [AgentGraph](docs/AgentGraph.md) - [AgentGraphEdge](docs/AgentGraphEdge.md) - [AgentGraphEdgePost](docs/AgentGraphEdgePost.md) @@ -590,7 +607,9 @@ Class | Method | HTTP request | Description - [CallerIdentityRep](docs/CallerIdentityRep.md) - [CapabilityConfigPost](docs/CapabilityConfigPost.md) - [CapabilityConfigRep](docs/CapabilityConfigRep.md) + - [Classifier](docs/Classifier.md) - [Clause](docs/Clause.md) + - [CleanupBehavior](docs/CleanupBehavior.md) - [Client](docs/Client.md) - [ClientCollection](docs/ClientCollection.md) - [ClientSideAvailability](docs/ClientSideAvailability.md) @@ -610,11 +629,8 @@ Class | Method | HTTP request | Description - [ContextInstanceEvaluation](docs/ContextInstanceEvaluation.md) - [ContextInstanceEvaluationReason](docs/ContextInstanceEvaluationReason.md) - [ContextInstanceEvaluations](docs/ContextInstanceEvaluations.md) - - [ContextInstanceRecord](docs/ContextInstanceRecord.md) - - [ContextInstanceSearch](docs/ContextInstanceSearch.md) - [ContextInstanceSegmentMembership](docs/ContextInstanceSegmentMembership.md) - [ContextInstanceSegmentMemberships](docs/ContextInstanceSegmentMemberships.md) - - [ContextInstances](docs/ContextInstances.md) - [ContextKindEnvironmentObservation](docs/ContextKindEnvironmentObservation.md) - [ContextKindRep](docs/ContextKindRep.md) - [ContextKindsCollectionRep](docs/ContextKindsCollectionRep.md) @@ -626,13 +642,14 @@ Class | Method | HTTP request | Description - [CountBucket](docs/CountBucket.md) - [CountBucketsResult](docs/CountBucketsResult.md) - [CovariateInfoRep](docs/CovariateInfoRep.md) + - [CreateAdaptiveTriggerRequest](docs/CreateAdaptiveTriggerRequest.md) - [CreateAnnouncementBody](docs/CreateAnnouncementBody.md) - [CreateApprovalRequestRequest](docs/CreateApprovalRequestRequest.md) - [CreateCopyFlagConfigApprovalRequestRequest](docs/CreateCopyFlagConfigApprovalRequestRequest.md) - [CreateFlagConfigApprovalRequestRequest](docs/CreateFlagConfigApprovalRequestRequest.md) - [CreateIpAllowlistEntryRequest](docs/CreateIpAllowlistEntryRequest.md) - [CreatePhaseInput](docs/CreatePhaseInput.md) - - [CreateReleaseInput](docs/CreateReleaseInput.md) + - [CreatePipelineReleaseInput](docs/CreatePipelineReleaseInput.md) - [CreateReleasePipelineInput](docs/CreateReleasePipelineInput.md) - [CreateWorkflowTemplateInput](docs/CreateWorkflowTemplateInput.md) - [CustomProperty](docs/CustomProperty.md) @@ -644,6 +661,14 @@ Class | Method | HTTP request | Description - [CustomWorkflowOutput](docs/CustomWorkflowOutput.md) - [CustomWorkflowStageMeta](docs/CustomWorkflowStageMeta.md) - [CustomWorkflowsListingOutput](docs/CustomWorkflowsListingOutput.md) + - [DataExportProjectIdentityIncompleteError](docs/DataExportProjectIdentityIncompleteError.md) + - [DataExportProjectIdentityIncompleteErrorRep](docs/DataExportProjectIdentityIncompleteErrorRep.md) + - [DataExportProjectRankComponentsRep](docs/DataExportProjectRankComponentsRep.md) + - [DataExportProjectRankRep](docs/DataExportProjectRankRep.md) + - [DataExportProjectRankingPageRep](docs/DataExportProjectRankingPageRep.md) + - [DataExportProjectRankingRep](docs/DataExportProjectRankingRep.md) + - [DataExportProjectRankingScopeRep](docs/DataExportProjectRankingScopeRep.md) + - [DataExportSeriesListRep](docs/DataExportSeriesListRep.md) - [DefaultClientSideAvailability](docs/DefaultClientSideAvailability.md) - [DefaultClientSideAvailabilityPost](docs/DefaultClientSideAvailabilityPost.md) - [Defaults](docs/Defaults.md) @@ -652,20 +677,42 @@ Class | Method | HTTP request | Description - [DependentFlag](docs/DependentFlag.md) - [DependentFlagEnvironment](docs/DependentFlagEnvironment.md) - [DependentFlagsByEnvironment](docs/DependentFlagsByEnvironment.md) - - [DependentMeasuredRolloutRep](docs/DependentMeasuredRolloutRep.md) - [DependentMetricGroupRep](docs/DependentMetricGroupRep.md) - [DependentMetricGroupRepWithMetrics](docs/DependentMetricGroupRepWithMetrics.md) - [DependentMetricOrMetricGroupRep](docs/DependentMetricOrMetricGroupRep.md) + - [DependentReleasePhaseRep](docs/DependentReleasePhaseRep.md) - [DeploymentCollectionRep](docs/DeploymentCollectionRep.md) - [DeploymentRep](docs/DeploymentRep.md) - [Destination](docs/Destination.md) - [DestinationPost](docs/DestinationPost.md) - [Destinations](docs/Destinations.md) + - [DynamicOptionFiltersItems](docs/DynamicOptionFiltersItems.md) - [DynamicOptions](docs/DynamicOptions.md) - [DynamicOptionsParser](docs/DynamicOptionsParser.md) + - [DynamicOptionsSource](docs/DynamicOptionsSource.md) - [Endpoint](docs/Endpoint.md) - [Environment](docs/Environment.md) - [EnvironmentPost](docs/EnvironmentPost.md) + - [EnvironmentRelease](docs/EnvironmentRelease.md) + - [EnvironmentReleaseAdvancementMode](docs/EnvironmentReleaseAdvancementMode.md) + - [EnvironmentReleaseClause](docs/EnvironmentReleaseClause.md) + - [EnvironmentReleaseCollection](docs/EnvironmentReleaseCollection.md) + - [EnvironmentReleaseExistingRulePhaseInput](docs/EnvironmentReleaseExistingRulePhaseInput.md) + - [EnvironmentReleaseLink](docs/EnvironmentReleaseLink.md) + - [EnvironmentReleaseMetricInput](docs/EnvironmentReleaseMetricInput.md) + - [EnvironmentReleaseNewRulePhaseInput](docs/EnvironmentReleaseNewRulePhaseInput.md) + - [EnvironmentReleasePhase](docs/EnvironmentReleasePhase.md) + - [EnvironmentReleasePhaseInput](docs/EnvironmentReleasePhaseInput.md) + - [EnvironmentReleaseResolution](docs/EnvironmentReleaseResolution.md) + - [EnvironmentReleaseStepInput](docs/EnvironmentReleaseStepInput.md) + - [EnvironmentReleasesAccess](docs/EnvironmentReleasesAccess.md) + - [EnvironmentReleasesAccessAllowedRep](docs/EnvironmentReleasesAccessAllowedRep.md) + - [EnvironmentReleasesAccessDenied](docs/EnvironmentReleasesAccessDenied.md) + - [EnvironmentReleasesFilter](docs/EnvironmentReleasesFilter.md) + - [EnvironmentReleasesMemberSummary](docs/EnvironmentReleasesMemberSummary.md) + - [EnvironmentReleasesMetricDenominatorRep](docs/EnvironmentReleasesMetricDenominatorRep.md) + - [EnvironmentReleasesMetricListingRep](docs/EnvironmentReleasesMetricListingRep.md) + - [EnvironmentReleasesModification](docs/EnvironmentReleasesModification.md) - [EnvironmentSummary](docs/EnvironmentSummary.md) - [Environments](docs/Environments.md) - [EvaluationReason](docs/EvaluationReason.md) @@ -702,6 +749,7 @@ Class | Method | HTTP request | Description - [ExperimentInfoRep](docs/ExperimentInfoRep.md) - [ExperimentPatchInput](docs/ExperimentPatchInput.md) - [ExperimentPost](docs/ExperimentPost.md) + - [ExperimentationLink](docs/ExperimentationLink.md) - [ExpiringTarget](docs/ExpiringTarget.md) - [ExpiringTargetError](docs/ExpiringTargetError.md) - [ExpiringTargetGetResponse](docs/ExpiringTargetGetResponse.md) @@ -890,6 +938,7 @@ Class | Method | HTTP request | Description - [NewMemberForm](docs/NewMemberForm.md) - [NotFoundErrorRep](docs/NotFoundErrorRep.md) - [OauthClientPost](docs/OauthClientPost.md) + - [ObservabilityAlertSource](docs/ObservabilityAlertSource.md) - [OptionsArray](docs/OptionsArray.md) - [PaginatedLinks](docs/PaginatedLinks.md) - [ParameterDefault](docs/ParameterDefault.md) @@ -911,6 +960,14 @@ Class | Method | HTTP request | Description - [PermissionGrantInput](docs/PermissionGrantInput.md) - [Phase](docs/Phase.md) - [PhaseInfo](docs/PhaseInfo.md) + - [PipelineRelease](docs/PipelineRelease.md) + - [PipelineReleaseAudience](docs/PipelineReleaseAudience.md) + - [PipelineReleaseAudienceConfigInput](docs/PipelineReleaseAudienceConfigInput.md) + - [PipelineReleaseGuardianConfiguration](docs/PipelineReleaseGuardianConfiguration.md) + - [PipelineReleaseGuardianConfigurationInput](docs/PipelineReleaseGuardianConfigurationInput.md) + - [PipelineReleasePhase](docs/PipelineReleasePhase.md) + - [PipelineReleaseProgression](docs/PipelineReleaseProgression.md) + - [PipelineReleaseProgressionCollection](docs/PipelineReleaseProgressionCollection.md) - [PostApprovalRequestApplyRequest](docs/PostApprovalRequestApplyRequest.md) - [PostApprovalRequestReviewRequest](docs/PostApprovalRequestReviewRequest.md) - [PostDeploymentEventInput](docs/PostDeploymentEventInput.md) @@ -950,12 +1007,11 @@ Class | Method | HTTP request | Description - [RelayAutoConfigCollectionRep](docs/RelayAutoConfigCollectionRep.md) - [RelayAutoConfigPost](docs/RelayAutoConfigPost.md) - [RelayAutoConfigRep](docs/RelayAutoConfigRep.md) - - [Release](docs/Release.md) - - [ReleaseAudience](docs/ReleaseAudience.md) - - [ReleaseGuardianConfiguration](docs/ReleaseGuardianConfiguration.md) - - [ReleaseGuardianConfigurationInput](docs/ReleaseGuardianConfigurationInput.md) + - [ReleaseHealthCheckFailure](docs/ReleaseHealthCheckFailure.md) + - [ReleaseHealthCheckKind](docs/ReleaseHealthCheckKind.md) - [ReleaseMethod](docs/ReleaseMethod.md) - - [ReleasePhase](docs/ReleasePhase.md) + - [ReleaseMetric](docs/ReleaseMetric.md) + - [ReleaseMetricStatus](docs/ReleaseMetricStatus.md) - [ReleasePipeline](docs/ReleasePipeline.md) - [ReleasePipelineCollection](docs/ReleasePipelineCollection.md) - [ReleasePoliciesAccess](docs/ReleasePoliciesAccess.md) @@ -968,9 +1024,10 @@ Class | Method | HTTP request | Description - [ReleasePolicy](docs/ReleasePolicy.md) - [ReleasePolicyScope](docs/ReleasePolicyScope.md) - [ReleasePolicyStage](docs/ReleasePolicyStage.md) - - [ReleaseProgression](docs/ReleaseProgression.md) - - [ReleaseProgressionCollection](docs/ReleaseProgressionCollection.md) - - [ReleaserAudienceConfigInput](docs/ReleaserAudienceConfigInput.md) + - [ReleaseStatus](docs/ReleaseStatus.md) + - [ReleaseStatusReason](docs/ReleaseStatusReason.md) + - [ReleaseStep](docs/ReleaseStep.md) + - [ReleaseType](docs/ReleaseType.md) - [RepositoryCollectionRep](docs/RepositoryCollectionRep.md) - [RepositoryPost](docs/RepositoryPost.md) - [RepositoryRep](docs/RepositoryRep.md) @@ -993,6 +1050,8 @@ Class | Method | HTTP request | Description - [SdkKeyListItem](docs/SdkKeyListItem.md) - [SdkKeyPatch](docs/SdkKeyPatch.md) - [SdkKeyPost](docs/SdkKeyPost.md) + - [SdkKeyViewsPut](docs/SdkKeyViewsPut.md) + - [SdkKeys](docs/SdkKeys.md) - [SdkKeysEnvironmentSummary](docs/SdkKeysEnvironmentSummary.md) - [SdkKeysForGetSdkKeys](docs/SdkKeysForGetSdkKeys.md) - [SdkKeysSelfLink](docs/SdkKeysSelfLink.md) @@ -1016,6 +1075,8 @@ Class | Method | HTTP request | Description - [StageInput](docs/StageInput.md) - [StageOutput](docs/StageOutput.md) - [StaleFlagData](docs/StaleFlagData.md) + - [StartEnvironmentReleaseBadRequest](docs/StartEnvironmentReleaseBadRequest.md) + - [StartEnvironmentReleaseRequest](docs/StartEnvironmentReleaseRequest.md) - [Statement](docs/Statement.md) - [StatementPost](docs/StatementPost.md) - [StatisticCollectionRep](docs/StatisticCollectionRep.md) @@ -1024,6 +1085,7 @@ Class | Method | HTTP request | Description - [StatusConflictErrorRep](docs/StatusConflictErrorRep.md) - [StatusResponse](docs/StatusResponse.md) - [StatusServiceUnavailable](docs/StatusServiceUnavailable.md) + - [StopEnvironmentReleaseRequest](docs/StopEnvironmentReleaseRequest.md) - [StoreIntegrationError](docs/StoreIntegrationError.md) - [SubjectDataRep](docs/SubjectDataRep.md) - [SubscriptionPost](docs/SubscriptionPost.md) @@ -1058,6 +1120,7 @@ Class | Method | HTTP request | Description - [TrustPolicyStatement](docs/TrustPolicyStatement.md) - [UnauthorizedErrorRep](docs/UnauthorizedErrorRep.md) - [UnlinkResourceSuccessResponse](docs/UnlinkResourceSuccessResponse.md) + - [UpdateAdaptiveTriggerRequest](docs/UpdateAdaptiveTriggerRequest.md) - [UpdatePhaseStatusInput](docs/UpdatePhaseStatusInput.md) - [UpdateReleasePipelineInput](docs/UpdateReleasePipelineInput.md) - [UpsertContextKindPayload](docs/UpsertContextKindPayload.md) diff --git a/api.ts b/api.ts index 436dd80..4224b90 100644 --- a/api.ts +++ b/api.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * LaunchDarkly REST API - * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). + * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. Unless an endpoint\'s documentation says otherwise, the API ignores request body fields that are not part of that endpoint\'s request schema, and does not return an error for them. A successful response does not mean that every field you sent was applied. To confirm the result, check the response body. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). * * The version of the OpenAPI document: 2.0 * Contact: support@launchdarkly.com @@ -26,13 +26,35 @@ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerM export interface AIConfig { '_access'?: AiConfigsAccess; '_links'?: ParentAndSelfLinks; + '_site'?: CoreLink; + /** + * A description of the AI Config + */ 'description': string; + /** + * The AI Config key + */ 'key': string; '_maintainer'?: AIConfigMaintainer; + /** + * The AI Config mode + */ 'mode'?: AIConfigModeEnum; + /** + * The AI Config name + */ 'name': string; + /** + * Tags for this resource + */ 'tags': Array; + /** + * The version number of this resource + */ 'version': number; + /** + * The variations of this AI Config + */ 'variations': Array; 'createdAt': number; 'updatedAt': number; @@ -85,14 +107,34 @@ export type AIConfigDependencyTypeEnum = typeof AIConfigDependencyTypeEnum[keyof /** * @type AIConfigMaintainer + * The member or team that maintains this resource */ export type AIConfigMaintainer = AiConfigsMaintainerTeam | MaintainerMember; export interface AIConfigPatch { + /** + * Key of the variation this config serves by default + */ + 'defaultVariationKey'?: string; + /** + * A description of the AI Config + */ 'description'?: string; + /** + * The ID of the member who maintains this resource + */ 'maintainerId'?: string; + /** + * The key of the team that maintains this resource + */ 'maintainerTeamKey'?: string; + /** + * A human-readable name for the AI Config + */ 'name'?: string; + /** + * Tags for this resource + */ 'tags'?: Array; /** * Evaluation metric key for this config @@ -104,13 +146,37 @@ export interface AIConfigPatch { 'isInverted'?: boolean; } export interface AIConfigPost { + /** + * A description of the AI Config + */ 'description'?: string; + /** + * A unique key for the AI Config + */ 'key': string; + /** + * The ID of the member who maintains this resource + */ 'maintainerId'?: string; + /** + * The key of the team that maintains this resource + */ 'maintainerTeamKey'?: string; + /** + * The AI Config mode + */ 'mode'?: AIConfigPostModeEnum; + /** + * A human-readable name for the AI Config + */ 'name': string; + /** + * Tags for this resource + */ 'tags'?: Array; + /** + * Keys of the views to add the AI Config to + */ 'viewKeys'?: Array; 'defaultVariation'?: AIConfigVariationPost; /** @@ -147,87 +213,230 @@ export interface AIConfigTargeting { */ 'createdAt': number; 'defaults'?: AIConfigTargetingDefaults; + /** + * Targeting for each environment, keyed by environment key + */ 'environments': { [key: string]: AIConfigTargetingEnvironment; }; 'experiments': AiConfigsExperimentInfoRep; + /** + * The AI Config key + */ 'key': string; + /** + * The AI Config name + */ 'name': string; + /** + * Tags for this resource + */ 'tags': Array; + /** + * The variations of this AI Config + */ 'variations': Array; + /** + * The version number of this resource + */ '_version': number; } export interface AIConfigTargetingDefaults { + /** + * Index of the variation served when targeting is on + */ 'onVariation': number; + /** + * Index of the variation served when targeting is off + */ 'offVariation': number; } export interface AIConfigTargetingEnvironment { + /** + * Individual context targets for non-user context kinds + */ 'contextTargets': Array; + /** + * Whether targeting is on in this environment + */ 'enabled': boolean; 'fallthrough': AIConfigTargetingEnvironmentFallthrough; 'lastModified': number; + /** + * Index of the variation served when targeting is off + */ 'offVariation'?: number; + /** + * The targeting rules + */ 'rules': Array; + /** + * Individual user targets + */ 'targets': Array; + /** + * Whether to send detailed events for all evaluations + */ 'trackEvents': boolean; + /** + * Whether to send detailed events for evaluations that fall through to the default rule + */ 'trackEventsFallthrough': boolean; + /** + * The environment name + */ '_environmentName': string; + /** + * The version of the targeting in this environment + */ '_version': number; } export interface AIConfigTargetingEnvironmentFallthrough { + /** + * Index of the variation served by the default rule + */ 'variation'?: number; 'rollout'?: AIConfigTargetingEnvironmentFallthroughRollout; } export interface AIConfigTargetingEnvironmentFallthroughRollout { + /** + * The context attribute used to bucket contexts + */ 'bucketBy'?: string; + /** + * The context kind used to bucket contexts + */ 'contextKind': string; 'experimentAllocation'?: AIConfigTargetingEnvironmentFallthroughRolloutExperimentationAllocation; + /** + * The seed used for bucketing + */ 'seed'?: number; + /** + * The variations and their weights + */ 'variations': Array; } export interface AIConfigTargetingEnvironmentFallthroughRolloutExperimentationAllocation { + /** + * Whether contexts can be reassigned to new buckets + */ 'canReshuffle': boolean; + /** + * Index of the default variation + */ 'defaultVariation': number; + /** + * The allocation type + */ 'type': string; } export interface AIConfigTargetingEnvironmentFallthroughRolloutVariation { + /** + * Whether this variation is excluded from experiment tracking + */ '_untracked'?: boolean; + /** + * Index of the variation + */ 'variation': number; + /** + * The weight of this variation, in thousandths of a percent + */ 'weight': number; } export interface AIConfigTargetingEnvironmentRule { + /** + * The clauses a context must match + */ 'clauses': Array; + /** + * Whether to send detailed events for evaluations that match this rule + */ 'trackEvents': boolean; } export interface AIConfigTargetingEnvironmentRuleClause { + /** + * The context attribute to match + */ 'attribute': string; + /** + * The clause ID + */ 'id': string; + /** + * Whether to negate the match + */ 'negate': boolean; + /** + * The operator to use + */ 'op': string; + /** + * The values to match against + */ 'values': Array; } export interface AIConfigTargetingEnvironmentTarget { + /** + * The context kind + */ 'contextKind': string; + /** + * The context keys to target + */ 'values': Array; + /** + * Index of the variation to serve + */ 'variation': number; } export interface AIConfigTargetingPatch { + /** + * A comment describing the change + */ 'comment'?: string; + /** + * The environment key + */ 'environmentKey': string; + /** + * The semantic patch instructions to apply + */ 'instructions': Array<{ [key: string]: any; }>; } export interface AIConfigTargetingVariation { + /** + * The variation ID + */ '_id': string; + /** + * A description of the variation + */ 'description': string; + /** + * The variation name + */ 'name': string; 'value': AIConfigTargetingVariationValue; } /** * @type AIConfigTargetingVariationValue + * The variation value */ export type AIConfigTargetingVariationValue = boolean | number | object | string; export interface AIConfigVariation { '_links'?: ParentLink; + /** + * The color used for this variation in the UI + */ 'color'?: string; + /** + * Classifier rules for a judge variation. When this array is non-empty, messages must be empty. + */ + 'classifiers'?: Array; + /** + * A comment describing this version of the variation + */ 'comment'?: string; /** * Returns the description for the agent. This is only returned for agent variations. @@ -237,27 +446,76 @@ export interface AIConfigVariation { * Returns the instructions for the agent. This is only returned for agent variations. */ 'instructions'?: string; + /** + * The variation key + */ 'key': string; + /** + * The variation ID + */ '_id': string; + /** + * The prompt messages for this variation + */ 'messages'?: Array; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'model': object; + /** + * The key of the model config that this variation uses, not the provider model ID. Absent when the variation does not use a model config. + */ 'modelConfigKey'?: string; + /** + * The version of the model config that this variation is pinned to, when it references a custom model config. Absent when the variation does not reference a model config, when the variation is not pinned to a specific version, or when custom model config versioning is not enabled for the project. + */ + 'modelConfigVersion'?: number; + /** + * The variation name + */ 'name': string; /** * JSON Schema defining the structured output format for the variation. */ 'outputFormat'?: { [key: string]: any; }; 'createdAt': number; + /** + * The version number of this resource + */ 'version': number; - 'state'?: string; + /** + * The state of the variation. - `archived`: The variation is archived. To restore it, update the variation with `state` set to `published`. - `published`: The variation is active. + */ + 'state'?: AIConfigVariationStateEnum; '_archivedAt'?: number; '_publishedAt'?: number; + /** + * The tools this variation can use + */ 'tools'?: Array; + /** + * The agent skills this variation can use + */ 'skills'?: Array; 'judgeConfiguration'?: JudgeConfiguration; + /** + * Keys of the judge AI Configs attached to this variation + */ 'judgingConfigKeys'?: Array; } + +export const AIConfigVariationStateEnum = { + Archived: 'archived', + Published: 'published' +} as const; + +export type AIConfigVariationStateEnum = typeof AIConfigVariationStateEnum[keyof typeof AIConfigVariationStateEnum]; + export interface AIConfigVariationPatch { + /** + * Replaces classifier rules on a judge variation. An empty array clears them. When this array is non-empty, messages must be empty. + */ + 'classifiers'?: Array; /** * Human-readable description of what this patch changes */ @@ -270,19 +528,38 @@ export interface AIConfigVariationPatch { * Instructions for agent when the config is in agent mode. */ 'instructions'?: string; + /** + * The prompt messages for this variation + */ 'messages'?: Array; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'model'?: object; + /** + * The key that GET /api/v2/projects/{projectKey}/ai-configs/model-configs returns for the model config. Do not use a custom model config\'s ID, which is the provider model ID. + */ 'modelConfigKey'?: string; + /** + * The exact model config version to set this variation to. Requires modelConfigKey to be set (either in this patch or already on the variation), and the version must exist for that model config. When omitted, the variation keeps the version it is currently set to, unless the patch changes modelConfigKey, in which case the variation records the new model config\'s current (latest) version. + */ + 'modelConfigVersion'?: number; + /** + * A human-readable name for the variation + */ 'name'?: string; /** * JSON Schema defining the structured output format for the variation. */ 'outputFormat'?: { [key: string]: any; }; + /** + * Whether to publish this version of the variation + */ 'published'?: boolean; /** - * One of \'archived\', \'published\' + * The state to move the variation to. Omit this field to keep the current state. - `archived`: Archive a published variation. You cannot archive a variation that is already archived. You also cannot archive the only variation of an AI Config. An AI Config itself cannot be archived. - `published`: Restore an archived variation. You cannot publish a variation that is already published. */ - 'state'?: string; + 'state'?: AIConfigVariationPatchStateEnum; /** * List of tools to use for this variation. The latest version of the tool will be used. */ @@ -297,7 +574,19 @@ export interface AIConfigVariationPatch { 'skills'?: Array; 'judgeConfiguration'?: JudgeConfiguration; } + +export const AIConfigVariationPatchStateEnum = { + Archived: 'archived', + Published: 'published' +} as const; + +export type AIConfigVariationPatchStateEnum = typeof AIConfigVariationPatchStateEnum[keyof typeof AIConfigVariationPatchStateEnum]; + export interface AIConfigVariationPost { + /** + * Classifier rules for a judge variation. When this array is non-empty, messages must be empty. + */ + 'classifiers'?: Array; /** * Human-readable description of this variation */ @@ -310,11 +599,30 @@ export interface AIConfigVariationPost { * Returns the instructions for the agent. This is only returned for agent variations. */ 'instructions'?: string; + /** + * A unique key for the variation + */ 'key': string; + /** + * The prompt messages for this variation + */ 'messages'?: Array; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'model'?: object; + /** + * A human-readable name for the variation + */ 'name': string; + /** + * The key that GET /api/v2/projects/{projectKey}/ai-configs/model-configs returns for the model config. Do not use a custom model config\'s ID, which is the provider model ID. + */ 'modelConfigKey'?: string; + /** + * The exact model config version to set this variation to. Requires modelConfigKey to be set, and the version must exist for that model config. When omitted, the variation records the model config\'s current (latest) version. + */ + 'modelConfigVersion'?: number; /** * JSON Schema defining the structured output format for the variation. */ @@ -334,22 +642,41 @@ export interface AIConfigVariationPost { 'judgeConfiguration'?: JudgeConfiguration; } export interface AIConfigVariationsResponse { + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount': number; } export interface AIConfigs { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount': number; } export interface AIConfigsSummary { 'count': number; } export interface AITool { + /** + * The tool key + */ 'key': string; '_access'?: AiConfigsAccess; '_links'?: ParentAndSelfLinks; + '_site'?: CoreLink; '_maintainer'?: AIConfigMaintainer; + /** + * A description of the tool + */ 'description'?: string; /** * JSON Schema defining the tool\'s parameters for LLM consumption @@ -359,13 +686,28 @@ export interface AITool { * Custom metadata and configuration for application-level use (not sent to LLM) */ 'customParameters'?: object; + /** + * Tags for the tool. Tags can be used in custom role policies. + */ 'tags'?: Array; + /** + * Version of the tool. Starts at 1, and each update that changes the description, schema, custom parameters, or tags creates a new version. Pass this value with `key` in a variation\'s `tools: [{key, version}]`. + */ 'version': number; 'createdAt': number; } export interface AIToolPatch { + /** + * The ID of the member who maintains this resource + */ 'maintainerId'?: string; + /** + * The key of the team that maintains this resource + */ 'maintainerTeamKey'?: string; + /** + * A description of the tool + */ 'description'?: string; /** * JSON Schema defining the tool\'s parameters for LLM consumption @@ -375,12 +717,27 @@ export interface AIToolPatch { * Custom metadata and configuration for application-level use (not sent to LLM) */ 'customParameters'?: object; + /** + * Replaces the tags on the tool. Tags can be used in custom role policies. + */ 'tags'?: Array; } export interface AIToolPost { + /** + * A unique key for the tool + */ 'key': string; + /** + * The ID of the member who maintains this resource + */ 'maintainerId'?: string; + /** + * The key of the team that maintains this resource + */ 'maintainerTeamKey'?: string; + /** + * A description of the tool + */ 'description'?: string; /** * JSON Schema defining the tool\'s parameters for LLM consumption @@ -390,11 +747,20 @@ export interface AIToolPost { * Custom metadata and configuration for application-level use (not sent to LLM) */ 'customParameters'?: object; + /** + * Tags for the tool. Tags can be used in custom role policies. + */ 'tags'?: Array; } export interface AITools { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount': number; } export interface Access { @@ -500,6 +866,7 @@ export interface AccessTokenPost { * The default API version for this token */ 'defaultApiVersion'?: number; + 'expiry'?: number; } export const AccessTokenPostRoleEnum = { @@ -523,11 +890,65 @@ export interface ActionOutput { 'kind': string; 'instructions': Array<{ [key: string]: any; }>; } +export interface AdaptiveTrigger { + 'id': string; + 'name': string; + 'resourceKind': AdaptiveTriggerResourceKind; + 'resourceKey': string; + 'enabled': boolean; + 'triggerSource': ObservabilityAlertSource; + 'task': AdaptiveTriggerTask; + 'createdAt': number; + 'updatedAt': number; +} + + +export interface AdaptiveTriggerInstruction { + 'kind': AdaptiveTriggerInstructionKindEnum; + 'variationId': string; + /** + * The targeting rule this adaptive trigger acts on. Required for updateRuleVariationOrRollout instructions. + */ + 'ruleId'?: string; +} + +export const AdaptiveTriggerInstructionKindEnum = { + UpdateFallthroughVariationOrRollout: 'updateFallthroughVariationOrRollout', + UpdateRuleVariationOrRollout: 'updateRuleVariationOrRollout' +} as const; + +export type AdaptiveTriggerInstructionKindEnum = typeof AdaptiveTriggerInstructionKindEnum[keyof typeof AdaptiveTriggerInstructionKindEnum]; + + +export const AdaptiveTriggerResourceKind = { + Flag: 'flag', + AiConfig: 'ai-config' +} as const; + +export type AdaptiveTriggerResourceKind = typeof AdaptiveTriggerResourceKind[keyof typeof AdaptiveTriggerResourceKind]; + + +export interface AdaptiveTriggerTask { + 'instructions': Array; +} +export interface AdaptiveTriggers { + '_links'?: AdaptiveTriggersPaginatedLinks; + 'items': Array; + 'totalCount': number; +} +export interface AdaptiveTriggersPaginatedLinks { + 'first'?: ExperimentationLink; + 'last'?: ExperimentationLink; + 'next'?: ExperimentationLink; + 'prev'?: ExperimentationLink; + 'self': ExperimentationLink; +} /** * An agent graph representing a directed graph of configs */ export interface AgentGraph { '_access'?: AiConfigsAccess; + '_site'?: CoreLink; /** * A unique key for the agent graph */ @@ -596,6 +1017,7 @@ export interface AgentGraphEdgePost { } /** * @type AgentGraphMaintainer + * The member or team that maintains this agent graph */ export type AgentGraphMaintainer = AiConfigsMaintainerTeam | MaintainerMember; @@ -666,100 +1088,331 @@ export interface AgentGraphPost { */ export interface AgentGraphs { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount': number; } export interface AgentOptimization { '_access'?: AiConfigsAccess; '_links'?: ParentAndSelfLinks; + /** + * The agent optimization ID + */ 'id': string; + /** + * The agent optimization key + */ 'key': string; + /** + * The key of the AI Config to optimize + */ 'aiConfigKey': string; + /** + * The maximum number of attempts + */ 'maxAttempts': number; + /** + * The models to try + */ 'modelChoices': Array; + /** + * The model used to judge responses + */ 'judgeModel': string; + /** + * Sets of prompt variable values to try + */ 'variableChoices': Array<{ [key: string]: any; }>; + /** + * Statements a response must satisfy to pass + */ 'acceptanceStatements': Array; + /** + * Judges that score each response + */ 'judges': Array; + /** + * User inputs to test with + */ 'userInputOptions': Array; + /** + * Expected responses to compare against + */ 'groundTruthResponses': Array; + /** + * The key of the metric to optimize + */ 'metricKey'?: string; + /** + * The maximum number of tokens to use + */ 'tokenLimit'?: number; + /** + * The key of the variation to start from + */ 'variationKey'?: string; + /** + * A label for the optimization + */ 'label'?: string; + /** + * Whether to optimize for lower latency + */ 'latencyOptimization'?: boolean; + /** + * Whether to optimize for lower token use + */ 'tokenOptimization'?: boolean; + /** + * Whether to save the best result as a new variation automatically + */ 'autoCommit'?: boolean; + /** + * The version number of this resource + */ 'version': number; + /** + * When this resource was created, in Unix milliseconds + */ 'createdAt': number; } export interface AgentOptimizationAcceptanceStatement { + /** + * A statement the response must satisfy + */ 'statement': string; + /** + * The minimum score needed to pass + */ 'threshold': number; } export interface AgentOptimizationJudge { + /** + * The key of the judge AI Config + */ 'key': string; + /** + * The minimum score needed to pass + */ 'threshold': number; } export interface AgentOptimizationPatch { + /** + * The maximum number of attempts + */ 'maxAttempts'?: number; + /** + * The models to try + */ 'modelChoices'?: Array; + /** + * The model used to judge responses + */ 'judgeModel'?: string; + /** + * Sets of prompt variable values to try + */ 'variableChoices'?: Array<{ [key: string]: any; }>; + /** + * Statements a response must satisfy to pass + */ 'acceptanceStatements'?: Array; + /** + * Judges that score each response + */ 'judges'?: Array; + /** + * User inputs to test with + */ 'userInputOptions'?: Array; + /** + * Expected responses to compare against + */ 'groundTruthResponses'?: Array; + /** + * The key of the metric to optimize + */ 'metricKey'?: string; + /** + * The maximum number of tokens to use + */ 'tokenLimit'?: number; + /** + * The key of the variation to start from + */ 'variationKey'?: string; + /** + * A label for the optimization + */ 'label'?: string; + /** + * Whether to optimize for lower latency + */ 'latencyOptimization'?: boolean; + /** + * Whether to optimize for lower token use + */ 'tokenOptimization'?: boolean; + /** + * Whether to save the best result as a new variation automatically + */ 'autoCommit'?: boolean; } export interface AgentOptimizationPost { + /** + * A unique key for the agent optimization + */ 'key': string; + /** + * The key of the AI Config to optimize + */ 'aiConfigKey': string; + /** + * The maximum number of attempts + */ 'maxAttempts': number; + /** + * The models to try + */ 'modelChoices'?: Array; + /** + * The model used to judge responses + */ 'judgeModel': string; + /** + * Sets of prompt variable values to try + */ 'variableChoices'?: Array<{ [key: string]: any; }>; + /** + * Statements a response must satisfy to pass + */ 'acceptanceStatements'?: Array; + /** + * Judges that score each response + */ 'judges'?: Array; + /** + * User inputs to test with + */ 'userInputOptions'?: Array; + /** + * Expected responses to compare against + */ 'groundTruthResponses'?: Array; + /** + * The key of the metric to optimize + */ 'metricKey'?: string; + /** + * The maximum number of tokens to use + */ 'tokenLimit'?: number; + /** + * The key of the variation to start from + */ 'variationKey'?: string; + /** + * A label for the optimization + */ 'label'?: string; + /** + * Whether to optimize for lower latency + */ 'latencyOptimization'?: boolean; + /** + * Whether to optimize for lower token use + */ 'tokenOptimization'?: boolean; + /** + * Whether to save the best result as a new variation automatically + */ 'autoCommit'?: boolean; } export interface AgentOptimizationResult { '_access'?: AiConfigsAccess; '_links'?: ParentAndSelfLinks; + /** + * The result ID + */ 'id': string; + /** + * The ID of the run this result belongs to + */ 'runId': string; + /** + * The agent optimization ID + */ 'agentOptimizationId': string; + /** + * The version of the agent optimization used + */ 'agentOptimizationVersion': number; 'status': AgentOptimizationResultStatus; 'activity': AgentOptimizationResultActivity; + /** + * The iteration number within the run + */ 'iteration': number; + /** + * The instructions used for this attempt + */ 'instructions': string; + /** + * The model parameters used for this attempt + */ 'parameters'?: { [key: string]: any; }; + /** + * The user input used for this attempt + */ 'userInput': string; + /** + * The model response + */ 'completionResponse'?: string; + /** + * The variation that was tested + */ 'variation'?: { [key: string]: any; }; + /** + * The scores for the response + */ 'scores'?: { [key: string]: any; }; + /** + * Token usage for generating the response + */ 'generationTokens'?: { [key: string]: any; }; + /** + * Token usage for judging the response + */ 'evaluationTokens'?: { [key: string]: any; }; + /** + * How long the response took to generate + */ 'generationLatency'?: number; + /** + * How long each evaluation took + */ 'evaluationLatencies'?: { [key: string]: any; }; + /** + * When this finished, in Unix milliseconds + */ 'completedAt'?: number; + /** + * The key of the variation created from this result + */ 'createdVariationKey'?: string; + /** + * When this resource was created, in Unix milliseconds + */ 'createdAt': number; + /** + * When this resource was last updated, in Unix milliseconds + */ 'updatedAt': number; } @@ -780,23 +1433,65 @@ export type AgentOptimizationResultActivity = typeof AgentOptimizationResultActi export interface AgentOptimizationResultPatch { 'status'?: AgentOptimizationResultStatus; 'activity'?: AgentOptimizationResultActivity; + /** + * The model response + */ 'completionResponse'?: string; + /** + * The variation that was tested + */ 'variation'?: { [key: string]: any; }; + /** + * The scores for the response + */ 'scores'?: { [key: string]: any; }; + /** + * Token usage for generating the response + */ 'generationTokens'?: { [key: string]: any; }; + /** + * Token usage for judging the response + */ 'evaluationTokens'?: { [key: string]: any; }; + /** + * How long the response took to generate + */ 'generationLatency'?: number; + /** + * How long each evaluation took + */ 'evaluationLatencies'?: { [key: string]: any; }; + /** + * The key of the variation created from this result + */ 'createdVariationKey'?: string; } export interface AgentOptimizationResultPost { + /** + * The ID of the run this result belongs to + */ 'runId': string; + /** + * The version of the agent optimization used + */ 'agentOptimizationVersion': number; + /** + * The iteration number within the run + */ 'iteration': number; + /** + * The instructions used for this attempt + */ 'instructions': string; + /** + * The user input used for this attempt + */ 'userInput': string; + /** + * The model parameters used for this attempt + */ 'parameters'?: { [key: string]: any; }; } @@ -812,67 +1507,151 @@ export type AgentOptimizationResultStatus = typeof AgentOptimizationResultStatus export interface AgentOptimizationResults { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount'?: number; } export interface AgentOptimizationRun { + /** + * The run ID + */ 'runId': string; + /** + * The agent optimization key + */ 'optimizationKey': string; + /** + * The agent optimization ID + */ 'agentOptimizationId': string; + /** + * The version of the agent optimization used + */ 'agentOptimizationVersion': number; 'status': AgentOptimizationResultStatus; 'activity': AgentOptimizationResultActivity; + /** + * When this resource was created, in Unix milliseconds + */ 'createdAt': number; + /** + * When this finished, in Unix milliseconds + */ 'completedAt'?: number | null; } export interface AgentOptimizationRuns { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount'?: number; } export interface AgentOptimizations { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount': number; } export interface AgentSkill { + /** + * The agent skill key + */ 'key': string; '_access'?: AiConfigsAccess; '_links'?: ParentAndSelfLinks; '_maintainer'?: AIConfigMaintainer; + /** + * Human-readable name of the agent skill. + */ 'name': string; + /** + * Human-readable description of what the agent skill does. + */ 'description'?: string; /** * The verbatim SKILL.md content of the agent skill */ 'markdown': string; + /** + * Tags for the agent skill. Tags can be used in custom role policies. + */ 'tags': Array; + /** + * Version of the agent skill. Starts at 1, and each update that changes the name, description, or markdown creates a new version. Pass this value with `key` in a variation\'s `skills: [{key, version}]`. + */ 'version': number; 'createdAt': number; } export interface AgentSkillPatch { + /** + * Human-readable name of the agent skill. + */ 'name'?: string; + /** + * Human-readable description of what the agent skill does. + */ 'description'?: string; /** * The verbatim SKILL.md content of the agent skill */ 'markdown'?: string; + /** + * The ID of the member who maintains this resource + */ 'maintainerId'?: string; + /** + * The key of the team that maintains this resource + */ 'maintainerTeamKey'?: string; + /** + * Replaces the tags on the agent skill. Tags can be used in custom role policies. Changing only the tags does not create a new version. + */ 'tags'?: Array; } export interface AgentSkillPost { + /** + * A unique key for the agent skill. The key must match `^[a-z0-9][a-z0-9-]*$`: it can only contain lowercase letters, numbers, or \'-\', and must start with a lowercase letter or number. The key can be at most 64 characters, and Windows reserved file names (`con`, `prn`, `aux`, `nul`, `com0`-`com9`, and `lpt0`-`lpt9`) aren\'t allowed. + */ 'key': string; + /** + * Human-readable name of the agent skill. + */ 'name': string; + /** + * Human-readable description of what the agent skill does. + */ 'description'?: string; /** * The verbatim SKILL.md content of the agent skill */ 'markdown': string; + /** + * The ID of the member who maintains this resource + */ 'maintainerId'?: string; + /** + * The key of the team that maintains this resource + */ 'maintainerTeamKey'?: string; + /** + * Tags for the agent skill. Tags can be used in custom role policies. + */ 'tags'?: Array; } /** @@ -914,6 +1693,9 @@ export interface AgentSkillReferences { * The type of the resource being referenced. */ 'resourceType': string; + /** + * The resources that reference this agent skill + */ 'items': Array; /** * The total number of references. @@ -922,7 +1704,13 @@ export interface AgentSkillReferences { } export interface AgentSkills { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount': number; } export interface AiConfigsAccess { @@ -1055,7 +1843,13 @@ export interface AiConfigsLink { 'type'?: string; } export interface AiConfigsMaintainerTeam { + /** + * The team key + */ 'key': string; + /** + * The team name + */ 'name': string; } export interface AiConfigsMemberSummary { @@ -1301,6 +2095,10 @@ export interface AiConfigsMetricListingRep { * For trace metrics, the location in the trace to use for numeric values. */ 'traceValueLocation'?: string; + /** + * For count_distinct metrics, the column to count distinct values of + */ + 'unitAggregationField'?: string; 'denominator'?: AiConfigsMetricDenominatorRep; } @@ -1733,6 +2531,10 @@ export interface ApprovalRequestResponse { * An array of member IDs. These members are notified to review the approval request. */ 'notifyMemberIds': Array; + /** + * An array of team keys, if teams were specified when the approval request was created. The members of these teams are listed in notifyMemberIds, resolved when the request was made. Team membership may have changed since then. + */ + 'notifyTeamKeys'?: Array; 'appliedDate'?: number; /** * The member ID of the member who applied the approval request @@ -1964,7 +2766,7 @@ export interface AudienceConfiguration { * An array of team keys. The members of these teams are notified to review the approval request. */ 'notifyTeamKeys'?: Array; - 'releaseGuardianConfiguration'?: ReleaseGuardianConfiguration; + 'releaseGuardianConfiguration'?: PipelineReleaseGuardianConfiguration; } export interface AudiencePost { /** @@ -2141,10 +2943,18 @@ export interface AuthorizedAppDataRep { * The authorized application name */ 'name'?: string; + /** + * The icon for this authorized application, if it has one + */ + 'iconUrl'?: string; /** * The name of the maintainer for this authorized application */ 'maintainerName'?: string; + /** + * Whether this application acted on behalf of the member in this entry. When true, the member and the application are co-authors of the change rather than the member acting alone. Omitted for applications that act on their own. + */ + 'isAgent'?: boolean; } export interface BigSegmentStoreIntegration { '_links': BigSegmentStoreIntegrationLinks; @@ -2354,6 +3164,15 @@ export interface CallerIdentityRep { 'authKind'?: string; 'tokenKind'?: string; 'clientId'?: string; + /** + * The registered name of the OAuth client the access token was issued to. Only present for OAuth access tokens, and omitted when the client\'s name can\'t be resolved. + */ + 'clientName'?: string; + /** + * The resources (RFC 8707) the OAuth access token was issued for. Only present for OAuth access tokens issued for a specific resource. + */ + 'audience'?: Array; + 'expiresAt'?: number; 'tokenName'?: string; 'tokenId'?: string; 'memberId'?: string; @@ -2368,6 +3187,24 @@ export interface CapabilityConfigRep { 'approvals'?: ApprovalsCapabilityConfig; 'auditLogEventsHook'?: AuditLogEventsHookCapabilityConfigRep; } +export interface Classifier { + 'key': string; + 'type': ClassifierTypeEnum; + 'instructions': string; + /** + * Type-specific criteria. An enum classifier uses a map of option keys to descriptions. A float classifier uses an ordered list of level labels. A bool classifier uses optional true and false descriptions. + */ + 'criteria'?: any; +} + +export const ClassifierTypeEnum = { + Bool: 'bool', + Float: 'float', + Enum: 'enum' +} as const; + +export type ClassifierTypeEnum = typeof ClassifierTypeEnum[keyof typeof ClassifierTypeEnum]; + export interface Clause { '_id'?: string; 'attribute': string; @@ -2376,6 +3213,18 @@ export interface Clause { 'contextKind'?: string; 'negate': boolean; } +/** + * What happens to the release rules when the final phase completes, either on its own or because a stop rolls it forward while it\'s running: - `remove_rules_and_update_default_rule`: The release rules are removed and the default rule serves the target variation. - `leave_rules_in_place`: The release rules stay and serve the target variation. In every other case, including a revert, it has no effect: release rules left on the flag keep serving the variation the release ended on, ahead of rules added later without `beforeRuleId`. + */ + +export const CleanupBehavior = { + CleanupBehaviorRemoveRulesAndUpdateDefaultRule: 'remove_rules_and_update_default_rule', + CleanupBehaviorLeaveRulesInPlace: 'leave_rules_in_place' +} as const; + +export type CleanupBehavior = typeof CleanupBehavior[keyof typeof CleanupBehavior]; + + export interface Client { /** * The location and content type of related resources @@ -2612,51 +3461,6 @@ export interface ContextInstanceEvaluations { */ '_links': { [key: string]: Link; }; } -export interface ContextInstanceRecord { - /** - * Timestamp of the last time an evaluation occurred for this context instance - */ - 'lastSeen'?: string; - /** - * The context instance ID - */ - 'id': string; - /** - * An identifier representing the application where the LaunchDarkly SDK is running - */ - 'applicationId'?: string; - /** - * A list of the context kinds this context was associated with that the SDK removed because they were marked as anonymous at flag evaluation - */ - 'anonymousKinds'?: Array; - /** - * The context, including its kind and attributes - */ - 'context': any; - /** - * The location and content type of related resources - */ - '_links'?: { [key: string]: Link; }; - '_access'?: Access; -} -export interface ContextInstanceSearch { - /** - * A collection of context instance filters - */ - 'filter'?: string; - /** - * Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying ts for this value, or descending order by specifying -ts. - */ - 'sort'?: string; - /** - * Specifies the maximum number of items in the collection to return (max: 50, default: 20) - */ - 'limit'?: number; - /** - * 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. - */ - 'continuationToken'?: string; -} export interface ContextInstanceSegmentMembership { /** * A human-friendly name for the segment @@ -2702,28 +3506,6 @@ export interface ContextInstanceSegmentMemberships { */ '_links': { [key: string]: Link; }; } -export interface ContextInstances { - /** - * The location and content type of related resources - */ - '_links'?: { [key: string]: Link; }; - /** - * The number of unique context instances - */ - 'totalCount'?: number; - /** - * The environment ID - */ - '_environmentId': string; - /** - * 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. - */ - 'continuationToken'?: string; - /** - * A collection of context instances. Can include multiple versions of context instances that have the same id, but different applicationIds. - */ - 'items': Array; -} export interface ContextKindEnvironmentObservation { /** * The environment key @@ -2785,7 +3567,7 @@ export interface ContextRecord { */ 'lastSeen'?: string; /** - * An identifier representing the application where the LaunchDarkly SDK is running + * An identifier representing the application where the LaunchDarkly SDK is running. Populated when you get contexts by kind and key. Empty in search results, which return each context\'s most recently reported data. */ 'applicationId'?: string; /** @@ -2798,7 +3580,8 @@ export interface ContextRecord { '_links'?: { [key: string]: Link; }; '_access'?: Access; /** - * 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. + * Deprecated. This value is always 1. + * @deprecated */ 'associatedContexts'?: number; } @@ -2826,7 +3609,7 @@ export interface Contexts { */ '_links'?: { [key: string]: Link; }; /** - * The number of contexts + * The number of matching contexts. This value is approximate and may be omitted if it is unavailable. */ 'totalCount'?: number; /** @@ -2834,7 +3617,7 @@ export interface Contexts { */ '_environmentId': string; /** - * 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. + * An obfuscated string that references the last context on the previous page of results. You can use this for pagination, however, we recommend using the next link instead. */ 'continuationToken'?: string; /** @@ -2876,6 +3659,15 @@ export interface CovariateInfoRep { 'fileName': string; 'createdAt': number; } +export interface CreateAdaptiveTriggerRequest { + 'name': string; + 'resourceKind': AdaptiveTriggerResourceKind; + 'resourceKey': string; + 'triggerSource': ObservabilityAlertSource; + 'task': AdaptiveTriggerTask; +} + + /** * Create announcement request body */ @@ -3027,7 +3819,7 @@ export interface CreatePhaseInput { 'name': string; 'configuration'?: object; } -export interface CreateReleaseInput { +export interface CreatePipelineReleaseInput { /** * The variation id to release to across all phases */ @@ -3251,6 +4043,127 @@ export interface CustomWorkflowsListingOutput { */ '_links': { [key: string]: Link; }; } +export interface DataExportProjectIdentityIncompleteError { + 'message': string; + 'code': DataExportProjectIdentityIncompleteErrorCodeEnum; +} + +export const DataExportProjectIdentityIncompleteErrorCodeEnum = { + DataExportProjectIdentityIncomplete: 'data_export_project_identity_incomplete' +} as const; + +export type DataExportProjectIdentityIncompleteErrorCodeEnum = typeof DataExportProjectIdentityIncompleteErrorCodeEnum[keyof typeof DataExportProjectIdentityIncompleteErrorCodeEnum]; + +export interface DataExportProjectIdentityIncompleteErrorRep { + 'code'?: string; + 'message'?: string; +} +export interface DataExportProjectRankComponentsRep { + /** + * Successful Streaming transfers attributed to this project in the requested range. + */ + 'streaming': number; +} +export interface DataExportProjectRankRep { + /** + * The canonical project key. + */ + 'projectKey': string; + /** + * The current project name. + */ + 'projectName': string; + /** + * The one-based rank within all matching projects. + */ + 'rank': number; + /** + * Successful Streaming transfers in the requested range. + */ + 'usage': number; + 'components': DataExportProjectRankComponentsRep; +} +export interface DataExportProjectRankingPageRep { + /** + * The bounded page size requested. + */ + 'limit': number; + /** + * The number of items on this page. + */ + 'count': number; + /** + * The number of matching projects with usage. + */ + 'totalCount': number; + /** + * An opaque cursor for the next page. + */ + 'nextCursor'?: string; +} +/** + * A bounded Streaming project ranking. + */ +export interface DataExportProjectRankingRep { + /** + * Projects in deterministic rank order. + */ + 'items': Array; + 'page': DataExportProjectRankingPageRep; + 'scope': DataExportProjectRankingScopeRep; +} +export interface DataExportProjectRankingScopeRep { + /** + * The included usage source. + */ + 'source': DataExportProjectRankingScopeRepSourceEnum; + /** + * The ranked dimension. + */ + 'dimension': DataExportProjectRankingScopeRepDimensionEnum; + /** + * Inclusive UTC range start in Unix milliseconds. + */ + 'from': number; + /** + * Exclusive UTC range end in Unix milliseconds. + */ + 'to': number; +} + +export const DataExportProjectRankingScopeRepSourceEnum = { + Streaming: 'streaming' +} as const; + +export type DataExportProjectRankingScopeRepSourceEnum = typeof DataExportProjectRankingScopeRepSourceEnum[keyof typeof DataExportProjectRankingScopeRepSourceEnum]; +export const DataExportProjectRankingScopeRepDimensionEnum = { + Project: 'project' +} as const; + +export type DataExportProjectRankingScopeRepDimensionEnum = typeof DataExportProjectRankingScopeRepDimensionEnum[keyof typeof DataExportProjectRankingScopeRepDimensionEnum]; + +export interface DataExportSeriesListRep { + /** + * The location and content type of related resources + */ + '_links': { [key: string]: any; }; + /** + * Metadata about each series + */ + 'metadata': Array<{ [key: string]: any; }>; + /** + * 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. + */ + 'series': Array<{ [key: string]: number; }>; + /** + * The end of the latest hour written by this source\'s usage pipeline, as an RFC 3339 UTC timestamp. It is measured across all accounts, not only yours, and usage after this time is not counted yet. Omitted when the watermark is unavailable. + */ + 'dataThrough'?: string; + /** + * Whether this source\'s usage pipeline is late: it wrote every hour of the 24 hours ending at dataThrough, and more than three hours have passed since dataThrough. Always false for a source with gaps in those 24 hours, where gaps usually mean no usage rather than a stalled pipeline. Omitted when dataThrough is omitted. + */ + 'delayed'?: boolean; +} export interface DefaultClientSideAvailability { /** * Whether to enable availability for mobile SDKs @@ -3390,9 +4303,129 @@ export interface DependentFlagsByEnvironment { '_links': { [key: string]: Link; }; '_site': Link; } -export interface DependentMeasuredRolloutRep { +export interface DependentMetricGroupRep { + /** + * A unique key to reference the metric group + */ + 'key': string; + /** + * A human-friendly name for the metric group + */ + 'name': string; + /** + * The type of the metric group + */ + 'kind': DependentMetricGroupRepKindEnum; + /** + * The location and content type of related resources + */ + '_links': { [key: string]: Link; }; +} + +export const DependentMetricGroupRepKindEnum = { + Funnel: 'funnel', + Standard: 'standard' +} as const; + +export type DependentMetricGroupRepKindEnum = typeof DependentMetricGroupRepKindEnum[keyof typeof DependentMetricGroupRepKindEnum]; + +export interface DependentMetricGroupRepWithMetrics { + /** + * A unique key to reference the metric group + */ + 'key': string; + /** + * A human-friendly name for the metric group + */ + 'name': string; + /** + * The type of the metric group + */ + 'kind': DependentMetricGroupRepWithMetricsKindEnum; + /** + * The location and content type of related resources + */ + '_links': { [key: string]: Link; }; + /** + * The metrics in the metric group + */ + 'metrics'?: Array; +} + +export const DependentMetricGroupRepWithMetricsKindEnum = { + Funnel: 'funnel', + Standard: 'standard' +} as const; + +export type DependentMetricGroupRepWithMetricsKindEnum = typeof DependentMetricGroupRepWithMetricsKindEnum[keyof typeof DependentMetricGroupRepWithMetricsKindEnum]; + +export interface DependentMetricOrMetricGroupRep { + /** + * A unique key to reference the metric or metric group + */ + 'key': string; + /** + * The version ID of the metric or metric group + */ + '_versionId': string; + /** + * A human-friendly name for the metric or metric group + */ + 'name': string; + /** + * 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 + */ + 'kind': DependentMetricOrMetricGroupRepKindEnum; + /** + * For custom and trace metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false). + */ + 'isNumeric'?: boolean; + /** + * The event key sent with the metric. Only relevant for custom metrics. + */ + 'eventKey'?: string; + /** + * The location and content type of related resources + */ + '_links': { [key: string]: Link; }; + /** + * Whether this is a metric group or a metric + */ + 'isGroup': boolean; + /** + * An ordered list of the metrics in this metric group + */ + 'metrics'?: Array; + /** + * The method for analyzing metric events. Only set for individual metrics, not metric groups. + */ + 'analysisType'?: DependentMetricOrMetricGroupRepAnalysisTypeEnum; + /** + * The context kind chosen as the analysis unit for this metric in the iteration. If null, analysis uses the iteration\'s randomization unit. + */ + 'analysisUnit'?: string; +} + +export const DependentMetricOrMetricGroupRepKindEnum = { + Pageview: 'pageview', + Click: 'click', + Custom: 'custom', + Trace: 'trace', + Funnel: 'funnel', + Standard: 'standard' +} as const; + +export type DependentMetricOrMetricGroupRepKindEnum = typeof DependentMetricOrMetricGroupRepKindEnum[keyof typeof DependentMetricOrMetricGroupRepKindEnum]; +export const DependentMetricOrMetricGroupRepAnalysisTypeEnum = { + Mean: 'mean', + Percentile: 'percentile' +} as const; + +export type DependentMetricOrMetricGroupRepAnalysisTypeEnum = typeof DependentMetricOrMetricGroupRepAnalysisTypeEnum[keyof typeof DependentMetricOrMetricGroupRepAnalysisTypeEnum]; + +export interface DependentReleasePhaseRep { /** - * The guarded rollout measured rollout Id + * The guarded rollout release phase ID */ '_id': string; /** @@ -3425,126 +4458,6 @@ export interface DependentMeasuredRolloutRep { */ '_links': { [key: string]: Link; }; } -export interface DependentMetricGroupRep { - /** - * A unique key to reference the metric group - */ - 'key': string; - /** - * A human-friendly name for the metric group - */ - 'name': string; - /** - * The type of the metric group - */ - 'kind': DependentMetricGroupRepKindEnum; - /** - * The location and content type of related resources - */ - '_links': { [key: string]: Link; }; -} - -export const DependentMetricGroupRepKindEnum = { - Funnel: 'funnel', - Standard: 'standard' -} as const; - -export type DependentMetricGroupRepKindEnum = typeof DependentMetricGroupRepKindEnum[keyof typeof DependentMetricGroupRepKindEnum]; - -export interface DependentMetricGroupRepWithMetrics { - /** - * A unique key to reference the metric group - */ - 'key': string; - /** - * A human-friendly name for the metric group - */ - 'name': string; - /** - * The type of the metric group - */ - 'kind': DependentMetricGroupRepWithMetricsKindEnum; - /** - * The location and content type of related resources - */ - '_links': { [key: string]: Link; }; - /** - * The metrics in the metric group - */ - 'metrics'?: Array; -} - -export const DependentMetricGroupRepWithMetricsKindEnum = { - Funnel: 'funnel', - Standard: 'standard' -} as const; - -export type DependentMetricGroupRepWithMetricsKindEnum = typeof DependentMetricGroupRepWithMetricsKindEnum[keyof typeof DependentMetricGroupRepWithMetricsKindEnum]; - -export interface DependentMetricOrMetricGroupRep { - /** - * A unique key to reference the metric or metric group - */ - 'key': string; - /** - * The version ID of the metric or metric group - */ - '_versionId': string; - /** - * A human-friendly name for the metric or metric group - */ - 'name': string; - /** - * 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 - */ - 'kind': DependentMetricOrMetricGroupRepKindEnum; - /** - * For custom and trace metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false). - */ - 'isNumeric'?: boolean; - /** - * The event key sent with the metric. Only relevant for custom metrics. - */ - 'eventKey'?: string; - /** - * The location and content type of related resources - */ - '_links': { [key: string]: Link; }; - /** - * Whether this is a metric group or a metric - */ - 'isGroup': boolean; - /** - * An ordered list of the metrics in this metric group - */ - 'metrics'?: Array; - /** - * The method for analyzing metric events. Only set for individual metrics, not metric groups. - */ - 'analysisType'?: DependentMetricOrMetricGroupRepAnalysisTypeEnum; - /** - * The context kind chosen as the analysis unit for this metric in the iteration. If null, analysis uses the iteration\'s randomization unit. - */ - 'analysisUnit'?: string; -} - -export const DependentMetricOrMetricGroupRepKindEnum = { - Pageview: 'pageview', - Click: 'click', - Custom: 'custom', - Trace: 'trace', - Funnel: 'funnel', - Standard: 'standard' -} as const; - -export type DependentMetricOrMetricGroupRepKindEnum = typeof DependentMetricOrMetricGroupRepKindEnum[keyof typeof DependentMetricOrMetricGroupRepKindEnum]; -export const DependentMetricOrMetricGroupRepAnalysisTypeEnum = { - Mean: 'mean', - Percentile: 'percentile' -} as const; - -export type DependentMetricOrMetricGroupRepAnalysisTypeEnum = typeof DependentMetricOrMetricGroupRepAnalysisTypeEnum[keyof typeof DependentMetricOrMetricGroupRepAnalysisTypeEnum]; - export interface DeploymentCollectionRep { /** * The total number of deployments @@ -3712,14 +4625,25 @@ export interface Destinations { */ 'items'?: Array; } +export interface DynamicOptionFiltersItems { + 'attribute'?: string; + 'variableKey'?: string; +} export interface DynamicOptions { + 'allowUnknownValue'?: boolean; 'endpoint'?: Endpoint; + 'filters'?: Array; 'parser'?: DynamicOptionsParser; + 'source'?: DynamicOptionsSource; } export interface DynamicOptionsParser { 'optionsItems'?: OptionsArray; 'optionsPath'?: string; } +export interface DynamicOptionsSource { + 'key'?: string; + 'type'?: string; +} export interface Endpoint { 'headers'?: Array; 'hmacSignature'?: HMACSignature; @@ -3765,7 +4689,7 @@ export interface Environment { 'secureMode': boolean; '_access'?: Access; /** - * Enables tracking detailed information for new flags by default + * The initial value of trackEvents for flags created in this environment. Does not affect existing flags. Required for Data Export, but doesn\'t enable Data Export on its own. */ 'defaultTrackEvents': boolean; /** @@ -3812,7 +4736,7 @@ export interface EnvironmentPost { */ 'secureMode'?: boolean; /** - * Enables tracking detailed information for new flags by default + * The initial value of trackEvents for flags created in this environment. Does not affect existing flags. Required for Data Export, but doesn\'t enable Data Export on its own. */ 'defaultTrackEvents'?: boolean; /** @@ -3833,6 +4757,525 @@ export interface EnvironmentPost { */ 'critical'?: boolean; } +/** + * A flag release in one environment, made up of one or more ordered phases. The top-level status is derived from the phases: it reflects the active phase, reports `waiting` between successfully completed phases, and reports the terminal outcome of the release. + */ +export interface EnvironmentRelease { + 'id': string; + 'status': ReleaseStatus; + 'statusReason'?: ReleaseStatusReason; + 'projectKey': string; + 'environmentKey': string; + 'flagKey': string; + /** + * ID of the variation the release started from. + */ + 'originalVariationId': string; + /** + * The value of the variation. This may be a string, boolean, number, JSON object, or array. + */ + 'originalVariationValue': any; + /** + * ID of the variation being released. + */ + 'targetVariationId': string; + /** + * The value of the variation. This may be a string, boolean, number, JSON object, or array. + */ + 'targetVariationValue': any; + /** + * Key of the context kind the release randomizes on. + */ + 'randomizationUnit': string; + 'cleanupBehavior': CleanupBehavior; + 'kind': ReleaseType; + 'metrics': Array; + 'phases': Array; + /** + * Zero-based index of the active phase. Null before the first phase, between phases, and after the release reaches a terminal status. + */ + 'currentPhaseIndex': number | null; + 'advancementMode': EnvironmentReleaseAdvancementMode; + /** + * Creation time in Unix milliseconds. + */ + 'createdAt': number; + /** + * Start of the first phase in Unix milliseconds. Absent until a phase has started. + */ + 'startedAt'?: number; + /** + * End of the last started phase in Unix milliseconds. Present only after the release reaches a terminal status of `completed` or `reverted`. + */ + 'endedAt'?: number; + '_links'?: { [key: string]: EnvironmentReleaseLink; }; +} + + +/** + * Whether a multi-phase release advances to the next phase automatically once the current phase\'s steps complete, or waits for an explicit advance. Has no effect on a single-phase release. + */ + +export const EnvironmentReleaseAdvancementMode = { + EnvironmentReleaseAdvancementModeManual: 'manual', + EnvironmentReleaseAdvancementModeAutomatic: 'automatic' +} as const; + +export type EnvironmentReleaseAdvancementMode = typeof EnvironmentReleaseAdvancementMode[keyof typeof EnvironmentReleaseAdvancementMode]; + + +/** + * One targeting clause of a rule created for the release. + */ +export interface EnvironmentReleaseClause { + /** + * Context kind the clause applies to. Omit for `segmentMatch`. + */ + 'contextKind'?: string; + 'attribute': string; + /** + * One of `in`, `endsWith`, `startsWith`, `matches`, `contains`, `lessThan`, `lessThanOrEqual`, `greaterThan`, `greaterThanOrEqual`, `before`, `after`, `segmentMatch`, `semVerEqual`, `semVerLessThan`, `semVerGreaterThan`. + */ + 'op': string; + /** + * JSON primitives only (strings, numbers, booleans); objects, arrays, and null are rejected. + */ + 'values': Array; + 'negate'?: boolean; +} +/** + * One page of environment releases for one flag in one environment, newest first. + */ +export interface EnvironmentReleaseCollection { + /** + * The releases on this page. + */ + 'items': Array; + /** + * The total number of releases that match the request, before `limit` and `offset` are applied. + */ + 'totalCount': number; + /** + * Links to this page (`self`), the flag (`parent`), and, where they apply, the `first`, `prev`, `next`, and `last` pages. + */ + '_links'?: { [key: string]: EnvironmentReleaseLink; }; +} +/** + * A phase that releases on an existing rule. Allowed only on a single-phase release. + */ +export interface EnvironmentReleaseExistingRulePhaseInput { + /** + * Existing rule to release on. The rule must already include the `kind` clause for `randomizationUnit` described in `startEnvironmentRelease`. + */ + 'ruleId': string; + 'steps': Array; +} +export interface EnvironmentReleaseLink { + 'href': string; + 'type': string; +} +/** + * A metric to monitor across every phase of a guarded release. + */ +export interface EnvironmentReleaseMetricInput { + 'metricKey': string; + /** + * Whether a regression on this metric automatically reverts the release. When `false`, a detected regression pauses the release instead: it reports `waiting` with reason `waiting_regression_detected` and does not advance until the regression is dismissed or the release is stopped. + */ + 'autoRollback'?: boolean; +} +/** + * A phase that creates a new rule. + */ +export interface EnvironmentReleaseNewRulePhaseInput { + /** + * Clauses for a new rule. Must include the `kind` clause for `randomizationUnit` described in `startEnvironmentRelease`. A new rule that exactly duplicates an existing rule on the flag returns `400` with `new rule is exact duplicate of an existing rule at index `. + */ + 'clauses': Array; + /** + * Description for a new rule. Must differ from the description of every other rule on the flag, including rules an earlier release left in place, or the request returns `400` with `duplicate rule description not allowed`. + */ + 'description'?: string; + 'steps': Array; +} +/** + * One ordered phase of an environment release. + */ +export interface EnvironmentReleasePhase { + 'id': string; + /** + * Zero-based index of this phase. + */ + 'phaseIndex': number; + /** + * ID of the flag rule for this phase. New public-API releases always have a rule ID. `null` is retained only when reading a historical release that ran on the default rule. + */ + 'ruleId': string | null; + /** + * The description of the flag rule when this release was created. Omitted for default-rule phases. + */ + 'description'?: string; + 'status': ReleaseStatus; + 'statusReason'?: ReleaseStatusReason; + 'steps': Array; + /** + * Zero-based index of the step the phase is on. Omitted until the first step starts. Once the phase completes or reverts, it stays at the last step that started, unlike `currentPhaseIndex`, which becomes `null` when the release reaches a terminal status. + */ + 'currentStepIndex'?: number; + /** + * Start of the phase in Unix milliseconds. + */ + 'startedAt'?: number; + /** + * End of the phase in Unix milliseconds. + */ + 'endedAt'?: number; + /** + * Per-phase metric status keyed by metric key. Empty for progressive releases. Metric definitions and monitoring preferences live once in the parent release\'s `metrics` array. + */ + 'metricStatuses': { [key: string]: ReleaseMetricStatus; }; +} + + +/** + * @type EnvironmentReleasePhaseInput + * One phase of a release. Each phase creates a flag rule unless it sets `ruleId`. + */ +export type EnvironmentReleasePhaseInput = EnvironmentReleaseExistingRulePhaseInput | EnvironmentReleaseNewRulePhaseInput; + +/** + * How to resolve each phase of the release when you stop it: - `roll_forward_all_phases`: All phases serve the target variation. Pending phases stay on the flag and are enabled. - `roll_forward_current_phase_and_remove_pending_phases`: Current and completed phases serve the target variation. Pending phases are removed. - `roll_back_all_phases_and_remove_pending_phases`: Current and completed phases serve the original variation. Pending phases are removed. - `roll_back_current_phase_and_remove_pending_phases`: The current phase serves the original variation, and completed phases keep serving the target variation. Pending phases are removed. For a single-phase release there are no completed or pending phases, so the two roll-forward values are equivalent, as are the two roll-back values. The `current_phase` values return `400` if the release is between phases. Use an `all_phases` value instead. A terminal release returns `200` unchanged for every resolution. + */ + +export const EnvironmentReleaseResolution = { + EnvironmentReleaseResolutionRollForwardAllPhases: 'roll_forward_all_phases', + EnvironmentReleaseResolutionRollForwardCurrentPhaseAndRemovePendingPhases: 'roll_forward_current_phase_and_remove_pending_phases', + EnvironmentReleaseResolutionRollBackAllPhasesAndRemovePendingPhases: 'roll_back_all_phases_and_remove_pending_phases', + EnvironmentReleaseResolutionRollBackCurrentPhaseAndRemovePendingPhases: 'roll_back_current_phase_and_remove_pending_phases' +} as const; + +export type EnvironmentReleaseResolution = typeof EnvironmentReleaseResolution[keyof typeof EnvironmentReleaseResolution]; + + +/** + * One step of a phase\'s rollout schedule. + */ +export interface EnvironmentReleaseStepInput { + /** + * Thousandths of a percent. `100000` is 100%, and `10000` is 10%. Guarded releases cannot exceed `50000`, preserving a control group. Each step\'s allocation must be greater than the previous step\'s. In a progressive release, an allocation of N% serves the target variation to N% of the phase\'s contexts and the original variation to the rest. In a guarded release, it serves the target variation to N%, the original variation to another N% as the measured control group, and the original variation to the rest without measuring them. + */ + 'allocation': number; + 'durationMillis': number; +} +export interface EnvironmentReleasesAccess { + 'denied': Array; + 'allowed': Array; +} +export interface EnvironmentReleasesAccessAllowedRep { + 'action': string; + 'reason': AccessAllowedReason; +} +export interface EnvironmentReleasesAccessDenied { + 'action': string; + 'reason': AccessDeniedReason; +} +export interface EnvironmentReleasesFilter { + /** + * Filter type. One of [contextAttribute, eventProperty, group] + */ + 'type': EnvironmentReleasesFilterTypeEnum; + /** + * If not a group node, the context attribute name or event property name to filter on + */ + 'attribute'?: string; + 'op': string; + /** + * The context attribute / event property values or group member nodes + */ + 'values': Array; + /** + * For context attribute filters, the context kind. + */ + 'contextKind'?: string; + /** + * If set, then take the inverse of the operator. \'in\' becomes \'not in\'. + */ + 'negate': boolean; +} + +export const EnvironmentReleasesFilterTypeEnum = { + Group: 'group', + ContextAttribute: 'contextAttribute', + EventProperty: 'eventProperty' +} as const; + +export type EnvironmentReleasesFilterTypeEnum = typeof EnvironmentReleasesFilterTypeEnum[keyof typeof EnvironmentReleasesFilterTypeEnum]; + +export interface EnvironmentReleasesMemberSummary { + /** + * The location and content type of related resources + */ + '_links': { [key: string]: Link; }; + /** + * The member\'s ID + */ + '_id': string; + /** + * The member\'s first name + */ + 'firstName'?: string; + /** + * The member\'s last name + */ + 'lastName'?: string; + /** + * The member\'s base role. If the member has no additional roles, this role will be in effect. + */ + 'role': string; + /** + * The member\'s email address + */ + 'email': string; +} +export interface EnvironmentReleasesMetricDenominatorRep { + /** + * The warehouse event column for the denominator + */ + 'eventName'?: string; + /** + * Whether the denominator aggregates a numeric value + */ + 'isNumeric'?: boolean; + /** + * How individual unit values are aggregated for the denominator + */ + 'unitAggregationType'?: string; + /** + * The column to count distinct values of; required when unitAggregationType is count_distinct + */ + 'unitAggregationField'?: string; + /** + * For a numeric denominator, the column holding the numeric value + */ + 'valueColumn'?: string; + 'dataSource'?: MetricDataSourceRefRep; + 'filters'?: EnvironmentReleasesFilter; + /** + * Start of the measurement window in milliseconds + */ + 'windowStartOffset'?: number; + /** + * End of the measurement window in milliseconds + */ + 'windowEndOffset'?: number; + /** + * Lower winsorization percentile in the open interval (0, 100) + */ + 'winsorLowerPercentile'?: number; + /** + * Upper winsorization percentile in the open interval (0, 100) + */ + 'winsorUpperPercentile'?: number; + /** + * When true, the percentile bound calculation includes imputed zeros + */ + 'winsorIncludeImputed'?: boolean; +} +export interface EnvironmentReleasesMetricListingRep { + /** + * The number of experiments using this metric + */ + 'experimentCount'?: number; + /** + * The number of metric groups using this metric + */ + 'metricGroupCount'?: number; + /** + * The number of guarded rollouts using this metric + */ + 'guardedRolloutCount'?: number; + /** + * The number of release policies using this metric + */ + 'releasePolicyCount'?: number; + /** + * The number of active experiments using this metric + */ + 'activeExperimentCount'?: number; + /** + * The number of active guarded rollouts using this metric + */ + 'activeGuardedRolloutCount'?: number; + /** + * The ID of this metric + */ + '_id': string; + /** + * The version ID of the metric + */ + '_versionId': string; + /** + * Version of the metric + */ + '_version'?: number; + /** + * A unique key to reference the metric + */ + 'key': string; + /** + * A human-friendly name for the metric + */ + 'name': string; + /** + * The kind of event the metric tracks + */ + 'kind': EnvironmentReleasesMetricListingRepKindEnum; + /** + * The number of feature flags currently attached to this metric + */ + '_attachedFlagCount'?: number; + /** + * The location and content type of related resources + */ + '_links': { [key: string]: Link; }; + '_site'?: Link; + '_access'?: EnvironmentReleasesAccess; + /** + * Tags for the metric + */ + 'tags': Array; + '_creationDate': number; + 'lastModified'?: EnvironmentReleasesModification; + /** + * The ID of the member who maintains this metric + */ + 'maintainerId'?: string; + '_maintainer'?: EnvironmentReleasesMemberSummary; + /** + * Description of the metric + */ + 'description'?: string; + /** + * The category of the metric + */ + 'category'?: string; + /** + * For custom and trace metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false). + */ + 'isNumeric'?: boolean; + /** + * For custom and trace metrics, the success criteria + */ + 'successCriteria'?: EnvironmentReleasesMetricListingRepSuccessCriteriaEnum; + /** + * For numeric custom and trace metrics, the unit of measure + */ + 'unit'?: string; + /** + * For custom metrics, the event key to use in your code + */ + 'eventKey'?: string; + /** + * Deprecated, use analysisUnits instead. + * @deprecated + */ + 'randomizationUnits'?: Array; + /** + * An array of analysis units allowed for this metric. + */ + 'analysisUnits'?: Array; + 'filters'?: EnvironmentReleasesFilter; + /** + * The method by which multiple unit event values are aggregated + */ + 'unitAggregationType'?: EnvironmentReleasesMetricListingRepUnitAggregationTypeEnum; + /** + * The method for analyzing metric events + */ + 'analysisType'?: EnvironmentReleasesMetricListingRepAnalysisTypeEnum; + /** + * The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile. + */ + 'percentileValue'?: number; + 'eventDefault'?: MetricEventDefaultRep; + 'dataSource': MetricDataSourceRefRep; + 'lastSeen'?: number; + /** + * Whether the metric version is archived + */ + 'archived'?: boolean; + 'archivedAt'?: number; + /** + * For click metrics, the CSS selectors + */ + 'selector'?: string; + 'urls'?: Array<{ [key: string]: any; }>; + /** + * Not yet implemented - The start of the measurement window, in milliseconds relative to the unit\'s first exposure to a flag variation + */ + 'windowStartOffset'?: number; + /** + * Not yet implemented - The end of the measurement window, in milliseconds relative to the unit\'s first exposure to a flag variation + */ + 'windowEndOffset'?: number; + /** + * Lower winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, defines a two-sided clamp range. Otherwise lower-only winsorization. + */ + 'winsorLowerPercentile'?: number; + /** + * Upper winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, must be greater than winsorLowerPercentile. + */ + 'winsorUpperPercentile'?: number; + /** + * When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn\'t send events. + */ + 'winsorIncludeImputed'?: boolean; + /** + * For trace metrics, the trace query to use for the metric. + */ + 'traceQuery'?: string; + /** + * For trace metrics, the location in the trace to use for numeric values. + */ + 'traceValueLocation'?: string; + /** + * For count_distinct metrics, the column to count distinct values of + */ + 'unitAggregationField'?: string; + 'denominator'?: EnvironmentReleasesMetricDenominatorRep; +} + +export const EnvironmentReleasesMetricListingRepKindEnum = { + Pageview: 'pageview', + Click: 'click', + Custom: 'custom', + Trace: 'trace' +} as const; + +export type EnvironmentReleasesMetricListingRepKindEnum = typeof EnvironmentReleasesMetricListingRepKindEnum[keyof typeof EnvironmentReleasesMetricListingRepKindEnum]; +export const EnvironmentReleasesMetricListingRepSuccessCriteriaEnum = { + HigherThanBaseline: 'HigherThanBaseline', + LowerThanBaseline: 'LowerThanBaseline' +} as const; + +export type EnvironmentReleasesMetricListingRepSuccessCriteriaEnum = typeof EnvironmentReleasesMetricListingRepSuccessCriteriaEnum[keyof typeof EnvironmentReleasesMetricListingRepSuccessCriteriaEnum]; +export const EnvironmentReleasesMetricListingRepUnitAggregationTypeEnum = { + Average: 'average', + Sum: 'sum', + CountDistinct: 'count_distinct' +} as const; + +export type EnvironmentReleasesMetricListingRepUnitAggregationTypeEnum = typeof EnvironmentReleasesMetricListingRepUnitAggregationTypeEnum[keyof typeof EnvironmentReleasesMetricListingRepUnitAggregationTypeEnum]; +export const EnvironmentReleasesMetricListingRepAnalysisTypeEnum = { + Mean: 'mean', + Percentile: 'percentile' +} as const; + +export type EnvironmentReleasesMetricListingRepAnalysisTypeEnum = typeof EnvironmentReleasesMetricListingRepAnalysisTypeEnum[keyof typeof EnvironmentReleasesMetricListingRepAnalysisTypeEnum]; + +export interface EnvironmentReleasesModification { + 'date'?: string; +} export interface EnvironmentSummary { /** * The location and content type of related resources @@ -3958,6 +5401,10 @@ export interface ExpandableApprovalRequestResponse { * An array of member IDs. These members are notified to review the approval request. */ 'notifyMemberIds': Array; + /** + * An array of team keys, if teams were specified when the approval request was created. The members of these teams are listed in notifyMemberIds, resolved when the request was made. Team membership may have changed since then. + */ + 'notifyTeamKeys'?: Array; 'appliedDate'?: number; /** * The member ID of the member who applied the approval request @@ -4526,7 +5973,7 @@ export interface ExperimentPost { */ 'tags'?: Array; /** - * The results analysis approach. + * The results analysis approach. Defaults to \"frequentist\" when not provided, or \"bayesian\" for multi-armed bandit experiments. */ 'methodology'?: ExperimentPostMethodologyEnum; 'analysisConfig'?: AnalysisConfigInput; @@ -4561,6 +6008,10 @@ export const ExperimentPostTypeEnum = { export type ExperimentPostTypeEnum = typeof ExperimentPostTypeEnum[keyof typeof ExperimentPostTypeEnum]; +export interface ExperimentationLink { + 'href'?: string; + 'type'?: string; +} export interface ExpiringTarget { /** * The ID of this expiring target @@ -4972,11 +6423,11 @@ export interface FeatureFlagConfig { */ '_environmentName': string; /** - * Whether LaunchDarkly tracks events for the feature flag, for all rules + * Whether the SDK sends a detailed event for every evaluation of this flag, across all rules, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. */ 'trackEvents': boolean; /** - * Whether LaunchDarkly tracks events for the feature flag, for the default rule + * Whether the SDK sends a detailed event for every evaluation of this flag\'s default rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. */ 'trackEventsFallthrough': boolean; '_debugEventsUntilDate'?: number; @@ -5150,6 +6601,10 @@ export interface FlagConfigApprovalRequestResponse { * An array of member IDs. These members are notified to review the approval request. */ 'notifyMemberIds': Array; + /** + * An array of team keys, if teams were specified when the approval request was created. The members of these teams are listed in notifyMemberIds, resolved when the request was made. Team membership may have changed since then. + */ + 'notifyTeamKeys'?: Array; 'appliedDate'?: number; /** * The member ID of the member who applied the approval request @@ -5860,7 +7315,7 @@ export interface GuardedReleaseConfig { */ 'metricGroupKeys'?: Array; /** - * List of stages + * List of stages. At most 10 stages by default; the server enforces the per-account limit, which is never more than 20. */ 'stages'?: Array; } @@ -6494,7 +7949,7 @@ export interface IntegrationConfigurationsRep { */ 'snowflakeSetupScript'?: string; /** - * SQL setup scripts (4 parts) for Redshift Native Experimentation setup. Present only for setup endpoint responses. + * SQL setup scripts (4 parts) for Redshift native Experimentation setup. Present on setup endpoint responses and, rehydrated from the persisted config, on active (finalized) Redshift native Experimentation configurations. */ 'redshiftSetupScripts'?: Array; /** @@ -6505,6 +7960,10 @@ export interface IntegrationConfigurationsRep { * IAM trust policy JSON for the customer\'s Redshift IAM role. Present only for setup endpoint responses. */ 'redshiftIAMTrustPolicy'?: string; + /** + * SQL setup script for ClickHouse native Experimentation. On setup endpoint responses it also creates the experimentation user with the submitted password. When the two-step setup flow is enabled, it is rehydrated from the persisted config on other responses with only the grants, never the password. + */ + 'clickHouseSetupScript'?: string; /** * The ID of the member who maintains this integration configuration. Defaults to the member who created it. */ @@ -6951,10 +8410,25 @@ export interface Maintainer { 'maintainerTeam'?: ViewsMaintainerTeam; } export interface MaintainerMember { + /** + * The member ID + */ '_id': string; + /** + * The member email address + */ 'email': string; + /** + * The member first name + */ 'firstName'?: string; + /** + * The member last name + */ 'lastName'?: string; + /** + * The member role + */ 'role': string; } export interface MaintainerRep { @@ -7184,7 +8658,13 @@ export interface MembersPatchInput { 'instructions': Array<{ [key: string]: any; }>; } export interface Message { + /** + * The message text + */ 'content': string; + /** + * The message role, such as system, user, or assistant + */ 'role': string; } export interface MethodNotAllowedErrorRep { @@ -7198,6 +8678,9 @@ export interface MethodNotAllowedErrorRep { 'message': string; } export interface MetricByVariation { + /** + * The variation key + */ 'variationKey'?: string; 'metrics'?: Metrics; } @@ -7287,7 +8770,7 @@ export interface MetricGroupPost { /** * A unique key to reference the metric group */ - 'key'?: string; + 'key': string; /** * A human-friendly name for the metric group */ @@ -7640,6 +9123,10 @@ export interface MetricListingRep { * For trace metrics, the location in the trace to use for numeric values. */ 'traceValueLocation'?: string; + /** + * For count_distinct metrics, the column to count distinct values of + */ + 'unitAggregationField'?: string; 'denominator'?: MetricDenominatorRep; } @@ -7954,6 +9441,10 @@ export interface MetricRep { * For trace metrics, the location in the trace to use for numeric values. */ 'traceValueLocation'?: string; + /** + * For count_distinct metrics, the column to count distinct values of + */ + 'unitAggregationField'?: string; 'denominator'?: MetricDenominatorRep; 'experiments'?: Array; /** @@ -7961,7 +9452,7 @@ export interface MetricRep { */ 'metricGroups'?: Array; 'lastUsedInExperiment'?: DependentExperimentRep; - 'lastUsedInGuardedRollout'?: DependentMeasuredRolloutRep; + 'lastUsedInGuardedRollout'?: DependentReleasePhaseRep; /** * Whether the metric is active */ @@ -8066,8 +9557,17 @@ export const MetricV2RepAnalysisTypeEnum = { export type MetricV2RepAnalysisTypeEnum = typeof MetricV2RepAnalysisTypeEnum[keyof typeof MetricV2RepAnalysisTypeEnum]; export interface Metrics { + /** + * Number of input tokens + */ 'inputTokens'?: number; + /** + * Number of output tokens + */ 'outputTokens'?: number; + /** + * Total number of tokens + */ 'totalTokens'?: number; /** * Number of attempted generations @@ -8082,9 +9582,21 @@ export interface Metrics { * Number of generations with errors */ 'generationErrorCount'?: number; + /** + * Number of positive feedback ratings + */ 'thumbsUp'?: number; + /** + * Number of negative feedback ratings + */ 'thumbsDown'?: number; + /** + * Total generation duration, in milliseconds + */ 'durationMs'?: number; + /** + * Time to the first token, in milliseconds + */ 'timeToFirstTokenMs'?: number; /** * A value between 0 and 1 representing satisfaction rating @@ -8147,11 +9659,11 @@ export interface ModelConfig { */ 'name': string; /** - * Unique key for the model + * Unique key for the model config in the project, in the format `Provider.model-id`. Use this value as `modelConfigKey` on a config variation. */ 'key': string; /** - * Identifier for the model, for use with third party providers + * Model ID that the provider\'s API uses. This is different from `key`. Use this value as `modelName` on a config variation. */ 'id': string; /** @@ -8159,16 +9671,28 @@ export interface ModelConfig { */ 'icon'?: string; /** - * Provider for the model + * Provider for the model. Matches the provider prefix of `key`. */ 'provider'?: string; /** - * Whether the model is global + * Whether the model is in the LaunchDarkly global catalog. Global models are read-only. Model configs that you create are always custom, with `global` set to `false`. */ 'global': boolean; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'params'?: object; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'customParams'?: object; + /** + * Tags for the model config. Tags can be used in custom role policies. + */ 'tags': Array; + /** + * Version of the model config. Starts at 1, and each update that changes the model config adds a new version. + */ 'version': number; /** * Cost per input token in USD @@ -8183,10 +9707,17 @@ export interface ModelConfig { */ 'costPerCachedInputToken'?: number; /** - * Whether the model is restricted + * Whether the model is on the project\'s restricted list. Config variations cannot select a restricted model. To change this, use the add or remove restricted models endpoints. */ 'isRestricted': boolean; + /** + * Number of distinct AgentControl configs that reference this model + */ + 'usedInCount'?: number; } +/** + * Fields to update. Omitted fields keep their current values. `params`, `customParams`, and `tags` replace the current values. Global model configs cannot be updated. + */ export interface ModelConfigPatch { /** * Immutable provider model identifier. To use a different model identifier, create a new model config. @@ -8212,10 +9743,25 @@ export interface ModelConfigPatch { * Cost per cached input token in USD */ 'costPerCachedInputToken'?: number; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'params'?: object; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'customParams'?: object; + /** + * Tags for the model config. Replaces the current tags. + */ 'tags'?: Array; + /** + * The member ID of the new maintainer. Set `maintainerId` or `maintainerTeamKey`, not both. An empty string removes the maintainer. + */ 'maintainerId'?: string; + /** + * The key of the team to set as the new maintainer. Set `maintainerId` or `maintainerTeamKey`, not both. + */ 'maintainerTeamKey'?: string; } export interface ModelConfigPost { @@ -8224,25 +9770,40 @@ export interface ModelConfigPost { */ 'name': string; /** - * Unique key for the model + * Unique key for the model config in the project, in the format `Provider.model-id`. Config variations reject other formats. Keys of global catalog models are reserved. */ 'key': string; /** - * Identifier for the model, for use with third party providers + * Model ID that the provider\'s API uses. Cannot be changed after creation. */ 'id': string; + /** + * The member ID of the maintainer. Not applied on create. To set the maintainer, update the model config after you create it. + */ 'maintainerId'?: string; + /** + * The key of the team that maintains the model config. Not applied on create. To set the maintainer, update the model config after you create it. + */ 'maintainerTeamKey'?: string; /** * Icon for the model */ 'icon'?: string; /** - * Provider for the model + * Provider for the model. Use the provider prefix of `key`. Cannot be changed after creation. */ 'provider'?: string; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'params'?: object; + /** + * Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. + */ 'customParams'?: object; + /** + * Tags for the model config + */ 'tags'?: Array; /** * Cost per input token in USD @@ -8259,7 +9820,13 @@ export interface ModelConfigPost { } export interface ModelConfigs { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount': number; } export interface ModelError { @@ -8385,6 +9952,17 @@ export interface OauthClientPost { */ 'description'?: string; } +export interface ObservabilityAlertSource { + 'type': ObservabilityAlertSourceTypeEnum; + 'alertId': number; +} + +export const ObservabilityAlertSourceTypeEnum = { + ObservabilityAlert: 'observabilityAlert' +} as const; + +export type ObservabilityAlertSourceTypeEnum = typeof ObservabilityAlertSourceTypeEnum[keyof typeof ObservabilityAlertSourceTypeEnum]; + export interface OptionsArray { 'label'?: string; 'value'?: string; @@ -8641,6 +10219,184 @@ export interface PhaseInfo { */ 'releaseCount': number; } +export interface PipelineRelease { + /** + * The location and content type of related resources + */ + '_links'?: { [key: string]: Link; }; + /** + * The release pipeline name + */ + 'name': string; + /** + * The release pipeline key + */ + 'releasePipelineKey': string; + /** + * The release pipeline description + */ + 'releasePipelineDescription': string; + /** + * An ordered list of the release pipeline phases + */ + 'phases': Array; + /** + * The release version + */ + '_version': number; + /** + * The chosen release variation ID to use across all phases of a release + */ + '_releaseVariationId'?: string; + '_canceledAt'?: number; +} +export interface PipelineReleaseAudience { + /** + * The audience ID + */ + '_id': string; + /** + * The location and content type of related resources + */ + '_links'?: { [key: string]: Link; }; + 'environment'?: EnvironmentSummary; + /** + * The release phase name + */ + 'name': string; + 'configuration'?: AudienceConfiguration; + /** + * A list of segment keys + */ + 'segmentKeys'?: Array; + 'status'?: string; + /** + * The rules IDs added or updated by this audience + */ + '_ruleIds'?: Array; +} +export interface PipelineReleaseAudienceConfigInput { + /** + * UUID of the audience. + */ + 'audienceId'?: string; + 'releaseGuardianConfiguration'?: PipelineReleaseGuardianConfigurationInput; + /** + * An array of member IDs. These members are notified to review the approval request. + */ + 'notifyMemberIds'?: Array; + /** + * An array of team keys. The members of these teams are notified to review the approval request. + */ + 'notifyTeamKeys'?: Array; +} +export interface PipelineReleaseGuardianConfiguration { + /** + * The monitoring window in milliseconds + */ + 'monitoringWindowMilliseconds': number; + /** + * The rollout weight percentage + */ + 'rolloutWeight': number; + /** + * Whether or not to roll back on regression + */ + 'rollbackOnRegression': boolean; + /** + * The randomization unit for the measured rollout + */ + 'randomizationUnit'?: string; +} +export interface PipelineReleaseGuardianConfigurationInput { + /** + * The monitoring window in milliseconds + */ + 'monitoringWindowMilliseconds'?: number; + /** + * The rollout weight + */ + 'rolloutWeight'?: number; + /** + * Whether or not to rollback on regression + */ + 'rollbackOnRegression'?: boolean; + /** + * The randomization unit for the measured rollout + */ + 'randomizationUnit'?: string; +} +export interface PipelineReleasePhase { + /** + * The phase ID + */ + '_id': string; + /** + * The release phase name + */ + '_name': string; + /** + * Whether this phase is complete + */ + 'complete': boolean; + '_creationDate': number; + '_completionDate'?: number; + '_completedBy'?: CompletedBy; + /** + * A logical grouping of one or more environments that share attributes for rolling out changes + */ + '_audiences': Array; + 'status'?: string; + /** + * Whether or not this phase has started + */ + 'started'?: boolean; + '_startedDate'?: number; + 'configuration'?: object; +} +export interface PipelineReleaseProgression { + '_createdAt': number; + '_completedAt'?: number; + /** + * The flag key + */ + 'flagKey': string; + /** + * The ID of the currently active release phase + */ + 'activePhaseId'?: string; + 'activePhaseStatus'?: string; + /** + * The location and content type of related resources + */ + '_links': { [key: string]: Link; }; +} +export interface PipelineReleaseProgressionCollection { + /** + * The number of active releases + */ + 'activeCount': number; + /** + * The number of completed releases + */ + 'completedCount': number; + /** + * A list of details for each release, across all flags, for this release pipeline + */ + 'items': Array; + /** + * A list of details for each phase, across all releases, for this release pipeline + */ + 'phases': Array; + /** + * The total number of releases for this release pipeline + */ + 'totalCount': number; + /** + * The location and content type of related resources + */ + '_links': { [key: string]: Link; }; +} export interface PostApprovalRequestApplyRequest { /** * Optional comment about the approval request @@ -8785,7 +10541,7 @@ export interface ProgressiveReleaseConfig { */ 'rolloutContextKindKey'?: string; /** - * List of stages + * List of stages. At most 10 stages by default; the server enforces the per-account limit, which is never more than 20. */ 'stages'?: Array; } @@ -8917,46 +10673,101 @@ export interface Projects { 'totalCount'?: number; } export interface PromptSnippet { + /** + * The prompt snippet key + */ 'key': string; '_access'?: AiConfigsAccess; '_links'?: ParentAndSelfLinks; + '_site'?: CoreLink; '_maintainer'?: AIConfigMaintainer; + /** + * The prompt snippet name + */ 'name': string; + /** + * A description of the prompt snippet + */ 'description'?: string; /** * The text content of the prompt snippet */ 'text': string; + /** + * Tags for this resource + */ 'tags': Array; + /** + * The version number of this resource + */ 'version': number; 'createdAt': number; } export interface PromptSnippetPatch { + /** + * A human-readable name for the prompt snippet + */ 'name'?: string; + /** + * A description of the prompt snippet + */ 'description'?: string; /** * The text content of the prompt snippet */ 'text'?: string; + /** + * The ID of the member who maintains this resource + */ 'maintainerId'?: string; + /** + * The key of the team that maintains this resource + */ 'maintainerTeamKey'?: string; + /** + * Tags for this resource + */ 'tags'?: Array; } export interface PromptSnippetPost { + /** + * A unique key for the prompt snippet + */ 'key': string; + /** + * A human-readable name for the prompt snippet + */ 'name': string; + /** + * A description of the prompt snippet + */ 'description'?: string; /** * The text content of the prompt snippet */ 'text': string; + /** + * The ID of the member who maintains this resource + */ 'maintainerId'?: string; + /** + * The key of the team that maintains this resource + */ 'maintainerTeamKey'?: string; + /** + * Tags for this resource + */ 'tags'?: Array; } export interface PromptSnippets { '_links'?: PaginatedLinks; + /** + * The items on this page + */ 'items': Array; + /** + * The total number of items + */ 'totalCount': number; } export interface PullRequestCollectionRep { @@ -9095,9 +10906,21 @@ export interface PutReleasePolicyRequest { export interface QuickStats { + /** + * Number of active AI Configs + */ 'activeConfigs': number; + /** + * Number of active experiments on AI Configs + */ 'activeExperiments': number; + /** + * Average satisfaction rating over the last 7 days + */ 'averageSatisfaction7D'?: number | null; + /** + * Spend so far this month + */ 'spendMonthToDate'?: number | null; } export interface RandomizationSettingsPut { @@ -9177,7 +11000,7 @@ export interface RedshiftDataExportCompletedArtifactsRep { */ 'sqlSetupScript'?: string; /** - * The auto-generated S3 staging bucket name. + * The S3 staging bucket name used by the destination. This is the customer-supplied bucket name, or the auto-generated name for destinations that did not set one. */ 's3BucketName'?: string; } @@ -9245,98 +11068,33 @@ export interface RelayAutoConfigRep { 'creationDate': number; 'lastModified': number; } -export interface Release { +export interface ReleaseHealthCheckFailure { + 'kind': ReleaseHealthCheckKind; /** - * The location and content type of related resources - */ - '_links'?: { [key: string]: Link; }; - /** - * The release pipeline name - */ - 'name': string; - /** - * The release pipeline key - */ - 'releasePipelineKey': string; - /** - * The release pipeline description - */ - 'releasePipelineDescription': string; - /** - * An ordered list of the release pipeline phases - */ - 'phases': Array; - /** - * The release version - */ - '_version': number; - /** - * The chosen release variation ID to use across all phases of a release - */ - '_releaseVariationId'?: string; - '_canceledAt'?: number; -} -export interface ReleaseAudience { - /** - * The audience ID - */ - '_id': string; - /** - * The location and content type of related resources + * The metric key associated with a metric event check. */ - '_links'?: { [key: string]: Link; }; - 'environment'?: EnvironmentSummary; - /** - * The release phase name - */ - 'name': string; - 'configuration'?: AudienceConfiguration; - /** - * A list of segment keys - */ - 'segmentKeys'?: Array; - 'status'?: string; - /** - * The rules IDs added or updated by this audience - */ - '_ruleIds'?: Array; -} -export interface ReleaseGuardianConfiguration { - /** - * The monitoring window in milliseconds - */ - 'monitoringWindowMilliseconds': number; - /** - * The rollout weight percentage - */ - 'rolloutWeight': number; - /** - * Whether or not to roll back on regression - */ - 'rollbackOnRegression': boolean; - /** - * The randomization unit for the measured rollout - */ - 'randomizationUnit'?: string; -} -export interface ReleaseGuardianConfigurationInput { - /** - * The monitoring window in milliseconds - */ - 'monitoringWindowMilliseconds'?: number; - /** - * The rollout weight - */ - 'rolloutWeight'?: number; - /** - * Whether or not to rollback on regression - */ - 'rollbackOnRegression'?: boolean; + 'metricKey'?: string; /** - * The randomization unit for the measured rollout + * A description of the failed health check. */ - 'randomizationUnit'?: string; + 'message': string; } + + +/** + * A release health check: - `flag_evaluations_any`: The flag has recently been evaluated. - `flag_evaluations_with_context`: The flag has recently been evaluated for contexts of the `randomizationUnit` kind. - `metric_events_any`: Guarded releases only. The metric has received events. - `metric_events_with_context`: Guarded releases only. The metric has received events for contexts of the `randomizationUnit` kind. + */ + +export const ReleaseHealthCheckKind = { + ReleaseHealthCheckKindFlagEvaluationsAny: 'flag_evaluations_any', + ReleaseHealthCheckKindFlagEvaluationsWithContext: 'flag_evaluations_with_context', + ReleaseHealthCheckKindMetricEventsAny: 'metric_events_any', + ReleaseHealthCheckKindMetricEventsWithContext: 'metric_events_with_context' +} as const; + +export type ReleaseHealthCheckKind = typeof ReleaseHealthCheckKind[keyof typeof ReleaseHealthCheckKind]; + + /** * The release method for this policy */ @@ -9350,34 +11108,31 @@ export const ReleaseMethod = { export type ReleaseMethod = typeof ReleaseMethod[keyof typeof ReleaseMethod]; -export interface ReleasePhase { - /** - * The phase ID - */ - '_id': string; - /** - * The release phase name - */ - '_name': string; - /** - * Whether this phase is complete - */ - 'complete': boolean; - '_creationDate': number; - '_completionDate'?: number; - '_completedBy'?: CompletedBy; +/** + * A metric shared by every phase of a guarded release. + */ +export interface ReleaseMetric { + 'metricKey': string; + 'metricVersionId'?: string; /** - * A logical grouping of one or more environments that share attributes for rolling out changes + * Whether a regression automatically reverts the release. */ - '_audiences': Array; - 'status'?: string; + 'autoRollback': boolean; /** - * Whether or not this phase has started + * Present only when the caller requests `expand=metrics` and the pinned metric version still exists. A metric whose pinned version has been deleted keeps its `metricKey` and `metricVersionId` but has no definition. */ - 'started'?: boolean; - '_startedDate'?: number; - 'configuration'?: object; + 'definition'?: EnvironmentReleasesMetricListingRep; } + +export const ReleaseMetricStatus = { + ReleaseMetricStatusOK: 'ok', + ReleaseMetricStatusRegressed: 'regressed', + ReleaseMetricStatusRegressionDismissed: 'regression_dismissed' +} as const; + +export type ReleaseMetricStatus = typeof ReleaseMetricStatus[keyof typeof ReleaseMetricStatus]; + + export interface ReleasePipeline { /** * Timestamp of when the release pipeline was created @@ -9546,7 +11301,7 @@ export interface ReleasePolicyScope { */ 'environmentKeys'?: Array; /** - * List of flag tag keys this policy applies to + * List of flag tag keys this policy applies to. At most 1000 keys. Each key must only contain letters, numbers, \'-\', \'_\', or \'.\', and be at most 64 characters. */ 'flagTagKeys'?: Array; } @@ -9554,64 +11309,73 @@ export interface ReleasePolicyStage { 'allocation': number; 'durationMillis': number; } -export interface ReleaseProgression { - '_createdAt': number; - '_completedAt'?: number; - /** - * The flag key - */ - 'flagKey': string; - /** - * The ID of the currently active release phase - */ - 'activePhaseId'?: string; - 'activePhaseStatus'?: string; - /** - * The location and content type of related resources - */ - '_links': { [key: string]: Link; }; -} -export interface ReleaseProgressionCollection { - /** - * The number of active releases - */ - 'activeCount': number; - /** - * The number of completed releases - */ - 'completedCount': number; - /** - * A list of details for each release, across all flags, for this release pipeline - */ - 'items': Array; - /** - * A list of details for each phase, across all releases, for this release pipeline - */ - 'phases': Array; - /** - * The total number of releases for this release pipeline - */ - 'totalCount': number; +/** + * High-level status of an environment release or release phase. - `pending`: The release or phase has not started. - `in_progress`: The release or phase is progressing without requiring action. - `waiting`: The release is partially rolled out, but is paused and waiting for action from the user. - `completed`: The release or phase reached the target variation. - `reverted`: The release or phase returned to the original variation. + */ + +export const ReleaseStatus = { + ReleaseStatusPending: 'pending', + ReleaseStatusInProgress: 'in_progress', + ReleaseStatusWaiting: 'waiting', + ReleaseStatusCompleted: 'completed', + ReleaseStatusReverted: 'reverted' +} as const; + +export type ReleaseStatus = typeof ReleaseStatus[keyof typeof ReleaseStatus]; + + +/** + * Additional detail for a `waiting`, `completed`, or `reverted` status. The field may be absent for a `waiting` status when there is no specific reason. `waiting_phase_ended` appears only on the release, never on a phase. It means a phase of a multi-phase release with `advancementMode` `manual` ended and the release must be advanced to the next phase. `reverted_discarded` means the phase ended without a regression or a member rolling it back. A running phase is discarded when the flag changes underneath it, for example when the flag is turned off, archived, or deleted. A pending phase is discarded when the release ends before it starts, either because an earlier phase reverted or because the release was stopped with a resolution that removes pending phases. A release reports `reverted_discarded` only when the last phase that started was discarded. + */ + +export const ReleaseStatusReason = { + ReleaseStatusReasonWaitingRegressionDetected: 'waiting_regression_detected', + ReleaseStatusReasonWaitingPhaseEnded: 'waiting_phase_ended', + ReleaseStatusReasonCompletedAutomatic: 'completed_automatic', + ReleaseStatusReasonCompletedManual: 'completed_manual', + ReleaseStatusReasonRevertedRegressionDetected: 'reverted_regression_detected', + ReleaseStatusReasonRevertedManual: 'reverted_manual', + ReleaseStatusReasonRevertedDiscarded: 'reverted_discarded', + ReleaseStatusReasonRevertedInsufficientData: 'reverted_insufficient_data' +} as const; + +export type ReleaseStatusReason = typeof ReleaseStatusReason[keyof typeof ReleaseStatusReason]; + + +/** + * One step in a phase\'s rollout schedule. + */ +export interface ReleaseStep { /** - * The location and content type of related resources + * Zero-based index of this step. */ - '_links': { [key: string]: Link; }; -} -export interface ReleaserAudienceConfigInput { + 'stepIndex': number; /** - * UUID of the audience. + * Thousandths of a percent. `100000` is 100%, and `10000` is 10%. Guarded releases cannot exceed `50000`, preserving a control group. */ - 'audienceId'?: string; - 'releaseGuardianConfiguration'?: ReleaseGuardianConfigurationInput; + 'allocation': number; + 'durationMillis': number; /** - * An array of member IDs. These members are notified to review the approval request. + * Start of the step in Unix milliseconds. */ - 'notifyMemberIds'?: Array; + 'startedAt'?: number; /** - * An array of team keys. The members of these teams are notified to review the approval request. + * End of the step in Unix milliseconds. */ - 'notifyTeamKeys'?: Array; + 'endedAt'?: number; } +/** + * Whether the release uses metric monitoring. + */ + +export const ReleaseType = { + ReleaseTypeProgressive: 'progressive', + ReleaseTypeGuarded: 'guarded' +} as const; + +export type ReleaseType = typeof ReleaseType[keyof typeof ReleaseType]; + + export interface RepositoryCollectionRep { '_links': { [key: string]: Link; }; /** @@ -9742,15 +11506,33 @@ export interface ResourceSummary { 'totalCount': number; } export interface RestrictedModelError { + /** + * The model config key that was not added + */ 'key': string; + /** + * Why the key was not added. A key that a config variation uses cannot be restricted. Move those variations to a different model first. + */ 'message': string; + /** + * HTTP status code for this key. `400` means a config variation uses the key. `404` means the key does not exist in the project. + */ 'code': number; } export interface RestrictedModelsRequest { + /** + * Model config keys, not provider model IDs. Get keys from the list AI model configs endpoint. + */ 'keys': Array; } export interface RestrictedModelsResponse { + /** + * Model config keys that were added to the restricted list + */ 'successes': Array; + /** + * Model config keys that were not added, with the reason for each key + */ 'errors': Array; } export interface ReviewOutput { @@ -9822,7 +11604,7 @@ export interface Rule { */ 'clauses': Array; /** - * Whether LaunchDarkly tracks events for this rule + * Whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. */ 'trackEvents': boolean; /** @@ -9991,6 +11773,10 @@ export interface SdkKeyListItem { */ '_version': number; 'environmentSummary'?: SdkKeysEnvironmentSummary; + /** + * Summaries of views associated with the SDK key. + */ + 'viewSummaries'?: Array; } @@ -10023,6 +11809,10 @@ export interface SdkKeyPost { */ 'description'?: string; 'expiry'?: number; + /** + * List of view keys to associate with the SDK key. + */ + 'viewKeys'?: Array; } export const SdkKeyPostKindEnum = { @@ -10032,6 +11822,20 @@ export const SdkKeyPostKindEnum = { export type SdkKeyPostKindEnum = typeof SdkKeyPostKindEnum[keyof typeof SdkKeyPostKindEnum]; +export interface SdkKeyViewsPut { + /** + * The complete target list of view keys to associate with this SDK key. An empty array removes all views from the SDK key. + */ + 'viewKeys': Array; +} +export interface SdkKeys { + '_links'?: SdkKeysSelfLink; + 'items': Array; + /** + * The total number of SDK keys matching the query, before pagination. + */ + 'totalCount': number; +} export interface SdkKeysEnvironmentSummary { /** * The location and content type of related resources @@ -10248,6 +12052,9 @@ export interface SnippetReferences { * The type of the resource being referenced. */ 'resourceType': string; + /** + * The resources that reference this prompt snippet + */ 'items': Array; /** * The total number of references. @@ -10319,6 +12126,62 @@ export interface StaleFlagData { */ 'cleanupId'?: string; } +export interface StartEnvironmentReleaseBadRequest { + 'code': string; + 'message': string; + /** + * Present when `code` is `health_checks_failed`. + */ + 'failingChecks'?: Array; +} +export interface StartEnvironmentReleaseRequest { + /** + * Insert the newly created rule or phase rules before this rule. If omitted, append them to the end of the rule list. + */ + 'beforeRuleId'?: string; + /** + * ID of the variation the release starts from. The release gradually moves traffic from it to the target variation, and moves traffic back to it if the release reverts. + */ + 'originalVariationId': string; + /** + * ID of the variation being released. The release gradually moves traffic to it from the original variation, and moves traffic back to the original variation if the release reverts. + */ + 'targetVariationId': string; + /** + * Key of an environment release plan in this environment. The plan supplies `randomizationUnit`, `phases`, `metrics`, `advancementMode`, and `cleanupBehavior`, so omit them. Omit this field to configure the release inline. + */ + 'releasePlanKey'?: string; + /** + * Key of an existing, non-archived context kind in the project that the release randomizes on, such as `user`. Each phase\'s rule must include the clause `{\"contextKind\": \"\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\"]}`. Required unless `releasePlanKey` is set. + */ + 'randomizationUnit'?: string; + /** + * How the release moves between phases. Required when `phases` has more than one entry; a single-phase release ignores it and may omit it. Omit when `releasePlanKey` is set. + */ + 'advancementMode'?: EnvironmentReleaseAdvancementMode; + /** + * Ordered phases of the release. Required unless `releasePlanKey` is set. + */ + 'phases'?: Array; + /** + * Metrics shared by every phase. Omit or pass an empty array for a progressive release. Metric groups cannot be listed inline; a release plan\'s metric groups expand into their member metrics at start. Omit when `releasePlanKey` is set. + */ + 'metrics'?: Array; + /** + * Health check kinds that do not block this request. LaunchDarkly still runs and enforces every health check kind not listed here. + */ + 'bypassHealthChecks'?: Set; + /** + * What happens to the release rules after the release completes. Omit for `leave_rules_in_place`. Omit when `releasePlanKey` is set. + */ + 'cleanupBehavior'?: CleanupBehavior; + /** + * Optional comment written to the flag\'s audit-log entry. + */ + 'comment'?: string; +} + + export interface Statement { /** * Resource specifier strings @@ -10471,6 +12334,15 @@ export interface StatusServiceUnavailable { */ 'message': string; } +export interface StopEnvironmentReleaseRequest { + 'resolution': EnvironmentReleaseResolution; + /** + * Optional comment written to the flag\'s audit-log entry. + */ + 'comment'?: string; +} + + export interface StoreIntegrationError { 'statusCode'?: number; 'message'?: string; @@ -10752,6 +12624,7 @@ export interface Token { */ 'defaultApiVersion'?: number; 'lastUsed'?: number; + 'expiry'?: number; } export interface TokenSummary { '_links'?: { [key: string]: Link; }; @@ -10819,6 +12692,9 @@ export interface ToolReferences { * The type of the resource being referenced. */ 'resourceType': string; + /** + * The resources that reference this tool + */ 'items': Array; /** * The total number of references. @@ -11004,12 +12880,16 @@ export interface UnlinkResourceSuccessResponse { */ 'failedResources'?: Array; } +export interface UpdateAdaptiveTriggerRequest { + 'name'?: string; + 'task'?: AdaptiveTriggerTask; +} export interface UpdatePhaseStatusInput { 'status'?: string; /** * Extra configuration for audiences required upon phase initialization. */ - 'audiences'?: Array; + 'audiences'?: Array; } export interface UpdateReleasePipelineInput { /** @@ -11642,7 +13522,7 @@ export interface ViewPatch { } export interface ViewPost { /** - * Unique key for the view within the account/project + * Unique key for the view within the account/project. The key is converted to lowercase when the view is created, so use the lowercase form to reference the view afterward. */ 'key': string; /** @@ -11860,7 +13740,7 @@ export interface WarehouseDestinationSetupScriptRep { */ 'redshiftIAMTrustPolicy'?: string; /** - * The auto-generated S3 staging bucket name (ClickHouse and Redshift) + * The S3 staging bucket name (ClickHouse and Redshift). For Redshift this is the name chosen for setup, a previously saved name, or an auto-generated default. */ 's3BucketName'?: string; } @@ -11992,241 +13872,6 @@ export interface WorkflowTemplatesListingOutputRep { 'items': Array; } -/** - * AIConfigsApi - axios parameter creator - */ -export const AIConfigsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get all AgentControl config variations that currently reference this tool. - * @summary List AI tool references - * @param {string} projectKey - * @param {string} toolKey - * @param {number} [limit] The number of resources to return. - * @param {number} [offset] 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`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAIToolReferences: async (projectKey: string, toolKey: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('listAIToolReferences', 'projectKey', projectKey) - // verify required parameter 'toolKey' is not null or undefined - assertParamExists('listAIToolReferences', 'toolKey', toolKey) - const localVarPath = `/api/v2/projects/{projectKey}/ai-tools/{toolKey}/references` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"toolKey"}}`, encodeURIComponent(String(toolKey))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. - * @summary List agent optimization runs - * @param {string} projectKey - * @param {string} optimizationKey - * @param {number} [limit] The number of resources to return. - * @param {number} [offset] 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`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAgentOptimizationRuns: async (projectKey: string, optimizationKey: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('listAgentOptimizationRuns', 'projectKey', projectKey) - // verify required parameter 'optimizationKey' is not null or undefined - assertParamExists('listAgentOptimizationRuns', 'optimizationKey', optimizationKey) - const localVarPath = `/api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"optimizationKey"}}`, encodeURIComponent(String(optimizationKey))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * AIConfigsApi - functional programming interface - */ -export const AIConfigsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AIConfigsApiAxiosParamCreator(configuration) - return { - /** - * Get all AgentControl config variations that currently reference this tool. - * @summary List AI tool references - * @param {string} projectKey - * @param {string} toolKey - * @param {number} [limit] The number of resources to return. - * @param {number} [offset] 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`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listAIToolReferences(projectKey: string, toolKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAIToolReferences(projectKey, toolKey, limit, offset, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIConfigsApi.listAIToolReferences']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. - * @summary List agent optimization runs - * @param {string} projectKey - * @param {string} optimizationKey - * @param {number} [limit] The number of resources to return. - * @param {number} [offset] 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`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listAgentOptimizationRuns(projectKey: string, optimizationKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAgentOptimizationRuns(projectKey, optimizationKey, limit, offset, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AIConfigsApi.listAgentOptimizationRuns']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * AIConfigsApi - factory interface - */ -export const AIConfigsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AIConfigsApiFp(configuration) - return { - /** - * Get all AgentControl config variations that currently reference this tool. - * @summary List AI tool references - * @param {string} projectKey - * @param {string} toolKey - * @param {number} [limit] The number of resources to return. - * @param {number} [offset] 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`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAIToolReferences(projectKey: string, toolKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listAIToolReferences(projectKey, toolKey, limit, offset, options).then((request) => request(axios, basePath)); - }, - /** - * Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. - * @summary List agent optimization runs - * @param {string} projectKey - * @param {string} optimizationKey - * @param {number} [limit] The number of resources to return. - * @param {number} [offset] 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`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAgentOptimizationRuns(projectKey: string, optimizationKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listAgentOptimizationRuns(projectKey, optimizationKey, limit, offset, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * AIConfigsApi - object-oriented interface - */ -export class AIConfigsApi extends BaseAPI { - /** - * Get all AgentControl config variations that currently reference this tool. - * @summary List AI tool references - * @param {string} projectKey - * @param {string} toolKey - * @param {number} [limit] The number of resources to return. - * @param {number} [offset] 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`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public listAIToolReferences(projectKey: string, toolKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { - return AIConfigsApiFp(this.configuration).listAIToolReferences(projectKey, toolKey, limit, offset, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. - * @summary List agent optimization runs - * @param {string} projectKey - * @param {string} optimizationKey - * @param {number} [limit] The number of resources to return. - * @param {number} [offset] 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`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public listAgentOptimizationRuns(projectKey: string, optimizationKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { - return AIConfigsApiFp(this.configuration).listAgentOptimizationRuns(projectKey, optimizationKey, limit, offset, options).then((request) => request(this.axios, this.basePath)); - } -} - - - /** * AccessTokensApi - axios parameter creator */ @@ -12264,7 +13909,7 @@ export const AccessTokensApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12308,7 +13953,7 @@ export const AccessTokensApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12363,7 +14008,7 @@ export const AccessTokensApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12411,7 +14056,7 @@ export const AccessTokensApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12456,7 +14101,7 @@ export const AccessTokensApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12470,11 +14115,12 @@ export const AccessTokensApiAxiosParamCreator = function (configuration?: Config }; }, /** - * Reset an access token\'s secret key with an optional expiry time for the old key. - * @summary Reset access token + * Reset an access token\'s secret key with an optional expiry time for the old key. Use of this legacy handler is discouraged. Patch the `expiry` field on the token directly instead. + * @summary Reset access token (legacy) * @param {string} id The ID of the access token to update * @param {number} [expiry] An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ resetToken: async (id: string, expiry?: number, options: RawAxiosRequestConfig = {}): Promise => { @@ -12506,7 +14152,7 @@ export const AccessTokensApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12596,11 +14242,12 @@ export const AccessTokensApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Reset an access token\'s secret key with an optional expiry time for the old key. - * @summary Reset access token + * Reset an access token\'s secret key with an optional expiry time for the old key. Use of this legacy handler is discouraged. Patch the `expiry` field on the token directly instead. + * @summary Reset access token (legacy) * @param {string} id The ID of the access token to update * @param {number} [expiry] An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async resetToken(id: string, expiry?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { @@ -12672,11 +14319,12 @@ export const AccessTokensApiFactory = function (configuration?: Configuration, b return localVarFp.postToken(accessTokenPost, options).then((request) => request(axios, basePath)); }, /** - * Reset an access token\'s secret key with an optional expiry time for the old key. - * @summary Reset access token + * Reset an access token\'s secret key with an optional expiry time for the old key. Use of this legacy handler is discouraged. Patch the `expiry` field on the token directly instead. + * @summary Reset access token (legacy) * @param {string} id The ID of the access token to update * @param {number} [expiry] An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ resetToken(id: string, expiry?: number, options?: RawAxiosRequestConfig): AxiosPromise { @@ -12748,11 +14396,12 @@ export class AccessTokensApi extends BaseAPI { } /** - * Reset an access token\'s secret key with an optional expiry time for the old key. - * @summary Reset access token + * Reset an access token\'s secret key with an optional expiry time for the old key. Use of this legacy handler is discouraged. Patch the `expiry` field on the token directly instead. + * @summary Reset access token (legacy) * @param {string} id The ID of the access token to update * @param {number} [expiry] An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ public resetToken(id: string, expiry?: number, options?: RawAxiosRequestConfig) { @@ -12799,7 +14448,7 @@ export const AccountMembersApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12848,7 +14497,7 @@ export const AccountMembersApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12913,7 +14562,7 @@ export const AccountMembersApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -12961,7 +14610,7 @@ export const AccountMembersApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13006,7 +14655,7 @@ export const AccountMembersApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13055,7 +14704,7 @@ export const AccountMembersApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13069,7 +14718,7 @@ export const AccountMembersApiAxiosParamCreator = function (configuration?: Conf }; }, /** - * Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). + * Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. You can assign new members to teams with the `teamKeys` field. Teams are available only on Enterprise plans. If your plan does not include teams, a request that includes a non-empty `teamKeys` field returns an HTTP response code of 403 (Forbidden). Omit `teamKeys` to invite members without assigning them to a team. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). * @summary Invite new members * @param {Array} newMemberForm * @param {*} [options] Override http request option. @@ -13100,7 +14749,7 @@ export const AccountMembersApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13208,7 +14857,7 @@ export const AccountMembersApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). + * Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. You can assign new members to teams with the `teamKeys` field. Teams are available only on Enterprise plans. If your plan does not include teams, a request that includes a non-empty `teamKeys` field returns an HTTP response code of 403 (Forbidden). Omit `teamKeys` to invite members without assigning them to a team. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). * @summary Invite new members * @param {Array} newMemberForm * @param {*} [options] Override http request option. @@ -13297,7 +14946,7 @@ export const AccountMembersApiFactory = function (configuration?: Configuration, return localVarFp.postMemberTeams(id, memberTeamsPostInput, options).then((request) => request(axios, basePath)); }, /** - * Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). + * Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. You can assign new members to teams with the `teamKeys` field. Teams are available only on Enterprise plans. If your plan does not include teams, a request that includes a non-empty `teamKeys` field returns an HTTP response code of 403 (Forbidden). Omit `teamKeys` to invite members without assigning them to a team. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). * @summary Invite new members * @param {Array} newMemberForm * @param {*} [options] Override http request option. @@ -13387,7 +15036,7 @@ export class AccountMembersApi extends BaseAPI { } /** - * Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). + * Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. You can assign new members to teams with the `teamKeys` field. Teams are available only on Enterprise plans. If your plan does not include teams, a request that includes a non-empty `teamKeys` field returns an HTTP response code of 403 (Forbidden). Omit `teamKeys` to invite members without assigning them to a team. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). * @summary Invite new members * @param {Array} newMemberForm * @param {*} [options] Override http request option. @@ -13483,7 +15132,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13573,7 +15222,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13663,7 +15312,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13758,7 +15407,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13771,20 +15420,21 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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. + * 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. `groupBy=projectId` resolves legacy rows through the account\'s current environment-to-project mapping and returns `409` instead of a partial series when any successful row remains unattributed. Plain project filtering keeps its current-environment compatibility behavior. * @summary Get data export events usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `groupBy=projectId`, filters to the project\'s current environments so retained pre-materialization usage remains visible. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [eventKind] An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. - * @param {string} [groupBy] 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.<br/>Valid values: `environmentId`, `eventKind`. + * @param {string} [destinationKind] A Streaming configuration kind to filter results by. Values preserve raw product identity; `snowflake` is legacy Streaming Snowflake and is distinct from Warehouse `snowflake-v2`. Can be specified multiple times.<br/>Valid values: `kinesis`, `google-pubsub`, `mparticle`, `segment`, `azure-event-hubs`, `snowflake`, `unknown`. + * @param {string} [groupBy] 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. `projectId` requires one or more explicit `projectKey` filters and is capped at 100 selected projects. `destinationId` returns one series per streaming destination with `destinationName` metadata, plus `destinationViewable` when the destination is in the current configuration. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. A destination ID absent from the current configuration is named `Unknown historical destination`. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`.<br/>Valid values: `projectId`, `environmentId`, `eventKind`, `destinationKind`, `destinationId`. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getDataExportEventsUsage: async (from?: string, to?: string, projectKey?: string, environmentKey?: string, eventKind?: string, groupBy?: string, aggregationType?: string, granularity?: string, options: RawAxiosRequestConfig = {}): Promise => { + getDataExportEventsUsage: async (from?: string, to?: string, projectKey?: string, environmentKey?: string, eventKind?: string, destinationKind?: string, groupBy?: string, aggregationType?: string, granularity?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v2/usage/data-export-events`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -13820,6 +15470,10 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co localVarQueryParameter['eventKind'] = eventKind; } + if (destinationKind !== undefined) { + localVarQueryParameter['destinationKind'] = destinationKind; + } + if (groupBy !== undefined) { localVarQueryParameter['groupBy'] = groupBy; } @@ -13838,7 +15492,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13851,7 +15505,91 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co }; }, /** - * 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. + * Rank projects with usage in the requested range by successful Streaming transfers. Legacy rows are attributed through the account\'s complete current environment-to-project mapping. If any successful row remains unattributed after resolution, the operation returns `409` instead of a partial ranking. The result limit does not cap the account-wide project universe or environment mapping. This source-specific operation does not provide Combined or Warehouse ranking. + * @summary Rank Streaming usage by project + * @param {number} from Inclusive UTC range start in Unix milliseconds. + * @param {number} to Exclusive UTC range end in Unix milliseconds. + * @param {string} [source] The source scope. Only `streaming` is supported. + * @param {string} [dimension] The ranking dimension. Only `project` is supported. + * @param {Array} [projectKey] A canonical project key to include. Can be specified multiple times, with at most 100 unique explicit selections; duplicates do not consume the limit. When omitted, all account projects with usage in the requested range are ranked. + * @param {string} [search] A case-insensitive substring matched against canonical project keys before querying usage. Project names are not searched. + * @param {string} [cursor] An opaque cursor returned by a previous response. Cursors are bound to the account and ranking inputs. + * @param {number} [limit] The maximum number of ranked projects to return. This bounds response rows and look-ahead, not the account-wide candidate universe. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDataExportProjectRanking: async (from: number, to: number, source?: string, dimension?: string, projectKey?: Array, search?: string, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'from' is not null or undefined + assertParamExists('getDataExportProjectRanking', 'from', from) + // verify required parameter 'to' is not null or undefined + assertParamExists('getDataExportProjectRanking', 'to', to) + const localVarPath = `/api/v2/usage/data-export-events/projects/ranking`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + if (from !== undefined) { + localVarQueryParameter['from'] = from; + } + + if (to !== undefined) { + localVarQueryParameter['to'] = to; + } + + if (source !== undefined) { + localVarQueryParameter['source'] = source; + } + + if (dimension !== undefined) { + localVarQueryParameter['dimension'] = dimension; + } + + if (projectKey) { + localVarQueryParameter['projectKey'] = projectKey; + } + + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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 returned data depends on the length of the requested time range: ranges shorter than two hours return minutely data, ranges shorter than two days return hourly data, and ranges of two days or longer return daily data. Minutely data is retained for 70 days; a range shorter than two hours that starts before then is returned at hourly granularity instead, with the start of the range widened to the containing hour. Ranges that predate available data return an empty series list. If a flag has served many distinct variation values in the requested range, the least recently seen values may be aggregated into a single additional series labeled \"Other Variations\". * @summary Get evaluations usage * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -13905,7 +15643,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13959,7 +15697,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13976,7 +15714,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co * @summary Get experimentation events usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `environmentKey`, filters to the project\'s current environments. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [eventKey] An event key to filter results by. Can be specified multiple times, one query parameter per event key. * @param {string} [eventKind] An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. @@ -14044,7 +15782,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14061,7 +15799,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co * @summary Get experimentation keys usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `environmentKey`, filters by project, including projects that currently have no environments. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [experimentId] An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID. * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `experimentId`. @@ -14124,7 +15862,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14209,7 +15947,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14299,7 +16037,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14354,7 +16092,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14445,7 +16183,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14496,7 +16234,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14561,7 +16299,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14626,7 +16364,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14691,7 +16429,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14756,7 +16494,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14821,7 +16559,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14891,7 +16629,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14931,7 +16669,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -14954,9 +16692,9 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co * @param {string} [relayVersion] A relay version to filter results by. Can be specified multiple times, one query parameter per relay version. * @param {string} [sdkName] An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. * @param {string} [sdkVersion] An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version. - * @param {string} [sdkType] An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. + * @param {string} [sdkType] Deprecated. This endpoint reports server-side connections only, so `server` is the only value that returns data and omitting the parameter is equivalent. Any other value returns an empty series. To report client-side connections, use `GET /api/v2/usage/streams/{source}`. * @param {string} [sdkAppId] An SDK app ID to filter results by. Can be specified multiple times, one query parameter per SDK app ID. - * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`, `sdkAppId`. + * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkAppId`.<br/>`sdkType` is no longer offered: this endpoint reports server-side connections only, so grouping by it returns a single group. It is still accepted, for compatibility. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. @@ -15036,7 +16774,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15095,7 +16833,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15164,7 +16902,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15208,7 +16946,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15273,7 +17011,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15292,14 +17030,15 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. - * @param {string} [destination] A destination kind to filter results by. Can be specified multiple times, one query parameter per destination kind.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. - * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `destination`. + * @param {string} [destinationKind] A Warehouse configuration kind to filter results by. Cannot be combined with `destination`. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`, `s3`. + * @param {string} [destination] A Warehouse configuration kind to filter results by. Cannot be combined with `destinationKind`. Existing behavior is unchanged. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. + * @param {string} [groupBy] If specified, returns data for each distinct value of the given field. Can be specified multiple times.<br/>Valid values: `projectId`, `environmentId`, `destination`, `destinationKind`, `destinationId`. `destination` and `destinationKind` return the same raw Warehouse configuration kinds. `destinationId` returns one series per warehouse destination with `destinationName` metadata. When a current destination you can view matches, its `destinationId` is the LaunchDarkly destination ID, with `destinationViewable`. Otherwise, it is the warehouse provider\'s destination ID, named `Unknown destination`. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getWarehouseExportUsage: async (from?: string, to?: string, projectKey?: string, environmentKey?: string, destination?: string, groupBy?: string, aggregationType?: string, granularity?: string, options: RawAxiosRequestConfig = {}): Promise => { + getWarehouseExportUsage: async (from?: string, to?: string, projectKey?: string, environmentKey?: string, destinationKind?: string, destination?: string, groupBy?: string, aggregationType?: string, granularity?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v2/usage/warehouse-export`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -15331,6 +17070,10 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co localVarQueryParameter['environmentKey'] = environmentKey; } + if (destinationKind !== undefined) { + localVarQueryParameter['destinationKind'] = destinationKind; + } + if (destination !== undefined) { localVarQueryParameter['destination'] = destination; } @@ -15353,7 +17096,7 @@ export const AccountUsageBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -15464,27 +17207,48 @@ export const AccountUsageBetaApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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. + * 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. `groupBy=projectId` resolves legacy rows through the account\'s current environment-to-project mapping and returns `409` instead of a partial series when any successful row remains unattributed. Plain project filtering keeps its current-environment compatibility behavior. * @summary Get data export events usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `groupBy=projectId`, filters to the project\'s current environments so retained pre-materialization usage remains visible. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [eventKind] An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. - * @param {string} [groupBy] 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.<br/>Valid values: `environmentId`, `eventKind`. + * @param {string} [destinationKind] A Streaming configuration kind to filter results by. Values preserve raw product identity; `snowflake` is legacy Streaming Snowflake and is distinct from Warehouse `snowflake-v2`. Can be specified multiple times.<br/>Valid values: `kinesis`, `google-pubsub`, `mparticle`, `segment`, `azure-event-hubs`, `snowflake`, `unknown`. + * @param {string} [groupBy] 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. `projectId` requires one or more explicit `projectKey` filters and is capped at 100 selected projects. `destinationId` returns one series per streaming destination with `destinationName` metadata, plus `destinationViewable` when the destination is in the current configuration. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. A destination ID absent from the current configuration is named `Unknown historical destination`. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`.<br/>Valid values: `projectId`, `environmentId`, `eventKind`, `destinationKind`, `destinationId`. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getDataExportEventsUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, eventKind?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDataExportEventsUsage(from, to, projectKey, environmentKey, eventKind, groupBy, aggregationType, granularity, options); + async getDataExportEventsUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, eventKind?: string, destinationKind?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDataExportEventsUsage(from, to, projectKey, environmentKey, eventKind, destinationKind, groupBy, aggregationType, granularity, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountUsageBetaApi.getDataExportEventsUsage']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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. + * Rank projects with usage in the requested range by successful Streaming transfers. Legacy rows are attributed through the account\'s complete current environment-to-project mapping. If any successful row remains unattributed after resolution, the operation returns `409` instead of a partial ranking. The result limit does not cap the account-wide project universe or environment mapping. This source-specific operation does not provide Combined or Warehouse ranking. + * @summary Rank Streaming usage by project + * @param {number} from Inclusive UTC range start in Unix milliseconds. + * @param {number} to Exclusive UTC range end in Unix milliseconds. + * @param {string} [source] The source scope. Only `streaming` is supported. + * @param {string} [dimension] The ranking dimension. Only `project` is supported. + * @param {Array} [projectKey] A canonical project key to include. Can be specified multiple times, with at most 100 unique explicit selections; duplicates do not consume the limit. When omitted, all account projects with usage in the requested range are ranked. + * @param {string} [search] A case-insensitive substring matched against canonical project keys before querying usage. Project names are not searched. + * @param {string} [cursor] An opaque cursor returned by a previous response. Cursors are bound to the account and ranking inputs. + * @param {number} [limit] The maximum number of ranked projects to return. This bounds response rows and look-ahead, not the account-wide candidate universe. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDataExportProjectRanking(from: number, to: number, source?: string, dimension?: string, projectKey?: Array, search?: string, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDataExportProjectRanking(from, to, source, dimension, projectKey, search, cursor, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AccountUsageBetaApi.getDataExportProjectRanking']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 returned data depends on the length of the requested time range: ranges shorter than two hours return minutely data, ranges shorter than two days return hourly data, and ranges of two days or longer return daily data. Minutely data is retained for 70 days; a range shorter than two hours that starts before then is returned at hourly granularity instead, with the start of the range widened to the containing hour. Ranges that predate available data return an empty series list. If a flag has served many distinct variation values in the requested range, the least recently seen values may be aggregated into a single additional series labeled \"Other Variations\". * @summary Get evaluations usage * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -15521,7 +17285,7 @@ export const AccountUsageBetaApiFp = function(configuration?: Configuration) { * @summary Get experimentation events usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `environmentKey`, filters to the project\'s current environments. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [eventKey] An event key to filter results by. Can be specified multiple times, one query parameter per event key. * @param {string} [eventKind] An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. @@ -15542,7 +17306,7 @@ export const AccountUsageBetaApiFp = function(configuration?: Configuration) { * @summary Get experimentation keys usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `environmentKey`, filters by project, including projects that currently have no environments. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [experimentId] An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID. * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `experimentId`. @@ -15779,9 +17543,9 @@ export const AccountUsageBetaApiFp = function(configuration?: Configuration) { * @param {string} [relayVersion] A relay version to filter results by. Can be specified multiple times, one query parameter per relay version. * @param {string} [sdkName] An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. * @param {string} [sdkVersion] An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version. - * @param {string} [sdkType] An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. + * @param {string} [sdkType] Deprecated. This endpoint reports server-side connections only, so `server` is the only value that returns data and omitting the parameter is equivalent. Any other value returns an empty series. To report client-side connections, use `GET /api/v2/usage/streams/{source}`. * @param {string} [sdkAppId] An SDK app ID to filter results by. Can be specified multiple times, one query parameter per SDK app ID. - * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`, `sdkAppId`. + * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkAppId`.<br/>`sdkType` is no longer offered: this endpoint reports server-side connections only, so grouping by it returns a single group. It is still accepted, for compatibility. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. @@ -15864,15 +17628,16 @@ export const AccountUsageBetaApiFp = function(configuration?: Configuration) { * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. - * @param {string} [destination] A destination kind to filter results by. Can be specified multiple times, one query parameter per destination kind.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. - * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `destination`. + * @param {string} [destinationKind] A Warehouse configuration kind to filter results by. Cannot be combined with `destination`. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`, `s3`. + * @param {string} [destination] A Warehouse configuration kind to filter results by. Cannot be combined with `destinationKind`. Existing behavior is unchanged. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. + * @param {string} [groupBy] If specified, returns data for each distinct value of the given field. Can be specified multiple times.<br/>Valid values: `projectId`, `environmentId`, `destination`, `destinationKind`, `destinationId`. `destination` and `destinationKind` return the same raw Warehouse configuration kinds. `destinationId` returns one series per warehouse destination with `destinationName` metadata. When a current destination you can view matches, its `destinationId` is the LaunchDarkly destination ID, with `destinationViewable`. Otherwise, it is the warehouse provider\'s destination ID, named `Unknown destination`. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getWarehouseExportUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, destination?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getWarehouseExportUsage(from, to, projectKey, environmentKey, destination, groupBy, aggregationType, granularity, options); + async getWarehouseExportUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, destinationKind?: string, destination?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWarehouseExportUsage(from, to, projectKey, environmentKey, destinationKind, destination, groupBy, aggregationType, granularity, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountUsageBetaApi.getWarehouseExportUsage']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -15964,24 +17729,42 @@ export const AccountUsageBetaApiFactory = function (configuration?: Configuratio return localVarFp.getContextsTotalUsage(from, to, projectKey, environmentKey, contextKind, sdkName, sdkType, anonymous, groupBy, aggregationType, granularity, options).then((request) => request(axios, basePath)); }, /** - * 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. + * 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. `groupBy=projectId` resolves legacy rows through the account\'s current environment-to-project mapping and returns `409` instead of a partial series when any successful row remains unattributed. Plain project filtering keeps its current-environment compatibility behavior. * @summary Get data export events usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `groupBy=projectId`, filters to the project\'s current environments so retained pre-materialization usage remains visible. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [eventKind] An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. - * @param {string} [groupBy] 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.<br/>Valid values: `environmentId`, `eventKind`. + * @param {string} [destinationKind] A Streaming configuration kind to filter results by. Values preserve raw product identity; `snowflake` is legacy Streaming Snowflake and is distinct from Warehouse `snowflake-v2`. Can be specified multiple times.<br/>Valid values: `kinesis`, `google-pubsub`, `mparticle`, `segment`, `azure-event-hubs`, `snowflake`, `unknown`. + * @param {string} [groupBy] 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. `projectId` requires one or more explicit `projectKey` filters and is capped at 100 selected projects. `destinationId` returns one series per streaming destination with `destinationName` metadata, plus `destinationViewable` when the destination is in the current configuration. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. A destination ID absent from the current configuration is named `Unknown historical destination`. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`.<br/>Valid values: `projectId`, `environmentId`, `eventKind`, `destinationKind`, `destinationId`. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getDataExportEventsUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, eventKind?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getDataExportEventsUsage(from, to, projectKey, environmentKey, eventKind, groupBy, aggregationType, granularity, options).then((request) => request(axios, basePath)); + getDataExportEventsUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, eventKind?: string, destinationKind?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getDataExportEventsUsage(from, to, projectKey, environmentKey, eventKind, destinationKind, groupBy, aggregationType, granularity, options).then((request) => request(axios, basePath)); }, /** - * 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. + * Rank projects with usage in the requested range by successful Streaming transfers. Legacy rows are attributed through the account\'s complete current environment-to-project mapping. If any successful row remains unattributed after resolution, the operation returns `409` instead of a partial ranking. The result limit does not cap the account-wide project universe or environment mapping. This source-specific operation does not provide Combined or Warehouse ranking. + * @summary Rank Streaming usage by project + * @param {number} from Inclusive UTC range start in Unix milliseconds. + * @param {number} to Exclusive UTC range end in Unix milliseconds. + * @param {string} [source] The source scope. Only `streaming` is supported. + * @param {string} [dimension] The ranking dimension. Only `project` is supported. + * @param {Array} [projectKey] A canonical project key to include. Can be specified multiple times, with at most 100 unique explicit selections; duplicates do not consume the limit. When omitted, all account projects with usage in the requested range are ranked. + * @param {string} [search] A case-insensitive substring matched against canonical project keys before querying usage. Project names are not searched. + * @param {string} [cursor] An opaque cursor returned by a previous response. Cursors are bound to the account and ranking inputs. + * @param {number} [limit] The maximum number of ranked projects to return. This bounds response rows and look-ahead, not the account-wide candidate universe. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDataExportProjectRanking(from: number, to: number, source?: string, dimension?: string, projectKey?: Array, search?: string, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getDataExportProjectRanking(from, to, source, dimension, projectKey, search, cursor, limit, options).then((request) => request(axios, basePath)); + }, + /** + * 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 returned data depends on the length of the requested time range: ranges shorter than two hours return minutely data, ranges shorter than two days return hourly data, and ranges of two days or longer return daily data. Minutely data is retained for 70 days; a range shorter than two hours that starts before then is returned at hourly granularity instead, with the start of the range widened to the containing hour. Ranges that predate available data return an empty series list. If a flag has served many distinct variation values in the requested range, the least recently seen values may be aggregated into a single additional series labeled \"Other Variations\". * @summary Get evaluations usage * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -16012,7 +17795,7 @@ export const AccountUsageBetaApiFactory = function (configuration?: Configuratio * @summary Get experimentation events usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `environmentKey`, filters to the project\'s current environments. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [eventKey] An event key to filter results by. Can be specified multiple times, one query parameter per event key. * @param {string} [eventKind] An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. @@ -16030,7 +17813,7 @@ export const AccountUsageBetaApiFactory = function (configuration?: Configuratio * @summary Get experimentation keys usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `environmentKey`, filters by project, including projects that currently have no environments. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [experimentId] An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID. * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `experimentId`. @@ -16228,9 +18011,9 @@ export const AccountUsageBetaApiFactory = function (configuration?: Configuratio * @param {string} [relayVersion] A relay version to filter results by. Can be specified multiple times, one query parameter per relay version. * @param {string} [sdkName] An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. * @param {string} [sdkVersion] An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version. - * @param {string} [sdkType] An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. + * @param {string} [sdkType] Deprecated. This endpoint reports server-side connections only, so `server` is the only value that returns data and omitting the parameter is equivalent. Any other value returns an empty series. To report client-side connections, use `GET /api/v2/usage/streams/{source}`. * @param {string} [sdkAppId] An SDK app ID to filter results by. Can be specified multiple times, one query parameter per SDK app ID. - * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`, `sdkAppId`. + * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkAppId`.<br/>`sdkType` is no longer offered: this endpoint reports server-side connections only, so grouping by it returns a single group. It is still accepted, for compatibility. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. @@ -16298,15 +18081,16 @@ export const AccountUsageBetaApiFactory = function (configuration?: Configuratio * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. - * @param {string} [destination] A destination kind to filter results by. Can be specified multiple times, one query parameter per destination kind.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. - * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `destination`. + * @param {string} [destinationKind] A Warehouse configuration kind to filter results by. Cannot be combined with `destination`. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`, `s3`. + * @param {string} [destination] A Warehouse configuration kind to filter results by. Cannot be combined with `destinationKind`. Existing behavior is unchanged. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. + * @param {string} [groupBy] If specified, returns data for each distinct value of the given field. Can be specified multiple times.<br/>Valid values: `projectId`, `environmentId`, `destination`, `destinationKind`, `destinationId`. `destination` and `destinationKind` return the same raw Warehouse configuration kinds. `destinationId` returns one series per warehouse destination with `destinationName` metadata. When a current destination you can view matches, its `destinationId` is the LaunchDarkly destination ID, with `destinationViewable`. Otherwise, it is the warehouse provider\'s destination ID, named `Unknown destination`. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getWarehouseExportUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, destination?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getWarehouseExportUsage(from, to, projectKey, environmentKey, destination, groupBy, aggregationType, granularity, options).then((request) => request(axios, basePath)); + getWarehouseExportUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, destinationKind?: string, destination?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getWarehouseExportUsage(from, to, projectKey, environmentKey, destinationKind, destination, groupBy, aggregationType, granularity, options).then((request) => request(axios, basePath)); }, }; }; @@ -16397,25 +18181,44 @@ export class AccountUsageBetaApi extends BaseAPI { } /** - * 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. + * 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. `groupBy=projectId` resolves legacy rows through the account\'s current environment-to-project mapping and returns `409` instead of a partial series when any successful row remains unattributed. Plain project filtering keeps its current-environment compatibility behavior. * @summary Get data export events usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `groupBy=projectId`, filters to the project\'s current environments so retained pre-materialization usage remains visible. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [eventKind] An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. - * @param {string} [groupBy] 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.<br/>Valid values: `environmentId`, `eventKind`. + * @param {string} [destinationKind] A Streaming configuration kind to filter results by. Values preserve raw product identity; `snowflake` is legacy Streaming Snowflake and is distinct from Warehouse `snowflake-v2`. Can be specified multiple times.<br/>Valid values: `kinesis`, `google-pubsub`, `mparticle`, `segment`, `azure-event-hubs`, `snowflake`, `unknown`. + * @param {string} [groupBy] 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. `projectId` requires one or more explicit `projectKey` filters and is capped at 100 selected projects. `destinationId` returns one series per streaming destination with `destinationName` metadata, plus `destinationViewable` when the destination is in the current configuration. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. A destination ID absent from the current configuration is named `Unknown historical destination`. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`.<br/>Valid values: `projectId`, `environmentId`, `eventKind`, `destinationKind`, `destinationId`. * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getDataExportEventsUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, eventKind?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getDataExportEventsUsage(from, to, projectKey, environmentKey, eventKind, groupBy, aggregationType, granularity, options).then((request) => request(this.axios, this.basePath)); + public getDataExportEventsUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, eventKind?: string, destinationKind?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getDataExportEventsUsage(from, to, projectKey, environmentKey, eventKind, destinationKind, groupBy, aggregationType, granularity, options).then((request) => request(this.axios, this.basePath)); } /** - * 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. + * Rank projects with usage in the requested range by successful Streaming transfers. Legacy rows are attributed through the account\'s complete current environment-to-project mapping. If any successful row remains unattributed after resolution, the operation returns `409` instead of a partial ranking. The result limit does not cap the account-wide project universe or environment mapping. This source-specific operation does not provide Combined or Warehouse ranking. + * @summary Rank Streaming usage by project + * @param {number} from Inclusive UTC range start in Unix milliseconds. + * @param {number} to Exclusive UTC range end in Unix milliseconds. + * @param {string} [source] The source scope. Only `streaming` is supported. + * @param {string} [dimension] The ranking dimension. Only `project` is supported. + * @param {Array} [projectKey] A canonical project key to include. Can be specified multiple times, with at most 100 unique explicit selections; duplicates do not consume the limit. When omitted, all account projects with usage in the requested range are ranked. + * @param {string} [search] A case-insensitive substring matched against canonical project keys before querying usage. Project names are not searched. + * @param {string} [cursor] An opaque cursor returned by a previous response. Cursors are bound to the account and ranking inputs. + * @param {number} [limit] The maximum number of ranked projects to return. This bounds response rows and look-ahead, not the account-wide candidate universe. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDataExportProjectRanking(from: number, to: number, source?: string, dimension?: string, projectKey?: Array, search?: string, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getDataExportProjectRanking(from, to, source, dimension, projectKey, search, cursor, limit, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 returned data depends on the length of the requested time range: ranges shorter than two hours return minutely data, ranges shorter than two days return hourly data, and ranges of two days or longer return daily data. Minutely data is retained for 70 days; a range shorter than two hours that starts before then is returned at hourly granularity instead, with the start of the range widened to the containing hour. Ranges that predate available data return an empty series list. If a flag has served many distinct variation values in the requested range, the least recently seen values may be aggregated into a single additional series labeled \"Other Variations\". * @summary Get evaluations usage * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -16448,7 +18251,7 @@ export class AccountUsageBetaApi extends BaseAPI { * @summary Get experimentation events usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `environmentKey`, filters to the project\'s current environments. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [eventKey] An event key to filter results by. Can be specified multiple times, one query parameter per event key. * @param {string} [eventKind] An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. @@ -16467,7 +18270,7 @@ export class AccountUsageBetaApi extends BaseAPI { * @summary Get experimentation keys usage * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [projectKey] A project key to filter results by. Without `environmentKey`, filters by project, including projects that currently have no environments. Can be specified multiple times, one query parameter per project key. * @param {string} [environmentKey] 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. * @param {string} [experimentId] An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID. * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `experimentId`. @@ -16581,187 +18384,903 @@ export class AccountUsageBetaApi extends BaseAPI { return AccountUsageBetaApiFp(this.configuration).getObservabilityErrorsUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); } - /** - * Get time-series arrays of the number of observability logs. Supports `daily` and `monthly` granularity. - * @summary Get observability logs usage - * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. - * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. - * @param {string} [granularity] 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. - * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getObservabilityLogsUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getObservabilityLogsUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); - } + /** + * Get time-series arrays of the number of observability logs. Supports `daily` and `monthly` granularity. + * @summary Get observability logs usage + * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. + * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. + * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [granularity] 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. + * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getObservabilityLogsUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getObservabilityLogsUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get time-series arrays of the number of observability metrics. Supports `hourly`, `daily`, and `monthly` granularity. + * @summary Get observability metrics usage + * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. + * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. + * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `hourly`, `daily`, and `monthly`; **average** supports `hourly`, `daily`, and `monthly`. + * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `average`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getObservabilityMetricsUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getObservabilityMetricsUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get time-series arrays of the number of observability sessions. Supports `daily` and `monthly` granularity. + * @summary Get observability sessions usage + * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. + * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. + * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [granularity] 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. + * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getObservabilitySessionsUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getObservabilitySessionsUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get time-series arrays of the number of observability traces. Supports `daily` and `monthly` granularity. + * @summary Get observability traces usage + * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. + * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. + * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [granularity] 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. + * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getObservabilityTracesUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getObservabilityTracesUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get detailed SDK version usage data for all versions observed in the last 24 hours in your account. Unlike the `/details` endpoint which returns only the max version per SDK, this endpoint returns all SDK versions for the specified filters. This data is refreshed hourly.

All query parameters are optional, allowing you to filter results as broadly or narrowly as needed. + * @summary Get usage details for all SDK versions + * @param {string} [environmentId] Filter to a specific environment ID. + * @param {string} [projectId] Filter to a specific project ID. + * @param {string} [sdkName] Filter to a specific SDK name. + * @param {string} [sdkType] Filter to a specific SDK type (for example, \'server\', \'browser\', \'mobile\'). + * @param {string} [sdkAppId] Filter to a specific SDK application ID. + * @param {string} [connectionType] Filter to a specific connection type (for example, \'direct\', \'proxy\'). + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSdkAllVersions(environmentId?: string, projectId?: string, sdkName?: string, sdkType?: string, sdkAppId?: string, connectionType?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getSdkAllVersions(environmentId, projectId, sdkName, sdkType, sdkAppId, connectionType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get detailed SDK version usage data for your account, including version information, EOL status, and relay proxy metadata. Refreshed hourly, returns the max version for each SDK observed in the last 24 hours, including those without EOL metadata available.

This endpoint provides comprehensive information about SDK versions in use across your projects and environments. + * @summary Get SDK versions usage details + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSdkVersionsDetails(options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getSdkVersionsDetails(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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. + * @summary Get service connections usage + * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. + * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. + * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [environmentKey] 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. + * @param {string} [connectionType] A connection type to filter results by. Can be specified multiple times, one query parameter per connection type. + * @param {string} [relayVersion] A relay version to filter results by. Can be specified multiple times, one query parameter per relay version. + * @param {string} [sdkName] An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. + * @param {string} [sdkVersion] An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version. + * @param {string} [sdkType] Deprecated. This endpoint reports server-side connections only, so `server` is the only value that returns data and omitting the parameter is equivalent. Any other value returns an empty series. To report client-side connections, use `GET /api/v2/usage/streams/{source}`. + * @param {string} [sdkAppId] An SDK app ID to filter results by. Can be specified multiple times, one query parameter per SDK app ID. + * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkAppId`.<br/>`sdkType` is no longer offered: this endpoint reports server-side connections only, so grouping by it returns a single group. It is still accepted, for compatibility. + * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. + * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getServiceConnectionsUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, connectionType?: string, relayVersion?: string, sdkName?: string, sdkVersion?: string, sdkType?: string, sdkAppId?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getServiceConnectionsUsage(from, to, projectKey, environmentKey, connectionType, relayVersion, sdkName, sdkVersion, sdkType, sdkAppId, groupBy, aggregationType, granularity, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 stream usage + * @param {string} source The source of streaming connections to describe. Must be either `client` or `server`. + * @param {string} [from] The series of data returned starts from this timestamp. Defaults to 30 days ago. + * @param {string} [to] The series of data returned ends at this timestamp. Defaults to the current time. + * @param {string} [tz] The timezone to use for breaks between days when returning daily data. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStreamUsage(source: string, from?: string, to?: string, tz?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getStreamUsage(source, from, to, tz, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get multiple series of the number of streaming connections to LaunchDarkly in each time period, separated by SDK type and version. Information about each series is in the metadata array. The granularity of the data depends on the age of the data requested. If the requested range is within the past 2 hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned. + * @summary Get stream usage by SDK version + * @param {string} source The source of streaming connections to describe. Must be either `client` or `server`. + * @param {string} [from] The series of data returned starts from this timestamp. Defaults to 24 hours ago. + * @param {string} [to] The series of data returned ends at this timestamp. Defaults to the current time. + * @param {string} [tz] The timezone to use for breaks between days when returning daily data. + * @param {string} [sdk] If included, this filters the returned series to only those that match this SDK name. + * @param {string} [version] If included, this filters the returned series to only those that match this SDK version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStreamUsageBySdkVersion(source: string, from?: string, to?: string, tz?: string, sdk?: string, version?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getStreamUsageBySdkVersion(source, from, to, tz, sdk, version, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a list of SDK version objects, which contain an SDK name and version. These are all of the SDKs that have connected to LaunchDarkly from your account in the past 60 days. + * @summary Get stream usage SDK versions + * @param {string} source The source of streaming connections to describe. Must be either `client` or `server`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStreamUsageSdkversion(source: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getStreamUsageSdkversion(source, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get time-series arrays of the number of Vega AI usage. Supports `daily` and `monthly` granularity. + * @summary Get Vega AI usage + * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. + * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. + * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [granularity] 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. + * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getVegaAIUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getVegaAIUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a time series array showing the number of rows exported to your warehouse Data Export destinations. The supported granularity varies by aggregation type. The maximum time range is 365 days. + * @summary Get warehouse Data Export usage + * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. + * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. + * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. + * @param {string} [environmentKey] 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. + * @param {string} [destinationKind] A Warehouse configuration kind to filter results by. Cannot be combined with `destination`. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`, `s3`. + * @param {string} [destination] A Warehouse configuration kind to filter results by. Cannot be combined with `destinationKind`. Existing behavior is unchanged. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. + * @param {string} [groupBy] If specified, returns data for each distinct value of the given field. Can be specified multiple times.<br/>Valid values: `projectId`, `environmentId`, `destination`, `destinationKind`, `destinationId`. `destination` and `destinationKind` return the same raw Warehouse configuration kinds. `destinationId` returns one series per warehouse destination with `destinationName` metadata. When a current destination you can view matches, its `destinationId` is the LaunchDarkly destination ID, with `destinationViewable`. Otherwise, it is the warehouse provider\'s destination ID, named `Unknown destination`. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`. + * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. + * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getWarehouseExportUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, destinationKind?: string, destination?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig) { + return AccountUsageBetaApiFp(this.configuration).getWarehouseExportUsage(from, to, projectKey, environmentKey, destinationKind, destination, groupBy, aggregationType, granularity, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AdaptiveTriggersApi - axios parameter creator + */ +export const AdaptiveTriggersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Delete a single adaptive trigger. + * @summary Delete an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAdaptiveTrigger: async (projectKey: string, environmentKey: string, triggerID: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('deleteAdaptiveTrigger', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('deleteAdaptiveTrigger', 'environmentKey', environmentKey) + // verify required parameter 'triggerID' is not null or undefined + assertParamExists('deleteAdaptiveTrigger', 'triggerID', triggerID) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"triggerID"}}`, encodeURIComponent(String(triggerID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a single adaptive trigger. + * @summary Get an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAdaptiveTrigger: async (projectKey: string, environmentKey: string, triggerID: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('getAdaptiveTrigger', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('getAdaptiveTrigger', 'environmentKey', environmentKey) + // verify required parameter 'triggerID' is not null or undefined + assertParamExists('getAdaptiveTrigger', 'triggerID', triggerID) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"triggerID"}}`, encodeURIComponent(String(triggerID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all adaptive triggers for a resource. + * @summary List adaptive triggers + * @param {string} projectKey + * @param {string} environmentKey + * @param {AdaptiveTriggerResourceKind} resourceKind + * @param {string} resourceKey + * @param {number} [limit] The number of items to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAdaptiveTriggers: async (projectKey: string, environmentKey: string, resourceKind: AdaptiveTriggerResourceKind, resourceKey: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('listAdaptiveTriggers', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('listAdaptiveTriggers', 'environmentKey', environmentKey) + // verify required parameter 'resourceKind' is not null or undefined + assertParamExists('listAdaptiveTriggers', 'resourceKind', resourceKind) + // verify required parameter 'resourceKey' is not null or undefined + assertParamExists('listAdaptiveTriggers', 'resourceKey', resourceKey) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + if (resourceKind !== undefined) { + localVarQueryParameter['resourceKind'] = resourceKind; + } + + if (resourceKey !== undefined) { + localVarQueryParameter['resourceKey'] = resourceKey; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update a single adaptive trigger. + * @summary Update an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {UpdateAdaptiveTriggerRequest} updateAdaptiveTriggerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchAdaptiveTrigger: async (projectKey: string, environmentKey: string, triggerID: string, updateAdaptiveTriggerRequest: UpdateAdaptiveTriggerRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('patchAdaptiveTrigger', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('patchAdaptiveTrigger', 'environmentKey', environmentKey) + // verify required parameter 'triggerID' is not null or undefined + assertParamExists('patchAdaptiveTrigger', 'triggerID', triggerID) + // verify required parameter 'updateAdaptiveTriggerRequest' is not null or undefined + assertParamExists('patchAdaptiveTrigger', 'updateAdaptiveTriggerRequest', updateAdaptiveTriggerRequest) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"triggerID"}}`, encodeURIComponent(String(triggerID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateAdaptiveTriggerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new adaptive trigger for a resource. + * @summary Create an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {CreateAdaptiveTriggerRequest} createAdaptiveTriggerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postAdaptiveTrigger: async (projectKey: string, environmentKey: string, createAdaptiveTriggerRequest: CreateAdaptiveTriggerRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('postAdaptiveTrigger', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('postAdaptiveTrigger', 'environmentKey', environmentKey) + // verify required parameter 'createAdaptiveTriggerRequest' is not null or undefined + assertParamExists('postAdaptiveTrigger', 'createAdaptiveTriggerRequest', createAdaptiveTriggerRequest) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createAdaptiveTriggerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Disable an adaptive trigger. + * @summary Disable an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postDisableAdaptiveTrigger: async (projectKey: string, environmentKey: string, triggerID: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('postDisableAdaptiveTrigger', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('postDisableAdaptiveTrigger', 'environmentKey', environmentKey) + // verify required parameter 'triggerID' is not null or undefined + assertParamExists('postDisableAdaptiveTrigger', 'triggerID', triggerID) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/disable` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"triggerID"}}`, encodeURIComponent(String(triggerID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Enable an adaptive trigger. + * @summary Enable an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postEnableAdaptiveTrigger: async (projectKey: string, environmentKey: string, triggerID: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('postEnableAdaptiveTrigger', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('postEnableAdaptiveTrigger', 'environmentKey', environmentKey) + // verify required parameter 'triggerID' is not null or undefined + assertParamExists('postEnableAdaptiveTrigger', 'triggerID', triggerID) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/enable` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"triggerID"}}`, encodeURIComponent(String(triggerID))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - /** - * Get time-series arrays of the number of observability metrics. Supports `hourly`, `daily`, and `monthly` granularity. - * @summary Get observability metrics usage - * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. - * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. - * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `hourly`, `daily`, and `monthly`; **average** supports `hourly`, `daily`, and `monthly`. - * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `average`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getObservabilityMetricsUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getObservabilityMetricsUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); - } + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - /** - * Get time-series arrays of the number of observability sessions. Supports `daily` and `monthly` granularity. - * @summary Get observability sessions usage - * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. - * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. - * @param {string} [granularity] 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. - * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getObservabilitySessionsUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getObservabilitySessionsUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); - } + localVarHeaderParameter['Accept'] = 'application/json'; - /** - * Get time-series arrays of the number of observability traces. Supports `daily` and `monthly` granularity. - * @summary Get observability traces usage - * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. - * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. - * @param {string} [granularity] 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. - * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getObservabilityTracesUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getObservabilityTracesUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, } +}; - /** - * Get detailed SDK version usage data for all versions observed in the last 24 hours in your account. Unlike the `/details` endpoint which returns only the max version per SDK, this endpoint returns all SDK versions for the specified filters. This data is refreshed hourly.

All query parameters are optional, allowing you to filter results as broadly or narrowly as needed. - * @summary Get usage details for all SDK versions - * @param {string} [environmentId] Filter to a specific environment ID. - * @param {string} [projectId] Filter to a specific project ID. - * @param {string} [sdkName] Filter to a specific SDK name. - * @param {string} [sdkType] Filter to a specific SDK type (for example, \'server\', \'browser\', \'mobile\'). - * @param {string} [sdkAppId] Filter to a specific SDK application ID. - * @param {string} [connectionType] Filter to a specific connection type (for example, \'direct\', \'proxy\'). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getSdkAllVersions(environmentId?: string, projectId?: string, sdkName?: string, sdkType?: string, sdkAppId?: string, connectionType?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getSdkAllVersions(environmentId, projectId, sdkName, sdkType, sdkAppId, connectionType, options).then((request) => request(this.axios, this.basePath)); +/** + * AdaptiveTriggersApi - functional programming interface + */ +export const AdaptiveTriggersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AdaptiveTriggersApiAxiosParamCreator(configuration) + return { + /** + * Delete a single adaptive trigger. + * @summary Delete an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAdaptiveTrigger(projectKey, environmentKey, triggerID, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdaptiveTriggersApi.deleteAdaptiveTrigger']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get a single adaptive trigger. + * @summary Get an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAdaptiveTrigger(projectKey, environmentKey, triggerID, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdaptiveTriggersApi.getAdaptiveTrigger']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all adaptive triggers for a resource. + * @summary List adaptive triggers + * @param {string} projectKey + * @param {string} environmentKey + * @param {AdaptiveTriggerResourceKind} resourceKind + * @param {string} resourceKey + * @param {number} [limit] The number of items to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAdaptiveTriggers(projectKey: string, environmentKey: string, resourceKind: AdaptiveTriggerResourceKind, resourceKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAdaptiveTriggers(projectKey, environmentKey, resourceKind, resourceKey, limit, offset, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdaptiveTriggersApi.listAdaptiveTriggers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Update a single adaptive trigger. + * @summary Update an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {UpdateAdaptiveTriggerRequest} updateAdaptiveTriggerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async patchAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, updateAdaptiveTriggerRequest: UpdateAdaptiveTriggerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.patchAdaptiveTrigger(projectKey, environmentKey, triggerID, updateAdaptiveTriggerRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdaptiveTriggersApi.patchAdaptiveTrigger']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new adaptive trigger for a resource. + * @summary Create an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {CreateAdaptiveTriggerRequest} createAdaptiveTriggerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postAdaptiveTrigger(projectKey: string, environmentKey: string, createAdaptiveTriggerRequest: CreateAdaptiveTriggerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postAdaptiveTrigger(projectKey, environmentKey, createAdaptiveTriggerRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdaptiveTriggersApi.postAdaptiveTrigger']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Disable an adaptive trigger. + * @summary Disable an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postDisableAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postDisableAdaptiveTrigger(projectKey, environmentKey, triggerID, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdaptiveTriggersApi.postDisableAdaptiveTrigger']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Enable an adaptive trigger. + * @summary Enable an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postEnableAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postEnableAdaptiveTrigger(projectKey, environmentKey, triggerID, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AdaptiveTriggersApi.postEnableAdaptiveTrigger']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } +}; + +/** + * AdaptiveTriggersApi - factory interface + */ +export const AdaptiveTriggersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AdaptiveTriggersApiFp(configuration) + return { + /** + * Delete a single adaptive trigger. + * @summary Delete an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteAdaptiveTrigger(projectKey, environmentKey, triggerID, options).then((request) => request(axios, basePath)); + }, + /** + * Get a single adaptive trigger. + * @summary Get an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAdaptiveTrigger(projectKey, environmentKey, triggerID, options).then((request) => request(axios, basePath)); + }, + /** + * List all adaptive triggers for a resource. + * @summary List adaptive triggers + * @param {string} projectKey + * @param {string} environmentKey + * @param {AdaptiveTriggerResourceKind} resourceKind + * @param {string} resourceKey + * @param {number} [limit] The number of items to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAdaptiveTriggers(projectKey: string, environmentKey: string, resourceKind: AdaptiveTriggerResourceKind, resourceKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAdaptiveTriggers(projectKey, environmentKey, resourceKind, resourceKey, limit, offset, options).then((request) => request(axios, basePath)); + }, + /** + * Update a single adaptive trigger. + * @summary Update an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {UpdateAdaptiveTriggerRequest} updateAdaptiveTriggerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + patchAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, updateAdaptiveTriggerRequest: UpdateAdaptiveTriggerRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.patchAdaptiveTrigger(projectKey, environmentKey, triggerID, updateAdaptiveTriggerRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new adaptive trigger for a resource. + * @summary Create an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {CreateAdaptiveTriggerRequest} createAdaptiveTriggerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postAdaptiveTrigger(projectKey: string, environmentKey: string, createAdaptiveTriggerRequest: CreateAdaptiveTriggerRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postAdaptiveTrigger(projectKey, environmentKey, createAdaptiveTriggerRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Disable an adaptive trigger. + * @summary Disable an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postDisableAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postDisableAdaptiveTrigger(projectKey, environmentKey, triggerID, options).then((request) => request(axios, basePath)); + }, + /** + * Enable an adaptive trigger. + * @summary Enable an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postEnableAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postEnableAdaptiveTrigger(projectKey, environmentKey, triggerID, options).then((request) => request(axios, basePath)); + }, + }; +}; +/** + * AdaptiveTriggersApi - object-oriented interface + */ +export class AdaptiveTriggersApi extends BaseAPI { /** - * Get detailed SDK version usage data for your account, including version information, EOL status, and relay proxy metadata. Refreshed hourly, returns the max version for each SDK observed in the last 24 hours, including those without EOL metadata available.

This endpoint provides comprehensive information about SDK versions in use across your projects and environments. - * @summary Get SDK versions usage details + * Delete a single adaptive trigger. + * @summary Delete an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSdkVersionsDetails(options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getSdkVersionsDetails(options).then((request) => request(this.axios, this.basePath)); + public deleteAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig) { + return AdaptiveTriggersApiFp(this.configuration).deleteAdaptiveTrigger(projectKey, environmentKey, triggerID, options).then((request) => request(this.axios, this.basePath)); } /** - * 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. - * @summary Get service connections usage - * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. - * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. - * @param {string} [environmentKey] 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. - * @param {string} [connectionType] A connection type to filter results by. Can be specified multiple times, one query parameter per connection type. - * @param {string} [relayVersion] A relay version to filter results by. Can be specified multiple times, one query parameter per relay version. - * @param {string} [sdkName] An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. - * @param {string} [sdkVersion] An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version. - * @param {string} [sdkType] An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. - * @param {string} [sdkAppId] An SDK app ID to filter results by. Can be specified multiple times, one query parameter per SDK app ID. - * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`, `sdkAppId`. - * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. - * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. + * Get a single adaptive trigger. + * @summary Get an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getServiceConnectionsUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, connectionType?: string, relayVersion?: string, sdkName?: string, sdkVersion?: string, sdkType?: string, sdkAppId?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getServiceConnectionsUsage(from, to, projectKey, environmentKey, connectionType, relayVersion, sdkName, sdkVersion, sdkType, sdkAppId, groupBy, aggregationType, granularity, options).then((request) => request(this.axios, this.basePath)); + public getAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig) { + return AdaptiveTriggersApiFp(this.configuration).getAdaptiveTrigger(projectKey, environmentKey, triggerID, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 stream usage - * @param {string} source The source of streaming connections to describe. Must be either `client` or `server`. - * @param {string} [from] The series of data returned starts from this timestamp. Defaults to 30 days ago. - * @param {string} [to] The series of data returned ends at this timestamp. Defaults to the current time. - * @param {string} [tz] The timezone to use for breaks between days when returning daily data. + * List all adaptive triggers for a resource. + * @summary List adaptive triggers + * @param {string} projectKey + * @param {string} environmentKey + * @param {AdaptiveTriggerResourceKind} resourceKind + * @param {string} resourceKey + * @param {number} [limit] The number of items to return. + * @param {number} [offset] 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`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStreamUsage(source: string, from?: string, to?: string, tz?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getStreamUsage(source, from, to, tz, options).then((request) => request(this.axios, this.basePath)); + public listAdaptiveTriggers(projectKey: string, environmentKey: string, resourceKind: AdaptiveTriggerResourceKind, resourceKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { + return AdaptiveTriggersApiFp(this.configuration).listAdaptiveTriggers(projectKey, environmentKey, resourceKind, resourceKey, limit, offset, options).then((request) => request(this.axios, this.basePath)); } /** - * Get multiple series of the number of streaming connections to LaunchDarkly in each time period, separated by SDK type and version. Information about each series is in the metadata array. The granularity of the data depends on the age of the data requested. If the requested range is within the past 2 hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned. - * @summary Get stream usage by SDK version - * @param {string} source The source of streaming connections to describe. Must be either `client` or `server`. - * @param {string} [from] The series of data returned starts from this timestamp. Defaults to 24 hours ago. - * @param {string} [to] The series of data returned ends at this timestamp. Defaults to the current time. - * @param {string} [tz] The timezone to use for breaks between days when returning daily data. - * @param {string} [sdk] If included, this filters the returned series to only those that match this SDK name. - * @param {string} [version] If included, this filters the returned series to only those that match this SDK version. + * Update a single adaptive trigger. + * @summary Update an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID + * @param {UpdateAdaptiveTriggerRequest} updateAdaptiveTriggerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStreamUsageBySdkVersion(source: string, from?: string, to?: string, tz?: string, sdk?: string, version?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getStreamUsageBySdkVersion(source, from, to, tz, sdk, version, options).then((request) => request(this.axios, this.basePath)); + public patchAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, updateAdaptiveTriggerRequest: UpdateAdaptiveTriggerRequest, options?: RawAxiosRequestConfig) { + return AdaptiveTriggersApiFp(this.configuration).patchAdaptiveTrigger(projectKey, environmentKey, triggerID, updateAdaptiveTriggerRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get a list of SDK version objects, which contain an SDK name and version. These are all of the SDKs that have connected to LaunchDarkly from your account in the past 60 days. - * @summary Get stream usage SDK versions - * @param {string} source The source of streaming connections to describe. Must be either `client` or `server`. + * Create a new adaptive trigger for a resource. + * @summary Create an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {CreateAdaptiveTriggerRequest} createAdaptiveTriggerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStreamUsageSdkversion(source: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getStreamUsageSdkversion(source, options).then((request) => request(this.axios, this.basePath)); + public postAdaptiveTrigger(projectKey: string, environmentKey: string, createAdaptiveTriggerRequest: CreateAdaptiveTriggerRequest, options?: RawAxiosRequestConfig) { + return AdaptiveTriggersApiFp(this.configuration).postAdaptiveTrigger(projectKey, environmentKey, createAdaptiveTriggerRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Get time-series arrays of the number of Vega AI usage. Supports `daily` and `monthly` granularity. - * @summary Get Vega AI usage - * @param {string} [from] The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. - * @param {string} [to] The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. - * @param {string} [granularity] 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. - * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`, `rolling_30d`. + * Disable an adaptive trigger. + * @summary Disable an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getVegaAIUsage(from?: string, to?: string, projectKey?: string, granularity?: string, aggregationType?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getVegaAIUsage(from, to, projectKey, granularity, aggregationType, options).then((request) => request(this.axios, this.basePath)); + public postDisableAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig) { + return AdaptiveTriggersApiFp(this.configuration).postDisableAdaptiveTrigger(projectKey, environmentKey, triggerID, options).then((request) => request(this.axios, this.basePath)); } /** - * Get a time series array showing the number of rows exported to your warehouse Data Export destinations. The supported granularity varies by aggregation type. The maximum time range is 365 days. - * @summary Get warehouse Data Export usage - * @param {string} [from] The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. - * @param {string} [to] The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. - * @param {string} [projectKey] A project key to filter results by. Can be specified multiple times, one query parameter per project key. - * @param {string} [environmentKey] 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. - * @param {string} [destination] A destination kind to filter results by. Can be specified multiple times, one query parameter per destination kind.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. - * @param {string} [groupBy] 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.<br/>Valid values: `projectId`, `environmentId`, `destination`. - * @param {string} [aggregationType] Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. - * @param {string} [granularity] Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. + * Enable an adaptive trigger. + * @summary Enable an adaptive trigger + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} triggerID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getWarehouseExportUsage(from?: string, to?: string, projectKey?: string, environmentKey?: string, destination?: string, groupBy?: string, aggregationType?: string, granularity?: string, options?: RawAxiosRequestConfig) { - return AccountUsageBetaApiFp(this.configuration).getWarehouseExportUsage(from, to, projectKey, environmentKey, destination, groupBy, aggregationType, granularity, options).then((request) => request(this.axios, this.basePath)); + public postEnableAdaptiveTrigger(projectKey: string, environmentKey: string, triggerID: string, options?: RawAxiosRequestConfig) { + return AdaptiveTriggersApiFp(this.configuration).postEnableAdaptiveTrigger(projectKey, environmentKey, triggerID, options).then((request) => request(this.axios, this.basePath)); } } @@ -16775,8 +19294,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Delete an existing AI Config. * @summary Delete AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -16808,7 +19327,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -16823,9 +19342,9 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Delete a specific variation of an AI Config by config key and variation key. * @summary Delete AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -16860,7 +19379,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -16875,8 +19394,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Delete an existing AI tool. * @summary Delete AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -16908,7 +19427,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -16924,8 +19443,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config * Delete an existing agent graph and all of its edges. * @summary Delete agent graph * @param {DeleteAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -16959,7 +19478,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -16977,8 +19496,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Delete an existing agent optimization. * @summary Delete an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17010,7 +19529,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17026,9 +19545,9 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config * Delete all results for a specific run of an agent optimization. Returns a 404 if the optimization does not exist or if the run has no results. A run whose results have already been deleted is indistinguishable from a run that never existed, so repeating this request also returns a 404. * @summary Delete an agent optimization run * @param {DeleteAgentOptimizationRunLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} runId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} runId The agent optimization run ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17065,7 +19584,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -17083,8 +19602,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Delete an agent skill, including all of its versions. * @summary Delete an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17116,7 +19635,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17131,8 +19650,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Delete an AI model config. * @summary Delete an AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17164,7 +19683,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17179,8 +19698,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Delete an existing prompt snippet. * @summary Delete a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17212,7 +19731,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17227,7 +19746,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Remove AI models, by key, from the restricted list. * @summary Remove AI models from the restricted list - * @param {string} projectKey + * @param {string} projectKey The project key * @param {RestrictedModelsRequest} restrictedModelsRequest List of AI model keys to remove from the restricted list * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -17260,7 +19779,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17276,8 +19795,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieve a specific AI Config by its key. * @summary Get AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17309,7 +19828,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17324,8 +19843,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieve usage metrics for an AI Config by config key. * @summary Get AI Config metrics - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {number} from The starting time, as milliseconds since epoch (inclusive). * @param {number} to The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. * @param {string} env An environment key. Only metrics from this environment will be included. @@ -17388,7 +19907,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17403,8 +19922,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieve usage metrics for an AI Config by config key, with results split by variation. * @summary Get AI Config metrics by variation - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {number} from The starting time, as milliseconds since epoch (inclusive). * @param {number} to The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. * @param {string} env An environment key. Only metrics from this environment will be included. @@ -17467,7 +19986,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17482,7 +20001,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieve aggregate quick stats for AI Configs in a project. * @summary Get AI Config quick stats - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} env An environment key. Only metrics from this environment will be included. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -17518,7 +20037,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17533,8 +20052,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieves a specific AI Config\'s targeting by its key * @summary Show an AI Config\'s targeting - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17566,7 +20085,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17581,9 +20100,9 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get an AI Config variation by key. The response includes all variation versions for the given variation key. * @summary Get AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17618,7 +20137,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17633,7 +20152,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get a list of all AI Configs in the given project. * @summary List AI Configs - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -17682,7 +20201,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17697,8 +20216,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieve a specific AI tool by its key. * @summary Get AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17730,7 +20249,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17746,8 +20265,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config * Retrieve a specific agent graph by its key, including its edges. * @summary Get agent graph * @param {GetAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17781,7 +20300,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -17799,8 +20318,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieve a specific agent optimization by its key. * @summary Get an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17832,7 +20351,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17847,8 +20366,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieve a specific agent skill by its key. * @summary Get an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17880,7 +20399,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17895,8 +20414,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get an AI model config by key. Specify a version to retrieve a historical custom model config version. Global model configs accept version 0 or 1 and return their current representation. * @summary Get AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {number} [version] Specific model config version to return. Omit to return the latest version. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -17933,7 +20452,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17948,8 +20467,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Retrieve a specific prompt snippet by its key. * @summary Get a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -17981,7 +20500,65 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get all AgentControl config variations that currently reference this tool. + * @summary List AI tool references + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key + * @param {number} [limit] The number of resources to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAIToolReferences: async (projectKey: string, toolKey: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('listAIToolReferences', 'projectKey', projectKey) + // verify required parameter 'toolKey' is not null or undefined + assertParamExists('listAIToolReferences', 'toolKey', toolKey) + const localVarPath = `/api/v2/projects/{projectKey}/ai-tools/{toolKey}/references` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"toolKey"}}`, encodeURIComponent(String(toolKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -17996,8 +20573,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get a list of all versions of an AI tool in the given project. * @summary List AI tool versions - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -18044,7 +20621,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18059,7 +20636,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get a list of all AI tools in the given project. * @summary List AI tools - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -18108,7 +20685,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18124,7 +20701,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config * Get a list of all agent graphs in the given project. Returns metadata only, without edge data. * @summary List agent graphs * @param {ListAgentGraphsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -18170,7 +20747,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -18187,9 +20764,9 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config }, /** * Get the most recent result for each unique run of an agent optimization. - * @summary List agent optimization runs - * @param {string} projectKey - * @param {string} optimizationKey + * @summary List latest agent optimization result per run + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -18231,59 +20808,117 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get all results for a specific run of an agent optimization, sorted by iteration descending. - * @summary List agent optimization results for a run - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} runId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listAgentOptimizationResultsByRunId: async (projectKey: string, optimizationKey: string, runId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('listAgentOptimizationResultsByRunId', 'projectKey', projectKey) - // verify required parameter 'optimizationKey' is not null or undefined - assertParamExists('listAgentOptimizationResultsByRunId', 'optimizationKey', optimizationKey) - // verify required parameter 'runId' is not null or undefined - assertParamExists('listAgentOptimizationResultsByRunId', 'runId', runId) - const localVarPath = `/api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs/{runId}/results` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"optimizationKey"}}`, encodeURIComponent(String(optimizationKey))) - .replace(`{${"runId"}}`, encodeURIComponent(String(runId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get all results for a specific run of an agent optimization, sorted by iteration descending. + * @summary List agent optimization results for a run + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} runId The agent optimization run ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAgentOptimizationResultsByRunId: async (projectKey: string, optimizationKey: string, runId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('listAgentOptimizationResultsByRunId', 'projectKey', projectKey) + // verify required parameter 'optimizationKey' is not null or undefined + assertParamExists('listAgentOptimizationResultsByRunId', 'optimizationKey', optimizationKey) + // verify required parameter 'runId' is not null or undefined + assertParamExists('listAgentOptimizationResultsByRunId', 'runId', runId) + const localVarPath = `/api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs/{runId}/results` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"optimizationKey"}}`, encodeURIComponent(String(optimizationKey))) + .replace(`{${"runId"}}`, encodeURIComponent(String(runId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. + * @summary List agent optimization runs + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {number} [limit] The number of resources to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAgentOptimizationRuns: async (projectKey: string, optimizationKey: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('listAgentOptimizationRuns', 'projectKey', projectKey) + // verify required parameter 'optimizationKey' is not null or undefined + assertParamExists('listAgentOptimizationRuns', 'optimizationKey', optimizationKey) + const localVarPath = `/api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"optimizationKey"}}`, encodeURIComponent(String(optimizationKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18298,7 +20933,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get a list of all agent optimizations in the given project. * @summary List agent optimizations - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -18342,7 +20977,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18357,8 +20992,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get all config variations that currently reference this agent skill. * @summary List agent skill references - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -18400,7 +21035,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18415,8 +21050,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get all versions of an agent skill in the given project, ordered by version descending. * @summary List agent skill versions - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -18458,7 +21093,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18473,7 +21108,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get a list of all agent skills in the given project. * @summary List agent skills - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -18517,7 +21152,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18532,8 +21167,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get all results across all versions of an agent optimization. * @summary List all agent optimization results across versions - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -18575,7 +21210,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18590,8 +21225,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get a paginated list of all available versions of an AI model config, ordered from newest to oldest. Global model configs return their single current representation. * @summary List AI model config versions - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -18633,7 +21268,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18648,12 +21283,14 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get all AI model configs for a project. * @summary List AI model configs - * @param {string} projectKey + * @param {string} projectKey The project key * @param {boolean} [restricted] Whether to return only restricted models + * @param {string} [sort] A sort to apply to the list of AgentControl configs. + * @param {string} [filter] A filter to apply to the list. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listModelConfigs: async (projectKey: string, restricted?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + listModelConfigs: async (projectKey: string, restricted?: boolean, sort?: string, filter?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('listModelConfigs', 'projectKey', projectKey) const localVarPath = `/api/v2/projects/{projectKey}/ai-configs/model-configs` @@ -18676,13 +21313,21 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config localVarQueryParameter['restricted'] = restricted; } + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } + + if (filter !== undefined) { + localVarQueryParameter['filter'] = filter; + } + localVarHeaderParameter['Accept'] = 'application/json'; // CUSTOM-START // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18697,8 +21342,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get all config variations that currently reference this prompt snippet. * @summary List prompt snippet references - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -18740,7 +21385,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18755,8 +21400,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get all versions of a prompt snippet in the given project, ordered by version descending. * @summary List prompt snippet versions - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -18798,7 +21443,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18813,7 +21458,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Get a list of all prompt snippets in the given project. * @summary List prompt snippets - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -18857,7 +21502,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18872,8 +21517,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ``` * @summary Update AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigPatch} [aIConfigPatch] AI Config object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -18907,7 +21552,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18923,8 +21568,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Perform a partial update to an AI Config\'s targeting. The request body must be a valid semantic patch. ### Using semantic patches on an AI Config To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating an AI Config\'s targeting takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating AI Configs.
Click to expand instructions for working with targeting and variations for AI Configs #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addRule Adds a new targeting rule to the AI Config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a rule. - Either - `variationId`: ID of a variation. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the AI Config to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the AI Config. ##### Parameters - `ruleIds`: Array of IDs of all rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replaceRules Removes all targeting rules for the AI Config and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ] } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the AI Config. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the AI Config, which the AI Config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule. - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the AI Config, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ```
* @summary Update AI Config targeting - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigTargetingPatch} [aIConfigTargetingPatch] AI Config targeting semantic patch instructions * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -18958,7 +21603,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -18972,11 +21617,11 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config }; }, /** - * Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` + * Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the variation is in use in a project environment where approval settings require review for this AI Config, this endpoint returns 403 and the change must be submitted through an approval request. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` * @summary Update AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {AIConfigVariationPatch} [aIConfigVariationPatch] AI Config variation object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19013,7 +21658,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19029,8 +21674,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Edit an existing AI tool. * @summary Update AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {AIToolPatch} [aIToolPatch] AI tool object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19064,7 +21709,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19081,8 +21726,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config * Edit an existing agent graph. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the update includes `rootConfigKey` or `edges`, both must be present and will be treated as full replacements. * @summary Update agent graph * @param {PatchAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {AgentGraphPatch} [agentGraphPatch] Agent graph object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19118,7 +21763,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -19137,8 +21782,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Update an existing agent optimization. Creates a new version of the optimization. * @summary Update an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {AgentOptimizationPatch} agentOptimizationPatch Agent optimization fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19174,7 +21819,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19190,9 +21835,9 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Update status, activity, and AI request metadata fields on an agent optimization result. * @summary Update an agent optimization result - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} resultId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} resultId The agent optimization result ID * @param {AgentOptimizationResultPatch} agentOptimizationResultPatch Agent optimization result fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19231,7 +21876,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19247,8 +21892,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Update an existing agent skill. Creates a new version of the skill. * @summary Update an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {AgentSkillPatch} agentSkillPatch Agent skill fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19284,7 +21929,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19300,8 +21945,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Update an AI model config. * @summary Update an AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {ModelConfigPatch} modelConfigPatch AI model config object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19337,7 +21982,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19353,8 +21998,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Update an existing prompt snippet. Creates a new version of the snippet. * @summary Update a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {PromptSnippetPatch} promptSnippetPatch Prompt snippet fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19390,7 +22035,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19406,7 +22051,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Create a new AI Config within the given project. * @summary Create new AI Config - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AIConfigPost} aIConfigPost AI Config object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19439,7 +22084,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19455,8 +22100,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Create a new variation for a given AI Config. The model in the request body requires a modelName and parameters, for example: ``` \"model\": { \"modelName\": \"claude-3-opus-20240229\", \"parameters\": { \"max_tokens\": 1024 } } ``` * @summary Create AI Config variation - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigVariationPost} aIConfigVariationPost AI Config variation object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19492,7 +22137,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19508,7 +22153,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Create an AI tool * @summary Create an AI tool - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AIToolPost} aIToolPost AI tool object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19541,7 +22186,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19558,7 +22203,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config * Create a new agent graph within the given project. * @summary Create new agent graph * @param {PostAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentGraphPost} agentGraphPost Agent graph object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19593,7 +22238,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -19612,7 +22257,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Create a new agent optimization within the given project. * @summary Create agent optimization - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentOptimizationPost} agentOptimizationPost Agent optimization object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19645,7 +22290,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19661,8 +22306,8 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Create a new result for an agent optimization run. * @summary Create agent optimization result - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {AgentOptimizationResultPost} agentOptimizationResultPost Agent optimization result to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19698,7 +22343,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19714,7 +22359,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Create a new agent skill within the given project. * @summary Create an agent skill - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentSkillPost} agentSkillPost Agent skill object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19747,7 +22392,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19763,7 +22408,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Create an AI model config. You can use this in any variation for any config in your project. * @summary Create an AI model config - * @param {string} projectKey + * @param {string} projectKey The project key * @param {ModelConfigPost} modelConfigPost AI model config object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19796,7 +22441,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19812,7 +22457,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Create a new prompt snippet within the given project. * @summary Create a prompt snippet - * @param {string} projectKey + * @param {string} projectKey The project key * @param {PromptSnippetPost} promptSnippetPost Prompt snippet object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19845,7 +22490,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19861,7 +22506,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config /** * Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/agent-control/list-model-configs) endpoint. * @summary Add AI models to the restricted list - * @param {string} projectKey + * @param {string} projectKey The project key * @param {RestrictedModelsRequest} restrictedModelsRequest List of AI model keys to add to the restricted list. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -19894,7 +22539,7 @@ export const AgentControlApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -19919,8 +22564,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Delete an existing AI Config. * @summary Delete AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -19933,9 +22578,9 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Delete a specific variation of an AI Config by config key and variation key. * @summary Delete AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -19948,8 +22593,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Delete an existing AI tool. * @summary Delete AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -19963,8 +22608,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { * Delete an existing agent graph and all of its edges. * @summary Delete agent graph * @param {DeleteAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -19977,8 +22622,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Delete an existing agent optimization. * @summary Delete an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -19992,9 +22637,9 @@ export const AgentControlApiFp = function(configuration?: Configuration) { * Delete all results for a specific run of an agent optimization. Returns a 404 if the optimization does not exist or if the run has no results. A run whose results have already been deleted is indistinguishable from a run that never existed, so repeating this request also returns a 404. * @summary Delete an agent optimization run * @param {DeleteAgentOptimizationRunLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} runId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} runId The agent optimization run ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20007,8 +22652,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Delete an agent skill, including all of its versions. * @summary Delete an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20021,8 +22666,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Delete an AI model config. * @summary Delete an AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20035,8 +22680,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Delete an existing prompt snippet. * @summary Delete a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20049,7 +22694,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Remove AI models, by key, from the restricted list. * @summary Remove AI models from the restricted list - * @param {string} projectKey + * @param {string} projectKey The project key * @param {RestrictedModelsRequest} restrictedModelsRequest List of AI model keys to remove from the restricted list * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20063,8 +22708,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieve a specific AI Config by its key. * @summary Get AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20077,8 +22722,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieve usage metrics for an AI Config by config key. * @summary Get AI Config metrics - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {number} from The starting time, as milliseconds since epoch (inclusive). * @param {number} to The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. * @param {string} env An environment key. Only metrics from this environment will be included. @@ -20096,8 +22741,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieve usage metrics for an AI Config by config key, with results split by variation. * @summary Get AI Config metrics by variation - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {number} from The starting time, as milliseconds since epoch (inclusive). * @param {number} to The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. * @param {string} env An environment key. Only metrics from this environment will be included. @@ -20115,7 +22760,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieve aggregate quick stats for AI Configs in a project. * @summary Get AI Config quick stats - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} env An environment key. Only metrics from this environment will be included. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20129,8 +22774,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieves a specific AI Config\'s targeting by its key * @summary Show an AI Config\'s targeting - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20143,9 +22788,9 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get an AI Config variation by key. The response includes all variation versions for the given variation key. * @summary Get AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20158,7 +22803,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get a list of all AI Configs in the given project. * @summary List AI Configs - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -20175,8 +22820,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieve a specific AI tool by its key. * @summary Get AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20190,8 +22835,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { * Retrieve a specific agent graph by its key, including its edges. * @summary Get agent graph * @param {GetAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20204,8 +22849,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieve a specific agent optimization by its key. * @summary Get an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20218,8 +22863,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieve a specific agent skill by its key. * @summary Get an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20232,8 +22877,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get an AI model config by key. Specify a version to retrieve a historical custom model config version. Global model configs accept version 0 or 1 and return their current representation. * @summary Get AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {number} [version] Specific model config version to return. Omit to return the latest version. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20247,8 +22892,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Retrieve a specific prompt snippet by its key. * @summary Get a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20258,11 +22903,27 @@ export const AgentControlApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AgentControlApi.getPromptSnippet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Get all AgentControl config variations that currently reference this tool. + * @summary List AI tool references + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key + * @param {number} [limit] The number of resources to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAIToolReferences(projectKey: string, toolKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAIToolReferences(projectKey, toolKey, limit, offset, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AgentControlApi.listAIToolReferences']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Get a list of all versions of an AI tool in the given project. * @summary List AI tool versions - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -20278,7 +22939,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get a list of all AI tools in the given project. * @summary List AI tools - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -20296,7 +22957,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { * Get a list of all agent graphs in the given project. Returns metadata only, without edge data. * @summary List agent graphs * @param {ListAgentGraphsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -20311,9 +22972,9 @@ export const AgentControlApiFp = function(configuration?: Configuration) { }, /** * Get the most recent result for each unique run of an agent optimization. - * @summary List agent optimization runs - * @param {string} projectKey - * @param {string} optimizationKey + * @summary List latest agent optimization result per run + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -20328,9 +22989,9 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get all results for a specific run of an agent optimization, sorted by iteration descending. * @summary List agent optimization results for a run - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} runId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} runId The agent optimization run ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20340,10 +23001,26 @@ export const AgentControlApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['AgentControlApi.listAgentOptimizationResultsByRunId']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. + * @summary List agent optimization runs + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {number} [limit] The number of resources to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listAgentOptimizationRuns(projectKey: string, optimizationKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listAgentOptimizationRuns(projectKey, optimizationKey, limit, offset, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AgentControlApi.listAgentOptimizationRuns']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Get a list of all agent optimizations in the given project. * @summary List agent optimizations - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -20359,8 +23036,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get all config variations that currently reference this agent skill. * @summary List agent skill references - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -20375,8 +23052,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get all versions of an agent skill in the given project, ordered by version descending. * @summary List agent skill versions - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -20391,7 +23068,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get a list of all agent skills in the given project. * @summary List agent skills - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -20407,8 +23084,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get all results across all versions of an agent optimization. * @summary List all agent optimization results across versions - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -20423,8 +23100,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get a paginated list of all available versions of an AI model config, ordered from newest to oldest. Global model configs return their single current representation. * @summary List AI model config versions - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -20439,13 +23116,15 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get all AI model configs for a project. * @summary List AI model configs - * @param {string} projectKey + * @param {string} projectKey The project key * @param {boolean} [restricted] Whether to return only restricted models + * @param {string} [sort] A sort to apply to the list of AgentControl configs. + * @param {string} [filter] A filter to apply to the list. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listModelConfigs(projectKey: string, restricted?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listModelConfigs(projectKey, restricted, options); + async listModelConfigs(projectKey: string, restricted?: boolean, sort?: string, filter?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listModelConfigs(projectKey, restricted, sort, filter, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AgentControlApi.listModelConfigs']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -20453,8 +23132,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get all config variations that currently reference this prompt snippet. * @summary List prompt snippet references - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -20469,8 +23148,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get all versions of a prompt snippet in the given project, ordered by version descending. * @summary List prompt snippet versions - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -20485,7 +23164,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Get a list of all prompt snippets in the given project. * @summary List prompt snippets - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -20501,8 +23180,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ``` * @summary Update AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigPatch} [aIConfigPatch] AI Config object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20516,8 +23195,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Perform a partial update to an AI Config\'s targeting. The request body must be a valid semantic patch. ### Using semantic patches on an AI Config To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating an AI Config\'s targeting takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating AI Configs.
Click to expand instructions for working with targeting and variations for AI Configs #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addRule Adds a new targeting rule to the AI Config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a rule. - Either - `variationId`: ID of a variation. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the AI Config to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the AI Config. ##### Parameters - `ruleIds`: Array of IDs of all rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replaceRules Removes all targeting rules for the AI Config and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ] } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the AI Config. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the AI Config, which the AI Config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule. - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the AI Config, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ```
* @summary Update AI Config targeting - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigTargetingPatch} [aIConfigTargetingPatch] AI Config targeting semantic patch instructions * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20529,11 +23208,11 @@ export const AgentControlApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` + * Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the variation is in use in a project environment where approval settings require review for this AI Config, this endpoint returns 403 and the change must be submitted through an approval request. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` * @summary Update AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {AIConfigVariationPatch} [aIConfigVariationPatch] AI Config variation object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20547,8 +23226,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Edit an existing AI tool. * @summary Update AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {AIToolPatch} [aIToolPatch] AI tool object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20563,8 +23242,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { * Edit an existing agent graph. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the update includes `rootConfigKey` or `edges`, both must be present and will be treated as full replacements. * @summary Update agent graph * @param {PatchAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {AgentGraphPatch} [agentGraphPatch] Agent graph object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20578,8 +23257,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Update an existing agent optimization. Creates a new version of the optimization. * @summary Update an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {AgentOptimizationPatch} agentOptimizationPatch Agent optimization fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20593,9 +23272,9 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Update status, activity, and AI request metadata fields on an agent optimization result. * @summary Update an agent optimization result - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} resultId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} resultId The agent optimization result ID * @param {AgentOptimizationResultPatch} agentOptimizationResultPatch Agent optimization result fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20609,8 +23288,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Update an existing agent skill. Creates a new version of the skill. * @summary Update an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {AgentSkillPatch} agentSkillPatch Agent skill fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20624,8 +23303,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Update an AI model config. * @summary Update an AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {ModelConfigPatch} modelConfigPatch AI model config object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20639,8 +23318,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Update an existing prompt snippet. Creates a new version of the snippet. * @summary Update a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {PromptSnippetPatch} promptSnippetPatch Prompt snippet fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20654,7 +23333,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Create a new AI Config within the given project. * @summary Create new AI Config - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AIConfigPost} aIConfigPost AI Config object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20668,8 +23347,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Create a new variation for a given AI Config. The model in the request body requires a modelName and parameters, for example: ``` \"model\": { \"modelName\": \"claude-3-opus-20240229\", \"parameters\": { \"max_tokens\": 1024 } } ``` * @summary Create AI Config variation - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigVariationPost} aIConfigVariationPost AI Config variation object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20683,7 +23362,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Create an AI tool * @summary Create an AI tool - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AIToolPost} aIToolPost AI tool object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20698,7 +23377,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { * Create a new agent graph within the given project. * @summary Create new agent graph * @param {PostAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentGraphPost} agentGraphPost Agent graph object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20712,7 +23391,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Create a new agent optimization within the given project. * @summary Create agent optimization - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentOptimizationPost} agentOptimizationPost Agent optimization object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20726,8 +23405,8 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Create a new result for an agent optimization run. * @summary Create agent optimization result - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {AgentOptimizationResultPost} agentOptimizationResultPost Agent optimization result to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20741,7 +23420,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Create a new agent skill within the given project. * @summary Create an agent skill - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentSkillPost} agentSkillPost Agent skill object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20755,7 +23434,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Create an AI model config. You can use this in any variation for any config in your project. * @summary Create an AI model config - * @param {string} projectKey + * @param {string} projectKey The project key * @param {ModelConfigPost} modelConfigPost AI model config object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20769,7 +23448,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Create a new prompt snippet within the given project. * @summary Create a prompt snippet - * @param {string} projectKey + * @param {string} projectKey The project key * @param {PromptSnippetPost} promptSnippetPost Prompt snippet object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20783,7 +23462,7 @@ export const AgentControlApiFp = function(configuration?: Configuration) { /** * Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/agent-control/list-model-configs) endpoint. * @summary Add AI models to the restricted list - * @param {string} projectKey + * @param {string} projectKey The project key * @param {RestrictedModelsRequest} restrictedModelsRequest List of AI model keys to add to the restricted list. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20806,8 +23485,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Delete an existing AI Config. * @summary Delete AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20817,9 +23496,9 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Delete a specific variation of an AI Config by config key and variation key. * @summary Delete AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20829,8 +23508,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Delete an existing AI tool. * @summary Delete AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20841,8 +23520,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b * Delete an existing agent graph and all of its edges. * @summary Delete agent graph * @param {DeleteAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20852,8 +23531,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Delete an existing agent optimization. * @summary Delete an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20864,9 +23543,9 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b * Delete all results for a specific run of an agent optimization. Returns a 404 if the optimization does not exist or if the run has no results. A run whose results have already been deleted is indistinguishable from a run that never existed, so repeating this request also returns a 404. * @summary Delete an agent optimization run * @param {DeleteAgentOptimizationRunLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} runId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} runId The agent optimization run ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20876,8 +23555,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Delete an agent skill, including all of its versions. * @summary Delete an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20887,8 +23566,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Delete an AI model config. * @summary Delete an AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20898,8 +23577,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Delete an existing prompt snippet. * @summary Delete a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20909,7 +23588,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Remove AI models, by key, from the restricted list. * @summary Remove AI models from the restricted list - * @param {string} projectKey + * @param {string} projectKey The project key * @param {RestrictedModelsRequest} restrictedModelsRequest List of AI model keys to remove from the restricted list * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20920,8 +23599,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieve a specific AI Config by its key. * @summary Get AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20931,8 +23610,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieve usage metrics for an AI Config by config key. * @summary Get AI Config metrics - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {number} from The starting time, as milliseconds since epoch (inclusive). * @param {number} to The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. * @param {string} env An environment key. Only metrics from this environment will be included. @@ -20947,8 +23626,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieve usage metrics for an AI Config by config key, with results split by variation. * @summary Get AI Config metrics by variation - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {number} from The starting time, as milliseconds since epoch (inclusive). * @param {number} to The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. * @param {string} env An environment key. Only metrics from this environment will be included. @@ -20963,7 +23642,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieve aggregate quick stats for AI Configs in a project. * @summary Get AI Config quick stats - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} env An environment key. Only metrics from this environment will be included. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -20974,8 +23653,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieves a specific AI Config\'s targeting by its key * @summary Show an AI Config\'s targeting - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20985,9 +23664,9 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get an AI Config variation by key. The response includes all variation versions for the given variation key. * @summary Get AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -20997,7 +23676,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get a list of all AI Configs in the given project. * @summary List AI Configs - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -21011,8 +23690,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieve a specific AI tool by its key. * @summary Get AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21023,8 +23702,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b * Retrieve a specific agent graph by its key, including its edges. * @summary Get agent graph * @param {GetAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21034,8 +23713,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieve a specific agent optimization by its key. * @summary Get an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21045,8 +23724,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieve a specific agent skill by its key. * @summary Get an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21056,8 +23735,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get an AI model config by key. Specify a version to retrieve a historical custom model config version. Global model configs accept version 0 or 1 and return their current representation. * @summary Get AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {number} [version] Specific model config version to return. Omit to return the latest version. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21068,19 +23747,32 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Retrieve a specific prompt snippet by its key. * @summary Get a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPromptSnippet(projectKey: string, snippetKey: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getPromptSnippet(projectKey, snippetKey, options).then((request) => request(axios, basePath)); }, + /** + * Get all AgentControl config variations that currently reference this tool. + * @summary List AI tool references + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key + * @param {number} [limit] The number of resources to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAIToolReferences(projectKey: string, toolKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAIToolReferences(projectKey, toolKey, limit, offset, options).then((request) => request(axios, basePath)); + }, /** * Get a list of all versions of an AI tool in the given project. * @summary List AI tool versions - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -21093,7 +23785,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get a list of all AI tools in the given project. * @summary List AI tools - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -21108,7 +23800,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b * Get a list of all agent graphs in the given project. Returns metadata only, without edge data. * @summary List agent graphs * @param {ListAgentGraphsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -21120,9 +23812,9 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b }, /** * Get the most recent result for each unique run of an agent optimization. - * @summary List agent optimization runs - * @param {string} projectKey - * @param {string} optimizationKey + * @summary List latest agent optimization result per run + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21134,19 +23826,32 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get all results for a specific run of an agent optimization, sorted by iteration descending. * @summary List agent optimization results for a run - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} runId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} runId The agent optimization run ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ listAgentOptimizationResultsByRunId(projectKey: string, optimizationKey: string, runId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listAgentOptimizationResultsByRunId(projectKey, optimizationKey, runId, options).then((request) => request(axios, basePath)); }, + /** + * Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. + * @summary List agent optimization runs + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {number} [limit] The number of resources to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listAgentOptimizationRuns(projectKey: string, optimizationKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listAgentOptimizationRuns(projectKey, optimizationKey, limit, offset, options).then((request) => request(axios, basePath)); + }, /** * Get a list of all agent optimizations in the given project. * @summary List agent optimizations - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -21159,8 +23864,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get all config variations that currently reference this agent skill. * @summary List agent skill references - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21172,8 +23877,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get all versions of an agent skill in the given project, ordered by version descending. * @summary List agent skill versions - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21185,7 +23890,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get a list of all agent skills in the given project. * @summary List agent skills - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -21198,8 +23903,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get all results across all versions of an agent optimization. * @summary List all agent optimization results across versions - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21211,8 +23916,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get a paginated list of all available versions of an AI model config, ordered from newest to oldest. Global model configs return their single current representation. * @summary List AI model config versions - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21224,19 +23929,21 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get all AI model configs for a project. * @summary List AI model configs - * @param {string} projectKey + * @param {string} projectKey The project key * @param {boolean} [restricted] Whether to return only restricted models + * @param {string} [sort] A sort to apply to the list of AgentControl configs. + * @param {string} [filter] A filter to apply to the list. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listModelConfigs(projectKey: string, restricted?: boolean, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.listModelConfigs(projectKey, restricted, options).then((request) => request(axios, basePath)); + listModelConfigs(projectKey: string, restricted?: boolean, sort?: string, filter?: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listModelConfigs(projectKey, restricted, sort, filter, options).then((request) => request(axios, basePath)); }, /** * Get all config variations that currently reference this prompt snippet. * @summary List prompt snippet references - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21248,8 +23955,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get all versions of a prompt snippet in the given project, ordered by version descending. * @summary List prompt snippet versions - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21261,7 +23968,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Get a list of all prompt snippets in the given project. * @summary List prompt snippets - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -21274,8 +23981,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ``` * @summary Update AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigPatch} [aIConfigPatch] AI Config object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21286,8 +23993,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Perform a partial update to an AI Config\'s targeting. The request body must be a valid semantic patch. ### Using semantic patches on an AI Config To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating an AI Config\'s targeting takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating AI Configs.
Click to expand instructions for working with targeting and variations for AI Configs #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addRule Adds a new targeting rule to the AI Config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a rule. - Either - `variationId`: ID of a variation. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the AI Config to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the AI Config. ##### Parameters - `ruleIds`: Array of IDs of all rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replaceRules Removes all targeting rules for the AI Config and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ] } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the AI Config. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the AI Config, which the AI Config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule. - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the AI Config, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ```
* @summary Update AI Config targeting - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigTargetingPatch} [aIConfigTargetingPatch] AI Config targeting semantic patch instructions * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21296,11 +24003,11 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b return localVarFp.patchAIConfigTargeting(projectKey, configKey, aIConfigTargetingPatch, options).then((request) => request(axios, basePath)); }, /** - * Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` + * Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the variation is in use in a project environment where approval settings require review for this AI Config, this endpoint returns 403 and the change must be submitted through an approval request. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` * @summary Update AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {AIConfigVariationPatch} [aIConfigVariationPatch] AI Config variation object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21311,8 +24018,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Edit an existing AI tool. * @summary Update AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {AIToolPatch} [aIToolPatch] AI tool object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21324,8 +24031,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b * Edit an existing agent graph. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the update includes `rootConfigKey` or `edges`, both must be present and will be treated as full replacements. * @summary Update agent graph * @param {PatchAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {AgentGraphPatch} [agentGraphPatch] Agent graph object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21336,8 +24043,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Update an existing agent optimization. Creates a new version of the optimization. * @summary Update an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {AgentOptimizationPatch} agentOptimizationPatch Agent optimization fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21348,9 +24055,9 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Update status, activity, and AI request metadata fields on an agent optimization result. * @summary Update an agent optimization result - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} resultId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} resultId The agent optimization result ID * @param {AgentOptimizationResultPatch} agentOptimizationResultPatch Agent optimization result fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21361,8 +24068,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Update an existing agent skill. Creates a new version of the skill. * @summary Update an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {AgentSkillPatch} agentSkillPatch Agent skill fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21373,8 +24080,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Update an AI model config. * @summary Update an AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {ModelConfigPatch} modelConfigPatch AI model config object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21385,8 +24092,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Update an existing prompt snippet. Creates a new version of the snippet. * @summary Update a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {PromptSnippetPatch} promptSnippetPatch Prompt snippet fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21397,7 +24104,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Create a new AI Config within the given project. * @summary Create new AI Config - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AIConfigPost} aIConfigPost AI Config object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21408,8 +24115,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Create a new variation for a given AI Config. The model in the request body requires a modelName and parameters, for example: ``` \"model\": { \"modelName\": \"claude-3-opus-20240229\", \"parameters\": { \"max_tokens\": 1024 } } ``` * @summary Create AI Config variation - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigVariationPost} aIConfigVariationPost AI Config variation object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21420,7 +24127,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Create an AI tool * @summary Create an AI tool - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AIToolPost} aIToolPost AI tool object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21432,7 +24139,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b * Create a new agent graph within the given project. * @summary Create new agent graph * @param {PostAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentGraphPost} agentGraphPost Agent graph object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21443,7 +24150,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Create a new agent optimization within the given project. * @summary Create agent optimization - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentOptimizationPost} agentOptimizationPost Agent optimization object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21454,8 +24161,8 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Create a new result for an agent optimization run. * @summary Create agent optimization result - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {AgentOptimizationResultPost} agentOptimizationResultPost Agent optimization result to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21466,7 +24173,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Create a new agent skill within the given project. * @summary Create an agent skill - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentSkillPost} agentSkillPost Agent skill object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21477,7 +24184,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Create an AI model config. You can use this in any variation for any config in your project. * @summary Create an AI model config - * @param {string} projectKey + * @param {string} projectKey The project key * @param {ModelConfigPost} modelConfigPost AI model config object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21488,7 +24195,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Create a new prompt snippet within the given project. * @summary Create a prompt snippet - * @param {string} projectKey + * @param {string} projectKey The project key * @param {PromptSnippetPost} promptSnippetPost Prompt snippet object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21499,7 +24206,7 @@ export const AgentControlApiFactory = function (configuration?: Configuration, b /** * Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/agent-control/list-model-configs) endpoint. * @summary Add AI models to the restricted list - * @param {string} projectKey + * @param {string} projectKey The project key * @param {RestrictedModelsRequest} restrictedModelsRequest List of AI model keys to add to the restricted list. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21517,8 +24224,8 @@ export class AgentControlApi extends BaseAPI { /** * Delete an existing AI Config. * @summary Delete AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21529,9 +24236,9 @@ export class AgentControlApi extends BaseAPI { /** * Delete a specific variation of an AI Config by config key and variation key. * @summary Delete AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21542,8 +24249,8 @@ export class AgentControlApi extends BaseAPI { /** * Delete an existing AI tool. * @summary Delete AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21555,8 +24262,8 @@ export class AgentControlApi extends BaseAPI { * Delete an existing agent graph and all of its edges. * @summary Delete agent graph * @param {DeleteAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21567,8 +24274,8 @@ export class AgentControlApi extends BaseAPI { /** * Delete an existing agent optimization. * @summary Delete an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21580,9 +24287,9 @@ export class AgentControlApi extends BaseAPI { * Delete all results for a specific run of an agent optimization. Returns a 404 if the optimization does not exist or if the run has no results. A run whose results have already been deleted is indistinguishable from a run that never existed, so repeating this request also returns a 404. * @summary Delete an agent optimization run * @param {DeleteAgentOptimizationRunLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} runId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} runId The agent optimization run ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21593,8 +24300,8 @@ export class AgentControlApi extends BaseAPI { /** * Delete an agent skill, including all of its versions. * @summary Delete an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21605,8 +24312,8 @@ export class AgentControlApi extends BaseAPI { /** * Delete an AI model config. * @summary Delete an AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21617,8 +24324,8 @@ export class AgentControlApi extends BaseAPI { /** * Delete an existing prompt snippet. * @summary Delete a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21629,7 +24336,7 @@ export class AgentControlApi extends BaseAPI { /** * Remove AI models, by key, from the restricted list. * @summary Remove AI models from the restricted list - * @param {string} projectKey + * @param {string} projectKey The project key * @param {RestrictedModelsRequest} restrictedModelsRequest List of AI model keys to remove from the restricted list * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21641,8 +24348,8 @@ export class AgentControlApi extends BaseAPI { /** * Retrieve a specific AI Config by its key. * @summary Get AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21653,8 +24360,8 @@ export class AgentControlApi extends BaseAPI { /** * Retrieve usage metrics for an AI Config by config key. * @summary Get AI Config metrics - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {number} from The starting time, as milliseconds since epoch (inclusive). * @param {number} to The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. * @param {string} env An environment key. Only metrics from this environment will be included. @@ -21670,8 +24377,8 @@ export class AgentControlApi extends BaseAPI { /** * Retrieve usage metrics for an AI Config by config key, with results split by variation. * @summary Get AI Config metrics by variation - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {number} from The starting time, as milliseconds since epoch (inclusive). * @param {number} to The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. * @param {string} env An environment key. Only metrics from this environment will be included. @@ -21687,7 +24394,7 @@ export class AgentControlApi extends BaseAPI { /** * Retrieve aggregate quick stats for AI Configs in a project. * @summary Get AI Config quick stats - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} env An environment key. Only metrics from this environment will be included. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21699,8 +24406,8 @@ export class AgentControlApi extends BaseAPI { /** * Retrieves a specific AI Config\'s targeting by its key * @summary Show an AI Config\'s targeting - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21711,9 +24418,9 @@ export class AgentControlApi extends BaseAPI { /** * Get an AI Config variation by key. The response includes all variation versions for the given variation key. * @summary Get AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21724,7 +24431,7 @@ export class AgentControlApi extends BaseAPI { /** * Get a list of all AI Configs in the given project. * @summary List AI Configs - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -21739,8 +24446,8 @@ export class AgentControlApi extends BaseAPI { /** * Retrieve a specific AI tool by its key. * @summary Get AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21752,8 +24459,8 @@ export class AgentControlApi extends BaseAPI { * Retrieve a specific agent graph by its key, including its edges. * @summary Get agent graph * @param {GetAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21764,8 +24471,8 @@ export class AgentControlApi extends BaseAPI { /** * Retrieve a specific agent optimization by its key. * @summary Get an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21776,8 +24483,8 @@ export class AgentControlApi extends BaseAPI { /** * Retrieve a specific agent skill by its key. * @summary Get an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21788,8 +24495,8 @@ export class AgentControlApi extends BaseAPI { /** * Get an AI model config by key. Specify a version to retrieve a historical custom model config version. Global model configs accept version 0 or 1 and return their current representation. * @summary Get AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {number} [version] Specific model config version to return. Omit to return the latest version. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -21801,8 +24508,8 @@ export class AgentControlApi extends BaseAPI { /** * Retrieve a specific prompt snippet by its key. * @summary Get a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21810,11 +24517,25 @@ export class AgentControlApi extends BaseAPI { return AgentControlApiFp(this.configuration).getPromptSnippet(projectKey, snippetKey, options).then((request) => request(this.axios, this.basePath)); } + /** + * Get all AgentControl config variations that currently reference this tool. + * @summary List AI tool references + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key + * @param {number} [limit] The number of resources to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listAIToolReferences(projectKey: string, toolKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { + return AgentControlApiFp(this.configuration).listAIToolReferences(projectKey, toolKey, limit, offset, options).then((request) => request(this.axios, this.basePath)); + } + /** * Get a list of all versions of an AI tool in the given project. * @summary List AI tool versions - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -21828,7 +24549,7 @@ export class AgentControlApi extends BaseAPI { /** * Get a list of all AI tools in the given project. * @summary List AI tools - * @param {string} projectKey + * @param {string} projectKey The project key * @param {string} [sort] A sort to apply to the list of AgentControl configs. * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. @@ -21844,7 +24565,7 @@ export class AgentControlApi extends BaseAPI { * Get a list of all agent graphs in the given project. Returns metadata only, without edge data. * @summary List agent graphs * @param {ListAgentGraphsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -21857,9 +24578,9 @@ export class AgentControlApi extends BaseAPI { /** * Get the most recent result for each unique run of an agent optimization. - * @summary List agent optimization runs - * @param {string} projectKey - * @param {string} optimizationKey + * @summary List latest agent optimization result per run + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21872,9 +24593,9 @@ export class AgentControlApi extends BaseAPI { /** * Get all results for a specific run of an agent optimization, sorted by iteration descending. * @summary List agent optimization results for a run - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} runId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} runId The agent optimization run ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -21882,10 +24603,24 @@ export class AgentControlApi extends BaseAPI { return AgentControlApiFp(this.configuration).listAgentOptimizationResultsByRunId(projectKey, optimizationKey, runId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. + * @summary List agent optimization runs + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {number} [limit] The number of resources to return. + * @param {number} [offset] 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`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listAgentOptimizationRuns(projectKey: string, optimizationKey: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { + return AgentControlApiFp(this.configuration).listAgentOptimizationRuns(projectKey, optimizationKey, limit, offset, options).then((request) => request(this.axios, this.basePath)); + } + /** * Get a list of all agent optimizations in the given project. * @summary List agent optimizations - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -21899,8 +24634,8 @@ export class AgentControlApi extends BaseAPI { /** * Get all config variations that currently reference this agent skill. * @summary List agent skill references - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21913,8 +24648,8 @@ export class AgentControlApi extends BaseAPI { /** * Get all versions of an agent skill in the given project, ordered by version descending. * @summary List agent skill versions - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21927,7 +24662,7 @@ export class AgentControlApi extends BaseAPI { /** * Get a list of all agent skills in the given project. * @summary List agent skills - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -21941,8 +24676,8 @@ export class AgentControlApi extends BaseAPI { /** * Get all results across all versions of an agent optimization. * @summary List all agent optimization results across versions - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21955,8 +24690,8 @@ export class AgentControlApi extends BaseAPI { /** * Get a paginated list of all available versions of an AI model config, ordered from newest to oldest. Global model configs return their single current representation. * @summary List AI model config versions - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21969,20 +24704,22 @@ export class AgentControlApi extends BaseAPI { /** * Get all AI model configs for a project. * @summary List AI model configs - * @param {string} projectKey + * @param {string} projectKey The project key * @param {boolean} [restricted] Whether to return only restricted models + * @param {string} [sort] A sort to apply to the list of AgentControl configs. + * @param {string} [filter] A filter to apply to the list. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public listModelConfigs(projectKey: string, restricted?: boolean, options?: RawAxiosRequestConfig) { - return AgentControlApiFp(this.configuration).listModelConfigs(projectKey, restricted, options).then((request) => request(this.axios, this.basePath)); + public listModelConfigs(projectKey: string, restricted?: boolean, sort?: string, filter?: string, options?: RawAxiosRequestConfig) { + return AgentControlApiFp(this.configuration).listModelConfigs(projectKey, restricted, sort, filter, options).then((request) => request(this.axios, this.basePath)); } /** * Get all config variations that currently reference this prompt snippet. * @summary List prompt snippet references - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -21995,8 +24732,8 @@ export class AgentControlApi extends BaseAPI { /** * Get all versions of a prompt snippet in the given project, ordered by version descending. * @summary List prompt snippet versions - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {*} [options] Override http request option. @@ -22009,7 +24746,7 @@ export class AgentControlApi extends BaseAPI { /** * Get a list of all prompt snippets in the given project. * @summary List prompt snippets - * @param {string} projectKey + * @param {string} projectKey The project key * @param {number} [limit] The number of resources to return. * @param {number} [offset] 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`. * @param {string} [filter] A filter to apply to the list. @@ -22023,8 +24760,8 @@ export class AgentControlApi extends BaseAPI { /** * Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ``` * @summary Update AI Config - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigPatch} [aIConfigPatch] AI Config object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22036,8 +24773,8 @@ export class AgentControlApi extends BaseAPI { /** * Perform a partial update to an AI Config\'s targeting. The request body must be a valid semantic patch. ### Using semantic patches on an AI Config To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating an AI Config\'s targeting takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating AI Configs.
Click to expand instructions for working with targeting and variations for AI Configs #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addRule Adds a new targeting rule to the AI Config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a rule. - Either - `variationId`: ID of a variation. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the AI Config to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the AI Config. ##### Parameters - `ruleIds`: Array of IDs of all rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replaceRules Removes all targeting rules for the AI Config and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ] } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the AI Config. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the AI Config, which the AI Config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule. - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the AI Config, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ```
* @summary Update AI Config targeting - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigTargetingPatch} [aIConfigTargetingPatch] AI Config targeting semantic patch instructions * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22047,11 +24784,11 @@ export class AgentControlApi extends BaseAPI { } /** - * Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` + * Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the variation is in use in a project environment where approval settings require review for this AI Config, this endpoint returns 403 and the change must be submitted through an approval request. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` * @summary Update AI Config variation - * @param {string} projectKey - * @param {string} configKey - * @param {string} variationKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key + * @param {string} variationKey The AI Config variation key * @param {AIConfigVariationPatch} [aIConfigVariationPatch] AI Config variation object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22063,8 +24800,8 @@ export class AgentControlApi extends BaseAPI { /** * Edit an existing AI tool. * @summary Update AI tool - * @param {string} projectKey - * @param {string} toolKey + * @param {string} projectKey The project key + * @param {string} toolKey The AI tool key * @param {AIToolPatch} [aIToolPatch] AI tool object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22077,8 +24814,8 @@ export class AgentControlApi extends BaseAPI { * Edit an existing agent graph. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the update includes `rootConfigKey` or `edges`, both must be present and will be treated as full replacements. * @summary Update agent graph * @param {PatchAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} graphKey + * @param {string} projectKey The project key + * @param {string} graphKey The agent graph key * @param {AgentGraphPatch} [agentGraphPatch] Agent graph object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22090,8 +24827,8 @@ export class AgentControlApi extends BaseAPI { /** * Update an existing agent optimization. Creates a new version of the optimization. * @summary Update an agent optimization - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {AgentOptimizationPatch} agentOptimizationPatch Agent optimization fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22103,9 +24840,9 @@ export class AgentControlApi extends BaseAPI { /** * Update status, activity, and AI request metadata fields on an agent optimization result. * @summary Update an agent optimization result - * @param {string} projectKey - * @param {string} optimizationKey - * @param {string} resultId + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key + * @param {string} resultId The agent optimization result ID * @param {AgentOptimizationResultPatch} agentOptimizationResultPatch Agent optimization result fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22117,8 +24854,8 @@ export class AgentControlApi extends BaseAPI { /** * Update an existing agent skill. Creates a new version of the skill. * @summary Update an agent skill - * @param {string} projectKey - * @param {string} skillKey + * @param {string} projectKey The project key + * @param {string} skillKey The agent skill key * @param {AgentSkillPatch} agentSkillPatch Agent skill fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22130,8 +24867,8 @@ export class AgentControlApi extends BaseAPI { /** * Update an AI model config. * @summary Update an AI model config - * @param {string} projectKey - * @param {string} modelConfigKey + * @param {string} projectKey The project key + * @param {string} modelConfigKey The AI model config key * @param {ModelConfigPatch} modelConfigPatch AI model config object to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22143,8 +24880,8 @@ export class AgentControlApi extends BaseAPI { /** * Update an existing prompt snippet. Creates a new version of the snippet. * @summary Update a prompt snippet - * @param {string} projectKey - * @param {string} snippetKey + * @param {string} projectKey The project key + * @param {string} snippetKey The prompt snippet key * @param {PromptSnippetPatch} promptSnippetPatch Prompt snippet fields to update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22156,7 +24893,7 @@ export class AgentControlApi extends BaseAPI { /** * Create a new AI Config within the given project. * @summary Create new AI Config - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AIConfigPost} aIConfigPost AI Config object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22168,8 +24905,8 @@ export class AgentControlApi extends BaseAPI { /** * Create a new variation for a given AI Config. The model in the request body requires a modelName and parameters, for example: ``` \"model\": { \"modelName\": \"claude-3-opus-20240229\", \"parameters\": { \"max_tokens\": 1024 } } ``` * @summary Create AI Config variation - * @param {string} projectKey - * @param {string} configKey + * @param {string} projectKey The project key + * @param {string} configKey The AI Config key * @param {AIConfigVariationPost} aIConfigVariationPost AI Config variation object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22181,7 +24918,7 @@ export class AgentControlApi extends BaseAPI { /** * Create an AI tool * @summary Create an AI tool - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AIToolPost} aIToolPost AI tool object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22194,7 +24931,7 @@ export class AgentControlApi extends BaseAPI { * Create a new agent graph within the given project. * @summary Create new agent graph * @param {PostAgentGraphLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentGraphPost} agentGraphPost Agent graph object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22206,7 +24943,7 @@ export class AgentControlApi extends BaseAPI { /** * Create a new agent optimization within the given project. * @summary Create agent optimization - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentOptimizationPost} agentOptimizationPost Agent optimization object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22218,8 +24955,8 @@ export class AgentControlApi extends BaseAPI { /** * Create a new result for an agent optimization run. * @summary Create agent optimization result - * @param {string} projectKey - * @param {string} optimizationKey + * @param {string} projectKey The project key + * @param {string} optimizationKey The agent optimization key * @param {AgentOptimizationResultPost} agentOptimizationResultPost Agent optimization result to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22231,7 +24968,7 @@ export class AgentControlApi extends BaseAPI { /** * Create a new agent skill within the given project. * @summary Create an agent skill - * @param {string} projectKey + * @param {string} projectKey The project key * @param {AgentSkillPost} agentSkillPost Agent skill object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22243,7 +24980,7 @@ export class AgentControlApi extends BaseAPI { /** * Create an AI model config. You can use this in any variation for any config in your project. * @summary Create an AI model config - * @param {string} projectKey + * @param {string} projectKey The project key * @param {ModelConfigPost} modelConfigPost AI model config object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22255,7 +24992,7 @@ export class AgentControlApi extends BaseAPI { /** * Create a new prompt snippet within the given project. * @summary Create a prompt snippet - * @param {string} projectKey + * @param {string} projectKey The project key * @param {PromptSnippetPost} promptSnippetPost Prompt snippet object to create * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22267,7 +25004,7 @@ export class AgentControlApi extends BaseAPI { /** * Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/agent-control/list-model-configs) endpoint. * @summary Add AI models to the restricted list - * @param {string} projectKey + * @param {string} projectKey The project key * @param {RestrictedModelsRequest} restrictedModelsRequest List of AI model keys to add to the restricted list. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -22340,7 +25077,7 @@ export const AnnouncementsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22385,7 +25122,7 @@ export const AnnouncementsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22440,7 +25177,7 @@ export const AnnouncementsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22488,7 +25225,7 @@ export const AnnouncementsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22717,7 +25454,7 @@ export const ApplicationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22765,7 +25502,7 @@ export const ApplicationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22814,7 +25551,7 @@ export const ApplicationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22878,7 +25615,7 @@ export const ApplicationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22943,7 +25680,7 @@ export const ApplicationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -22991,7 +25728,7 @@ export const ApplicationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23044,7 +25781,7 @@ export const ApplicationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23399,7 +26136,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23455,7 +26192,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23511,7 +26248,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23560,7 +26297,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23620,7 +26357,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23672,7 +26409,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23716,7 +26453,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23765,7 +26502,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23826,7 +26563,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23883,7 +26620,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23932,7 +26669,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -23993,7 +26730,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -24050,7 +26787,7 @@ export const ApprovalsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -24672,7 +27409,7 @@ export const ApprovalsBetaApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -24723,7 +27460,7 @@ export const ApprovalsBetaApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -24773,7 +27510,7 @@ export const ApprovalsBetaApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -24833,7 +27570,7 @@ export const ApprovalsBetaApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25053,17 +27790,19 @@ export type PatchApprovalRequestSettingsLDAPIVersionEnum = typeof PatchApprovalR export const AuditLogApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). + * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). * @summary List audit log entries * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp. * @param {number} [after] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp. * @param {string} [q] Text to search for. You can search for the full or partial name of the resource. * @param {number} [limit] A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. * @param {string} [spec] A resource specifier that lets you filter audit log listings by resource + * @param {string} [member] A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAuditLogEntries: async (before?: number, after?: number, q?: string, limit?: number, spec?: string, options: RawAxiosRequestConfig = {}): Promise => { + getAuditLogEntries: async (before?: number, after?: number, q?: string, limit?: number, spec?: string, member?: string, token?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v2/auditlog`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -25099,13 +27838,21 @@ export const AuditLogApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['spec'] = spec; } + if (member !== undefined) { + localVarQueryParameter['member'] = member; + } + + if (token !== undefined) { + localVarQueryParameter['token'] = token; + } + localVarHeaderParameter['Accept'] = 'application/json'; // CUSTOM-START // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25149,7 +27896,7 @@ export const AuditLogApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25162,17 +27909,19 @@ export const AuditLogApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). + * Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). * @summary Search audit log entries * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp. * @param {number} [after] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. * @param {string} [q] Text to search for. You can search for the full or partial name of the resource. * @param {number} [limit] A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. + * @param {string} [member] A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. * @param {Array} [statementPost] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - postAuditLogEntries: async (before?: number, after?: number, q?: string, limit?: number, statementPost?: Array, options: RawAxiosRequestConfig = {}): Promise => { + postAuditLogEntries: async (before?: number, after?: number, q?: string, limit?: number, member?: string, token?: string, statementPost?: Array, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v2/auditlog`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -25204,6 +27953,14 @@ export const AuditLogApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['limit'] = limit; } + if (member !== undefined) { + localVarQueryParameter['member'] = member; + } + + if (token !== undefined) { + localVarQueryParameter['token'] = token; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; @@ -25211,7 +27968,7 @@ export const AuditLogApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25231,10 +27988,12 @@ export const AuditLogApiAxiosParamCreator = function (configuration?: Configurat * @param {Array} statementPost * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. * @param {number} [buckets] Number of time buckets to divide the range into. Default 50, max 500. + * @param {string} [member] A member ID that lets you filter counts to changes made by that member. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter counts to changes made by that token. Repeat the parameter to filter by multiple tokens. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - postAuditLogEntryCounts: async (after: number, statementPost: Array, before?: number, buckets?: number, options: RawAxiosRequestConfig = {}): Promise => { + postAuditLogEntryCounts: async (after: number, statementPost: Array, before?: number, buckets?: number, member?: string, token?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'after' is not null or undefined assertParamExists('postAuditLogEntryCounts', 'after', after) // verify required parameter 'statementPost' is not null or undefined @@ -25266,6 +28025,14 @@ export const AuditLogApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['buckets'] = buckets; } + if (member !== undefined) { + localVarQueryParameter['member'] = member; + } + + if (token !== undefined) { + localVarQueryParameter['token'] = token; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; @@ -25273,7 +28040,7 @@ export const AuditLogApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25296,18 +28063,20 @@ export const AuditLogApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AuditLogApiAxiosParamCreator(configuration) return { /** - * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). + * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). * @summary List audit log entries * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp. * @param {number} [after] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp. * @param {string} [q] Text to search for. You can search for the full or partial name of the resource. * @param {number} [limit] A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. * @param {string} [spec] A resource specifier that lets you filter audit log listings by resource + * @param {string} [member] A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, spec?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAuditLogEntries(before, after, q, limit, spec, options); + async getAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, spec?: string, member?: string, token?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAuditLogEntries(before, after, q, limit, spec, member, token, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AuditLogApi.getAuditLogEntries']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -25326,18 +28095,20 @@ export const AuditLogApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). + * Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). * @summary Search audit log entries * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp. * @param {number} [after] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. * @param {string} [q] Text to search for. You can search for the full or partial name of the resource. * @param {number} [limit] A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. + * @param {string} [member] A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. * @param {Array} [statementPost] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, statementPost?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postAuditLogEntries(before, after, q, limit, statementPost, options); + async postAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, member?: string, token?: string, statementPost?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postAuditLogEntries(before, after, q, limit, member, token, statementPost, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AuditLogApi.postAuditLogEntries']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -25349,11 +28120,13 @@ export const AuditLogApiFp = function(configuration?: Configuration) { * @param {Array} statementPost * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. * @param {number} [buckets] Number of time buckets to divide the range into. Default 50, max 500. + * @param {string} [member] A member ID that lets you filter counts to changes made by that member. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter counts to changes made by that token. Repeat the parameter to filter by multiple tokens. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postAuditLogEntryCounts(after: number, statementPost: Array, before?: number, buckets?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postAuditLogEntryCounts(after, statementPost, before, buckets, options); + async postAuditLogEntryCounts(after: number, statementPost: Array, before?: number, buckets?: number, member?: string, token?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postAuditLogEntryCounts(after, statementPost, before, buckets, member, token, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AuditLogApi.postAuditLogEntryCounts']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -25368,18 +28141,20 @@ export const AuditLogApiFactory = function (configuration?: Configuration, baseP const localVarFp = AuditLogApiFp(configuration) return { /** - * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). + * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). * @summary List audit log entries * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp. * @param {number} [after] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp. * @param {string} [q] Text to search for. You can search for the full or partial name of the resource. * @param {number} [limit] A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. * @param {string} [spec] A resource specifier that lets you filter audit log listings by resource + * @param {string} [member] A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, spec?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getAuditLogEntries(before, after, q, limit, spec, options).then((request) => request(axios, basePath)); + getAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, spec?: string, member?: string, token?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAuditLogEntries(before, after, q, limit, spec, member, token, options).then((request) => request(axios, basePath)); }, /** * Fetch a detailed audit log entry representation. The detailed representation includes several fields that are not present in the summary representation, including: - `previousVersion`: a JSON representation of the previous version of the entity. - `currentVersion`: a JSON representation of the current version of the entity. - `delta`: the JSON patch body that was used in the request to update the entity. This is only included if the update was made through a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch). It is null when the update was made using [semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). Because most [flag updates](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag) are made using semantic patch, this field is rarely returned. @@ -25392,18 +28167,20 @@ export const AuditLogApiFactory = function (configuration?: Configuration, baseP return localVarFp.getAuditLogEntry(id, options).then((request) => request(axios, basePath)); }, /** - * Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). + * Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). * @summary Search audit log entries * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp. * @param {number} [after] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. * @param {string} [q] Text to search for. You can search for the full or partial name of the resource. * @param {number} [limit] A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. + * @param {string} [member] A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. * @param {Array} [statementPost] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - postAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, statementPost?: Array, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postAuditLogEntries(before, after, q, limit, statementPost, options).then((request) => request(axios, basePath)); + postAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, member?: string, token?: string, statementPost?: Array, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postAuditLogEntries(before, after, q, limit, member, token, statementPost, options).then((request) => request(axios, basePath)); }, /** * Returns aggregate counts of audit log entries per time bucket. Used for dashboard overlays that show flag targeting changes. @@ -25412,11 +28189,13 @@ export const AuditLogApiFactory = function (configuration?: Configuration, baseP * @param {Array} statementPost * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. * @param {number} [buckets] Number of time buckets to divide the range into. Default 50, max 500. + * @param {string} [member] A member ID that lets you filter counts to changes made by that member. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter counts to changes made by that token. Repeat the parameter to filter by multiple tokens. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - postAuditLogEntryCounts(after: number, statementPost: Array, before?: number, buckets?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postAuditLogEntryCounts(after, statementPost, before, buckets, options).then((request) => request(axios, basePath)); + postAuditLogEntryCounts(after: number, statementPost: Array, before?: number, buckets?: number, member?: string, token?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postAuditLogEntryCounts(after, statementPost, before, buckets, member, token, options).then((request) => request(axios, basePath)); }, }; }; @@ -25426,18 +28205,20 @@ export const AuditLogApiFactory = function (configuration?: Configuration, baseP */ export class AuditLogApi extends BaseAPI { /** - * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). + * Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). * @summary List audit log entries * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp. * @param {number} [after] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp. * @param {string} [q] Text to search for. You can search for the full or partial name of the resource. * @param {number} [limit] A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. * @param {string} [spec] A resource specifier that lets you filter audit log listings by resource + * @param {string} [member] A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, spec?: string, options?: RawAxiosRequestConfig) { - return AuditLogApiFp(this.configuration).getAuditLogEntries(before, after, q, limit, spec, options).then((request) => request(this.axios, this.basePath)); + public getAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, spec?: string, member?: string, token?: string, options?: RawAxiosRequestConfig) { + return AuditLogApiFp(this.configuration).getAuditLogEntries(before, after, q, limit, spec, member, token, options).then((request) => request(this.axios, this.basePath)); } /** @@ -25452,18 +28233,20 @@ export class AuditLogApi extends BaseAPI { } /** - * Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). + * Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). * @summary Search audit log entries * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp. * @param {number} [after] A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. * @param {string} [q] Text to search for. You can search for the full or partial name of the resource. * @param {number} [limit] A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. + * @param {string} [member] A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. * @param {Array} [statementPost] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public postAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, statementPost?: Array, options?: RawAxiosRequestConfig) { - return AuditLogApiFp(this.configuration).postAuditLogEntries(before, after, q, limit, statementPost, options).then((request) => request(this.axios, this.basePath)); + public postAuditLogEntries(before?: number, after?: number, q?: string, limit?: number, member?: string, token?: string, statementPost?: Array, options?: RawAxiosRequestConfig) { + return AuditLogApiFp(this.configuration).postAuditLogEntries(before, after, q, limit, member, token, statementPost, options).then((request) => request(this.axios, this.basePath)); } /** @@ -25473,11 +28256,13 @@ export class AuditLogApi extends BaseAPI { * @param {Array} statementPost * @param {number} [before] A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. * @param {number} [buckets] Number of time buckets to divide the range into. Default 50, max 500. + * @param {string} [member] A member ID that lets you filter counts to changes made by that member. Repeat the parameter to filter by multiple members. + * @param {string} [token] An access token ID that lets you filter counts to changes made by that token. Repeat the parameter to filter by multiple tokens. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public postAuditLogEntryCounts(after: number, statementPost: Array, before?: number, buckets?: number, options?: RawAxiosRequestConfig) { - return AuditLogApiFp(this.configuration).postAuditLogEntryCounts(after, statementPost, before, buckets, options).then((request) => request(this.axios, this.basePath)); + public postAuditLogEntryCounts(after: number, statementPost: Array, before?: number, buckets?: number, member?: string, token?: string, options?: RawAxiosRequestConfig) { + return AuditLogApiFp(this.configuration).postAuditLogEntryCounts(after, statementPost, before, buckets, member, token, options).then((request) => request(this.axios, this.basePath)); } } @@ -25524,7 +28309,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25569,7 +28354,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25627,7 +28412,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25671,7 +28456,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25741,7 +28526,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25801,7 +28586,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25845,7 +28630,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25885,7 +28670,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25934,7 +28719,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -25982,7 +28767,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -26035,7 +28820,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -26080,7 +28865,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -26133,7 +28918,7 @@ export const CodeReferencesApiAxiosParamCreator = function (configuration?: Conf // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -26724,7 +29509,7 @@ export const ContextSettingsApiAxiosParamCreator = function (configuration?: Con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -26819,58 +29604,6 @@ export class ContextSettingsApi extends BaseAPI { */ export const ContextsApiAxiosParamCreator = function (configuration?: Configuration) { return { - /** - * Delete context instances by ID. - * @summary Delete context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {string} id The context instance ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteContextInstances: async (projectKey: string, environmentKey: string, id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('deleteContextInstances', 'projectKey', projectKey) - // verify required parameter 'environmentKey' is not null or undefined - assertParamExists('deleteContextInstances', 'environmentKey', environmentKey) - // verify required parameter 'id' is not null or undefined - assertParamExists('deleteContextInstances', 'id', id) - const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * 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). ### Filtering LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `query` filters for a string that matches against the flags\' keys and names. It is not case sensitive. For example: `filter=query equals dark-mode`. - `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`. You can also apply multiple filters at once. For example, setting `filter=query equals dark-mode, tags contains [\"beta\",\"q1\"]` matches flags which match the key or name `dark-mode` and are tagged `beta` and `q1`. * @summary Evaluate flags for context instance @@ -26931,7 +29664,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -26949,7 +29682,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat * @summary Get context attribute names * @param {string} projectKey The project key * @param {string} environmentKey The environment key - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 100, default: 100) * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -26990,7 +29723,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -27008,7 +29741,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {string} attributeName The attribute name - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `value` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [filter] A comma-separated list of context filters. This endpoint requires a `kind` filter, with the `equals` operator, and also accepts a `value` filter, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 100, default: 50) * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27052,84 +29785,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get context instances by ID. - * @summary Get context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {string} id The context instance ID - * @param {number} [limit] Specifies the maximum number of context instances to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching context instances. Defaults to true. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getContextInstances: async (projectKey: string, environmentKey: string, id: string, limit?: number, continuationToken?: string, sort?: string, filter?: string, includeTotalCount?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('getContextInstances', 'projectKey', projectKey) - // verify required parameter 'environmentKey' is not null or undefined - assertParamExists('getContextInstances', 'environmentKey', environmentKey) - // verify required parameter 'id' is not null or undefined - assertParamExists('getContextInstances', 'id', id) - const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (continuationToken !== undefined) { - localVarQueryParameter['continuationToken'] = continuationToken; - } - - if (sort !== undefined) { - localVarQueryParameter['sort'] = sort; - } - - if (filter !== undefined) { - localVarQueryParameter['filter'] = filter; - } - - if (includeTotalCount !== undefined) { - localVarQueryParameter['includeTotalCount'] = includeTotalCount; - } - - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -27178,7 +29834,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -27191,16 +29847,16 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Get contexts based on kind and key. + * Get contexts based on kind and key. Returns one item for each application from which LaunchDarkly has received the context, with the `applicationId` field populated. * @summary Get contexts * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {string} kind The context kind * @param {string} key The context key * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [continuationToken] An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. + * @param {string} [sort] Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. + * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27259,7 +29915,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -27311,7 +29967,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -27325,94 +29981,16 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Search for context instances. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). - * @summary Search for context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {ContextInstanceSearch} contextInstanceSearch - * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching context instances. Defaults to true. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchContextInstances: async (projectKey: string, environmentKey: string, contextInstanceSearch: ContextInstanceSearch, limit?: number, continuationToken?: string, sort?: string, filter?: string, includeTotalCount?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('searchContextInstances', 'projectKey', projectKey) - // verify required parameter 'environmentKey' is not null or undefined - assertParamExists('searchContextInstances', 'environmentKey', environmentKey) - // verify required parameter 'contextInstanceSearch' is not null or undefined - assertParamExists('searchContextInstances', 'contextInstanceSearch', contextInstanceSearch) - const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (continuationToken !== undefined) { - localVarQueryParameter['continuationToken'] = continuationToken; - } - - if (sort !== undefined) { - localVarQueryParameter['sort'] = sort; - } - - if (filter !== undefined) { - localVarQueryParameter['filter'] = filter; - } - - if (includeTotalCount !== undefined) { - localVarQueryParameter['includeTotalCount'] = includeTotalCount; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(contextInstanceSearch, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). + * Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. Results are sorted by context kind and key. Each context appears once, with its most recently reported attributes. Results include contexts that LaunchDarkly has received within the last 30 days. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/api/contexts#filtering-contexts). To learn more about contexts, read [Contexts](https://launchdarkly.com/docs/home/flags/contexts). * @summary Search for contexts * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {ContextSearch} contextSearch * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. To 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). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. + * @param {string} [continuationToken] An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. + * @param {string} [sort] Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. + * @param {string} [filter] A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). + * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. The total count is approximate and may be omitted if it is unavailable. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -27467,7 +30045,7 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -27489,21 +30067,6 @@ export const ContextsApiAxiosParamCreator = function (configuration?: Configurat export const ContextsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ContextsApiAxiosParamCreator(configuration) return { - /** - * Delete context instances by ID. - * @summary Delete context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {string} id The context instance ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteContextInstances(projectKey: string, environmentKey: string, id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteContextInstances(projectKey, environmentKey, id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ContextsApi.deleteContextInstances']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, /** * 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). ### Filtering LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `query` filters for a string that matches against the flags\' keys and names. It is not case sensitive. For example: `filter=query equals dark-mode`. - `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`. You can also apply multiple filters at once. For example, setting `filter=query equals dark-mode, tags contains [\"beta\",\"q1\"]` matches flags which match the key or name `dark-mode` and are tagged `beta` and `q1`. * @summary Evaluate flags for context instance @@ -27528,7 +30091,7 @@ export const ContextsApiFp = function(configuration?: Configuration) { * @summary Get context attribute names * @param {string} projectKey The project key * @param {string} environmentKey The environment key - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 100, default: 100) * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27545,7 +30108,7 @@ export const ContextsApiFp = function(configuration?: Configuration) { * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {string} attributeName The attribute name - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `value` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [filter] A comma-separated list of context filters. This endpoint requires a `kind` filter, with the `equals` operator, and also accepts a `value` filter, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 100, default: 50) * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27556,26 +30119,6 @@ export const ContextsApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['ContextsApi.getContextAttributeValues']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - /** - * Get context instances by ID. - * @summary Get context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {string} id The context instance ID - * @param {number} [limit] Specifies the maximum number of context instances to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching context instances. Defaults to true. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getContextInstances(projectKey: string, environmentKey: string, id: string, limit?: number, continuationToken?: string, sort?: string, filter?: string, includeTotalCount?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getContextInstances(projectKey, environmentKey, id, limit, continuationToken, sort, filter, includeTotalCount, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ContextsApi.getContextInstances']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, /** * Get all context kinds for a given project. * @summary Get context kinds @@ -27591,16 +30134,16 @@ export const ContextsApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get contexts based on kind and key. + * Get contexts based on kind and key. Returns one item for each application from which LaunchDarkly has received the context, with the `applicationId` field populated. * @summary Get contexts * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {string} kind The context kind * @param {string} key The context key * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [continuationToken] An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. + * @param {string} [sort] Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. + * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27627,36 +30170,16 @@ export const ContextsApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Search for context instances. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). - * @summary Search for context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {ContextInstanceSearch} contextInstanceSearch - * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching context instances. Defaults to true. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async searchContextInstances(projectKey: string, environmentKey: string, contextInstanceSearch: ContextInstanceSearch, limit?: number, continuationToken?: string, sort?: string, filter?: string, includeTotalCount?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.searchContextInstances(projectKey, environmentKey, contextInstanceSearch, limit, continuationToken, sort, filter, includeTotalCount, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ContextsApi.searchContextInstances']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). + * Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. Results are sorted by context kind and key. Each context appears once, with its most recently reported attributes. Results include contexts that LaunchDarkly has received within the last 30 days. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/api/contexts#filtering-contexts). To learn more about contexts, read [Contexts](https://launchdarkly.com/docs/home/flags/contexts). * @summary Search for contexts * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {ContextSearch} contextSearch * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. To 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). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. + * @param {string} [continuationToken] An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. + * @param {string} [sort] Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. + * @param {string} [filter] A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). + * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. The total count is approximate and may be omitted if it is unavailable. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -27675,18 +30198,6 @@ export const ContextsApiFp = function(configuration?: Configuration) { export const ContextsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ContextsApiFp(configuration) return { - /** - * Delete context instances by ID. - * @summary Delete context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {string} id The context instance ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteContextInstances(projectKey: string, environmentKey: string, id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteContextInstances(projectKey, environmentKey, id, options).then((request) => request(axios, basePath)); - }, /** * 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). ### Filtering LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `query` filters for a string that matches against the flags\' keys and names. It is not case sensitive. For example: `filter=query equals dark-mode`. - `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`. You can also apply multiple filters at once. For example, setting `filter=query equals dark-mode, tags contains [\"beta\",\"q1\"]` matches flags which match the key or name `dark-mode` and are tagged `beta` and `q1`. * @summary Evaluate flags for context instance @@ -27708,7 +30219,7 @@ export const ContextsApiFactory = function (configuration?: Configuration, baseP * @summary Get context attribute names * @param {string} projectKey The project key * @param {string} environmentKey The environment key - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 100, default: 100) * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27722,7 +30233,7 @@ export const ContextsApiFactory = function (configuration?: Configuration, baseP * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {string} attributeName The attribute name - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `value` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [filter] A comma-separated list of context filters. This endpoint requires a `kind` filter, with the `equals` operator, and also accepts a `value` filter, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 100, default: 50) * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27730,23 +30241,6 @@ export const ContextsApiFactory = function (configuration?: Configuration, baseP getContextAttributeValues(projectKey: string, environmentKey: string, attributeName: string, filter?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getContextAttributeValues(projectKey, environmentKey, attributeName, filter, limit, options).then((request) => request(axios, basePath)); }, - /** - * Get context instances by ID. - * @summary Get context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {string} id The context instance ID - * @param {number} [limit] Specifies the maximum number of context instances to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching context instances. Defaults to true. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getContextInstances(projectKey: string, environmentKey: string, id: string, limit?: number, continuationToken?: string, sort?: string, filter?: string, includeTotalCount?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getContextInstances(projectKey, environmentKey, id, limit, continuationToken, sort, filter, includeTotalCount, options).then((request) => request(axios, basePath)); - }, /** * Get all context kinds for a given project. * @summary Get context kinds @@ -27759,16 +30253,16 @@ export const ContextsApiFactory = function (configuration?: Configuration, baseP return localVarFp.getContextKindsByProjectKey(projectKey, expand, options).then((request) => request(axios, basePath)); }, /** - * Get contexts based on kind and key. + * Get contexts based on kind and key. Returns one item for each application from which LaunchDarkly has received the context, with the `applicationId` field populated. * @summary Get contexts * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {string} kind The context kind * @param {string} key The context key * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [continuationToken] An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. + * @param {string} [sort] Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. + * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27789,33 +30283,16 @@ export const ContextsApiFactory = function (configuration?: Configuration, baseP return localVarFp.putContextKind(projectKey, key, upsertContextKindPayload, options).then((request) => request(axios, basePath)); }, /** - * Search for context instances. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). - * @summary Search for context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {ContextInstanceSearch} contextInstanceSearch - * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching context instances. Defaults to true. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchContextInstances(projectKey: string, environmentKey: string, contextInstanceSearch: ContextInstanceSearch, limit?: number, continuationToken?: string, sort?: string, filter?: string, includeTotalCount?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.searchContextInstances(projectKey, environmentKey, contextInstanceSearch, limit, continuationToken, sort, filter, includeTotalCount, options).then((request) => request(axios, basePath)); - }, - /** - * Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). + * Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. Results are sorted by context kind and key. Each context appears once, with its most recently reported attributes. Results include contexts that LaunchDarkly has received within the last 30 days. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/api/contexts#filtering-contexts). To learn more about contexts, read [Contexts](https://launchdarkly.com/docs/home/flags/contexts). * @summary Search for contexts * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {ContextSearch} contextSearch * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. To 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). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. + * @param {string} [continuationToken] An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. + * @param {string} [sort] Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. + * @param {string} [filter] A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). + * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. The total count is approximate and may be omitted if it is unavailable. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -27829,19 +30306,6 @@ export const ContextsApiFactory = function (configuration?: Configuration, baseP * ContextsApi - object-oriented interface */ export class ContextsApi extends BaseAPI { - /** - * Delete context instances by ID. - * @summary Delete context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {string} id The context instance ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public deleteContextInstances(projectKey: string, environmentKey: string, id: string, options?: RawAxiosRequestConfig) { - return ContextsApiFp(this.configuration).deleteContextInstances(projectKey, environmentKey, id, options).then((request) => request(this.axios, this.basePath)); - } - /** * 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). ### Filtering LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `query` filters for a string that matches against the flags\' keys and names. It is not case sensitive. For example: `filter=query equals dark-mode`. - `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`. You can also apply multiple filters at once. For example, setting `filter=query equals dark-mode, tags contains [\"beta\",\"q1\"]` matches flags which match the key or name `dark-mode` and are tagged `beta` and `q1`. * @summary Evaluate flags for context instance @@ -27864,7 +30328,7 @@ export class ContextsApi extends BaseAPI { * @summary Get context attribute names * @param {string} projectKey The project key * @param {string} environmentKey The environment key - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 100, default: 100) * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27879,7 +30343,7 @@ export class ContextsApi extends BaseAPI { * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {string} attributeName The attribute name - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `value` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [filter] A comma-separated list of context filters. This endpoint requires a `kind` filter, with the `equals` operator, and also accepts a `value` filter, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 100, default: 50) * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27888,24 +30352,6 @@ export class ContextsApi extends BaseAPI { return ContextsApiFp(this.configuration).getContextAttributeValues(projectKey, environmentKey, attributeName, filter, limit, options).then((request) => request(this.axios, this.basePath)); } - /** - * Get context instances by ID. - * @summary Get context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {string} id The context instance ID - * @param {number} [limit] Specifies the maximum number of context instances to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching context instances. Defaults to true. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getContextInstances(projectKey: string, environmentKey: string, id: string, limit?: number, continuationToken?: string, sort?: string, filter?: string, includeTotalCount?: boolean, options?: RawAxiosRequestConfig) { - return ContextsApiFp(this.configuration).getContextInstances(projectKey, environmentKey, id, limit, continuationToken, sort, filter, includeTotalCount, options).then((request) => request(this.axios, this.basePath)); - } - /** * Get all context kinds for a given project. * @summary Get context kinds @@ -27919,16 +30365,16 @@ export class ContextsApi extends BaseAPI { } /** - * Get contexts based on kind and key. + * Get contexts based on kind and key. Returns one item for each application from which LaunchDarkly has received the context, with the `applicationId` field populated. * @summary Get contexts * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {string} kind The context kind * @param {string} key The context key * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). + * @param {string} [continuationToken] An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. + * @param {string} [sort] Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. + * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -27951,34 +30397,16 @@ export class ContextsApi extends BaseAPI { } /** - * Search for context instances. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). - * @summary Search for context instances - * @param {string} projectKey The project key - * @param {string} environmentKey The environment key - * @param {ContextInstanceSearch} contextInstanceSearch - * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching context instances. Defaults to true. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public searchContextInstances(projectKey: string, environmentKey: string, contextInstanceSearch: ContextInstanceSearch, limit?: number, continuationToken?: string, sort?: string, filter?: string, includeTotalCount?: boolean, options?: RawAxiosRequestConfig) { - return ContextsApiFp(this.configuration).searchContextInstances(projectKey, environmentKey, contextInstanceSearch, limit, continuationToken, sort, filter, includeTotalCount, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). + * Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. Results are sorted by context kind and key. Each context appears once, with its most recently reported attributes. Results include contexts that LaunchDarkly has received within the last 30 days. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/api/contexts#filtering-contexts). To learn more about contexts, read [Contexts](https://launchdarkly.com/docs/home/flags/contexts). * @summary Search for contexts * @param {string} projectKey The project key * @param {string} environmentKey The environment key * @param {ContextSearch} contextSearch * @param {number} [limit] Specifies the maximum number of items in the collection to return (max: 50, default: 20) - * @param {string} [continuationToken] Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. - * @param {string} [sort] 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`. - * @param {string} [filter] A comma-separated list of context filters. To 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). - * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. + * @param {string} [continuationToken] An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. + * @param {string} [sort] Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. + * @param {string} [filter] A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). + * @param {boolean} [includeTotalCount] Specifies whether to include or omit the total count of matching contexts. Defaults to true. The total count is approximate and may be omitted if it is unavailable. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -28026,7 +30454,7 @@ export const CustomRolesApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28070,7 +30498,7 @@ export const CustomRolesApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28120,7 +30548,7 @@ export const CustomRolesApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28168,7 +30596,7 @@ export const CustomRolesApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28213,7 +30641,7 @@ export const CustomRolesApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28436,7 +30864,7 @@ export class CustomRolesApi extends BaseAPI { export const DataExportDestinationsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Delete a Data Export destination by ID. + * Delete a Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. * @summary Delete Data Export destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -28475,7 +30903,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28488,7 +30916,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio }; }, /** - * Get a single Data Export destination by ID. + * Get a single Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. * @summary Get destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -28527,7 +30955,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28567,7 +30995,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28580,7 +31008,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio }; }, /** - * Update a Data Export destination. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). + * Update a Data Export destination. The destination must belong to the environment in the URL. Otherwise, the response is 404. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). * @summary Update Data Export destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -28623,7 +31051,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28680,7 +31108,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28733,7 +31161,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28782,7 +31210,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28830,7 +31258,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28870,7 +31298,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28924,7 +31352,7 @@ export const DataExportDestinationsApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -28947,7 +31375,7 @@ export const DataExportDestinationsApiFp = function(configuration?: Configuratio const localVarAxiosParamCreator = DataExportDestinationsApiAxiosParamCreator(configuration) return { /** - * Delete a Data Export destination by ID. + * Delete a Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. * @summary Delete Data Export destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -28962,7 +31390,7 @@ export const DataExportDestinationsApiFp = function(configuration?: Configuratio return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Get a single Data Export destination by ID. + * Get a single Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. * @summary Get destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -28989,7 +31417,7 @@ export const DataExportDestinationsApiFp = function(configuration?: Configuratio return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Update a Data Export destination. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). + * Update a Data Export destination. The destination must belong to the environment in the URL. Otherwise, the response is 404. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). * @summary Update Data Export destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -29101,7 +31529,7 @@ export const DataExportDestinationsApiFactory = function (configuration?: Config const localVarFp = DataExportDestinationsApiFp(configuration) return { /** - * Delete a Data Export destination by ID. + * Delete a Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. * @summary Delete Data Export destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -29113,7 +31541,7 @@ export const DataExportDestinationsApiFactory = function (configuration?: Config return localVarFp.deleteDestination(projectKey, environmentKey, id, options).then((request) => request(axios, basePath)); }, /** - * Get a single Data Export destination by ID. + * Get a single Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. * @summary Get destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -29134,7 +31562,7 @@ export const DataExportDestinationsApiFactory = function (configuration?: Config return localVarFp.getDestinations(options).then((request) => request(axios, basePath)); }, /** - * Update a Data Export destination. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). + * Update a Data Export destination. The destination must belong to the environment in the URL. Otherwise, the response is 404. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). * @summary Update Data Export destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -29223,7 +31651,7 @@ export const DataExportDestinationsApiFactory = function (configuration?: Config */ export class DataExportDestinationsApi extends BaseAPI { /** - * Delete a Data Export destination by ID. + * Delete a Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. * @summary Delete Data Export destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -29236,7 +31664,7 @@ export class DataExportDestinationsApi extends BaseAPI { } /** - * Get a single Data Export destination by ID. + * Get a single Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. * @summary Get destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -29259,7 +31687,7 @@ export class DataExportDestinationsApi extends BaseAPI { } /** - * Update a Data Export destination. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). + * Update a Data Export destination. The destination must belong to the environment in the URL. Otherwise, the response is 404. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). * @summary Update Data Export destination * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -29350,6 +31778,533 @@ export class DataExportDestinationsApi extends BaseAPI { +/** + * EnvironmentReleasesBetaApi - axios parameter creator + */ +export const EnvironmentReleasesBetaApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns an environment release and all its phases in phase-index order. The release ID must belong to the flag and environment in the path. Returns `404` for a release that ended more than 90 days ago. Pass `expand=metrics` to attach each metric\'s definition to the top-level `metrics` array. Analysis settings come from the version pinned when the release started (`metricVersionId`); name, description, tags, maintainer, and archive state reflect the current metric and may change afterwards. + * @summary Get an environment release + * @param {GetEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} releaseId + * @param {Set} [expand] Optional fields to expand. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getEnvironmentRelease: async (lDAPIVersion: GetEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, releaseId: string, expand?: Set, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'lDAPIVersion' is not null or undefined + assertParamExists('getEnvironmentRelease', 'lDAPIVersion', lDAPIVersion) + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('getEnvironmentRelease', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('getEnvironmentRelease', 'flagKey', flagKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('getEnvironmentRelease', 'environmentKey', environmentKey) + // verify required parameter 'releaseId' is not null or undefined + assertParamExists('getEnvironmentRelease', 'releaseId', releaseId) + const localVarPath = `/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId}` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"releaseId"}}`, encodeURIComponent(String(releaseId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + if (expand) { + localVarQueryParameter['expand'] = Array.from(expand).join(COLLECTION_FORMATS.csv); + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + if (lDAPIVersion != null) { + localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the environment releases for the flag in the environment, newest first. Each release includes its phases in phase-index order. Metric definitions are not included. To get them, call `getEnvironmentRelease` with `expand=metrics`. Returns an empty `items` array when the flag has no releases in the environment, or when no release matches the `filter`. Releases that ended more than 90 days ago are not returned. Results are paginated. By default, the first 25 releases are returned. Use `limit` and `offset` to page through the rest, and `totalCount` to learn how many releases match in total. The `_links` object includes `first`, `prev`, `next`, and `last` links where they apply. + * @summary List environment releases + * @param {ListEnvironmentReleasesLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} [filter] A queryfilter expression that narrows the list. Supported fields and operators: `kind` (`equals`) with values `progressive` or `guarded`. + * @param {number} [limit] The number of releases to return. Defaults to 25. Maximum is 100. + * @param {number} [offset] Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten releases and then returns the next releases in the list, up to the query `limit`. + * @param {string} [snapshot] Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listEnvironmentReleases: async (lDAPIVersion: ListEnvironmentReleasesLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, filter?: string, limit?: number, offset?: number, snapshot?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'lDAPIVersion' is not null or undefined + assertParamExists('listEnvironmentReleases', 'lDAPIVersion', lDAPIVersion) + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('listEnvironmentReleases', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('listEnvironmentReleases', 'flagKey', flagKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('listEnvironmentReleases', 'environmentKey', environmentKey) + const localVarPath = `/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + if (filter !== undefined) { + localVarQueryParameter['filter'] = filter; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (snapshot !== undefined) { + localVarQueryParameter['_snapshot'] = snapshot; + } + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + if (lDAPIVersion != null) { + localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Creates and starts a release on a flag in an environment, either from inline configuration or from an environment release plan. A release has one or more phases. Each phase is an audience, targeted by one flag rule, and has its own steps: the schedule of allocations at which that rule serves the target variation. After all of a phase\'s steps complete, the phase serves the target variation to 100% of its contexts. **Inline configuration.** Each entry in `phases` must specify exactly one targeting mode: - **Existing rule**: set `ruleId`. The rule must be enabled. Only a single-phase release can use an existing rule. - **New rule**: set `clauses`, with an optional `description`. New rules are appended to the end of the flag\'s rule list. To insert them before an existing rule instead, set the top-level `beforeRuleId`, which applies to every phase. Every phase\'s rule, including an existing rule passed by `ruleId`, must include `{\"contextKind\": \"\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\"]}`, not negated and with no other values, so the release only reaches contexts of the `randomizationUnit` kind, or multi-contexts containing the `randomizationUnit` kind. An existing rule needs the clause even if its other clauses only match that context kind. A phase without it returns `400`. For multiple phases, set `phases` with at least two entries. Each phase creates a rule. The first rule is enabled and starts immediately. Subsequent rules stay disabled until the release advances to them: automatically when `advancementMode` is `automatic`, or by an explicit advance when it is `manual`. `advancementMode` is required for a multi-phase release. Releases on the flag\'s default rule are not supported. A phase that omits both targeting modes is rejected. The flag must be on in the environment, or the request returns `409`. The release only reaches contexts that match a phase\'s rule. Other contexts keep getting the flag\'s default rule, which may already serve the target variation. The release type is inferred from `metrics`: an omitted or empty array creates a progressive release; one or more metrics creates a guarded release. Metrics must be listed individually; metric groups are not accepted. Every start runs release health checks, described in `ReleaseHealthCheckKind`. A flag that hasn\'t recently been evaluated for contexts of the `randomizationUnit` kind fails `flag_evaluations_with_context`, and one with no recent evaluations at all also fails `flag_evaluations_any`. Guarded releases also check that each metric receives events. A failing check returns `400` with code `health_checks_failed`. To start the release anyway, list the failing kinds in `bypassHealthChecks`. **From a release plan.** Set `releasePlanKey` to start from a plan in this environment instead of configuring the release inline; a request that also sets fields the plan supplies is rejected. The plan\'s current version runs as stored, with metric groups expanded into their members. Health checks run against the plan\'s randomization unit and metrics. Returns `400` if the plan is missing or incomplete, and `422` until environment release plans are available for the account. Requires the `updateRules` action on the flag in this environment, plus `updateFallthrough` when `cleanupBehavior` is `remove_rules_and_update_default_rule`. A release started from a plan requires both. The start is recorded in the flag\'s audit log as a targeting change that carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to start the release directly. This operation is not idempotent. Retrying a request that already started a release returns `409` with code `release_already_active`. The earlier request may have succeeded; call `listEnvironmentReleases` to confirm the running release is yours. + * @summary Start an environment release + * @param {StartEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {StartEnvironmentReleaseRequest} startEnvironmentReleaseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startEnvironmentRelease: async (lDAPIVersion: StartEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, startEnvironmentReleaseRequest: StartEnvironmentReleaseRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'lDAPIVersion' is not null or undefined + assertParamExists('startEnvironmentRelease', 'lDAPIVersion', lDAPIVersion) + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('startEnvironmentRelease', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('startEnvironmentRelease', 'flagKey', flagKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('startEnvironmentRelease', 'environmentKey', environmentKey) + // verify required parameter 'startEnvironmentReleaseRequest' is not null or undefined + assertParamExists('startEnvironmentRelease', 'startEnvironmentReleaseRequest', startEnvironmentReleaseRequest) + const localVarPath = `/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + if (lDAPIVersion != null) { + localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(startEnvironmentReleaseRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Stops a release and resolves its phases according to the `resolution` you specify. To learn how each resolution treats completed and pending phases, read the `resolution` schema. Requires the `updateRules` action on the flag in this environment, or `updateFallthrough` for a historical release that ran on the default rule. The stop is recorded in the flag\'s audit log as a targeting change that names the resolution and carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to stop the release directly. Stopping a release that has already completed or been stopped returns `200` and makes no changes. Returns `404` for a release that ended more than 90 days ago. + * @summary Stop an environment release + * @param {StopEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} releaseId + * @param {StopEnvironmentReleaseRequest} stopEnvironmentReleaseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + stopEnvironmentRelease: async (lDAPIVersion: StopEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, releaseId: string, stopEnvironmentReleaseRequest: StopEnvironmentReleaseRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'lDAPIVersion' is not null or undefined + assertParamExists('stopEnvironmentRelease', 'lDAPIVersion', lDAPIVersion) + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('stopEnvironmentRelease', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('stopEnvironmentRelease', 'flagKey', flagKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('stopEnvironmentRelease', 'environmentKey', environmentKey) + // verify required parameter 'releaseId' is not null or undefined + assertParamExists('stopEnvironmentRelease', 'releaseId', releaseId) + // verify required parameter 'stopEnvironmentReleaseRequest' is not null or undefined + assertParamExists('stopEnvironmentRelease', 'stopEnvironmentReleaseRequest', stopEnvironmentReleaseRequest) + const localVarPath = `/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId}/stop` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))) + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"releaseId"}}`, encodeURIComponent(String(releaseId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + if (lDAPIVersion != null) { + localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(stopEnvironmentReleaseRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * EnvironmentReleasesBetaApi - functional programming interface + */ +export const EnvironmentReleasesBetaApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = EnvironmentReleasesBetaApiAxiosParamCreator(configuration) + return { + /** + * Returns an environment release and all its phases in phase-index order. The release ID must belong to the flag and environment in the path. Returns `404` for a release that ended more than 90 days ago. Pass `expand=metrics` to attach each metric\'s definition to the top-level `metrics` array. Analysis settings come from the version pinned when the release started (`metricVersionId`); name, description, tags, maintainer, and archive state reflect the current metric and may change afterwards. + * @summary Get an environment release + * @param {GetEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} releaseId + * @param {Set} [expand] Optional fields to expand. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getEnvironmentRelease(lDAPIVersion: GetEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, releaseId: string, expand?: Set, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, releaseId, expand, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EnvironmentReleasesBetaApi.getEnvironmentRelease']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns the environment releases for the flag in the environment, newest first. Each release includes its phases in phase-index order. Metric definitions are not included. To get them, call `getEnvironmentRelease` with `expand=metrics`. Returns an empty `items` array when the flag has no releases in the environment, or when no release matches the `filter`. Releases that ended more than 90 days ago are not returned. Results are paginated. By default, the first 25 releases are returned. Use `limit` and `offset` to page through the rest, and `totalCount` to learn how many releases match in total. The `_links` object includes `first`, `prev`, `next`, and `last` links where they apply. + * @summary List environment releases + * @param {ListEnvironmentReleasesLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} [filter] A queryfilter expression that narrows the list. Supported fields and operators: `kind` (`equals`) with values `progressive` or `guarded`. + * @param {number} [limit] The number of releases to return. Defaults to 25. Maximum is 100. + * @param {number} [offset] Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten releases and then returns the next releases in the list, up to the query `limit`. + * @param {string} [snapshot] Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listEnvironmentReleases(lDAPIVersion: ListEnvironmentReleasesLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, filter?: string, limit?: number, offset?: number, snapshot?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listEnvironmentReleases(lDAPIVersion, projectKey, flagKey, environmentKey, filter, limit, offset, snapshot, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EnvironmentReleasesBetaApi.listEnvironmentReleases']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Creates and starts a release on a flag in an environment, either from inline configuration or from an environment release plan. A release has one or more phases. Each phase is an audience, targeted by one flag rule, and has its own steps: the schedule of allocations at which that rule serves the target variation. After all of a phase\'s steps complete, the phase serves the target variation to 100% of its contexts. **Inline configuration.** Each entry in `phases` must specify exactly one targeting mode: - **Existing rule**: set `ruleId`. The rule must be enabled. Only a single-phase release can use an existing rule. - **New rule**: set `clauses`, with an optional `description`. New rules are appended to the end of the flag\'s rule list. To insert them before an existing rule instead, set the top-level `beforeRuleId`, which applies to every phase. Every phase\'s rule, including an existing rule passed by `ruleId`, must include `{\"contextKind\": \"\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\"]}`, not negated and with no other values, so the release only reaches contexts of the `randomizationUnit` kind, or multi-contexts containing the `randomizationUnit` kind. An existing rule needs the clause even if its other clauses only match that context kind. A phase without it returns `400`. For multiple phases, set `phases` with at least two entries. Each phase creates a rule. The first rule is enabled and starts immediately. Subsequent rules stay disabled until the release advances to them: automatically when `advancementMode` is `automatic`, or by an explicit advance when it is `manual`. `advancementMode` is required for a multi-phase release. Releases on the flag\'s default rule are not supported. A phase that omits both targeting modes is rejected. The flag must be on in the environment, or the request returns `409`. The release only reaches contexts that match a phase\'s rule. Other contexts keep getting the flag\'s default rule, which may already serve the target variation. The release type is inferred from `metrics`: an omitted or empty array creates a progressive release; one or more metrics creates a guarded release. Metrics must be listed individually; metric groups are not accepted. Every start runs release health checks, described in `ReleaseHealthCheckKind`. A flag that hasn\'t recently been evaluated for contexts of the `randomizationUnit` kind fails `flag_evaluations_with_context`, and one with no recent evaluations at all also fails `flag_evaluations_any`. Guarded releases also check that each metric receives events. A failing check returns `400` with code `health_checks_failed`. To start the release anyway, list the failing kinds in `bypassHealthChecks`. **From a release plan.** Set `releasePlanKey` to start from a plan in this environment instead of configuring the release inline; a request that also sets fields the plan supplies is rejected. The plan\'s current version runs as stored, with metric groups expanded into their members. Health checks run against the plan\'s randomization unit and metrics. Returns `400` if the plan is missing or incomplete, and `422` until environment release plans are available for the account. Requires the `updateRules` action on the flag in this environment, plus `updateFallthrough` when `cleanupBehavior` is `remove_rules_and_update_default_rule`. A release started from a plan requires both. The start is recorded in the flag\'s audit log as a targeting change that carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to start the release directly. This operation is not idempotent. Retrying a request that already started a release returns `409` with code `release_already_active`. The earlier request may have succeeded; call `listEnvironmentReleases` to confirm the running release is yours. + * @summary Start an environment release + * @param {StartEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {StartEnvironmentReleaseRequest} startEnvironmentReleaseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async startEnvironmentRelease(lDAPIVersion: StartEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, startEnvironmentReleaseRequest: StartEnvironmentReleaseRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.startEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, startEnvironmentReleaseRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EnvironmentReleasesBetaApi.startEnvironmentRelease']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Stops a release and resolves its phases according to the `resolution` you specify. To learn how each resolution treats completed and pending phases, read the `resolution` schema. Requires the `updateRules` action on the flag in this environment, or `updateFallthrough` for a historical release that ran on the default rule. The stop is recorded in the flag\'s audit log as a targeting change that names the resolution and carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to stop the release directly. Stopping a release that has already completed or been stopped returns `200` and makes no changes. Returns `404` for a release that ended more than 90 days ago. + * @summary Stop an environment release + * @param {StopEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} releaseId + * @param {StopEnvironmentReleaseRequest} stopEnvironmentReleaseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async stopEnvironmentRelease(lDAPIVersion: StopEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, releaseId: string, stopEnvironmentReleaseRequest: StopEnvironmentReleaseRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.stopEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, releaseId, stopEnvironmentReleaseRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EnvironmentReleasesBetaApi.stopEnvironmentRelease']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * EnvironmentReleasesBetaApi - factory interface + */ +export const EnvironmentReleasesBetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = EnvironmentReleasesBetaApiFp(configuration) + return { + /** + * Returns an environment release and all its phases in phase-index order. The release ID must belong to the flag and environment in the path. Returns `404` for a release that ended more than 90 days ago. Pass `expand=metrics` to attach each metric\'s definition to the top-level `metrics` array. Analysis settings come from the version pinned when the release started (`metricVersionId`); name, description, tags, maintainer, and archive state reflect the current metric and may change afterwards. + * @summary Get an environment release + * @param {GetEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} releaseId + * @param {Set} [expand] Optional fields to expand. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getEnvironmentRelease(lDAPIVersion: GetEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, releaseId: string, expand?: Set, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, releaseId, expand, options).then((request) => request(axios, basePath)); + }, + /** + * Returns the environment releases for the flag in the environment, newest first. Each release includes its phases in phase-index order. Metric definitions are not included. To get them, call `getEnvironmentRelease` with `expand=metrics`. Returns an empty `items` array when the flag has no releases in the environment, or when no release matches the `filter`. Releases that ended more than 90 days ago are not returned. Results are paginated. By default, the first 25 releases are returned. Use `limit` and `offset` to page through the rest, and `totalCount` to learn how many releases match in total. The `_links` object includes `first`, `prev`, `next`, and `last` links where they apply. + * @summary List environment releases + * @param {ListEnvironmentReleasesLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} [filter] A queryfilter expression that narrows the list. Supported fields and operators: `kind` (`equals`) with values `progressive` or `guarded`. + * @param {number} [limit] The number of releases to return. Defaults to 25. Maximum is 100. + * @param {number} [offset] Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten releases and then returns the next releases in the list, up to the query `limit`. + * @param {string} [snapshot] Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listEnvironmentReleases(lDAPIVersion: ListEnvironmentReleasesLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, filter?: string, limit?: number, offset?: number, snapshot?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listEnvironmentReleases(lDAPIVersion, projectKey, flagKey, environmentKey, filter, limit, offset, snapshot, options).then((request) => request(axios, basePath)); + }, + /** + * Creates and starts a release on a flag in an environment, either from inline configuration or from an environment release plan. A release has one or more phases. Each phase is an audience, targeted by one flag rule, and has its own steps: the schedule of allocations at which that rule serves the target variation. After all of a phase\'s steps complete, the phase serves the target variation to 100% of its contexts. **Inline configuration.** Each entry in `phases` must specify exactly one targeting mode: - **Existing rule**: set `ruleId`. The rule must be enabled. Only a single-phase release can use an existing rule. - **New rule**: set `clauses`, with an optional `description`. New rules are appended to the end of the flag\'s rule list. To insert them before an existing rule instead, set the top-level `beforeRuleId`, which applies to every phase. Every phase\'s rule, including an existing rule passed by `ruleId`, must include `{\"contextKind\": \"\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\"]}`, not negated and with no other values, so the release only reaches contexts of the `randomizationUnit` kind, or multi-contexts containing the `randomizationUnit` kind. An existing rule needs the clause even if its other clauses only match that context kind. A phase without it returns `400`. For multiple phases, set `phases` with at least two entries. Each phase creates a rule. The first rule is enabled and starts immediately. Subsequent rules stay disabled until the release advances to them: automatically when `advancementMode` is `automatic`, or by an explicit advance when it is `manual`. `advancementMode` is required for a multi-phase release. Releases on the flag\'s default rule are not supported. A phase that omits both targeting modes is rejected. The flag must be on in the environment, or the request returns `409`. The release only reaches contexts that match a phase\'s rule. Other contexts keep getting the flag\'s default rule, which may already serve the target variation. The release type is inferred from `metrics`: an omitted or empty array creates a progressive release; one or more metrics creates a guarded release. Metrics must be listed individually; metric groups are not accepted. Every start runs release health checks, described in `ReleaseHealthCheckKind`. A flag that hasn\'t recently been evaluated for contexts of the `randomizationUnit` kind fails `flag_evaluations_with_context`, and one with no recent evaluations at all also fails `flag_evaluations_any`. Guarded releases also check that each metric receives events. A failing check returns `400` with code `health_checks_failed`. To start the release anyway, list the failing kinds in `bypassHealthChecks`. **From a release plan.** Set `releasePlanKey` to start from a plan in this environment instead of configuring the release inline; a request that also sets fields the plan supplies is rejected. The plan\'s current version runs as stored, with metric groups expanded into their members. Health checks run against the plan\'s randomization unit and metrics. Returns `400` if the plan is missing or incomplete, and `422` until environment release plans are available for the account. Requires the `updateRules` action on the flag in this environment, plus `updateFallthrough` when `cleanupBehavior` is `remove_rules_and_update_default_rule`. A release started from a plan requires both. The start is recorded in the flag\'s audit log as a targeting change that carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to start the release directly. This operation is not idempotent. Retrying a request that already started a release returns `409` with code `release_already_active`. The earlier request may have succeeded; call `listEnvironmentReleases` to confirm the running release is yours. + * @summary Start an environment release + * @param {StartEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {StartEnvironmentReleaseRequest} startEnvironmentReleaseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startEnvironmentRelease(lDAPIVersion: StartEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, startEnvironmentReleaseRequest: StartEnvironmentReleaseRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.startEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, startEnvironmentReleaseRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Stops a release and resolves its phases according to the `resolution` you specify. To learn how each resolution treats completed and pending phases, read the `resolution` schema. Requires the `updateRules` action on the flag in this environment, or `updateFallthrough` for a historical release that ran on the default rule. The stop is recorded in the flag\'s audit log as a targeting change that names the resolution and carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to stop the release directly. Stopping a release that has already completed or been stopped returns `200` and makes no changes. Returns `404` for a release that ended more than 90 days ago. + * @summary Stop an environment release + * @param {StopEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} releaseId + * @param {StopEnvironmentReleaseRequest} stopEnvironmentReleaseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + stopEnvironmentRelease(lDAPIVersion: StopEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, releaseId: string, stopEnvironmentReleaseRequest: StopEnvironmentReleaseRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.stopEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, releaseId, stopEnvironmentReleaseRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * EnvironmentReleasesBetaApi - object-oriented interface + */ +export class EnvironmentReleasesBetaApi extends BaseAPI { + /** + * Returns an environment release and all its phases in phase-index order. The release ID must belong to the flag and environment in the path. Returns `404` for a release that ended more than 90 days ago. Pass `expand=metrics` to attach each metric\'s definition to the top-level `metrics` array. Analysis settings come from the version pinned when the release started (`metricVersionId`); name, description, tags, maintainer, and archive state reflect the current metric and may change afterwards. + * @summary Get an environment release + * @param {GetEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} releaseId + * @param {Set} [expand] Optional fields to expand. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getEnvironmentRelease(lDAPIVersion: GetEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, releaseId: string, expand?: Set, options?: RawAxiosRequestConfig) { + return EnvironmentReleasesBetaApiFp(this.configuration).getEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, releaseId, expand, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the environment releases for the flag in the environment, newest first. Each release includes its phases in phase-index order. Metric definitions are not included. To get them, call `getEnvironmentRelease` with `expand=metrics`. Returns an empty `items` array when the flag has no releases in the environment, or when no release matches the `filter`. Releases that ended more than 90 days ago are not returned. Results are paginated. By default, the first 25 releases are returned. Use `limit` and `offset` to page through the rest, and `totalCount` to learn how many releases match in total. The `_links` object includes `first`, `prev`, `next`, and `last` links where they apply. + * @summary List environment releases + * @param {ListEnvironmentReleasesLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} [filter] A queryfilter expression that narrows the list. Supported fields and operators: `kind` (`equals`) with values `progressive` or `guarded`. + * @param {number} [limit] The number of releases to return. Defaults to 25. Maximum is 100. + * @param {number} [offset] Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten releases and then returns the next releases in the list, up to the query `limit`. + * @param {string} [snapshot] Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listEnvironmentReleases(lDAPIVersion: ListEnvironmentReleasesLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, filter?: string, limit?: number, offset?: number, snapshot?: string, options?: RawAxiosRequestConfig) { + return EnvironmentReleasesBetaApiFp(this.configuration).listEnvironmentReleases(lDAPIVersion, projectKey, flagKey, environmentKey, filter, limit, offset, snapshot, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Creates and starts a release on a flag in an environment, either from inline configuration or from an environment release plan. A release has one or more phases. Each phase is an audience, targeted by one flag rule, and has its own steps: the schedule of allocations at which that rule serves the target variation. After all of a phase\'s steps complete, the phase serves the target variation to 100% of its contexts. **Inline configuration.** Each entry in `phases` must specify exactly one targeting mode: - **Existing rule**: set `ruleId`. The rule must be enabled. Only a single-phase release can use an existing rule. - **New rule**: set `clauses`, with an optional `description`. New rules are appended to the end of the flag\'s rule list. To insert them before an existing rule instead, set the top-level `beforeRuleId`, which applies to every phase. Every phase\'s rule, including an existing rule passed by `ruleId`, must include `{\"contextKind\": \"\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\"]}`, not negated and with no other values, so the release only reaches contexts of the `randomizationUnit` kind, or multi-contexts containing the `randomizationUnit` kind. An existing rule needs the clause even if its other clauses only match that context kind. A phase without it returns `400`. For multiple phases, set `phases` with at least two entries. Each phase creates a rule. The first rule is enabled and starts immediately. Subsequent rules stay disabled until the release advances to them: automatically when `advancementMode` is `automatic`, or by an explicit advance when it is `manual`. `advancementMode` is required for a multi-phase release. Releases on the flag\'s default rule are not supported. A phase that omits both targeting modes is rejected. The flag must be on in the environment, or the request returns `409`. The release only reaches contexts that match a phase\'s rule. Other contexts keep getting the flag\'s default rule, which may already serve the target variation. The release type is inferred from `metrics`: an omitted or empty array creates a progressive release; one or more metrics creates a guarded release. Metrics must be listed individually; metric groups are not accepted. Every start runs release health checks, described in `ReleaseHealthCheckKind`. A flag that hasn\'t recently been evaluated for contexts of the `randomizationUnit` kind fails `flag_evaluations_with_context`, and one with no recent evaluations at all also fails `flag_evaluations_any`. Guarded releases also check that each metric receives events. A failing check returns `400` with code `health_checks_failed`. To start the release anyway, list the failing kinds in `bypassHealthChecks`. **From a release plan.** Set `releasePlanKey` to start from a plan in this environment instead of configuring the release inline; a request that also sets fields the plan supplies is rejected. The plan\'s current version runs as stored, with metric groups expanded into their members. Health checks run against the plan\'s randomization unit and metrics. Returns `400` if the plan is missing or incomplete, and `422` until environment release plans are available for the account. Requires the `updateRules` action on the flag in this environment, plus `updateFallthrough` when `cleanupBehavior` is `remove_rules_and_update_default_rule`. A release started from a plan requires both. The start is recorded in the flag\'s audit log as a targeting change that carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to start the release directly. This operation is not idempotent. Retrying a request that already started a release returns `409` with code `release_already_active`. The earlier request may have succeeded; call `listEnvironmentReleases` to confirm the running release is yours. + * @summary Start an environment release + * @param {StartEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {StartEnvironmentReleaseRequest} startEnvironmentReleaseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public startEnvironmentRelease(lDAPIVersion: StartEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, startEnvironmentReleaseRequest: StartEnvironmentReleaseRequest, options?: RawAxiosRequestConfig) { + return EnvironmentReleasesBetaApiFp(this.configuration).startEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, startEnvironmentReleaseRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Stops a release and resolves its phases according to the `resolution` you specify. To learn how each resolution treats completed and pending phases, read the `resolution` schema. Requires the `updateRules` action on the flag in this environment, or `updateFallthrough` for a historical release that ran on the default rule. The stop is recorded in the flag\'s audit log as a targeting change that names the resolution and carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to stop the release directly. Stopping a release that has already completed or been stopped returns `200` and makes no changes. Returns `404` for a release that ended more than 90 days ago. + * @summary Stop an environment release + * @param {StopEnvironmentReleaseLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} flagKey + * @param {string} environmentKey + * @param {string} releaseId + * @param {StopEnvironmentReleaseRequest} stopEnvironmentReleaseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public stopEnvironmentRelease(lDAPIVersion: StopEnvironmentReleaseLDAPIVersionEnum, projectKey: string, flagKey: string, environmentKey: string, releaseId: string, stopEnvironmentReleaseRequest: StopEnvironmentReleaseRequest, options?: RawAxiosRequestConfig) { + return EnvironmentReleasesBetaApiFp(this.configuration).stopEnvironmentRelease(lDAPIVersion, projectKey, flagKey, environmentKey, releaseId, stopEnvironmentReleaseRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + +export const GetEnvironmentReleaseLDAPIVersionEnum = { + Beta: 'beta' +} as const; +export type GetEnvironmentReleaseLDAPIVersionEnum = typeof GetEnvironmentReleaseLDAPIVersionEnum[keyof typeof GetEnvironmentReleaseLDAPIVersionEnum]; +export const GetEnvironmentReleaseExpandEnum = { + GetEnvironmentReleaseParamsExpandMetrics: 'metrics' +} as const; +export type GetEnvironmentReleaseExpandEnum = typeof GetEnvironmentReleaseExpandEnum[keyof typeof GetEnvironmentReleaseExpandEnum]; +export const ListEnvironmentReleasesLDAPIVersionEnum = { + Beta: 'beta' +} as const; +export type ListEnvironmentReleasesLDAPIVersionEnum = typeof ListEnvironmentReleasesLDAPIVersionEnum[keyof typeof ListEnvironmentReleasesLDAPIVersionEnum]; +export const StartEnvironmentReleaseLDAPIVersionEnum = { + Beta: 'beta' +} as const; +export type StartEnvironmentReleaseLDAPIVersionEnum = typeof StartEnvironmentReleaseLDAPIVersionEnum[keyof typeof StartEnvironmentReleaseLDAPIVersionEnum]; +export const StopEnvironmentReleaseLDAPIVersionEnum = { + Beta: 'beta' +} as const; +export type StopEnvironmentReleaseLDAPIVersionEnum = typeof StopEnvironmentReleaseLDAPIVersionEnum[keyof typeof StopEnvironmentReleaseLDAPIVersionEnum]; + + /** * EnvironmentsApi - axios parameter creator */ @@ -29391,7 +32346,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -29439,7 +32394,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -29452,7 +32407,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config }; }, /** - * Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports two fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. + * Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. - `critical` is a boolean filter. `critical:true` returns only environments marked as critical, and `critical:false` returns only non-critical environments. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. * @summary List environments * @param {string} projectKey The project key * @param {number} [limit] The number of environments to return in the response. Defaults to 20. @@ -29503,7 +32458,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -29555,7 +32510,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -29604,7 +32559,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -29653,7 +32608,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -29706,7 +32661,7 @@ export const EnvironmentsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -29756,7 +32711,7 @@ export const EnvironmentsApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports two fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. + * Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. - `critical` is a boolean filter. `critical:true` returns only environments marked as critical, and `critical:false` returns only non-critical environments. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. * @summary List environments * @param {string} projectKey The project key * @param {number} [limit] The number of environments to return in the response. Defaults to 20. @@ -29862,7 +32817,7 @@ export const EnvironmentsApiFactory = function (configuration?: Configuration, b return localVarFp.getEnvironment(projectKey, environmentKey, options).then((request) => request(axios, basePath)); }, /** - * Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports two fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. + * Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. - `critical` is a boolean filter. `critical:true` returns only environments marked as critical, and `critical:false` returns only non-critical environments. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. * @summary List environments * @param {string} projectKey The project key * @param {number} [limit] The number of environments to return in the response. Defaults to 20. @@ -29953,7 +32908,7 @@ export class EnvironmentsApi extends BaseAPI { } /** - * Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports two fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. + * Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. - `critical` is a boolean filter. `critical:true` returns only environments marked as critical, and `critical:false` returns only non-critical environments. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. * @summary List environments * @param {string} projectKey The project key * @param {number} [limit] The number of environments to return in the response. Defaults to 20. @@ -30026,7 +32981,7 @@ export class EnvironmentsApi extends BaseAPI { export const ExperimentsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `bayesian` (default) or `frequentist`. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). + * Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `frequentist` (default) or `bayesian`. Multi-armed bandit experiments support only `bayesian`, which is their default. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). * @summary Create experiment * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -30065,7 +33020,7 @@ export const ExperimentsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30123,7 +33078,7 @@ export const ExperimentsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30181,7 +33136,7 @@ export const ExperimentsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30225,7 +33180,7 @@ export const ExperimentsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30298,7 +33253,7 @@ export const ExperimentsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30367,7 +33322,7 @@ export const ExperimentsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30423,7 +33378,7 @@ export const ExperimentsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30472,7 +33427,7 @@ export const ExperimentsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30495,7 +33450,7 @@ export const ExperimentsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ExperimentsApiAxiosParamCreator(configuration) return { /** - * Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `bayesian` (default) or `frequentist`. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). + * Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `frequentist` (default) or `bayesian`. Multi-armed bandit experiments support only `bayesian`, which is their default. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). * @summary Create experiment * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -30632,7 +33587,7 @@ export const ExperimentsApiFactory = function (configuration?: Configuration, ba const localVarFp = ExperimentsApiFp(configuration) return { /** - * Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `bayesian` (default) or `frequentist`. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). + * Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `frequentist` (default) or `bayesian`. Multi-armed bandit experiments support only `bayesian`, which is their default. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). * @summary Create experiment * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -30743,7 +33698,7 @@ export const ExperimentsApiFactory = function (configuration?: Configuration, ba */ export class ExperimentsApi extends BaseAPI { /** - * Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `bayesian` (default) or `frequentist`. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). + * Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `frequentist` (default) or `bayesian`. Multi-armed bandit experiments support only `bayesian`, which is their default. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). * @summary Create experiment * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -30902,7 +33857,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -30951,7 +33906,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31003,7 +33958,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31055,7 +34010,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31113,7 +34068,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31165,7 +34120,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31218,7 +34173,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31266,7 +34221,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31360,7 +34315,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31416,7 +34371,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31473,7 +34428,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31487,7 +34442,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config }; }, /** - * 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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

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

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). + * 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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

Click to expand instructions for working with targeting and variations These instructions require the `environmentKey` parameter. Several of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://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. #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addPrerequisite Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter. ##### Parameters - `key`: Flag key of the prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addPrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addRule Adds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a flag rule. - Either - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addUserTargets Adds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### addVariation Adds a variation to the flag. ##### Parameters - `value`: The variation value. - `name`: (Optional) The variation name. - `description`: (Optional) A description for the variation. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### clearUserTargets Removes all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removePrerequisite Removes the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeUserTargets Removes user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeVariation Removes a variation from the flag. ##### Parameters - `variationId`: ID of a variation of the flag to remove. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replacePrerequisites Removes all existing prerequisites and replaces them with the list you provide. ##### Parameters - `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"prereq-flag-key-123abc\", \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\" }, { \"key\": \"another-prereq-flag-key-456def\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\" } ] } ] } ``` #### replaceRules Removes all targeting rules for the flag and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### replaceUserTargets Removes all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag\'s variations. If you are working with contexts, use `replaceTargets` instead of this instruction. ##### Parameters - `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\", \"user-key-456def\"] }, { \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"user-key-789ghi\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the flag. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The flag serves the default off variation when the flag\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation of the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updatePrerequisite Changes the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updatePrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateRuleDescription Updates the description of the feature flag rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. - `trackEvents`: Whether or not detailed events are sent for this rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule in the flag. - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for this flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether the SDK sends detailed evaluation events for the flag\'s default rule. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for the default rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` #### updateVariation Updates a variation of the flag. ##### Parameters - `variationId`: The ID of the variation to update. - `name`: (Optional) The updated variation name. - `value`: (Optional) The updated variation value. - `description`: (Optional) The updated variation description. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ] } ```

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). * @summary Update feature flag * @param {string} projectKey The project key * @param {string} featureFlagKey The feature flag key. The key identifies the flag in your code. @@ -31536,7 +34491,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31590,7 +34545,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31647,7 +34602,7 @@ export const FeatureFlagsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -31844,7 +34799,7 @@ export const FeatureFlagsApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

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

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). + * 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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

Click to expand instructions for working with targeting and variations These instructions require the `environmentKey` parameter. Several of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://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. #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addPrerequisite Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter. ##### Parameters - `key`: Flag key of the prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addPrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addRule Adds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a flag rule. - Either - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addUserTargets Adds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### addVariation Adds a variation to the flag. ##### Parameters - `value`: The variation value. - `name`: (Optional) The variation name. - `description`: (Optional) A description for the variation. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### clearUserTargets Removes all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removePrerequisite Removes the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeUserTargets Removes user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeVariation Removes a variation from the flag. ##### Parameters - `variationId`: ID of a variation of the flag to remove. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replacePrerequisites Removes all existing prerequisites and replaces them with the list you provide. ##### Parameters - `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"prereq-flag-key-123abc\", \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\" }, { \"key\": \"another-prereq-flag-key-456def\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\" } ] } ] } ``` #### replaceRules Removes all targeting rules for the flag and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### replaceUserTargets Removes all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag\'s variations. If you are working with contexts, use `replaceTargets` instead of this instruction. ##### Parameters - `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\", \"user-key-456def\"] }, { \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"user-key-789ghi\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the flag. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The flag serves the default off variation when the flag\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation of the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updatePrerequisite Changes the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updatePrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateRuleDescription Updates the description of the feature flag rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. - `trackEvents`: Whether or not detailed events are sent for this rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule in the flag. - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for this flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether the SDK sends detailed evaluation events for the flag\'s default rule. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for the default rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` #### updateVariation Updates a variation of the flag. ##### Parameters - `variationId`: The ID of the variation to update. - `name`: (Optional) The updated variation name. - `value`: (Optional) The updated variation value. - `description`: (Optional) The updated variation description. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ] } ```

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). * @summary Update feature flag * @param {string} projectKey The project key * @param {string} featureFlagKey The feature flag key. The key identifies the flag in your code. @@ -32042,7 +34997,7 @@ export const FeatureFlagsApiFactory = function (configuration?: Configuration, b return localVarFp.patchExpiringUserTargets(projectKey, environmentKey, featureFlagKey, patchFlagsRequest, options).then((request) => request(axios, basePath)); }, /** - * 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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

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

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). + * 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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

Click to expand instructions for working with targeting and variations These instructions require the `environmentKey` parameter. Several of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://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. #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addPrerequisite Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter. ##### Parameters - `key`: Flag key of the prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addPrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addRule Adds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a flag rule. - Either - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addUserTargets Adds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### addVariation Adds a variation to the flag. ##### Parameters - `value`: The variation value. - `name`: (Optional) The variation name. - `description`: (Optional) A description for the variation. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### clearUserTargets Removes all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removePrerequisite Removes the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeUserTargets Removes user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeVariation Removes a variation from the flag. ##### Parameters - `variationId`: ID of a variation of the flag to remove. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replacePrerequisites Removes all existing prerequisites and replaces them with the list you provide. ##### Parameters - `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"prereq-flag-key-123abc\", \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\" }, { \"key\": \"another-prereq-flag-key-456def\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\" } ] } ] } ``` #### replaceRules Removes all targeting rules for the flag and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### replaceUserTargets Removes all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag\'s variations. If you are working with contexts, use `replaceTargets` instead of this instruction. ##### Parameters - `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\", \"user-key-456def\"] }, { \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"user-key-789ghi\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the flag. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The flag serves the default off variation when the flag\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation of the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updatePrerequisite Changes the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updatePrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateRuleDescription Updates the description of the feature flag rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. - `trackEvents`: Whether or not detailed events are sent for this rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule in the flag. - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for this flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether the SDK sends detailed evaluation events for the flag\'s default rule. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for the default rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` #### updateVariation Updates a variation of the flag. ##### Parameters - `variationId`: The ID of the variation to update. - `name`: (Optional) The updated variation name. - `value`: (Optional) The updated variation value. - `description`: (Optional) The updated variation description. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ] } ```

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). * @summary Update feature flag * @param {string} projectKey The project key * @param {string} featureFlagKey The feature flag key. The key identifies the flag in your code. @@ -32240,7 +35195,7 @@ export class FeatureFlagsApi extends BaseAPI { } /** - * 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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

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

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). + * 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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

Click to expand instructions for working with targeting and variations These instructions require the `environmentKey` parameter. Several of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://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. #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addPrerequisite Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter. ##### Parameters - `key`: Flag key of the prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addPrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addRule Adds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a flag rule. - Either - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addUserTargets Adds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### addVariation Adds a variation to the flag. ##### Parameters - `value`: The variation value. - `name`: (Optional) The variation name. - `description`: (Optional) A description for the variation. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### clearUserTargets Removes all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removePrerequisite Removes the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeUserTargets Removes user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeVariation Removes a variation from the flag. ##### Parameters - `variationId`: ID of a variation of the flag to remove. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replacePrerequisites Removes all existing prerequisites and replaces them with the list you provide. ##### Parameters - `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"prereq-flag-key-123abc\", \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\" }, { \"key\": \"another-prereq-flag-key-456def\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\" } ] } ] } ``` #### replaceRules Removes all targeting rules for the flag and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### replaceUserTargets Removes all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag\'s variations. If you are working with contexts, use `replaceTargets` instead of this instruction. ##### Parameters - `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\", \"user-key-456def\"] }, { \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"user-key-789ghi\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the flag. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The flag serves the default off variation when the flag\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation of the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updatePrerequisite Changes the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updatePrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateRuleDescription Updates the description of the feature flag rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. - `trackEvents`: Whether or not detailed events are sent for this rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule in the flag. - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for this flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether the SDK sends detailed evaluation events for the flag\'s default rule. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for the default rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` #### updateVariation Updates a variation of the flag. ##### Parameters - `variationId`: The ID of the variation to update. - `name`: (Optional) The updated variation name. - `value`: (Optional) The updated variation value. - `description`: (Optional) The updated variation description. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ] } ```

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). * @summary Update feature flag * @param {string} projectKey The project key * @param {string} featureFlagKey The feature flag key. The key identifies the flag in your code. @@ -32325,7 +35280,7 @@ export const FeatureFlagsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -32377,7 +35332,7 @@ export const FeatureFlagsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -32539,7 +35494,7 @@ export const FlagImportConfigurationsBetaApiAxiosParamCreator = function (config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -32592,7 +35547,7 @@ export const FlagImportConfigurationsBetaApiAxiosParamCreator = function (config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -32644,7 +35599,7 @@ export const FlagImportConfigurationsBetaApiAxiosParamCreator = function (config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -32684,7 +35639,7 @@ export const FlagImportConfigurationsBetaApiAxiosParamCreator = function (config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -32740,7 +35695,7 @@ export const FlagImportConfigurationsBetaApiAxiosParamCreator = function (config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -32793,7 +35748,7 @@ export const FlagImportConfigurationsBetaApiAxiosParamCreator = function (config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33112,7 +36067,7 @@ export const FlagLinksBetaApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33165,7 +36120,7 @@ export const FlagLinksBetaApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33213,7 +36168,7 @@ export const FlagLinksBetaApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33269,7 +36224,7 @@ export const FlagLinksBetaApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33519,7 +36474,7 @@ export const FlagTriggersApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33576,7 +36531,7 @@ export const FlagTriggersApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33632,7 +36587,7 @@ export const FlagTriggersApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33684,7 +36639,7 @@ export const FlagTriggersApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -33744,7 +36699,7 @@ export const FlagTriggersApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34049,7 +37004,7 @@ export const FollowFlagsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34101,7 +37056,7 @@ export const FollowFlagsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34149,7 +37104,7 @@ export const FollowFlagsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34205,7 +37160,7 @@ export const FollowFlagsApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34459,7 +37414,7 @@ export const HoldoutsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34516,7 +37471,7 @@ export const HoldoutsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34568,7 +37523,7 @@ export const HoldoutsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34624,7 +37579,7 @@ export const HoldoutsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34677,7 +37632,7 @@ export const HoldoutsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -34964,7 +37919,7 @@ export const IPAllowlistBetaApiAxiosParamCreator = function (configuration?: Con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35009,7 +37964,7 @@ export const IPAllowlistBetaApiAxiosParamCreator = function (configuration?: Con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35025,7 +37980,7 @@ export const IPAllowlistBetaApiAxiosParamCreator = function (configuration?: Con * Get the current IP allowlist configuration and entries. * @summary Get IP Allowlist * @param {string} [search] A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description. - * @param {number} [limit] The number of entries to return. When omitted, all matching entries are returned. Maximum is 100. + * @param {number} [limit] The number of entries to return. Defaults to 20. Maximum is 100. * @param {number} [offset] The number of entries to skip. Used for pagination. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -35064,7 +38019,7 @@ export const IPAllowlistBetaApiAxiosParamCreator = function (configuration?: Con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35108,7 +38063,7 @@ export const IPAllowlistBetaApiAxiosParamCreator = function (configuration?: Con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35157,7 +38112,7 @@ export const IPAllowlistBetaApiAxiosParamCreator = function (configuration?: Con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35209,7 +38164,7 @@ export const IPAllowlistBetaApiFp = function(configuration?: Configuration) { * Get the current IP allowlist configuration and entries. * @summary Get IP Allowlist * @param {string} [search] A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description. - * @param {number} [limit] The number of entries to return. When omitted, all matching entries are returned. Maximum is 100. + * @param {number} [limit] The number of entries to return. Defaults to 20. Maximum is 100. * @param {number} [offset] The number of entries to skip. Used for pagination. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -35280,7 +38235,7 @@ export const IPAllowlistBetaApiFactory = function (configuration?: Configuration * Get the current IP allowlist configuration and entries. * @summary Get IP Allowlist * @param {string} [search] A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description. - * @param {number} [limit] The number of entries to return. When omitted, all matching entries are returned. Maximum is 100. + * @param {number} [limit] The number of entries to return. Defaults to 20. Maximum is 100. * @param {number} [offset] The number of entries to skip. Used for pagination. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -35342,7 +38297,7 @@ export class IPAllowlistBetaApi extends BaseAPI { * Get the current IP allowlist configuration and entries. * @summary Get IP Allowlist * @param {string} [search] A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description. - * @param {number} [limit] The number of entries to return. When omitted, all matching entries are returned. Maximum is 100. + * @param {number} [limit] The number of entries to return. Defaults to 20. Maximum is 100. * @param {number} [offset] The number of entries to skip. Used for pagination. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -35459,7 +38414,7 @@ export const InsightsChartsBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35518,7 +38473,7 @@ export const InsightsChartsBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35605,7 +38560,7 @@ export const InsightsChartsBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35708,7 +38663,7 @@ export const InsightsChartsBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -35787,7 +38742,7 @@ export const InsightsChartsBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -36136,7 +39091,7 @@ export const InsightsDeploymentsBetaApiAxiosParamCreator = function (configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -36186,7 +39141,7 @@ export const InsightsDeploymentsBetaApiAxiosParamCreator = function (configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -36285,7 +39240,7 @@ export const InsightsDeploymentsBetaApiAxiosParamCreator = function (configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -36333,7 +39288,7 @@ export const InsightsDeploymentsBetaApiAxiosParamCreator = function (configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -36648,7 +39603,7 @@ export const InsightsFlagEventsBetaApiAxiosParamCreator = function (configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -36857,7 +39812,7 @@ export const InsightsPullRequestsBetaApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37001,7 +39956,7 @@ export const InsightsRepositoriesBetaApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37050,7 +40005,7 @@ export const InsightsRepositoriesBetaApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37095,7 +40050,7 @@ export const InsightsRepositoriesBetaApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37277,7 +40232,7 @@ export const InsightsScoresBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37322,7 +40277,7 @@ export const InsightsScoresBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37371,7 +40326,7 @@ export const InsightsScoresBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37436,7 +40391,7 @@ export const InsightsScoresBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37495,7 +40450,7 @@ export const InsightsScoresBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37543,7 +40498,7 @@ export const InsightsScoresBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37853,7 +40808,7 @@ export const IntegrationAuditLogSubscriptionsApiAxiosParamCreator = function (co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37902,7 +40857,7 @@ export const IntegrationAuditLogSubscriptionsApiAxiosParamCreator = function (co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37950,7 +40905,7 @@ export const IntegrationAuditLogSubscriptionsApiAxiosParamCreator = function (co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -37994,7 +40949,7 @@ export const IntegrationAuditLogSubscriptionsApiAxiosParamCreator = function (co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -38046,7 +41001,7 @@ export const IntegrationAuditLogSubscriptionsApiAxiosParamCreator = function (co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -38321,7 +41276,7 @@ export const IntegrationDeliveryConfigurationsBetaApiAxiosParamCreator = functio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -38378,7 +41333,7 @@ export const IntegrationDeliveryConfigurationsBetaApiAxiosParamCreator = functio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -38426,7 +41381,7 @@ export const IntegrationDeliveryConfigurationsBetaApiAxiosParamCreator = functio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -38482,7 +41437,7 @@ export const IntegrationDeliveryConfigurationsBetaApiAxiosParamCreator = functio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -38522,7 +41477,7 @@ export const IntegrationDeliveryConfigurationsBetaApiAxiosParamCreator = functio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -38582,7 +41537,7 @@ export const IntegrationDeliveryConfigurationsBetaApiAxiosParamCreator = functio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -38639,7 +41594,7 @@ export const IntegrationDeliveryConfigurationsBetaApiAxiosParamCreator = functio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39006,7 +41961,7 @@ export const IntegrationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39051,7 +42006,7 @@ export const IntegrationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39066,11 +42021,12 @@ export const IntegrationsBetaApiAxiosParamCreator = function (configuration?: Co /** * Get all integration configurations with the specified integration key. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).). * @summary Get all configurations for the integration - * @param {string} integrationKey Integration key + * @param {string} integrationKey A key that corresponds to the third-party integration you are configuring. For example, `mezmo`. + * @param {boolean} [includePending] When `true`, includes pending two-step setup drafts that were created using `/setup` but are not yet finalized. Defaults to `false`, which returns only active configurations. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAllIntegrationConfigurations: async (integrationKey: string, options: RawAxiosRequestConfig = {}): Promise => { + getAllIntegrationConfigurations: async (integrationKey: string, includePending?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'integrationKey' is not null or undefined assertParamExists('getAllIntegrationConfigurations', 'integrationKey', integrationKey) const localVarPath = `/api/v2/integration-configurations/keys/{integrationKey}` @@ -39089,13 +42045,17 @@ export const IntegrationsBetaApiAxiosParamCreator = function (configuration?: Co // authentication ApiKey required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + if (includePending !== undefined) { + localVarQueryParameter['includePending'] = includePending; + } + localVarHeaderParameter['Accept'] = 'application/json'; // CUSTOM-START // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39139,7 +42099,7 @@ export const IntegrationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39187,7 +42147,7 @@ export const IntegrationsBetaApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39239,12 +42199,13 @@ export const IntegrationsBetaApiFp = function(configuration?: Configuration) { /** * Get all integration configurations with the specified integration key. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).). * @summary Get all configurations for the integration - * @param {string} integrationKey Integration key + * @param {string} integrationKey A key that corresponds to the third-party integration you are configuring. For example, `mezmo`. + * @param {boolean} [includePending] When `true`, includes pending two-step setup drafts that were created using `/setup` but are not yet finalized. Defaults to `false`, which returns only active configurations. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAllIntegrationConfigurations(integrationKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAllIntegrationConfigurations(integrationKey, options); + async getAllIntegrationConfigurations(integrationKey: string, includePending?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllIntegrationConfigurations(integrationKey, includePending, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['IntegrationsBetaApi.getAllIntegrationConfigurations']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -39309,12 +42270,13 @@ export const IntegrationsBetaApiFactory = function (configuration?: Configuratio /** * Get all integration configurations with the specified integration key. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).). * @summary Get all configurations for the integration - * @param {string} integrationKey Integration key + * @param {string} integrationKey A key that corresponds to the third-party integration you are configuring. For example, `mezmo`. + * @param {boolean} [includePending] When `true`, includes pending two-step setup drafts that were created using `/setup` but are not yet finalized. Defaults to `false`, which returns only active configurations. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAllIntegrationConfigurations(integrationKey: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getAllIntegrationConfigurations(integrationKey, options).then((request) => request(axios, basePath)); + getAllIntegrationConfigurations(integrationKey: string, includePending?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAllIntegrationConfigurations(integrationKey, includePending, options).then((request) => request(axios, basePath)); }, /** * Get integration configuration with the specified ID. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).) @@ -39370,12 +42332,13 @@ export class IntegrationsBetaApi extends BaseAPI { /** * Get all integration configurations with the specified integration key. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).). * @summary Get all configurations for the integration - * @param {string} integrationKey Integration key + * @param {string} integrationKey A key that corresponds to the third-party integration you are configuring. For example, `mezmo`. + * @param {boolean} [includePending] When `true`, includes pending two-step setup drafts that were created using `/setup` but are not yet finalized. Defaults to `false`, which returns only active configurations. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getAllIntegrationConfigurations(integrationKey: string, options?: RawAxiosRequestConfig) { - return IntegrationsBetaApiFp(this.configuration).getAllIntegrationConfigurations(integrationKey, options).then((request) => request(this.axios, this.basePath)); + public getAllIntegrationConfigurations(integrationKey: string, includePending?: boolean, options?: RawAxiosRequestConfig) { + return IntegrationsBetaApiFp(this.configuration).getAllIntegrationConfigurations(integrationKey, includePending, options).then((request) => request(this.axios, this.basePath)); } /** @@ -39445,7 +42408,7 @@ export const LayersApiAxiosParamCreator = function (configuration?: Configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39495,7 +42458,7 @@ export const LayersApiAxiosParamCreator = function (configuration?: Configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39547,7 +42510,7 @@ export const LayersApiAxiosParamCreator = function (configuration?: Configuratio // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39743,7 +42706,7 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39801,7 +42764,7 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39870,7 +42833,7 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39922,7 +42885,7 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -39971,7 +42934,7 @@ export const MetricsApiAxiosParamCreator = function (configuration?: Configurati // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40259,7 +43222,7 @@ export const MetricsBetaApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40308,7 +43271,7 @@ export const MetricsBetaApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40361,7 +43324,7 @@ export const MetricsBetaApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40430,7 +43393,7 @@ export const MetricsBetaApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40482,7 +43445,7 @@ export const MetricsBetaApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40763,7 +43726,7 @@ export const OAuth2ClientsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40808,7 +43771,7 @@ export const OAuth2ClientsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40852,7 +43815,7 @@ export const OAuth2ClientsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40892,7 +43855,7 @@ export const OAuth2ClientsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -40940,7 +43903,7 @@ export const OAuth2ClientsApiAxiosParamCreator = function (configuration?: Confi // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41184,7 +44147,7 @@ export const OtherApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41224,7 +44187,7 @@ export const OtherApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41264,7 +44227,7 @@ export const OtherApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41304,7 +44267,7 @@ export const OtherApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41344,7 +44307,7 @@ export const OtherApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41588,7 +44551,7 @@ export const PersistentStoreIntegrationsBetaApiAxiosParamCreator = function (con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41645,7 +44608,7 @@ export const PersistentStoreIntegrationsBetaApiAxiosParamCreator = function (con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41701,7 +44664,7 @@ export const PersistentStoreIntegrationsBetaApiAxiosParamCreator = function (con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41741,7 +44704,7 @@ export const PersistentStoreIntegrationsBetaApiAxiosParamCreator = function (con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -41801,7 +44764,7 @@ export const PersistentStoreIntegrationsBetaApiAxiosParamCreator = function (con // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42085,7 +45048,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42129,7 +45092,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42178,7 +45141,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42243,7 +45206,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42291,7 +45254,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42340,7 +45303,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42385,7 +45348,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42434,7 +45397,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42808,7 +45771,7 @@ export const RelayProxyConfigurationsApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42852,7 +45815,7 @@ export const RelayProxyConfigurationsApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42892,7 +45855,7 @@ export const RelayProxyConfigurationsApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42940,7 +45903,7 @@ export const RelayProxyConfigurationsApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -42985,7 +45948,7 @@ export const RelayProxyConfigurationsApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -43035,7 +45998,7 @@ export const RelayProxyConfigurationsApiAxiosParamCreator = function (configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -43283,16 +46246,120 @@ export class RelayProxyConfigurationsApi extends BaseAPI { /** - * ReleasePipelinesBetaApi - axios parameter creator + * ReleasePipelinesDeprecatedApi - axios parameter creator */ -export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration?: Configuration) { +export const ReleasePipelinesDeprecatedApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * Creates a release by adding a flag to a release pipeline + * @summary Create a new release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {CreatePipelineReleaseInput} createPipelineReleaseInput + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + createReleaseForFlag: async (projectKey: string, flagKey: string, createPipelineReleaseInput: CreatePipelineReleaseInput, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('createReleaseForFlag', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('createReleaseForFlag', 'flagKey', flagKey) + // verify required parameter 'createPipelineReleaseInput' is not null or undefined + assertParamExists('createReleaseForFlag', 'createPipelineReleaseInput', createPipelineReleaseInput) + const localVarPath = `/api/v2/projects/{projectKey}/flags/{flagKey}/release` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createPipelineReleaseInput, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a release from a flag + * @summary Delete a release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + deleteReleaseByFlagKey: async (projectKey: string, flagKey: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('deleteReleaseByFlagKey', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('deleteReleaseByFlagKey', 'flagKey', flagKey) + const localVarPath = `/api/v2/flags/{projectKey}/{flagKey}/release` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Deletes a release pipeline. You cannot delete the default release pipeline. If you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`. * @summary Delete release pipeline * @param {string} projectKey The project key * @param {string} pipelineKey The release pipeline key * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ deleteReleasePipeline: async (projectKey: string, pipelineKey: string, options: RawAxiosRequestConfig = {}): Promise => { @@ -43323,7 +46390,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -43343,6 +46410,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? * @param {number} [limit] The maximum number of items to return. Defaults to 20. * @param {number} [offset] Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ getAllReleasePipelines: async (projectKey: string, filter?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { @@ -43382,7 +46450,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -43403,6 +46471,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? * @param {number} [limit] The maximum number of items to return. Defaults to 20. * @param {number} [offset] Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ getAllReleaseProgressionsForReleasePipeline: async (projectKey: string, pipelineKey: string, filter?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { @@ -43445,7 +46514,56 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get currently active release for a flag + * @summary Get release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + getReleaseByFlagKey: async (projectKey: string, flagKey: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('getReleaseByFlagKey', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('getReleaseByFlagKey', 'flagKey', flagKey) + const localVarPath = `/api/v2/flags/{projectKey}/{flagKey}/release` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -43463,6 +46581,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? * @param {string} projectKey The project key * @param {string} pipelineKey The release pipeline key * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ getReleasePipelineByKey: async (projectKey: string, pipelineKey: string, options: RawAxiosRequestConfig = {}): Promise => { @@ -43493,7 +46612,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -43505,12 +46624,67 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? options: localVarRequestOptions, }; }, + /** + * This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/release-pipelines-deprecated/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` + * @summary Patch release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {Array} patchOperation + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + patchReleaseByFlagKey: async (projectKey: string, flagKey: string, patchOperation: Array, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('patchReleaseByFlagKey', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('patchReleaseByFlagKey', 'flagKey', flagKey) + // verify required parameter 'patchOperation' is not null or undefined + assertParamExists('patchReleaseByFlagKey', 'patchOperation', patchOperation) + const localVarPath = `/api/v2/flags/{projectKey}/{flagKey}/release` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(patchOperation, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Creates a new release pipeline. The first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`. You can create up to 20 release pipelines per project. * @summary Create a release pipeline * @param {string} projectKey The project key * @param {CreateReleasePipelineInput} createReleasePipelineInput * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ postReleasePipeline: async (projectKey: string, createReleasePipelineInput: CreateReleasePipelineInput, options: RawAxiosRequestConfig = {}): Promise => { @@ -43541,7 +46715,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -43561,6 +46735,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? * @param {string} pipelineKey The release pipeline key * @param {UpdateReleasePipelineInput} updateReleasePipelineInput * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ putReleasePipeline: async (projectKey: string, pipelineKey: string, updateReleasePipelineInput: UpdateReleasePipelineInput, options: RawAxiosRequestConfig = {}): Promise => { @@ -43594,7 +46769,7 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -43602,6 +46777,64 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateReleasePipelineInput, localVarRequestOptions, configuration) + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates the execution status of a phase of a release + * @summary Update phase status for release + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {string} phaseId The phase ID + * @param {UpdatePhaseStatusInput} updatePhaseStatusInput + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + updatePhaseStatus: async (projectKey: string, flagKey: string, phaseId: string, updatePhaseStatusInput: UpdatePhaseStatusInput, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectKey' is not null or undefined + assertParamExists('updatePhaseStatus', 'projectKey', projectKey) + // verify required parameter 'flagKey' is not null or undefined + assertParamExists('updatePhaseStatus', 'flagKey', flagKey) + // verify required parameter 'phaseId' is not null or undefined + assertParamExists('updatePhaseStatus', 'phaseId', phaseId) + // verify required parameter 'updatePhaseStatusInput' is not null or undefined + assertParamExists('updatePhaseStatus', 'updatePhaseStatusInput', updatePhaseStatusInput) + const localVarPath = `/api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId}` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) + .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))) + .replace(`{${"phaseId"}}`, encodeURIComponent(String(phaseId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKey required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + // CUSTOM-START + // Set default API version. + localVarHeaderParameter['LD-API-Version'] = '20240415'; + // Set a custom LaunchDarkly user agent header. + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; + // CUSTOM-END + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updatePhaseStatusInput, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -43611,23 +46844,55 @@ export const ReleasePipelinesBetaApiAxiosParamCreator = function (configuration? }; /** - * ReleasePipelinesBetaApi - functional programming interface + * ReleasePipelinesDeprecatedApi - functional programming interface */ -export const ReleasePipelinesBetaApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ReleasePipelinesBetaApiAxiosParamCreator(configuration) +export const ReleasePipelinesDeprecatedApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ReleasePipelinesDeprecatedApiAxiosParamCreator(configuration) return { + /** + * Creates a release by adding a flag to a release pipeline + * @summary Create a new release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {CreatePipelineReleaseInput} createPipelineReleaseInput + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async createReleaseForFlag(projectKey: string, flagKey: string, createPipelineReleaseInput: CreatePipelineReleaseInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createReleaseForFlag(projectKey, flagKey, createPipelineReleaseInput, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.createReleaseForFlag']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Deletes a release from a flag + * @summary Delete a release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async deleteReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteReleaseByFlagKey(projectKey, flagKey, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.deleteReleaseByFlagKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Deletes a release pipeline. You cannot delete the default release pipeline. If you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`. * @summary Delete release pipeline * @param {string} projectKey The project key * @param {string} pipelineKey The release pipeline key * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async deleteReleasePipeline(projectKey: string, pipelineKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteReleasePipeline(projectKey, pipelineKey, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesBetaApi.deleteReleasePipeline']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.deleteReleasePipeline']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -43638,12 +46903,13 @@ export const ReleasePipelinesBetaApiFp = function(configuration?: Configuration) * @param {number} [limit] The maximum number of items to return. Defaults to 20. * @param {number} [offset] Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async getAllReleasePipelines(projectKey: string, filter?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllReleasePipelines(projectKey, filter, limit, offset, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesBetaApi.getAllReleasePipelines']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.getAllReleasePipelines']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -43655,12 +46921,28 @@ export const ReleasePipelinesBetaApiFp = function(configuration?: Configuration) * @param {number} [limit] The maximum number of items to return. Defaults to 20. * @param {number} [offset] Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ - async getAllReleaseProgressionsForReleasePipeline(projectKey: string, pipelineKey: string, filter?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getAllReleaseProgressionsForReleasePipeline(projectKey: string, pipelineKey: string, filter?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllReleaseProgressionsForReleasePipeline(projectKey, pipelineKey, filter, limit, offset, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesBetaApi.getAllReleaseProgressionsForReleasePipeline']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.getAllReleaseProgressionsForReleasePipeline']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get currently active release for a flag + * @summary Get release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async getReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReleaseByFlagKey(projectKey, flagKey, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.getReleaseByFlagKey']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -43669,12 +46951,29 @@ export const ReleasePipelinesBetaApiFp = function(configuration?: Configuration) * @param {string} projectKey The project key * @param {string} pipelineKey The release pipeline key * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async getReleasePipelineByKey(projectKey: string, pipelineKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getReleasePipelineByKey(projectKey, pipelineKey, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesBetaApi.getReleasePipelineByKey']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.getReleasePipelineByKey']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/release-pipelines-deprecated/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` + * @summary Patch release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {Array} patchOperation + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async patchReleaseByFlagKey(projectKey: string, flagKey: string, patchOperation: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.patchReleaseByFlagKey(projectKey, flagKey, patchOperation, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.patchReleaseByFlagKey']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -43683,12 +46982,13 @@ export const ReleasePipelinesBetaApiFp = function(configuration?: Configuration) * @param {string} projectKey The project key * @param {CreateReleasePipelineInput} createReleasePipelineInput * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async postReleasePipeline(projectKey: string, createReleasePipelineInput: CreateReleasePipelineInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.postReleasePipeline(projectKey, createReleasePipelineInput, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesBetaApi.postReleasePipeline']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.postReleasePipeline']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -43698,29 +46998,73 @@ export const ReleasePipelinesBetaApiFp = function(configuration?: Configuration) * @param {string} pipelineKey The release pipeline key * @param {UpdateReleasePipelineInput} updateReleasePipelineInput * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async putReleasePipeline(projectKey: string, pipelineKey: string, updateReleasePipelineInput: UpdateReleasePipelineInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.putReleasePipeline(projectKey, pipelineKey, updateReleasePipelineInput, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesBetaApi.putReleasePipeline']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.putReleasePipeline']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Updates the execution status of a phase of a release + * @summary Update phase status for release + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {string} phaseId The phase ID + * @param {UpdatePhaseStatusInput} updatePhaseStatusInput + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + async updatePhaseStatus(projectKey: string, flagKey: string, phaseId: string, updatePhaseStatusInput: UpdatePhaseStatusInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePhaseStatus(projectKey, flagKey, phaseId, updatePhaseStatusInput, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReleasePipelinesDeprecatedApi.updatePhaseStatus']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * ReleasePipelinesBetaApi - factory interface + * ReleasePipelinesDeprecatedApi - factory interface */ -export const ReleasePipelinesBetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ReleasePipelinesBetaApiFp(configuration) +export const ReleasePipelinesDeprecatedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ReleasePipelinesDeprecatedApiFp(configuration) return { + /** + * Creates a release by adding a flag to a release pipeline + * @summary Create a new release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {CreatePipelineReleaseInput} createPipelineReleaseInput + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + createReleaseForFlag(projectKey: string, flagKey: string, createPipelineReleaseInput: CreatePipelineReleaseInput, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createReleaseForFlag(projectKey, flagKey, createPipelineReleaseInput, options).then((request) => request(axios, basePath)); + }, + /** + * Deletes a release from a flag + * @summary Delete a release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + deleteReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteReleaseByFlagKey(projectKey, flagKey, options).then((request) => request(axios, basePath)); + }, /** * Deletes a release pipeline. You cannot delete the default release pipeline. If you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`. * @summary Delete release pipeline * @param {string} projectKey The project key * @param {string} pipelineKey The release pipeline key * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ deleteReleasePipeline(projectKey: string, pipelineKey: string, options?: RawAxiosRequestConfig): AxiosPromise { @@ -43734,6 +47078,7 @@ export const ReleasePipelinesBetaApiFactory = function (configuration?: Configur * @param {number} [limit] The maximum number of items to return. Defaults to 20. * @param {number} [offset] Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ getAllReleasePipelines(projectKey: string, filter?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { @@ -43748,28 +47093,56 @@ export const ReleasePipelinesBetaApiFactory = function (configuration?: Configur * @param {number} [limit] The maximum number of items to return. Defaults to 20. * @param {number} [offset] Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ - getAllReleaseProgressionsForReleasePipeline(projectKey: string, pipelineKey: string, filter?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { + getAllReleaseProgressionsForReleasePipeline(projectKey: string, pipelineKey: string, filter?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getAllReleaseProgressionsForReleasePipeline(projectKey, pipelineKey, filter, limit, offset, options).then((request) => request(axios, basePath)); }, + /** + * Get currently active release for a flag + * @summary Get release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + getReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getReleaseByFlagKey(projectKey, flagKey, options).then((request) => request(axios, basePath)); + }, /** * Get a release pipeline by key * @summary Get release pipeline by key * @param {string} projectKey The project key * @param {string} pipelineKey The release pipeline key * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ getReleasePipelineByKey(projectKey: string, pipelineKey: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getReleasePipelineByKey(projectKey, pipelineKey, options).then((request) => request(axios, basePath)); }, + /** + * This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/release-pipelines-deprecated/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` + * @summary Patch release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {Array} patchOperation + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + patchReleaseByFlagKey(projectKey: string, flagKey: string, patchOperation: Array, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.patchReleaseByFlagKey(projectKey, flagKey, patchOperation, options).then((request) => request(axios, basePath)); + }, /** * Creates a new release pipeline. The first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`. You can create up to 20 release pipelines per project. * @summary Create a release pipeline * @param {string} projectKey The project key * @param {CreateReleasePipelineInput} createReleasePipelineInput * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ postReleasePipeline(projectKey: string, createReleasePipelineInput: CreateReleasePipelineInput, options?: RawAxiosRequestConfig): AxiosPromise { @@ -43782,28 +47155,71 @@ export const ReleasePipelinesBetaApiFactory = function (configuration?: Configur * @param {string} pipelineKey The release pipeline key * @param {UpdateReleasePipelineInput} updateReleasePipelineInput * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + putReleasePipeline(projectKey: string, pipelineKey: string, updateReleasePipelineInput: UpdateReleasePipelineInput, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.putReleasePipeline(projectKey, pipelineKey, updateReleasePipelineInput, options).then((request) => request(axios, basePath)); + }, + /** + * Updates the execution status of a phase of a release + * @summary Update phase status for release + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {string} phaseId The phase ID + * @param {UpdatePhaseStatusInput} updatePhaseStatusInput + * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ - putReleasePipeline(projectKey: string, pipelineKey: string, updateReleasePipelineInput: UpdateReleasePipelineInput, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.putReleasePipeline(projectKey, pipelineKey, updateReleasePipelineInput, options).then((request) => request(axios, basePath)); + updatePhaseStatus(projectKey: string, flagKey: string, phaseId: string, updatePhaseStatusInput: UpdatePhaseStatusInput, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updatePhaseStatus(projectKey, flagKey, phaseId, updatePhaseStatusInput, options).then((request) => request(axios, basePath)); }, }; }; /** - * ReleasePipelinesBetaApi - object-oriented interface + * ReleasePipelinesDeprecatedApi - object-oriented interface */ -export class ReleasePipelinesBetaApi extends BaseAPI { +export class ReleasePipelinesDeprecatedApi extends BaseAPI { + /** + * Creates a release by adding a flag to a release pipeline + * @summary Create a new release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {CreatePipelineReleaseInput} createPipelineReleaseInput + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + public createReleaseForFlag(projectKey: string, flagKey: string, createPipelineReleaseInput: CreatePipelineReleaseInput, options?: RawAxiosRequestConfig) { + return ReleasePipelinesDeprecatedApiFp(this.configuration).createReleaseForFlag(projectKey, flagKey, createPipelineReleaseInput, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a release from a flag + * @summary Delete a release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + public deleteReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig) { + return ReleasePipelinesDeprecatedApiFp(this.configuration).deleteReleaseByFlagKey(projectKey, flagKey, options).then((request) => request(this.axios, this.basePath)); + } + /** * Deletes a release pipeline. You cannot delete the default release pipeline. If you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`. * @summary Delete release pipeline * @param {string} projectKey The project key * @param {string} pipelineKey The release pipeline key * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ public deleteReleasePipeline(projectKey: string, pipelineKey: string, options?: RawAxiosRequestConfig) { - return ReleasePipelinesBetaApiFp(this.configuration).deleteReleasePipeline(projectKey, pipelineKey, options).then((request) => request(this.axios, this.basePath)); + return ReleasePipelinesDeprecatedApiFp(this.configuration).deleteReleasePipeline(projectKey, pipelineKey, options).then((request) => request(this.axios, this.basePath)); } /** @@ -43814,10 +47230,11 @@ export class ReleasePipelinesBetaApi extends BaseAPI { * @param {number} [limit] The maximum number of items to return. Defaults to 20. * @param {number} [offset] Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ public getAllReleasePipelines(projectKey: string, filter?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { - return ReleasePipelinesBetaApiFp(this.configuration).getAllReleasePipelines(projectKey, filter, limit, offset, options).then((request) => request(this.axios, this.basePath)); + return ReleasePipelinesDeprecatedApiFp(this.configuration).getAllReleasePipelines(projectKey, filter, limit, offset, options).then((request) => request(this.axios, this.basePath)); } /** @@ -43829,10 +47246,24 @@ export class ReleasePipelinesBetaApi extends BaseAPI { * @param {number} [limit] The maximum number of items to return. Defaults to 20. * @param {number} [offset] Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ public getAllReleaseProgressionsForReleasePipeline(projectKey: string, pipelineKey: string, filter?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { - return ReleasePipelinesBetaApiFp(this.configuration).getAllReleaseProgressionsForReleasePipeline(projectKey, pipelineKey, filter, limit, offset, options).then((request) => request(this.axios, this.basePath)); + return ReleasePipelinesDeprecatedApiFp(this.configuration).getAllReleaseProgressionsForReleasePipeline(projectKey, pipelineKey, filter, limit, offset, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get currently active release for a flag + * @summary Get release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + public getReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig) { + return ReleasePipelinesDeprecatedApiFp(this.configuration).getReleaseByFlagKey(projectKey, flagKey, options).then((request) => request(this.axios, this.basePath)); } /** @@ -43841,10 +47272,25 @@ export class ReleasePipelinesBetaApi extends BaseAPI { * @param {string} projectKey The project key * @param {string} pipelineKey The release pipeline key * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ public getReleasePipelineByKey(projectKey: string, pipelineKey: string, options?: RawAxiosRequestConfig) { - return ReleasePipelinesBetaApiFp(this.configuration).getReleasePipelineByKey(projectKey, pipelineKey, options).then((request) => request(this.axios, this.basePath)); + return ReleasePipelinesDeprecatedApiFp(this.configuration).getReleasePipelineByKey(projectKey, pipelineKey, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/release-pipelines-deprecated/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` + * @summary Patch release for flag + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {Array} patchOperation + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + public patchReleaseByFlagKey(projectKey: string, flagKey: string, patchOperation: Array, options?: RawAxiosRequestConfig) { + return ReleasePipelinesDeprecatedApiFp(this.configuration).patchReleaseByFlagKey(projectKey, flagKey, patchOperation, options).then((request) => request(this.axios, this.basePath)); } /** @@ -43853,10 +47299,11 @@ export class ReleasePipelinesBetaApi extends BaseAPI { * @param {string} projectKey The project key * @param {CreateReleasePipelineInput} createReleasePipelineInput * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ public postReleasePipeline(projectKey: string, createReleasePipelineInput: CreateReleasePipelineInput, options?: RawAxiosRequestConfig) { - return ReleasePipelinesBetaApiFp(this.configuration).postReleasePipeline(projectKey, createReleasePipelineInput, options).then((request) => request(this.axios, this.basePath)); + return ReleasePipelinesDeprecatedApiFp(this.configuration).postReleasePipeline(projectKey, createReleasePipelineInput, options).then((request) => request(this.axios, this.basePath)); } /** @@ -43866,10 +47313,26 @@ export class ReleasePipelinesBetaApi extends BaseAPI { * @param {string} pipelineKey The release pipeline key * @param {UpdateReleasePipelineInput} updateReleasePipelineInput * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ public putReleasePipeline(projectKey: string, pipelineKey: string, updateReleasePipelineInput: UpdateReleasePipelineInput, options?: RawAxiosRequestConfig) { - return ReleasePipelinesBetaApiFp(this.configuration).putReleasePipeline(projectKey, pipelineKey, updateReleasePipelineInput, options).then((request) => request(this.axios, this.basePath)); + return ReleasePipelinesDeprecatedApiFp(this.configuration).putReleasePipeline(projectKey, pipelineKey, updateReleasePipelineInput, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the execution status of a phase of a release + * @summary Update phase status for release + * @param {string} projectKey The project key + * @param {string} flagKey The flag key + * @param {string} phaseId The phase ID + * @param {UpdatePhaseStatusInput} updatePhaseStatusInput + * @param {*} [options] Override http request option. + * @deprecated + * @throws {RequiredError} + */ + public updatePhaseStatus(projectKey: string, flagKey: string, phaseId: string, updatePhaseStatusInput: UpdatePhaseStatusInput, options?: RawAxiosRequestConfig) { + return ReleasePipelinesDeprecatedApiFp(this.configuration).updatePhaseStatus(projectKey, flagKey, phaseId, updatePhaseStatusInput, options).then((request) => request(this.axios, this.basePath)); } } @@ -43919,7 +47382,7 @@ export const ReleasePoliciesBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -43974,7 +47437,7 @@ export const ReleasePoliciesBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -44028,7 +47491,7 @@ export const ReleasePoliciesBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -44082,7 +47545,7 @@ export const ReleasePoliciesBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -44137,7 +47600,7 @@ export const ReleasePoliciesBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -44196,7 +47659,7 @@ export const ReleasePoliciesBetaApiAxiosParamCreator = function (configuration?: // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -44508,79 +47971,33 @@ export type PutReleasePolicyLDAPIVersionEnum = typeof PutReleasePolicyLDAPIVersi /** - * ReleasesBetaApi - axios parameter creator + * SDKKeysBetaApi - axios parameter creator */ -export const ReleasesBetaApiAxiosParamCreator = function (configuration?: Configuration) { +export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Creates a release by adding a flag to a release pipeline - * @summary Create a new release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {CreateReleaseInput} createReleaseInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createReleaseForFlag: async (projectKey: string, flagKey: string, createReleaseInput: CreateReleaseInput, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('createReleaseForFlag', 'projectKey', projectKey) - // verify required parameter 'flagKey' is not null or undefined - assertParamExists('createReleaseForFlag', 'flagKey', flagKey) - // verify required parameter 'createReleaseInput' is not null or undefined - assertParamExists('createReleaseForFlag', 'createReleaseInput', createReleaseInput) - const localVarPath = `/api/v2/projects/{projectKey}/flags/{flagKey}/release` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - - localVarHeaderParameter['Content-Type'] = 'application/json'; - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createReleaseInput, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Deletes a release from a flag - * @summary Delete a release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key + * Delete a specific SDK key by its key. + * @summary Delete SDK key + * @param {DeleteSdkKeyByKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} sdkKeyKey The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteReleaseByFlagKey: async (projectKey: string, flagKey: string, options: RawAxiosRequestConfig = {}): Promise => { + deleteSdkKeyByKey: async (lDAPIVersion: DeleteSdkKeyByKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'lDAPIVersion' is not null or undefined + assertParamExists('deleteSdkKeyByKey', 'lDAPIVersion', lDAPIVersion) // verify required parameter 'projectKey' is not null or undefined - assertParamExists('deleteReleaseByFlagKey', 'projectKey', projectKey) - // verify required parameter 'flagKey' is not null or undefined - assertParamExists('deleteReleaseByFlagKey', 'flagKey', flagKey) - const localVarPath = `/api/v2/flags/{projectKey}/{flagKey}/release` + assertParamExists('deleteSdkKeyByKey', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('deleteSdkKeyByKey', 'environmentKey', environmentKey) + // verify required parameter 'sdkKeyKey' is not null or undefined + assertParamExists('deleteSdkKeyByKey', 'sdkKeyKey', sdkKeyKey) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}` .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))); + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"sdkKeyKey"}}`, encodeURIComponent(String(sdkKeyKey))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -44601,9 +48018,12 @@ export const ReleasesBetaApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END + if (lDAPIVersion != null) { + localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); + } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -44614,21 +48034,25 @@ export const ReleasesBetaApiAxiosParamCreator = function (configuration?: Config }; }, /** - * Get currently active release for a flag - * @summary Get release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key + * Get all SDK keys for a given project across environments. + * @summary Get all project SDK keys + * @param {GetProjectSdkKeysLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} [filter] A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: `kind` (`equals`, `anyOf`; values: \"sdk\", \"mobile\"), `active` (`equals`, `anyOf`; values: `true`, `false`), `environmentKey` (`equals`, `anyOf`; values: environment keys), `viewKey` (`equals`, `anyOf`; values: view key strings — returns only SDK keys linked to the specified view(s)), `name` (`equals` only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: `kind anyOf [\"sdk\",\"mobile\"], environmentKey anyOf [\"production\",\"test\"], viewKey equals my-view, name equals \"production\"`. + * @param {number} [limit] The number of SDK keys to return. Defaults to 20. Maximum is 100. + * @param {number} [offset] The number of SDK keys to skip. Used for pagination. + * @param {string} [expand] A comma-separated list of fields to expand in the response. Supported fields: `environmentSummary`, `viewSummaries`. + * @param {GetProjectSdkKeysSortEnum} [sort] A sort to apply to the list of SDK keys. Supported fields: `createdAt` and `environmentKey`. Prefix `createdAt` with `-` to sort in descending order (for example, `-createdAt`). `environmentKey` orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getReleaseByFlagKey: async (projectKey: string, flagKey: string, options: RawAxiosRequestConfig = {}): Promise => { + getProjectSdkKeys: async (lDAPIVersion: GetProjectSdkKeysLDAPIVersionEnum, projectKey: string, filter?: string, limit?: number, offset?: number, expand?: string, sort?: GetProjectSdkKeysSortEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'lDAPIVersion' is not null or undefined + assertParamExists('getProjectSdkKeys', 'lDAPIVersion', lDAPIVersion) // verify required parameter 'projectKey' is not null or undefined - assertParamExists('getReleaseByFlagKey', 'projectKey', projectKey) - // verify required parameter 'flagKey' is not null or undefined - assertParamExists('getReleaseByFlagKey', 'flagKey', flagKey) - const localVarPath = `/api/v2/flags/{projectKey}/{flagKey}/release` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))); + assertParamExists('getProjectSdkKeys', 'projectKey', projectKey) + const localVarPath = `/api/v2/projects/{projectKey}/sdk-keys` + .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -44643,71 +48067,41 @@ export const ReleasesBetaApiAxiosParamCreator = function (configuration?: Config // authentication ApiKey required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END + if (filter !== undefined) { + localVarQueryParameter['filter'] = filter; + } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/releases-beta/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` - * @summary Patch release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {Array} patchOperation - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - patchReleaseByFlagKey: async (projectKey: string, flagKey: string, patchOperation: Array, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('patchReleaseByFlagKey', 'projectKey', projectKey) - // verify required parameter 'flagKey' is not null or undefined - assertParamExists('patchReleaseByFlagKey', 'flagKey', flagKey) - // verify required parameter 'patchOperation' is not null or undefined - assertParamExists('patchReleaseByFlagKey', 'patchOperation', patchOperation) - const localVarPath = `/api/v2/flags/{projectKey}/{flagKey}/release` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + if (expand !== undefined) { + localVarQueryParameter['expand'] = expand; + } - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } - localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; // CUSTOM-START // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END + if (lDAPIVersion != null) { + localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); + } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(patchOperation, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -44715,28 +48109,28 @@ export const ReleasesBetaApiAxiosParamCreator = function (configuration?: Config }; }, /** - * Updates the execution status of a phase of a release - * @summary Update phase status for release - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {string} phaseId The phase ID - * @param {UpdatePhaseStatusInput} updatePhaseStatusInput + * Get a specific SDK key by its key. + * @summary Get SDK key + * @param {GetSdkKeyByKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} sdkKeyKey The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePhaseStatus: async (projectKey: string, flagKey: string, phaseId: string, updatePhaseStatusInput: UpdatePhaseStatusInput, options: RawAxiosRequestConfig = {}): Promise => { + getSdkKeyByKey: async (lDAPIVersion: GetSdkKeyByKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'lDAPIVersion' is not null or undefined + assertParamExists('getSdkKeyByKey', 'lDAPIVersion', lDAPIVersion) // verify required parameter 'projectKey' is not null or undefined - assertParamExists('updatePhaseStatus', 'projectKey', projectKey) - // verify required parameter 'flagKey' is not null or undefined - assertParamExists('updatePhaseStatus', 'flagKey', flagKey) - // verify required parameter 'phaseId' is not null or undefined - assertParamExists('updatePhaseStatus', 'phaseId', phaseId) - // verify required parameter 'updatePhaseStatusInput' is not null or undefined - assertParamExists('updatePhaseStatus', 'updatePhaseStatusInput', updatePhaseStatusInput) - const localVarPath = `/api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId}` + assertParamExists('getSdkKeyByKey', 'projectKey', projectKey) + // verify required parameter 'environmentKey' is not null or undefined + assertParamExists('getSdkKeyByKey', 'environmentKey', environmentKey) + // verify required parameter 'sdkKeyKey' is not null or undefined + assertParamExists('getSdkKeyByKey', 'sdkKeyKey', sdkKeyKey) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}` .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"flagKey"}}`, encodeURIComponent(String(flagKey))) - .replace(`{${"phaseId"}}`, encodeURIComponent(String(phaseId))); + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) + .replace(`{${"sdkKeyKey"}}`, encodeURIComponent(String(sdkKeyKey))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -44744,286 +48138,57 @@ export const ReleasesBetaApiAxiosParamCreator = function (configuration?: Config baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKey required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; // CUSTOM-START // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END + if (lDAPIVersion != null) { + localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); + } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updatePhaseStatusInput, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, - } -}; - -/** - * ReleasesBetaApi - functional programming interface - */ -export const ReleasesBetaApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ReleasesBetaApiAxiosParamCreator(configuration) - return { - /** - * Creates a release by adding a flag to a release pipeline - * @summary Create a new release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {CreateReleaseInput} createReleaseInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createReleaseForFlag(projectKey: string, flagKey: string, createReleaseInput: CreateReleaseInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createReleaseForFlag(projectKey, flagKey, createReleaseInput, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasesBetaApi.createReleaseForFlag']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Deletes a release from a flag - * @summary Delete a release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteReleaseByFlagKey(projectKey, flagKey, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasesBetaApi.deleteReleaseByFlagKey']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Get currently active release for a flag - * @summary Get release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getReleaseByFlagKey(projectKey, flagKey, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasesBetaApi.getReleaseByFlagKey']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/releases-beta/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` - * @summary Patch release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {Array} patchOperation - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async patchReleaseByFlagKey(projectKey: string, flagKey: string, patchOperation: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.patchReleaseByFlagKey(projectKey, flagKey, patchOperation, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasesBetaApi.patchReleaseByFlagKey']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Updates the execution status of a phase of a release - * @summary Update phase status for release - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {string} phaseId The phase ID - * @param {UpdatePhaseStatusInput} updatePhaseStatusInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updatePhaseStatus(projectKey: string, flagKey: string, phaseId: string, updatePhaseStatusInput: UpdatePhaseStatusInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updatePhaseStatus(projectKey, flagKey, phaseId, updatePhaseStatusInput, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReleasesBetaApi.updatePhaseStatus']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * ReleasesBetaApi - factory interface - */ -export const ReleasesBetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ReleasesBetaApiFp(configuration) - return { - /** - * Creates a release by adding a flag to a release pipeline - * @summary Create a new release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {CreateReleaseInput} createReleaseInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createReleaseForFlag(projectKey: string, flagKey: string, createReleaseInput: CreateReleaseInput, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createReleaseForFlag(projectKey, flagKey, createReleaseInput, options).then((request) => request(axios, basePath)); - }, - /** - * Deletes a release from a flag - * @summary Delete a release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteReleaseByFlagKey(projectKey, flagKey, options).then((request) => request(axios, basePath)); - }, - /** - * Get currently active release for a flag - * @summary Get release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getReleaseByFlagKey(projectKey, flagKey, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/releases-beta/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` - * @summary Patch release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {Array} patchOperation - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - patchReleaseByFlagKey(projectKey: string, flagKey: string, patchOperation: Array, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.patchReleaseByFlagKey(projectKey, flagKey, patchOperation, options).then((request) => request(axios, basePath)); - }, - /** - * Updates the execution status of a phase of a release - * @summary Update phase status for release - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {string} phaseId The phase ID - * @param {UpdatePhaseStatusInput} updatePhaseStatusInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updatePhaseStatus(projectKey: string, flagKey: string, phaseId: string, updatePhaseStatusInput: UpdatePhaseStatusInput, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updatePhaseStatus(projectKey, flagKey, phaseId, updatePhaseStatusInput, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * ReleasesBetaApi - object-oriented interface - */ -export class ReleasesBetaApi extends BaseAPI { - /** - * Creates a release by adding a flag to a release pipeline - * @summary Create a new release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {CreateReleaseInput} createReleaseInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public createReleaseForFlag(projectKey: string, flagKey: string, createReleaseInput: CreateReleaseInput, options?: RawAxiosRequestConfig) { - return ReleasesBetaApiFp(this.configuration).createReleaseForFlag(projectKey, flagKey, createReleaseInput, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Deletes a release from a flag - * @summary Delete a release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public deleteReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig) { - return ReleasesBetaApiFp(this.configuration).deleteReleaseByFlagKey(projectKey, flagKey, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get currently active release for a flag - * @summary Get release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getReleaseByFlagKey(projectKey: string, flagKey: string, options?: RawAxiosRequestConfig) { - return ReleasesBetaApiFp(this.configuration).getReleaseByFlagKey(projectKey, flagKey, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/releases-beta/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` - * @summary Patch release for flag - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {Array} patchOperation - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public patchReleaseByFlagKey(projectKey: string, flagKey: string, patchOperation: Array, options?: RawAxiosRequestConfig) { - return ReleasesBetaApiFp(this.configuration).patchReleaseByFlagKey(projectKey, flagKey, patchOperation, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Updates the execution status of a phase of a release - * @summary Update phase status for release - * @param {string} projectKey The project key - * @param {string} flagKey The flag key - * @param {string} phaseId The phase ID - * @param {UpdatePhaseStatusInput} updatePhaseStatusInput - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public updatePhaseStatus(projectKey: string, flagKey: string, phaseId: string, updatePhaseStatusInput: UpdatePhaseStatusInput, options?: RawAxiosRequestConfig) { - return ReleasesBetaApiFp(this.configuration).updatePhaseStatus(projectKey, flagKey, phaseId, updatePhaseStatusInput, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * SDKKeysBetaApi - axios parameter creator - */ -export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configuration) { - return { /** - * Delete a specific SDK key by its key. - * @summary Delete SDK key - * @param {DeleteSdkKeyByKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * Get all SDK keys for a given project and environment. Can filter by kind. + * @summary Get all environment SDK keys + * @param {GetSdkKeysLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} environmentKey - * @param {string} sdkKeyKey The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value. + * @param {string} [filter] A filter to apply to the list of SDK keys. Supports the following fields and operators: `kind` (equals \"sdk\" or \"mobile\"), `active` (equals true or false). Format: `field:value`. Example: `kind:sdk`. + * @param {number} [limit] The number of SDK keys to return. Defaults to 20. Maximum is 100. + * @param {number} [offset] The number of SDK keys to skip. Used for pagination. + * @param {GetSdkKeysSortEnum} [sort] A sort to apply to the list of SDK keys. Supported field: `createdAt`. Prefix the field with `-` to sort in descending order (for example, `-createdAt`). * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteSdkKeyByKey: async (lDAPIVersion: DeleteSdkKeyByKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, options: RawAxiosRequestConfig = {}): Promise => { + getSdkKeys: async (lDAPIVersion: GetSdkKeysLDAPIVersionEnum, projectKey: string, environmentKey: string, filter?: string, limit?: number, offset?: number, sort?: GetSdkKeysSortEnum, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('deleteSdkKeyByKey', 'lDAPIVersion', lDAPIVersion) + assertParamExists('getSdkKeys', 'lDAPIVersion', lDAPIVersion) // verify required parameter 'projectKey' is not null or undefined - assertParamExists('deleteSdkKeyByKey', 'projectKey', projectKey) + assertParamExists('getSdkKeys', 'projectKey', projectKey) // verify required parameter 'environmentKey' is not null or undefined - assertParamExists('deleteSdkKeyByKey', 'environmentKey', environmentKey) - // verify required parameter 'sdkKeyKey' is not null or undefined - assertParamExists('deleteSdkKeyByKey', 'sdkKeyKey', sdkKeyKey) - const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}` + assertParamExists('getSdkKeys', 'environmentKey', environmentKey) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys` .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) - .replace(`{${"sdkKeyKey"}}`, encodeURIComponent(String(sdkKeyKey))); + .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -45031,20 +48196,36 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKey required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + if (filter !== undefined) { + localVarQueryParameter['filter'] = filter; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } + localVarHeaderParameter['Accept'] = 'application/json'; // CUSTOM-START // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -45060,24 +48241,28 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * Get a specific SDK key by its key. - * @summary Get SDK key - * @param {GetSdkKeyByKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * Update a an existing SDK key by its identifying key. + * @summary Update SDK key + * @param {PatchSdkKeyByKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} environmentKey * @param {string} sdkKeyKey The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value. + * @param {SdkKeyPatch} sdkKeyPatch An array of patches for updating an existing SDK key. The following fields are supported: `name`, `description`, `expiry`. + * @param {number} [version] The version of the SDK key for optimistic locking. If provided, the update will only succeed if the current version matches. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSdkKeyByKey: async (lDAPIVersion: GetSdkKeyByKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, options: RawAxiosRequestConfig = {}): Promise => { + patchSdkKeyByKey: async (lDAPIVersion: PatchSdkKeyByKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, sdkKeyPatch: SdkKeyPatch, version?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('getSdkKeyByKey', 'lDAPIVersion', lDAPIVersion) + assertParamExists('patchSdkKeyByKey', 'lDAPIVersion', lDAPIVersion) // verify required parameter 'projectKey' is not null or undefined - assertParamExists('getSdkKeyByKey', 'projectKey', projectKey) + assertParamExists('patchSdkKeyByKey', 'projectKey', projectKey) // verify required parameter 'environmentKey' is not null or undefined - assertParamExists('getSdkKeyByKey', 'environmentKey', environmentKey) + assertParamExists('patchSdkKeyByKey', 'environmentKey', environmentKey) // verify required parameter 'sdkKeyKey' is not null or undefined - assertParamExists('getSdkKeyByKey', 'sdkKeyKey', sdkKeyKey) + assertParamExists('patchSdkKeyByKey', 'sdkKeyKey', sdkKeyKey) + // verify required parameter 'sdkKeyPatch' is not null or undefined + assertParamExists('patchSdkKeyByKey', 'sdkKeyPatch', sdkKeyPatch) const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}` .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) @@ -45089,20 +48274,25 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKey required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + if (version !== undefined) { + localVarQueryParameter['version'] = version; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; // CUSTOM-START // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -45111,6 +48301,7 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(sdkKeyPatch, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -45118,25 +48309,24 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * Get all SDK keys for a given project and environment. Can filter by kind. - * @summary Get all environment SDK keys - * @param {GetSdkKeysLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * Create a new server-side or mobile SDK key. Deleted SDK keys are retained for 180 days. During that period you cannot reuse the `key` of a deleted SDK key, even though the deleted key no longer appears in the list of SDK keys for the environment. + * @summary Create SDK key + * @param {PostSdkKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} environmentKey - * @param {string} [filter] A filter to apply to the list of SDK keys. Supports the following fields and operators: `kind` (equals \"sdk\" or \"mobile\"), `active` (equals true or false). Format: `field:value`. Example: `kind:sdk`. - * @param {number} [limit] The number of SDK keys to return. Defaults to 20. Maximum is 100. - * @param {number} [offset] The number of SDK keys to skip. Used for pagination. - * @param {GetSdkKeysSortEnum} [sort] A sort to apply to the list of SDK keys. Supported field: `createdAt`. Prefix the field with `-` to sort in descending order (for example, `-createdAt`). + * @param {SdkKeyPost} sdkKeyPost Parameters for creating a new SDK key * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSdkKeys: async (lDAPIVersion: GetSdkKeysLDAPIVersionEnum, projectKey: string, environmentKey: string, filter?: string, limit?: number, offset?: number, sort?: GetSdkKeysSortEnum, options: RawAxiosRequestConfig = {}): Promise => { + postSdkKey: async (lDAPIVersion: PostSdkKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyPost: SdkKeyPost, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('getSdkKeys', 'lDAPIVersion', lDAPIVersion) + assertParamExists('postSdkKey', 'lDAPIVersion', lDAPIVersion) // verify required parameter 'projectKey' is not null or undefined - assertParamExists('getSdkKeys', 'projectKey', projectKey) + assertParamExists('postSdkKey', 'projectKey', projectKey) // verify required parameter 'environmentKey' is not null or undefined - assertParamExists('getSdkKeys', 'environmentKey', environmentKey) + assertParamExists('postSdkKey', 'environmentKey', environmentKey) + // verify required parameter 'sdkKeyPost' is not null or undefined + assertParamExists('postSdkKey', 'sdkKeyPost', sdkKeyPost) const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys` .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))); @@ -45147,36 +48337,21 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKey required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - if (filter !== undefined) { - localVarQueryParameter['filter'] = filter; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (sort !== undefined) { - localVarQueryParameter['sort'] = sort; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; // CUSTOM-START // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -45185,6 +48360,7 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(sdkKeyPost, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -45192,29 +48368,29 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu }; }, /** - * Update a an existing SDK key by its identifying key. - * @summary Update SDK key - * @param {PatchSdkKeyByKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * Replace the set of views associated with an SDK key. The `viewKeys` field is required. To remove all views from the SDK key, pass an empty `viewKeys` array. + * @summary Replace SDK key views + * @param {PutSdkKeyViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} environmentKey - * @param {string} sdkKeyKey The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value. - * @param {SdkKeyPatch} sdkKeyPatch An array of patches for updating an existing SDK key. The following fields are supported: `name`, `description`, `expiry`. - * @param {number} [version] The version of the SDK key for optimistic locking. If provided, the update will only succeed if the current version matches. + * @param {string} sdkKeyKey + * @param {SdkKeyViewsPut} sdkKeyViewsPut + * @param {string} [expand] A comma-separated list of fields to expand in the response. Supported fields: `viewSummaries`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchSdkKeyByKey: async (lDAPIVersion: PatchSdkKeyByKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, sdkKeyPatch: SdkKeyPatch, version?: number, options: RawAxiosRequestConfig = {}): Promise => { + putSdkKeyViews: async (lDAPIVersion: PutSdkKeyViewsLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, sdkKeyViewsPut: SdkKeyViewsPut, expand?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('patchSdkKeyByKey', 'lDAPIVersion', lDAPIVersion) + assertParamExists('putSdkKeyViews', 'lDAPIVersion', lDAPIVersion) // verify required parameter 'projectKey' is not null or undefined - assertParamExists('patchSdkKeyByKey', 'projectKey', projectKey) + assertParamExists('putSdkKeyViews', 'projectKey', projectKey) // verify required parameter 'environmentKey' is not null or undefined - assertParamExists('patchSdkKeyByKey', 'environmentKey', environmentKey) + assertParamExists('putSdkKeyViews', 'environmentKey', environmentKey) // verify required parameter 'sdkKeyKey' is not null or undefined - assertParamExists('patchSdkKeyByKey', 'sdkKeyKey', sdkKeyKey) - // verify required parameter 'sdkKeyPatch' is not null or undefined - assertParamExists('patchSdkKeyByKey', 'sdkKeyPatch', sdkKeyPatch) - const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}` + assertParamExists('putSdkKeyViews', 'sdkKeyKey', sdkKeyKey) + // verify required parameter 'sdkKeyViewsPut' is not null or undefined + assertParamExists('putSdkKeyViews', 'sdkKeyViewsPut', sdkKeyViewsPut) + const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}/views` .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))) .replace(`{${"sdkKeyKey"}}`, encodeURIComponent(String(sdkKeyKey))); @@ -45225,76 +48401,17 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKey required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - if (version !== undefined) { - localVarQueryParameter['version'] = version; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - localVarHeaderParameter['Accept'] = 'application/json'; - - // CUSTOM-START - // Set default API version. - localVarHeaderParameter['LD-API-Version'] = '20240415'; - // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; - // CUSTOM-END - - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(sdkKeyPatch, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Create a new server-side or mobile SDK key. - * @summary Create SDK key - * @param {PostSdkKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. - * @param {string} projectKey - * @param {string} environmentKey - * @param {SdkKeyPost} sdkKeyPost Parameters for creating a new SDK key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postSdkKey: async (lDAPIVersion: PostSdkKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyPost: SdkKeyPost, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('postSdkKey', 'lDAPIVersion', lDAPIVersion) - // verify required parameter 'projectKey' is not null or undefined - assertParamExists('postSdkKey', 'projectKey', projectKey) - // verify required parameter 'environmentKey' is not null or undefined - assertParamExists('postSdkKey', 'environmentKey', environmentKey) - // verify required parameter 'sdkKeyPost' is not null or undefined - assertParamExists('postSdkKey', 'sdkKeyPost', sdkKeyPost) - const localVarPath = `/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys` - .replace(`{${"projectKey"}}`, encodeURIComponent(String(projectKey))) - .replace(`{${"environmentKey"}}`, encodeURIComponent(String(environmentKey))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; + if (expand !== undefined) { + localVarQueryParameter['expand'] = expand; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKey required - await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) - localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/json'; @@ -45302,7 +48419,7 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END if (lDAPIVersion != null) { @@ -45311,7 +48428,7 @@ export const SDKKeysBetaApiAxiosParamCreator = function (configuration?: Configu setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(sdkKeyPost, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(sdkKeyViewsPut, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -45343,6 +48460,25 @@ export const SDKKeysBetaApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['SDKKeysBetaApi.deleteSdkKeyByKey']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Get all SDK keys for a given project across environments. + * @summary Get all project SDK keys + * @param {GetProjectSdkKeysLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} [filter] A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: `kind` (`equals`, `anyOf`; values: \"sdk\", \"mobile\"), `active` (`equals`, `anyOf`; values: `true`, `false`), `environmentKey` (`equals`, `anyOf`; values: environment keys), `viewKey` (`equals`, `anyOf`; values: view key strings — returns only SDK keys linked to the specified view(s)), `name` (`equals` only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: `kind anyOf [\"sdk\",\"mobile\"], environmentKey anyOf [\"production\",\"test\"], viewKey equals my-view, name equals \"production\"`. + * @param {number} [limit] The number of SDK keys to return. Defaults to 20. Maximum is 100. + * @param {number} [offset] The number of SDK keys to skip. Used for pagination. + * @param {string} [expand] A comma-separated list of fields to expand in the response. Supported fields: `environmentSummary`, `viewSummaries`. + * @param {GetProjectSdkKeysSortEnum} [sort] A sort to apply to the list of SDK keys. Supported fields: `createdAt` and `environmentKey`. Prefix `createdAt` with `-` to sort in descending order (for example, `-createdAt`). `environmentKey` orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getProjectSdkKeys(lDAPIVersion: GetProjectSdkKeysLDAPIVersionEnum, projectKey: string, filter?: string, limit?: number, offset?: number, expand?: string, sort?: GetProjectSdkKeysSortEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectSdkKeys(lDAPIVersion, projectKey, filter, limit, offset, expand, sort, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SDKKeysBetaApi.getProjectSdkKeys']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Get a specific SDK key by its key. * @summary Get SDK key @@ -45397,7 +48533,7 @@ export const SDKKeysBetaApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Create a new server-side or mobile SDK key. + * Create a new server-side or mobile SDK key. Deleted SDK keys are retained for 180 days. During that period you cannot reuse the `key` of a deleted SDK key, even though the deleted key no longer appears in the list of SDK keys for the environment. * @summary Create SDK key * @param {PostSdkKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey @@ -45412,6 +48548,24 @@ export const SDKKeysBetaApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['SDKKeysBetaApi.postSdkKey']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Replace the set of views associated with an SDK key. The `viewKeys` field is required. To remove all views from the SDK key, pass an empty `viewKeys` array. + * @summary Replace SDK key views + * @param {PutSdkKeyViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} sdkKeyKey + * @param {SdkKeyViewsPut} sdkKeyViewsPut + * @param {string} [expand] A comma-separated list of fields to expand in the response. Supported fields: `viewSummaries`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async putSdkKeyViews(lDAPIVersion: PutSdkKeyViewsLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, sdkKeyViewsPut: SdkKeyViewsPut, expand?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.putSdkKeyViews(lDAPIVersion, projectKey, environmentKey, sdkKeyKey, sdkKeyViewsPut, expand, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SDKKeysBetaApi.putSdkKeyViews']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -45434,6 +48588,22 @@ export const SDKKeysBetaApiFactory = function (configuration?: Configuration, ba deleteSdkKeyByKey(lDAPIVersion: DeleteSdkKeyByKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteSdkKeyByKey(lDAPIVersion, projectKey, environmentKey, sdkKeyKey, options).then((request) => request(axios, basePath)); }, + /** + * Get all SDK keys for a given project across environments. + * @summary Get all project SDK keys + * @param {GetProjectSdkKeysLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} [filter] A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: `kind` (`equals`, `anyOf`; values: \"sdk\", \"mobile\"), `active` (`equals`, `anyOf`; values: `true`, `false`), `environmentKey` (`equals`, `anyOf`; values: environment keys), `viewKey` (`equals`, `anyOf`; values: view key strings — returns only SDK keys linked to the specified view(s)), `name` (`equals` only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: `kind anyOf [\"sdk\",\"mobile\"], environmentKey anyOf [\"production\",\"test\"], viewKey equals my-view, name equals \"production\"`. + * @param {number} [limit] The number of SDK keys to return. Defaults to 20. Maximum is 100. + * @param {number} [offset] The number of SDK keys to skip. Used for pagination. + * @param {string} [expand] A comma-separated list of fields to expand in the response. Supported fields: `environmentSummary`, `viewSummaries`. + * @param {GetProjectSdkKeysSortEnum} [sort] A sort to apply to the list of SDK keys. Supported fields: `createdAt` and `environmentKey`. Prefix `createdAt` with `-` to sort in descending order (for example, `-createdAt`). `environmentKey` orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getProjectSdkKeys(lDAPIVersion: GetProjectSdkKeysLDAPIVersionEnum, projectKey: string, filter?: string, limit?: number, offset?: number, expand?: string, sort?: GetProjectSdkKeysSortEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getProjectSdkKeys(lDAPIVersion, projectKey, filter, limit, offset, expand, sort, options).then((request) => request(axios, basePath)); + }, /** * Get a specific SDK key by its key. * @summary Get SDK key @@ -45479,7 +48649,7 @@ export const SDKKeysBetaApiFactory = function (configuration?: Configuration, ba return localVarFp.patchSdkKeyByKey(lDAPIVersion, projectKey, environmentKey, sdkKeyKey, sdkKeyPatch, version, options).then((request) => request(axios, basePath)); }, /** - * Create a new server-side or mobile SDK key. + * Create a new server-side or mobile SDK key. Deleted SDK keys are retained for 180 days. During that period you cannot reuse the `key` of a deleted SDK key, even though the deleted key no longer appears in the list of SDK keys for the environment. * @summary Create SDK key * @param {PostSdkKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey @@ -45491,6 +48661,21 @@ export const SDKKeysBetaApiFactory = function (configuration?: Configuration, ba postSdkKey(lDAPIVersion: PostSdkKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyPost: SdkKeyPost, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.postSdkKey(lDAPIVersion, projectKey, environmentKey, sdkKeyPost, options).then((request) => request(axios, basePath)); }, + /** + * Replace the set of views associated with an SDK key. The `viewKeys` field is required. To remove all views from the SDK key, pass an empty `viewKeys` array. + * @summary Replace SDK key views + * @param {PutSdkKeyViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} sdkKeyKey + * @param {SdkKeyViewsPut} sdkKeyViewsPut + * @param {string} [expand] A comma-separated list of fields to expand in the response. Supported fields: `viewSummaries`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + putSdkKeyViews(lDAPIVersion: PutSdkKeyViewsLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, sdkKeyViewsPut: SdkKeyViewsPut, expand?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.putSdkKeyViews(lDAPIVersion, projectKey, environmentKey, sdkKeyKey, sdkKeyViewsPut, expand, options).then((request) => request(axios, basePath)); + }, }; }; @@ -45512,6 +48697,23 @@ export class SDKKeysBetaApi extends BaseAPI { return SDKKeysBetaApiFp(this.configuration).deleteSdkKeyByKey(lDAPIVersion, projectKey, environmentKey, sdkKeyKey, options).then((request) => request(this.axios, this.basePath)); } + /** + * Get all SDK keys for a given project across environments. + * @summary Get all project SDK keys + * @param {GetProjectSdkKeysLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} [filter] A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: `kind` (`equals`, `anyOf`; values: \"sdk\", \"mobile\"), `active` (`equals`, `anyOf`; values: `true`, `false`), `environmentKey` (`equals`, `anyOf`; values: environment keys), `viewKey` (`equals`, `anyOf`; values: view key strings — returns only SDK keys linked to the specified view(s)), `name` (`equals` only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: `kind anyOf [\"sdk\",\"mobile\"], environmentKey anyOf [\"production\",\"test\"], viewKey equals my-view, name equals \"production\"`. + * @param {number} [limit] The number of SDK keys to return. Defaults to 20. Maximum is 100. + * @param {number} [offset] The number of SDK keys to skip. Used for pagination. + * @param {string} [expand] A comma-separated list of fields to expand in the response. Supported fields: `environmentSummary`, `viewSummaries`. + * @param {GetProjectSdkKeysSortEnum} [sort] A sort to apply to the list of SDK keys. Supported fields: `createdAt` and `environmentKey`. Prefix `createdAt` with `-` to sort in descending order (for example, `-createdAt`). `environmentKey` orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getProjectSdkKeys(lDAPIVersion: GetProjectSdkKeysLDAPIVersionEnum, projectKey: string, filter?: string, limit?: number, offset?: number, expand?: string, sort?: GetProjectSdkKeysSortEnum, options?: RawAxiosRequestConfig) { + return SDKKeysBetaApiFp(this.configuration).getProjectSdkKeys(lDAPIVersion, projectKey, filter, limit, offset, expand, sort, options).then((request) => request(this.axios, this.basePath)); + } + /** * Get a specific SDK key by its key. * @summary Get SDK key @@ -45560,7 +48762,7 @@ export class SDKKeysBetaApi extends BaseAPI { } /** - * Create a new server-side or mobile SDK key. + * Create a new server-side or mobile SDK key. Deleted SDK keys are retained for 180 days. During that period you cannot reuse the `key` of a deleted SDK key, even though the deleted key no longer appears in the list of SDK keys for the environment. * @summary Create SDK key * @param {PostSdkKeyLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey @@ -45572,12 +48774,38 @@ export class SDKKeysBetaApi extends BaseAPI { public postSdkKey(lDAPIVersion: PostSdkKeyLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyPost: SdkKeyPost, options?: RawAxiosRequestConfig) { return SDKKeysBetaApiFp(this.configuration).postSdkKey(lDAPIVersion, projectKey, environmentKey, sdkKeyPost, options).then((request) => request(this.axios, this.basePath)); } + + /** + * Replace the set of views associated with an SDK key. The `viewKeys` field is required. To remove all views from the SDK key, pass an empty `viewKeys` array. + * @summary Replace SDK key views + * @param {PutSdkKeyViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. + * @param {string} projectKey + * @param {string} environmentKey + * @param {string} sdkKeyKey + * @param {SdkKeyViewsPut} sdkKeyViewsPut + * @param {string} [expand] A comma-separated list of fields to expand in the response. Supported fields: `viewSummaries`. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public putSdkKeyViews(lDAPIVersion: PutSdkKeyViewsLDAPIVersionEnum, projectKey: string, environmentKey: string, sdkKeyKey: string, sdkKeyViewsPut: SdkKeyViewsPut, expand?: string, options?: RawAxiosRequestConfig) { + return SDKKeysBetaApiFp(this.configuration).putSdkKeyViews(lDAPIVersion, projectKey, environmentKey, sdkKeyKey, sdkKeyViewsPut, expand, options).then((request) => request(this.axios, this.basePath)); + } } export const DeleteSdkKeyByKeyLDAPIVersionEnum = { Beta: 'beta' } as const; export type DeleteSdkKeyByKeyLDAPIVersionEnum = typeof DeleteSdkKeyByKeyLDAPIVersionEnum[keyof typeof DeleteSdkKeyByKeyLDAPIVersionEnum]; +export const GetProjectSdkKeysLDAPIVersionEnum = { + GetProjectSdkKeysParamsLDAPIVersionBeta: 'beta' +} as const; +export type GetProjectSdkKeysLDAPIVersionEnum = typeof GetProjectSdkKeysLDAPIVersionEnum[keyof typeof GetProjectSdkKeysLDAPIVersionEnum]; +export const GetProjectSdkKeysSortEnum = { + CreatedAt: 'createdAt', + CreatedAt2: '-createdAt', + EnvironmentKey: 'environmentKey' +} as const; +export type GetProjectSdkKeysSortEnum = typeof GetProjectSdkKeysSortEnum[keyof typeof GetProjectSdkKeysSortEnum]; export const GetSdkKeyByKeyLDAPIVersionEnum = { Beta: 'beta' } as const; @@ -45599,6 +48827,10 @@ export const PostSdkKeyLDAPIVersionEnum = { Beta: 'beta' } as const; export type PostSdkKeyLDAPIVersionEnum = typeof PostSdkKeyLDAPIVersionEnum[keyof typeof PostSdkKeyLDAPIVersionEnum]; +export const PutSdkKeyViewsLDAPIVersionEnum = { + Beta: 'beta' +} as const; +export type PutSdkKeyViewsLDAPIVersionEnum = typeof PutSdkKeyViewsLDAPIVersionEnum[keyof typeof PutSdkKeyViewsLDAPIVersionEnum]; /** @@ -45650,7 +48882,7 @@ export const ScheduledChangesApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -45706,7 +48938,7 @@ export const ScheduledChangesApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -45758,7 +48990,7 @@ export const ScheduledChangesApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -45823,7 +49055,7 @@ export const ScheduledChangesApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -45885,7 +49117,7 @@ export const ScheduledChangesApiAxiosParamCreator = function (configuration?: Co // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46192,7 +49424,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46261,7 +49493,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46314,7 +49546,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46370,7 +49602,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46426,7 +49658,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46478,7 +49710,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46531,7 +49763,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46583,7 +49815,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46635,7 +49867,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46691,7 +49923,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46747,7 +49979,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46815,7 +50047,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46871,7 +50103,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46928,7 +50160,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -46990,7 +50222,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -47004,7 +50236,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Create a new segment. + * Create a new segment. The new segment has no individual targets or rules. The request body only accepts the fields documented below. If you include targeting fields such as `included`, `excluded`, `includedContexts`, `excludedContexts`, or `rules`, LaunchDarkly ignores them and does not return an error. These fields are empty in the response. To add individual targets or rules after you create the segment, use [Update segment](https://launchdarkly.com/docs/api/segments/patch-segment) with a semantic patch. For example, use the `addIncludedTargets` or `addExcludedTargets` instruction to add individual targets, and the `addRule` instruction to add a rule. For big segments, use the `addBigSegmentIncludedTargets` or `addBigSegmentExcludedTargets` instruction. * @summary Create segment * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -47043,7 +50275,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -47100,7 +50332,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -47157,7 +50389,7 @@ export const SegmentsApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -47419,7 +50651,7 @@ export const SegmentsApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Create a new segment. + * Create a new segment. The new segment has no individual targets or rules. The request body only accepts the fields documented below. If you include targeting fields such as `included`, `excluded`, `includedContexts`, `excludedContexts`, or `rules`, LaunchDarkly ignores them and does not return an error. These fields are empty in the response. To add individual targets or rules after you create the segment, use [Update segment](https://launchdarkly.com/docs/api/segments/patch-segment) with a semantic patch. For example, use the `addIncludedTargets` or `addExcludedTargets` instruction to add individual targets, and the `addRule` instruction to add a rule. For big segments, use the `addBigSegmentIncludedTargets` or `addBigSegmentExcludedTargets` instruction. * @summary Create segment * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -47669,7 +50901,7 @@ export const SegmentsApiFactory = function (configuration?: Configuration, baseP return localVarFp.patchSegment(projectKey, environmentKey, segmentKey, patchWithComment, dryRun, options).then((request) => request(axios, basePath)); }, /** - * Create a new segment. + * Create a new segment. The new segment has no individual targets or rules. The request body only accepts the fields documented below. If you include targeting fields such as `included`, `excluded`, `includedContexts`, `excludedContexts`, or `rules`, LaunchDarkly ignores them and does not return an error. These fields are empty in the response. To add individual targets or rules after you create the segment, use [Update segment](https://launchdarkly.com/docs/api/segments/patch-segment) with a semantic patch. For example, use the `addIncludedTargets` or `addExcludedTargets` instruction to add individual targets, and the `addRule` instruction to add a rule. For big segments, use the `addBigSegmentIncludedTargets` or `addBigSegmentExcludedTargets` instruction. * @summary Create segment * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -47923,7 +51155,7 @@ export class SegmentsApi extends BaseAPI { } /** - * Create a new segment. + * Create a new segment. The new segment has no individual targets or rules. The request body only accepts the fields documented below. If you include targeting fields such as `included`, `excluded`, `includedContexts`, `excludedContexts`, or `rules`, LaunchDarkly ignores them and does not return an error. These fields are empty in the response. To add individual targets or rules after you create the segment, use [Update segment](https://launchdarkly.com/docs/api/segments/patch-segment) with a semantic patch. For example, use the `addIncludedTargets` or `addExcludedTargets` instruction to add individual targets, and the `addRule` instruction to add a rule. For big segments, use the `addBigSegmentIncludedTargets` or `addBigSegmentExcludedTargets` instruction. * @summary Create segment * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -47974,7 +51206,7 @@ export const TagsApiAxiosParamCreator = function (configuration?: Configuration) /** * Get a list of tags. * @summary List tags - * @param {Array} [kind] Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, and `view`. Returns all types by default. + * @param {Array} [kind] Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, `agent-skill`, and `view`. Returns all types by default. * @param {string} [pre] Return tags with the specified prefix * @param {boolean} [archived] Whether or not to return archived flags * @param {number} [limit] The number of tags to return. Maximum is 1000. @@ -48029,7 +51261,7 @@ export const TagsApiAxiosParamCreator = function (configuration?: Configuration) // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48053,7 +51285,7 @@ export const TagsApiFp = function(configuration?: Configuration) { /** * Get a list of tags. * @summary List tags - * @param {Array} [kind] Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, and `view`. Returns all types by default. + * @param {Array} [kind] Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, `agent-skill`, and `view`. Returns all types by default. * @param {string} [pre] Return tags with the specified prefix * @param {boolean} [archived] Whether or not to return archived flags * @param {number} [limit] The number of tags to return. Maximum is 1000. @@ -48080,7 +51312,7 @@ export const TagsApiFactory = function (configuration?: Configuration, basePath? /** * Get a list of tags. * @summary List tags - * @param {Array} [kind] Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, and `view`. Returns all types by default. + * @param {Array} [kind] Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, `agent-skill`, and `view`. Returns all types by default. * @param {string} [pre] Return tags with the specified prefix * @param {boolean} [archived] Whether or not to return archived flags * @param {number} [limit] The number of tags to return. Maximum is 1000. @@ -48102,7 +51334,7 @@ export class TagsApi extends BaseAPI { /** * Get a list of tags. * @summary List tags - * @param {Array} [kind] Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, and `view`. Returns all types by default. + * @param {Array} [kind] Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, `agent-skill`, and `view`. Returns all types by default. * @param {string} [pre] Return tags with the specified prefix * @param {boolean} [archived] Whether or not to return archived flags * @param {number} [limit] The number of tags to return. Maximum is 1000. @@ -48155,7 +51387,7 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48204,7 +51436,7 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48258,7 +51490,7 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48312,7 +51544,7 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48325,16 +51557,17 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. + * Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Sorting teams LaunchDarkly supports the following fields for sorting: - `name` sorts by team name. It is not case-sensitive. - `memberCount` sorts by the number of members on the team. By default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by team name in ascending order, and `?sort=-memberCount` sorts by member count from largest to smallest. Combine fields with a comma to break ties, for example `?sort=-memberCount,name`. ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. * @summary List teams * @param {number} [limit] The number of teams to return in the response. Defaults to 20. * @param {number} [offset] 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. * @param {string} [filter] A comma-separated list of filters. Each filter is constructed as `field:value`. + * @param {string} [sort] A comma-separated list of fields to sort by. Fields are sorted in ascending order by default. Prefix a field with `-` to sort in descending order. Supported fields: `name`, `memberCount`. * @param {string} [expand] A comma-separated list of properties that can reveal additional information in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTeams: async (limit?: number, offset?: number, filter?: string, expand?: string, options: RawAxiosRequestConfig = {}): Promise => { + getTeams: async (limit?: number, offset?: number, filter?: string, sort?: string, expand?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v2/teams`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -48362,6 +51595,10 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['filter'] = filter; } + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } + if (expand !== undefined) { localVarQueryParameter['expand'] = expand; } @@ -48372,7 +51609,7 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48425,7 +51662,7 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48475,7 +51712,7 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48527,7 +51764,7 @@ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -48607,17 +51844,18 @@ export const TeamsApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. + * Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Sorting teams LaunchDarkly supports the following fields for sorting: - `name` sorts by team name. It is not case-sensitive. - `memberCount` sorts by the number of members on the team. By default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by team name in ascending order, and `?sort=-memberCount` sorts by member count from largest to smallest. Combine fields with a comma to break ties, for example `?sort=-memberCount,name`. ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. * @summary List teams * @param {number} [limit] The number of teams to return in the response. Defaults to 20. * @param {number} [offset] 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. * @param {string} [filter] A comma-separated list of filters. Each filter is constructed as `field:value`. + * @param {string} [sort] A comma-separated list of fields to sort by. Fields are sorted in ascending order by default. Prefix a field with `-` to sort in descending order. Supported fields: `name`, `memberCount`. * @param {string} [expand] A comma-separated list of properties that can reveal additional information in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTeams(limit?: number, offset?: number, filter?: string, expand?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTeams(limit, offset, filter, expand, options); + async getTeams(limit?: number, offset?: number, filter?: string, sort?: string, expand?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeams(limit, offset, filter, sort, expand, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['TeamsApi.getTeams']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -48720,17 +51958,18 @@ export const TeamsApiFactory = function (configuration?: Configuration, basePath return localVarFp.getTeamRoles(teamKey, limit, offset, options).then((request) => request(axios, basePath)); }, /** - * Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. + * Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Sorting teams LaunchDarkly supports the following fields for sorting: - `name` sorts by team name. It is not case-sensitive. - `memberCount` sorts by the number of members on the team. By default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by team name in ascending order, and `?sort=-memberCount` sorts by member count from largest to smallest. Combine fields with a comma to break ties, for example `?sort=-memberCount,name`. ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. * @summary List teams * @param {number} [limit] The number of teams to return in the response. Defaults to 20. * @param {number} [offset] 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. * @param {string} [filter] A comma-separated list of filters. Each filter is constructed as `field:value`. + * @param {string} [sort] A comma-separated list of fields to sort by. Fields are sorted in ascending order by default. Prefix a field with `-` to sort in descending order. Supported fields: `name`, `memberCount`. * @param {string} [expand] A comma-separated list of properties that can reveal additional information in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTeams(limit?: number, offset?: number, filter?: string, expand?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTeams(limit, offset, filter, expand, options).then((request) => request(axios, basePath)); + getTeams(limit?: number, offset?: number, filter?: string, sort?: string, expand?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTeams(limit, offset, filter, sort, expand, options).then((request) => request(axios, basePath)); }, /** * Perform a partial update to a team. Updating a team uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic 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.
Click to expand instructions for updating teams #### addCustomRoles Adds custom roles to the team. Team members will have these custom roles granted to them. ##### Parameters - `values`: List of custom role keys. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"addCustomRoles\", \"values\": [ \"example-custom-role\" ] }] } ``` #### addMembers Adds members to the team. ##### Parameters - `values`: List of member IDs to add. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"addMembers\", \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ] }] } ``` #### addPermissionGrants Adds permission grants to members for the team. For example, a permission grant could allow a member to act as a team maintainer. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The members do not have to be team members to have a permission grant for the team. ##### Parameters - `actionSet`: Name of the action set. - `actions`: List of actions. - `memberIDs`: List of member IDs. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"addPermissionGrants\", \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ], \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ] }] } ``` #### addRoleAttribute Adds a role attribute to a team. Team members will have these role attribute values scoped for all custom roles granted to them. ##### Parameters - `key`: The role attribute key to add. - `values`: List of role attribute values for that key. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"addRoleAttribute\", \"key\": \"testAttribute\", \"values\": [\"someNewValue\", \"someOtherNewValue\"] } ] } ``` #### removeCustomRoles Removes custom roles from the team. The app will no longer grant these custom roles to the team members. ##### Parameters - `values`: List of custom role keys. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"removeCustomRoles\", \"values\": [ \"example-custom-role\" ] }] } ``` #### removeMembers Removes members from the team. ##### Parameters - `values`: List of member IDs to remove. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"removeMembers\", \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ] }] } ``` #### removePermissionGrants Removes permission grants from members for the team. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The `actionSet` and `actions` must match an existing permission grant. ##### Parameters - `actionSet`: Name of the action set. - `actions`: List of actions. - `memberIDs`: List of member IDs. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"removePermissionGrants\", \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ], \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ] }] } ``` #### removeRoleAttribute Removes a role attribute from the team. ##### Parameters - `key`: The role attribute key to remove. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"removeRoleAttribute\", \"key\": \"testAttribute\" } ] } ``` #### replaceMembers Replaces the existing members of the team with the new members. ##### Parameters - `values`: List of member IDs of the new members. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"replaceMembers\", \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ] }] } ``` #### replaceRoleAttributes Replaces the existing role attributes for the team with new role attributes. ##### Parameters - `value`: A map of role attribute keys to lists of role attribute values Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"replaceRoleAttributes\", \"value\": { \"testAttribute\": [ \"someNewValue\", \"someOtherNewValue\" ], \"projectRoleAttribute\": [ \"project1\", \"project2\"] } }] } ``` #### updateDescription Updates the description of the team. ##### Parameters - `value`: The new description. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"updateDescription\", \"value\": \"Updated team description\" }] } ``` #### updateName Updates the name of the team. ##### Parameters - `value`: The new name. Here\'s an example: ```json { \"instructions\": [{ \"kind\": \"updateName\", \"value\": \"Updated team name\" }] } ``` #### updateRoleAttribute Updates 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. ##### Parameters - `key`: The role attribute key to update. - `values`: List of role attribute values for that key. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateRoleAttribute\", \"key\": \"testAttribute\", \"values\": [\"someNewValue\", \"someOtherNewValue\"] } ] } ```
### Expanding the teams response LaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,roles` includes the `members` and `roles` fields in the response. @@ -48823,17 +52062,18 @@ export class TeamsApi extends BaseAPI { } /** - * Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. + * Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Sorting teams LaunchDarkly supports the following fields for sorting: - `name` sorts by team name. It is not case-sensitive. - `memberCount` sorts by the number of members on the team. By default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by team name in ascending order, and `?sort=-memberCount` sorts by member count from largest to smallest. Combine fields with a comma to break ties, for example `?sort=-memberCount,name`. ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. * @summary List teams * @param {number} [limit] The number of teams to return in the response. Defaults to 20. * @param {number} [offset] 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. * @param {string} [filter] A comma-separated list of filters. Each filter is constructed as `field:value`. + * @param {string} [sort] A comma-separated list of fields to sort by. Fields are sorted in ascending order by default. Prefix a field with `-` to sort in descending order. Supported fields: `name`, `memberCount`. * @param {string} [expand] A comma-separated list of properties that can reveal additional information in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTeams(limit?: number, offset?: number, filter?: string, expand?: string, options?: RawAxiosRequestConfig) { - return TeamsApiFp(this.configuration).getTeams(limit, offset, filter, expand, options).then((request) => request(this.axios, this.basePath)); + public getTeams(limit?: number, offset?: number, filter?: string, sort?: string, expand?: string, options?: RawAxiosRequestConfig) { + return TeamsApiFp(this.configuration).getTeams(limit, offset, filter, sort, expand, options).then((request) => request(this.axios, this.basePath)); } /** @@ -48913,7 +52153,7 @@ export const TeamsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49034,7 +52274,7 @@ export const UserSettingsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49091,7 +52331,7 @@ export const UserSettingsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49144,7 +52384,7 @@ export const UserSettingsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49201,7 +52441,7 @@ export const UserSettingsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49263,7 +52503,7 @@ export const UserSettingsApiAxiosParamCreator = function (configuration?: Config // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49537,7 +52777,7 @@ export class UserSettingsApi extends BaseAPI { export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * > ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). + * > ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). * @summary Find users * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -49593,7 +52833,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49606,7 +52846,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * > ### Use contexts instead > > 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. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. + * > ### Use contexts instead > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get contexts](https://launchdarkly.com/docs/api/contexts/get-contexts) instead of this endpoint. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. * @summary Get user * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -49646,7 +52886,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49705,7 +52945,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -49727,7 +52967,7 @@ export const UsersApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) return { /** - * > ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). + * > ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). * @summary Find users * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -49746,7 +52986,7 @@ export const UsersApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * > ### Use contexts instead > > 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. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. + * > ### Use contexts instead > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get contexts](https://launchdarkly.com/docs/api/contexts/get-contexts) instead of this endpoint. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. * @summary Get user * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -49788,7 +53028,7 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath const localVarFp = UsersApiFp(configuration) return { /** - * > ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). + * > ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). * @summary Find users * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -49804,7 +53044,7 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath return localVarFp.getSearchUsers(projectKey, environmentKey, q, limit, searchAfter, filter, options).then((request) => request(axios, basePath)); }, /** - * > ### Use contexts instead > > 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. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. + * > ### Use contexts instead > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get contexts](https://launchdarkly.com/docs/api/contexts/get-contexts) instead of this endpoint. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. * @summary Get user * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -49838,7 +53078,7 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath */ export class UsersApi extends BaseAPI { /** - * > ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). + * > ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). * @summary Find users * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -49855,7 +53095,7 @@ export class UsersApi extends BaseAPI { } /** - * > ### Use contexts instead > > 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. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. + * > ### Use contexts instead > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get contexts](https://launchdarkly.com/docs/api/contexts/get-contexts) instead of this endpoint. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. * @summary Get user * @param {string} projectKey The project key * @param {string} environmentKey The environment key @@ -49887,22 +53127,19 @@ export class UsersApi extends BaseAPI { /** - * ViewsBetaApi - axios parameter creator + * ViewsApi - axios parameter creator */ -export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configuration) { +export const ViewsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Create a new view in the given project. * @summary Create view - * @param {CreateViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {ViewPost} viewPost View object to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createView: async (lDAPIVersion: CreateViewLDAPIVersionEnum, projectKey: string, viewPost: ViewPost, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('createView', 'lDAPIVersion', lDAPIVersion) + createView: async (projectKey: string, viewPost: ViewPost, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('createView', 'projectKey', projectKey) // verify required parameter 'viewPost' is not null or undefined @@ -49930,12 +53167,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -49949,15 +53183,12 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura /** * Delete a specific view by its key. * @summary Delete view - * @param {DeleteViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteView: async (lDAPIVersion: DeleteViewLDAPIVersionEnum, projectKey: string, viewKey: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('deleteView', 'lDAPIVersion', lDAPIVersion) + deleteView: async (projectKey: string, viewKey: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('deleteView', 'projectKey', projectKey) // verify required parameter 'viewKey' is not null or undefined @@ -49985,12 +53216,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -50003,7 +53231,6 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura /** * Get a list of all linked resources for a given view. * @summary Get linked resources - * @param {GetLinkedResourcesLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {GetLinkedResourcesResourceTypeEnum} resourceType @@ -50016,9 +53243,7 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLinkedResources: async (lDAPIVersion: GetLinkedResourcesLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: GetLinkedResourcesResourceTypeEnum, limit?: number, offset?: number, sort?: GetLinkedResourcesSortEnum, query?: string, filter?: string, expand?: Array, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('getLinkedResources', 'lDAPIVersion', lDAPIVersion) + getLinkedResources: async (projectKey: string, viewKey: string, resourceType: GetLinkedResourcesResourceTypeEnum, limit?: number, offset?: number, sort?: GetLinkedResourcesSortEnum, query?: string, filter?: string, expand?: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('getLinkedResources', 'projectKey', projectKey) // verify required parameter 'viewKey' is not null or undefined @@ -50073,12 +53298,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -50091,7 +53313,6 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura /** * Get a list of all linked views for a resource. Flags and AI configs are identified by key. Segments are identified by segment ID. * @summary Get linked views for a given resource - * @param {GetLinkedViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {GetLinkedViewsResourceTypeEnum} resourceType * @param {string} resourceKey @@ -50101,9 +53322,7 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLinkedViews: async (lDAPIVersion: GetLinkedViewsLDAPIVersionEnum, projectKey: string, resourceType: GetLinkedViewsResourceTypeEnum, resourceKey: string, environmentId?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('getLinkedViews', 'lDAPIVersion', lDAPIVersion) + getLinkedViews: async (projectKey: string, resourceType: GetLinkedViewsResourceTypeEnum, resourceKey: string, environmentId?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('getLinkedViews', 'projectKey', projectKey) // verify required parameter 'resourceType' is not null or undefined @@ -50146,12 +53365,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -50164,7 +53380,6 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura /** * Retrieve a specific view by its key. * @summary Get view - * @param {GetViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {GetViewSortEnum} [sort] A sort to apply to the list of views. @@ -50175,9 +53390,7 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getView: async (lDAPIVersion: GetViewLDAPIVersionEnum, projectKey: string, viewKey: string, sort?: GetViewSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('getView', 'lDAPIVersion', lDAPIVersion) + getView: async (projectKey: string, viewKey: string, sort?: GetViewSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('getView', 'projectKey', projectKey) // verify required parameter 'viewKey' is not null or undefined @@ -50225,12 +53438,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -50243,7 +53453,6 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura /** * Get a list of all views in the given project. * @summary List views - * @param {GetViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {GetViewsSortEnum} [sort] A sort to apply to the list of views. * @param {number} [limit] The number of views to return. @@ -50253,9 +53462,7 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getViews: async (lDAPIVersion: GetViewsLDAPIVersionEnum, projectKey: string, sort?: GetViewsSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('getViews', 'lDAPIVersion', lDAPIVersion) + getViews: async (projectKey: string, sort?: GetViewsSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('getViews', 'projectKey', projectKey) const localVarPath = `/api/v2/projects/{projectKey}/views` @@ -50300,12 +53507,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -50318,7 +53522,6 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura /** * Link one or multiple resources to a view by keys, filters, or both: - Link flags using flag keys or filters (maintainerId, maintainerTeamKey, tags, state, query) - Link segments using segment IDs or filters (tags, query, unbounded) - Link AI configs using config keys When both keys and filters are provided, resources matching either condition are linked (union). * @summary Link resource - * @param {LinkResourceLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {LinkResourceResourceTypeEnum} resourceType @@ -50326,9 +53529,7 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - linkResource: async (lDAPIVersion: LinkResourceLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: LinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('linkResource', 'lDAPIVersion', lDAPIVersion) + linkResource: async (projectKey: string, viewKey: string, resourceType: LinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('linkResource', 'projectKey', projectKey) // verify required parameter 'viewKey' is not null or undefined @@ -50362,12 +53563,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -50381,7 +53579,6 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura /** * Unlink one or multiple resources from a view: - Unlink flags using flag keys - Unlink segments using segment IDs - Unlink AI configs using config keys * @summary Unlink resource - * @param {UnlinkResourceLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {UnlinkResourceResourceTypeEnum} resourceType @@ -50389,9 +53586,7 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - unlinkResource: async (lDAPIVersion: UnlinkResourceLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: UnlinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('unlinkResource', 'lDAPIVersion', lDAPIVersion) + unlinkResource: async (projectKey: string, viewKey: string, resourceType: UnlinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('unlinkResource', 'projectKey', projectKey) // verify required parameter 'viewKey' is not null or undefined @@ -50425,12 +53620,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -50444,16 +53636,13 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura /** * Edit an existing view. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ``` * @summary Update view - * @param {UpdateViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {ViewPatch} viewPatch A JSON representation of the view including only the fields to update. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateView: async (lDAPIVersion: UpdateViewLDAPIVersionEnum, projectKey: string, viewKey: string, viewPatch: ViewPatch, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'lDAPIVersion' is not null or undefined - assertParamExists('updateView', 'lDAPIVersion', lDAPIVersion) + updateView: async (projectKey: string, viewKey: string, viewPatch: ViewPatch, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'projectKey' is not null or undefined assertParamExists('updateView', 'projectKey', projectKey) // verify required parameter 'viewKey' is not null or undefined @@ -50484,12 +53673,9 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END - if (lDAPIVersion != null) { - localVarHeaderParameter['LD-API-Version'] = String(lDAPIVersion); - } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -50504,45 +53690,42 @@ export const ViewsBetaApiAxiosParamCreator = function (configuration?: Configura }; /** - * ViewsBetaApi - functional programming interface + * ViewsApi - functional programming interface */ -export const ViewsBetaApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ViewsBetaApiAxiosParamCreator(configuration) +export const ViewsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ViewsApiAxiosParamCreator(configuration) return { /** * Create a new view in the given project. * @summary Create view - * @param {CreateViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {ViewPost} viewPost View object to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createView(lDAPIVersion: CreateViewLDAPIVersionEnum, projectKey: string, viewPost: ViewPost, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createView(lDAPIVersion, projectKey, viewPost, options); + async createView(projectKey: string, viewPost: ViewPost, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createView(projectKey, viewPost, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.createView']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.createView']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Delete a specific view by its key. * @summary Delete view - * @param {DeleteViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteView(lDAPIVersion: DeleteViewLDAPIVersionEnum, projectKey: string, viewKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteView(lDAPIVersion, projectKey, viewKey, options); + async deleteView(projectKey: string, viewKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteView(projectKey, viewKey, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.deleteView']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.deleteView']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Get a list of all linked resources for a given view. * @summary Get linked resources - * @param {GetLinkedResourcesLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {GetLinkedResourcesResourceTypeEnum} resourceType @@ -50555,16 +53738,15 @@ export const ViewsBetaApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getLinkedResources(lDAPIVersion: GetLinkedResourcesLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: GetLinkedResourcesResourceTypeEnum, limit?: number, offset?: number, sort?: GetLinkedResourcesSortEnum, query?: string, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLinkedResources(lDAPIVersion, projectKey, viewKey, resourceType, limit, offset, sort, query, filter, expand, options); + async getLinkedResources(projectKey: string, viewKey: string, resourceType: GetLinkedResourcesResourceTypeEnum, limit?: number, offset?: number, sort?: GetLinkedResourcesSortEnum, query?: string, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLinkedResources(projectKey, viewKey, resourceType, limit, offset, sort, query, filter, expand, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.getLinkedResources']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.getLinkedResources']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Get a list of all linked views for a resource. Flags and AI configs are identified by key. Segments are identified by segment ID. * @summary Get linked views for a given resource - * @param {GetLinkedViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {GetLinkedViewsResourceTypeEnum} resourceType * @param {string} resourceKey @@ -50574,16 +53756,15 @@ export const ViewsBetaApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getLinkedViews(lDAPIVersion: GetLinkedViewsLDAPIVersionEnum, projectKey: string, resourceType: GetLinkedViewsResourceTypeEnum, resourceKey: string, environmentId?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLinkedViews(lDAPIVersion, projectKey, resourceType, resourceKey, environmentId, limit, offset, options); + async getLinkedViews(projectKey: string, resourceType: GetLinkedViewsResourceTypeEnum, resourceKey: string, environmentId?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLinkedViews(projectKey, resourceType, resourceKey, environmentId, limit, offset, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.getLinkedViews']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.getLinkedViews']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Retrieve a specific view by its key. * @summary Get view - * @param {GetViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {GetViewSortEnum} [sort] A sort to apply to the list of views. @@ -50594,16 +53775,15 @@ export const ViewsBetaApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getView(lDAPIVersion: GetViewLDAPIVersionEnum, projectKey: string, viewKey: string, sort?: GetViewSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getView(lDAPIVersion, projectKey, viewKey, sort, limit, offset, filter, expand, options); + async getView(projectKey: string, viewKey: string, sort?: GetViewSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getView(projectKey, viewKey, sort, limit, offset, filter, expand, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.getView']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.getView']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Get a list of all views in the given project. * @summary List views - * @param {GetViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {GetViewsSortEnum} [sort] A sort to apply to the list of views. * @param {number} [limit] The number of views to return. @@ -50613,16 +53793,15 @@ export const ViewsBetaApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getViews(lDAPIVersion: GetViewsLDAPIVersionEnum, projectKey: string, sort?: GetViewsSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getViews(lDAPIVersion, projectKey, sort, limit, offset, filter, expand, options); + async getViews(projectKey: string, sort?: GetViewsSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getViews(projectKey, sort, limit, offset, filter, expand, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.getViews']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.getViews']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Link one or multiple resources to a view by keys, filters, or both: - Link flags using flag keys or filters (maintainerId, maintainerTeamKey, tags, state, query) - Link segments using segment IDs or filters (tags, query, unbounded) - Link AI configs using config keys When both keys and filters are provided, resources matching either condition are linked (union). * @summary Link resource - * @param {LinkResourceLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {LinkResourceResourceTypeEnum} resourceType @@ -50630,16 +53809,15 @@ export const ViewsBetaApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async linkResource(lDAPIVersion: LinkResourceLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: LinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.linkResource(lDAPIVersion, projectKey, viewKey, resourceType, viewLinkRequest, options); + async linkResource(projectKey: string, viewKey: string, resourceType: LinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.linkResource(projectKey, viewKey, resourceType, viewLinkRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.linkResource']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.linkResource']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Unlink one or multiple resources from a view: - Unlink flags using flag keys - Unlink segments using segment IDs - Unlink AI configs using config keys * @summary Unlink resource - * @param {UnlinkResourceLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {UnlinkResourceResourceTypeEnum} resourceType @@ -50647,65 +53825,61 @@ export const ViewsBetaApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async unlinkResource(lDAPIVersion: UnlinkResourceLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: UnlinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.unlinkResource(lDAPIVersion, projectKey, viewKey, resourceType, viewLinkRequest, options); + async unlinkResource(projectKey: string, viewKey: string, resourceType: UnlinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.unlinkResource(projectKey, viewKey, resourceType, viewLinkRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.unlinkResource']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.unlinkResource']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Edit an existing view. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ``` * @summary Update view - * @param {UpdateViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {ViewPatch} viewPatch A JSON representation of the view including only the fields to update. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateView(lDAPIVersion: UpdateViewLDAPIVersionEnum, projectKey: string, viewKey: string, viewPatch: ViewPatch, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateView(lDAPIVersion, projectKey, viewKey, viewPatch, options); + async updateView(projectKey: string, viewKey: string, viewPatch: ViewPatch, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateView(projectKey, viewKey, viewPatch, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ViewsBetaApi.updateView']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ViewsApi.updateView']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * ViewsBetaApi - factory interface + * ViewsApi - factory interface */ -export const ViewsBetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ViewsBetaApiFp(configuration) +export const ViewsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ViewsApiFp(configuration) return { /** * Create a new view in the given project. * @summary Create view - * @param {CreateViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {ViewPost} viewPost View object to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createView(lDAPIVersion: CreateViewLDAPIVersionEnum, projectKey: string, viewPost: ViewPost, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.createView(lDAPIVersion, projectKey, viewPost, options).then((request) => request(axios, basePath)); + createView(projectKey: string, viewPost: ViewPost, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createView(projectKey, viewPost, options).then((request) => request(axios, basePath)); }, /** * Delete a specific view by its key. * @summary Delete view - * @param {DeleteViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteView(lDAPIVersion: DeleteViewLDAPIVersionEnum, projectKey: string, viewKey: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteView(lDAPIVersion, projectKey, viewKey, options).then((request) => request(axios, basePath)); + deleteView(projectKey: string, viewKey: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteView(projectKey, viewKey, options).then((request) => request(axios, basePath)); }, /** * Get a list of all linked resources for a given view. * @summary Get linked resources - * @param {GetLinkedResourcesLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {GetLinkedResourcesResourceTypeEnum} resourceType @@ -50718,13 +53892,12 @@ export const ViewsBetaApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLinkedResources(lDAPIVersion: GetLinkedResourcesLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: GetLinkedResourcesResourceTypeEnum, limit?: number, offset?: number, sort?: GetLinkedResourcesSortEnum, query?: string, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLinkedResources(lDAPIVersion, projectKey, viewKey, resourceType, limit, offset, sort, query, filter, expand, options).then((request) => request(axios, basePath)); + getLinkedResources(projectKey: string, viewKey: string, resourceType: GetLinkedResourcesResourceTypeEnum, limit?: number, offset?: number, sort?: GetLinkedResourcesSortEnum, query?: string, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLinkedResources(projectKey, viewKey, resourceType, limit, offset, sort, query, filter, expand, options).then((request) => request(axios, basePath)); }, /** * Get a list of all linked views for a resource. Flags and AI configs are identified by key. Segments are identified by segment ID. * @summary Get linked views for a given resource - * @param {GetLinkedViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {GetLinkedViewsResourceTypeEnum} resourceType * @param {string} resourceKey @@ -50734,13 +53907,12 @@ export const ViewsBetaApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLinkedViews(lDAPIVersion: GetLinkedViewsLDAPIVersionEnum, projectKey: string, resourceType: GetLinkedViewsResourceTypeEnum, resourceKey: string, environmentId?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLinkedViews(lDAPIVersion, projectKey, resourceType, resourceKey, environmentId, limit, offset, options).then((request) => request(axios, basePath)); + getLinkedViews(projectKey: string, resourceType: GetLinkedViewsResourceTypeEnum, resourceKey: string, environmentId?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLinkedViews(projectKey, resourceType, resourceKey, environmentId, limit, offset, options).then((request) => request(axios, basePath)); }, /** * Retrieve a specific view by its key. * @summary Get view - * @param {GetViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {GetViewSortEnum} [sort] A sort to apply to the list of views. @@ -50751,13 +53923,12 @@ export const ViewsBetaApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getView(lDAPIVersion: GetViewLDAPIVersionEnum, projectKey: string, viewKey: string, sort?: GetViewSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getView(lDAPIVersion, projectKey, viewKey, sort, limit, offset, filter, expand, options).then((request) => request(axios, basePath)); + getView(projectKey: string, viewKey: string, sort?: GetViewSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getView(projectKey, viewKey, sort, limit, offset, filter, expand, options).then((request) => request(axios, basePath)); }, /** * Get a list of all views in the given project. * @summary List views - * @param {GetViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {GetViewsSortEnum} [sort] A sort to apply to the list of views. * @param {number} [limit] The number of views to return. @@ -50767,13 +53938,12 @@ export const ViewsBetaApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getViews(lDAPIVersion: GetViewsLDAPIVersionEnum, projectKey: string, sort?: GetViewsSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getViews(lDAPIVersion, projectKey, sort, limit, offset, filter, expand, options).then((request) => request(axios, basePath)); + getViews(projectKey: string, sort?: GetViewsSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getViews(projectKey, sort, limit, offset, filter, expand, options).then((request) => request(axios, basePath)); }, /** * Link one or multiple resources to a view by keys, filters, or both: - Link flags using flag keys or filters (maintainerId, maintainerTeamKey, tags, state, query) - Link segments using segment IDs or filters (tags, query, unbounded) - Link AI configs using config keys When both keys and filters are provided, resources matching either condition are linked (union). * @summary Link resource - * @param {LinkResourceLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {LinkResourceResourceTypeEnum} resourceType @@ -50781,13 +53951,12 @@ export const ViewsBetaApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - linkResource(lDAPIVersion: LinkResourceLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: LinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.linkResource(lDAPIVersion, projectKey, viewKey, resourceType, viewLinkRequest, options).then((request) => request(axios, basePath)); + linkResource(projectKey: string, viewKey: string, resourceType: LinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.linkResource(projectKey, viewKey, resourceType, viewLinkRequest, options).then((request) => request(axios, basePath)); }, /** * Unlink one or multiple resources from a view: - Unlink flags using flag keys - Unlink segments using segment IDs - Unlink AI configs using config keys * @summary Unlink resource - * @param {UnlinkResourceLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {UnlinkResourceResourceTypeEnum} resourceType @@ -50795,59 +53964,55 @@ export const ViewsBetaApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - unlinkResource(lDAPIVersion: UnlinkResourceLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: UnlinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.unlinkResource(lDAPIVersion, projectKey, viewKey, resourceType, viewLinkRequest, options).then((request) => request(axios, basePath)); + unlinkResource(projectKey: string, viewKey: string, resourceType: UnlinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.unlinkResource(projectKey, viewKey, resourceType, viewLinkRequest, options).then((request) => request(axios, basePath)); }, /** * Edit an existing view. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ``` * @summary Update view - * @param {UpdateViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {ViewPatch} viewPatch A JSON representation of the view including only the fields to update. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateView(lDAPIVersion: UpdateViewLDAPIVersionEnum, projectKey: string, viewKey: string, viewPatch: ViewPatch, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateView(lDAPIVersion, projectKey, viewKey, viewPatch, options).then((request) => request(axios, basePath)); + updateView(projectKey: string, viewKey: string, viewPatch: ViewPatch, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateView(projectKey, viewKey, viewPatch, options).then((request) => request(axios, basePath)); }, }; }; /** - * ViewsBetaApi - object-oriented interface + * ViewsApi - object-oriented interface */ -export class ViewsBetaApi extends BaseAPI { +export class ViewsApi extends BaseAPI { /** * Create a new view in the given project. * @summary Create view - * @param {CreateViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {ViewPost} viewPost View object to create * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public createView(lDAPIVersion: CreateViewLDAPIVersionEnum, projectKey: string, viewPost: ViewPost, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).createView(lDAPIVersion, projectKey, viewPost, options).then((request) => request(this.axios, this.basePath)); + public createView(projectKey: string, viewPost: ViewPost, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).createView(projectKey, viewPost, options).then((request) => request(this.axios, this.basePath)); } /** * Delete a specific view by its key. * @summary Delete view - * @param {DeleteViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public deleteView(lDAPIVersion: DeleteViewLDAPIVersionEnum, projectKey: string, viewKey: string, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).deleteView(lDAPIVersion, projectKey, viewKey, options).then((request) => request(this.axios, this.basePath)); + public deleteView(projectKey: string, viewKey: string, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).deleteView(projectKey, viewKey, options).then((request) => request(this.axios, this.basePath)); } /** * Get a list of all linked resources for a given view. * @summary Get linked resources - * @param {GetLinkedResourcesLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {GetLinkedResourcesResourceTypeEnum} resourceType @@ -50860,14 +54025,13 @@ export class ViewsBetaApi extends BaseAPI { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLinkedResources(lDAPIVersion: GetLinkedResourcesLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: GetLinkedResourcesResourceTypeEnum, limit?: number, offset?: number, sort?: GetLinkedResourcesSortEnum, query?: string, filter?: string, expand?: Array, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).getLinkedResources(lDAPIVersion, projectKey, viewKey, resourceType, limit, offset, sort, query, filter, expand, options).then((request) => request(this.axios, this.basePath)); + public getLinkedResources(projectKey: string, viewKey: string, resourceType: GetLinkedResourcesResourceTypeEnum, limit?: number, offset?: number, sort?: GetLinkedResourcesSortEnum, query?: string, filter?: string, expand?: Array, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).getLinkedResources(projectKey, viewKey, resourceType, limit, offset, sort, query, filter, expand, options).then((request) => request(this.axios, this.basePath)); } /** * Get a list of all linked views for a resource. Flags and AI configs are identified by key. Segments are identified by segment ID. * @summary Get linked views for a given resource - * @param {GetLinkedViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {GetLinkedViewsResourceTypeEnum} resourceType * @param {string} resourceKey @@ -50877,14 +54041,13 @@ export class ViewsBetaApi extends BaseAPI { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLinkedViews(lDAPIVersion: GetLinkedViewsLDAPIVersionEnum, projectKey: string, resourceType: GetLinkedViewsResourceTypeEnum, resourceKey: string, environmentId?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).getLinkedViews(lDAPIVersion, projectKey, resourceType, resourceKey, environmentId, limit, offset, options).then((request) => request(this.axios, this.basePath)); + public getLinkedViews(projectKey: string, resourceType: GetLinkedViewsResourceTypeEnum, resourceKey: string, environmentId?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).getLinkedViews(projectKey, resourceType, resourceKey, environmentId, limit, offset, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieve a specific view by its key. * @summary Get view - * @param {GetViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {GetViewSortEnum} [sort] A sort to apply to the list of views. @@ -50895,14 +54058,13 @@ export class ViewsBetaApi extends BaseAPI { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getView(lDAPIVersion: GetViewLDAPIVersionEnum, projectKey: string, viewKey: string, sort?: GetViewSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).getView(lDAPIVersion, projectKey, viewKey, sort, limit, offset, filter, expand, options).then((request) => request(this.axios, this.basePath)); + public getView(projectKey: string, viewKey: string, sort?: GetViewSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).getView(projectKey, viewKey, sort, limit, offset, filter, expand, options).then((request) => request(this.axios, this.basePath)); } /** * Get a list of all views in the given project. * @summary List views - * @param {GetViewsLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {GetViewsSortEnum} [sort] A sort to apply to the list of views. * @param {number} [limit] The number of views to return. @@ -50912,14 +54074,13 @@ export class ViewsBetaApi extends BaseAPI { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getViews(lDAPIVersion: GetViewsLDAPIVersionEnum, projectKey: string, sort?: GetViewsSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).getViews(lDAPIVersion, projectKey, sort, limit, offset, filter, expand, options).then((request) => request(this.axios, this.basePath)); + public getViews(projectKey: string, sort?: GetViewsSortEnum, limit?: number, offset?: number, filter?: string, expand?: Array, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).getViews(projectKey, sort, limit, offset, filter, expand, options).then((request) => request(this.axios, this.basePath)); } /** * Link one or multiple resources to a view by keys, filters, or both: - Link flags using flag keys or filters (maintainerId, maintainerTeamKey, tags, state, query) - Link segments using segment IDs or filters (tags, query, unbounded) - Link AI configs using config keys When both keys and filters are provided, resources matching either condition are linked (union). * @summary Link resource - * @param {LinkResourceLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {LinkResourceResourceTypeEnum} resourceType @@ -50927,14 +54088,13 @@ export class ViewsBetaApi extends BaseAPI { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public linkResource(lDAPIVersion: LinkResourceLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: LinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).linkResource(lDAPIVersion, projectKey, viewKey, resourceType, viewLinkRequest, options).then((request) => request(this.axios, this.basePath)); + public linkResource(projectKey: string, viewKey: string, resourceType: LinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).linkResource(projectKey, viewKey, resourceType, viewLinkRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Unlink one or multiple resources from a view: - Unlink flags using flag keys - Unlink segments using segment IDs - Unlink AI configs using config keys * @summary Unlink resource - * @param {UnlinkResourceLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {UnlinkResourceResourceTypeEnum} resourceType @@ -50942,37 +54102,24 @@ export class ViewsBetaApi extends BaseAPI { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public unlinkResource(lDAPIVersion: UnlinkResourceLDAPIVersionEnum, projectKey: string, viewKey: string, resourceType: UnlinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).unlinkResource(lDAPIVersion, projectKey, viewKey, resourceType, viewLinkRequest, options).then((request) => request(this.axios, this.basePath)); + public unlinkResource(projectKey: string, viewKey: string, resourceType: UnlinkResourceResourceTypeEnum, viewLinkRequest: ViewLinkRequest, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).unlinkResource(projectKey, viewKey, resourceType, viewLinkRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Edit an existing view. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ``` * @summary Update view - * @param {UpdateViewLDAPIVersionEnum} lDAPIVersion Version of the endpoint. * @param {string} projectKey * @param {string} viewKey * @param {ViewPatch} viewPatch A JSON representation of the view including only the fields to update. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public updateView(lDAPIVersion: UpdateViewLDAPIVersionEnum, projectKey: string, viewKey: string, viewPatch: ViewPatch, options?: RawAxiosRequestConfig) { - return ViewsBetaApiFp(this.configuration).updateView(lDAPIVersion, projectKey, viewKey, viewPatch, options).then((request) => request(this.axios, this.basePath)); + public updateView(projectKey: string, viewKey: string, viewPatch: ViewPatch, options?: RawAxiosRequestConfig) { + return ViewsApiFp(this.configuration).updateView(projectKey, viewKey, viewPatch, options).then((request) => request(this.axios, this.basePath)); } } -export const CreateViewLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type CreateViewLDAPIVersionEnum = typeof CreateViewLDAPIVersionEnum[keyof typeof CreateViewLDAPIVersionEnum]; -export const DeleteViewLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type DeleteViewLDAPIVersionEnum = typeof DeleteViewLDAPIVersionEnum[keyof typeof DeleteViewLDAPIVersionEnum]; -export const GetLinkedResourcesLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type GetLinkedResourcesLDAPIVersionEnum = typeof GetLinkedResourcesLDAPIVersionEnum[keyof typeof GetLinkedResourcesLDAPIVersionEnum]; export const GetLinkedResourcesResourceTypeEnum = { Flags: 'flags', Segments: 'segments', @@ -50989,20 +54136,12 @@ export const GetLinkedResourcesExpandEnum = { ResourceDetails: 'resourceDetails' } as const; export type GetLinkedResourcesExpandEnum = typeof GetLinkedResourcesExpandEnum[keyof typeof GetLinkedResourcesExpandEnum]; -export const GetLinkedViewsLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type GetLinkedViewsLDAPIVersionEnum = typeof GetLinkedViewsLDAPIVersionEnum[keyof typeof GetLinkedViewsLDAPIVersionEnum]; export const GetLinkedViewsResourceTypeEnum = { Flags: 'flags', Segments: 'segments', AiConfigs: 'aiConfigs' } as const; export type GetLinkedViewsResourceTypeEnum = typeof GetLinkedViewsResourceTypeEnum[keyof typeof GetLinkedViewsResourceTypeEnum]; -export const GetViewLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type GetViewLDAPIVersionEnum = typeof GetViewLDAPIVersionEnum[keyof typeof GetViewLDAPIVersionEnum]; export const GetViewSortEnum = { Key: 'key', Name: 'name', @@ -51023,10 +54162,6 @@ export const GetViewExpandEnum = { ResourceSummary: 'resourceSummary' } as const; export type GetViewExpandEnum = typeof GetViewExpandEnum[keyof typeof GetViewExpandEnum]; -export const GetViewsLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type GetViewsLDAPIVersionEnum = typeof GetViewsLDAPIVersionEnum[keyof typeof GetViewsLDAPIVersionEnum]; export const GetViewsSortEnum = { Key: 'key', Name: 'name', @@ -51041,30 +54176,18 @@ export const GetViewsExpandEnum = { ResourceSummary: 'resourceSummary' } as const; export type GetViewsExpandEnum = typeof GetViewsExpandEnum[keyof typeof GetViewsExpandEnum]; -export const LinkResourceLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type LinkResourceLDAPIVersionEnum = typeof LinkResourceLDAPIVersionEnum[keyof typeof LinkResourceLDAPIVersionEnum]; export const LinkResourceResourceTypeEnum = { Flags: 'flags', Segments: 'segments', AiConfigs: 'aiConfigs' } as const; export type LinkResourceResourceTypeEnum = typeof LinkResourceResourceTypeEnum[keyof typeof LinkResourceResourceTypeEnum]; -export const UnlinkResourceLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type UnlinkResourceLDAPIVersionEnum = typeof UnlinkResourceLDAPIVersionEnum[keyof typeof UnlinkResourceLDAPIVersionEnum]; export const UnlinkResourceResourceTypeEnum = { Flags: 'flags', Segments: 'segments', AiConfigs: 'aiConfigs' } as const; export type UnlinkResourceResourceTypeEnum = typeof UnlinkResourceResourceTypeEnum[keyof typeof UnlinkResourceResourceTypeEnum]; -export const UpdateViewLDAPIVersionEnum = { - Beta: 'beta' -} as const; -export type UpdateViewLDAPIVersionEnum = typeof UpdateViewLDAPIVersionEnum[keyof typeof UpdateViewLDAPIVersionEnum]; /** @@ -51104,7 +54227,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51144,7 +54267,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51188,7 +54311,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51236,7 +54359,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51281,7 +54404,7 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51529,7 +54652,7 @@ export const WorkflowTemplatesApiAxiosParamCreator = function (configuration?: C // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51574,7 +54697,7 @@ export const WorkflowTemplatesApiAxiosParamCreator = function (configuration?: C // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51624,7 +54747,7 @@ export const WorkflowTemplatesApiAxiosParamCreator = function (configuration?: C // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51818,7 +54941,7 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51874,7 +54997,7 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -51946,7 +55069,7 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -52012,7 +55135,7 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura // Set default API version. localVarHeaderParameter['LD-API-Version'] = '20240415'; // Set a custom LaunchDarkly user agent header. - localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/24.0.0/typescript'; + localVarHeaderParameter['X-LaunchDarkly-User-Agent'] = 'OpenAPI-Generator/25.0.0/typescript'; // CUSTOM-END setSearchParams(localVarUrlObj, localVarQueryParameter); diff --git a/base.ts b/base.ts index 273ccd9..fd2bc2c 100644 --- a/base.ts +++ b/base.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * LaunchDarkly REST API - * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). + * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. Unless an endpoint\'s documentation says otherwise, the API ignores request body fields that are not part of that endpoint\'s request schema, and does not return an error for them. A successful response does not mean that every field you sent was applied. To confirm the result, check the response body. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). * * The version of the OpenAPI document: 2.0 * Contact: support@launchdarkly.com diff --git a/common.ts b/common.ts index 5a9ab01..4f3ea67 100644 --- a/common.ts +++ b/common.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * LaunchDarkly REST API - * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). + * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. Unless an endpoint\'s documentation says otherwise, the API ignores request body fields that are not part of that endpoint\'s request schema, and does not return an error for them. A successful response does not mean that every field you sent was applied. To confirm the result, check the response body. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). * * The version of the OpenAPI document: 2.0 * Contact: support@launchdarkly.com diff --git a/configuration.ts b/configuration.ts index 32ac12c..690df2d 100644 --- a/configuration.ts +++ b/configuration.ts @@ -1,7 +1,7 @@ /* tslint:disable */ /** * LaunchDarkly REST API - * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). + * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. Unless an endpoint\'s documentation says otherwise, the API ignores request body fields that are not part of that endpoint\'s request schema, and does not return an error for them. A successful response does not mean that every field you sent was applied. To confirm the result, check the response body. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). * * The version of the OpenAPI document: 2.0 * Contact: support@launchdarkly.com diff --git a/docs/AIConfig.md b/docs/AIConfig.md index a34a378..07a3574 100644 --- a/docs/AIConfig.md +++ b/docs/AIConfig.md @@ -7,14 +7,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_access** | [**AiConfigsAccess**](AiConfigsAccess.md) | | [optional] [default to undefined] **_links** | [**ParentAndSelfLinks**](ParentAndSelfLinks.md) | | [optional] [default to undefined] -**description** | **string** | | [default to undefined] -**key** | **string** | | [default to undefined] +**_site** | [**CoreLink**](CoreLink.md) | | [optional] [default to undefined] +**description** | **string** | A description of the AI Config | [default to undefined] +**key** | **string** | The AI Config key | [default to undefined] **_maintainer** | [**AIConfigMaintainer**](AIConfigMaintainer.md) | | [optional] [default to undefined] -**mode** | **string** | | [optional] [default to ModeEnum_Completion] -**name** | **string** | | [default to undefined] -**tags** | **Array<string>** | | [default to undefined] -**version** | **number** | | [default to undefined] -**variations** | [**Array<AIConfigVariation>**](AIConfigVariation.md) | | [default to undefined] +**mode** | **string** | The AI Config mode | [optional] [default to ModeEnum_Completion] +**name** | **string** | The AI Config name | [default to undefined] +**tags** | **Array<string>** | Tags for this resource | [default to undefined] +**version** | **number** | The version number of this resource | [default to undefined] +**variations** | [**Array<AIConfigVariation>**](AIConfigVariation.md) | The variations of this AI Config | [default to undefined] **createdAt** | **number** | | [default to undefined] **updatedAt** | **number** | | [default to undefined] **evaluationMetricKey** | **string** | Evaluation metric key for this config | [optional] [default to undefined] @@ -30,6 +31,7 @@ import { AIConfig } from 'launchdarkly-api-typescript'; const instance: AIConfig = { _access, _links, + _site, description, key, _maintainer, diff --git a/docs/AIConfigMaintainer.md b/docs/AIConfigMaintainer.md index 17bd74a..4e89d68 100644 --- a/docs/AIConfigMaintainer.md +++ b/docs/AIConfigMaintainer.md @@ -1,18 +1,19 @@ # AIConfigMaintainer +The member or team that maintains this resource ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **kind** | **string** | | [default to undefined] -**_id** | **string** | | [default to undefined] -**email** | **string** | | [default to undefined] -**firstName** | **string** | | [optional] [default to undefined] -**lastName** | **string** | | [optional] [default to undefined] -**role** | **string** | | [default to undefined] -**key** | **string** | | [default to undefined] -**name** | **string** | | [default to undefined] +**_id** | **string** | The member ID | [default to undefined] +**email** | **string** | The member email address | [default to undefined] +**firstName** | **string** | The member first name | [optional] [default to undefined] +**lastName** | **string** | The member last name | [optional] [default to undefined] +**role** | **string** | The member role | [default to undefined] +**key** | **string** | The team key | [default to undefined] +**name** | **string** | The team name | [default to undefined] ## Example diff --git a/docs/AIConfigPatch.md b/docs/AIConfigPatch.md index 878920a..5fe71a4 100644 --- a/docs/AIConfigPatch.md +++ b/docs/AIConfigPatch.md @@ -5,11 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **string** | | [optional] [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] -**name** | **string** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] +**defaultVariationKey** | **string** | Key of the variation this config serves by default | [optional] [default to undefined] +**description** | **string** | A description of the AI Config | [optional] [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this resource | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains this resource | [optional] [default to undefined] +**name** | **string** | A human-readable name for the AI Config | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for this resource | [optional] [default to undefined] **evaluationMetricKey** | **string** | Evaluation metric key for this config | [optional] [default to undefined] **isInverted** | **boolean** | Whether the evaluation metric is inverted, meaning a lower value is better if set as true | [optional] [default to undefined] @@ -19,6 +20,7 @@ Name | Type | Description | Notes import { AIConfigPatch } from 'launchdarkly-api-typescript'; const instance: AIConfigPatch = { + defaultVariationKey, description, maintainerId, maintainerTeamKey, diff --git a/docs/AIConfigPost.md b/docs/AIConfigPost.md index c33e5b5..e9631a9 100644 --- a/docs/AIConfigPost.md +++ b/docs/AIConfigPost.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **string** | | [optional] [default to ''] -**key** | **string** | | [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] -**mode** | **string** | | [optional] [default to ModeEnum_Completion] -**name** | **string** | | [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] -**viewKeys** | **Array<string>** | | [optional] [default to undefined] +**description** | **string** | A description of the AI Config | [optional] [default to ''] +**key** | **string** | A unique key for the AI Config | [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this resource | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains this resource | [optional] [default to undefined] +**mode** | **string** | The AI Config mode | [optional] [default to ModeEnum_Completion] +**name** | **string** | A human-readable name for the AI Config | [default to undefined] +**tags** | **Array<string>** | Tags for this resource | [optional] [default to undefined] +**viewKeys** | **Array<string>** | Keys of the views to add the AI Config to | [optional] [default to undefined] **defaultVariation** | [**AIConfigVariationPost**](AIConfigVariationPost.md) | | [optional] [default to undefined] **evaluationMetricKey** | **string** | Evaluation metric key for this config | [optional] [default to undefined] **isInverted** | **boolean** | Whether the evaluation metric is inverted, meaning a lower value is better if set as true | [optional] [default to undefined] diff --git a/docs/AIConfigTargeting.md b/docs/AIConfigTargeting.md index e9c0726..17a5b81 100644 --- a/docs/AIConfigTargeting.md +++ b/docs/AIConfigTargeting.md @@ -7,13 +7,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **createdAt** | **number** | Unix timestamp in milliseconds | [default to undefined] **defaults** | [**AIConfigTargetingDefaults**](AIConfigTargetingDefaults.md) | | [optional] [default to undefined] -**environments** | [**{ [key: string]: AIConfigTargetingEnvironment; }**](AIConfigTargetingEnvironment.md) | | [default to undefined] +**environments** | [**{ [key: string]: AIConfigTargetingEnvironment; }**](AIConfigTargetingEnvironment.md) | Targeting for each environment, keyed by environment key | [default to undefined] **experiments** | [**AiConfigsExperimentInfoRep**](AiConfigsExperimentInfoRep.md) | | [default to undefined] -**key** | **string** | | [default to undefined] -**name** | **string** | | [default to undefined] -**tags** | **Array<string>** | | [default to undefined] -**variations** | [**Array<AIConfigTargetingVariation>**](AIConfigTargetingVariation.md) | | [default to undefined] -**_version** | **number** | | [default to undefined] +**key** | **string** | The AI Config key | [default to undefined] +**name** | **string** | The AI Config name | [default to undefined] +**tags** | **Array<string>** | Tags for this resource | [default to undefined] +**variations** | [**Array<AIConfigTargetingVariation>**](AIConfigTargetingVariation.md) | The variations of this AI Config | [default to undefined] +**_version** | **number** | The version number of this resource | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingDefaults.md b/docs/AIConfigTargetingDefaults.md index e090ca2..8e47002 100644 --- a/docs/AIConfigTargetingDefaults.md +++ b/docs/AIConfigTargetingDefaults.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**onVariation** | **number** | | [default to undefined] -**offVariation** | **number** | | [default to undefined] +**onVariation** | **number** | Index of the variation served when targeting is on | [default to undefined] +**offVariation** | **number** | Index of the variation served when targeting is off | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingEnvironment.md b/docs/AIConfigTargetingEnvironment.md index 47a1699..d3e34bf 100644 --- a/docs/AIConfigTargetingEnvironment.md +++ b/docs/AIConfigTargetingEnvironment.md @@ -5,17 +5,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contextTargets** | [**Array<AIConfigTargetingEnvironmentTarget>**](AIConfigTargetingEnvironmentTarget.md) | | [default to undefined] -**enabled** | **boolean** | | [default to undefined] +**contextTargets** | [**Array<AIConfigTargetingEnvironmentTarget>**](AIConfigTargetingEnvironmentTarget.md) | Individual context targets for non-user context kinds | [default to undefined] +**enabled** | **boolean** | Whether targeting is on in this environment | [default to undefined] **fallthrough** | [**AIConfigTargetingEnvironmentFallthrough**](AIConfigTargetingEnvironmentFallthrough.md) | | [default to undefined] **lastModified** | **number** | | [default to undefined] -**offVariation** | **number** | | [optional] [default to undefined] -**rules** | [**Array<AIConfigTargetingEnvironmentRule>**](AIConfigTargetingEnvironmentRule.md) | | [default to undefined] -**targets** | [**Array<AIConfigTargetingEnvironmentTarget>**](AIConfigTargetingEnvironmentTarget.md) | | [default to undefined] -**trackEvents** | **boolean** | | [default to undefined] -**trackEventsFallthrough** | **boolean** | | [default to undefined] -**_environmentName** | **string** | | [default to undefined] -**_version** | **number** | | [default to undefined] +**offVariation** | **number** | Index of the variation served when targeting is off | [optional] [default to undefined] +**rules** | [**Array<AIConfigTargetingEnvironmentRule>**](AIConfigTargetingEnvironmentRule.md) | The targeting rules | [default to undefined] +**targets** | [**Array<AIConfigTargetingEnvironmentTarget>**](AIConfigTargetingEnvironmentTarget.md) | Individual user targets | [default to undefined] +**trackEvents** | **boolean** | Whether to send detailed events for all evaluations | [default to undefined] +**trackEventsFallthrough** | **boolean** | Whether to send detailed events for evaluations that fall through to the default rule | [default to undefined] +**_environmentName** | **string** | The environment name | [default to undefined] +**_version** | **number** | The version of the targeting in this environment | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingEnvironmentFallthrough.md b/docs/AIConfigTargetingEnvironmentFallthrough.md index f248b71..db88b4a 100644 --- a/docs/AIConfigTargetingEnvironmentFallthrough.md +++ b/docs/AIConfigTargetingEnvironmentFallthrough.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**variation** | **number** | | [optional] [default to undefined] +**variation** | **number** | Index of the variation served by the default rule | [optional] [default to undefined] **rollout** | [**AIConfigTargetingEnvironmentFallthroughRollout**](AIConfigTargetingEnvironmentFallthroughRollout.md) | | [optional] [default to undefined] ## Example diff --git a/docs/AIConfigTargetingEnvironmentFallthroughRollout.md b/docs/AIConfigTargetingEnvironmentFallthroughRollout.md index 6b5d6ef..7cff097 100644 --- a/docs/AIConfigTargetingEnvironmentFallthroughRollout.md +++ b/docs/AIConfigTargetingEnvironmentFallthroughRollout.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bucketBy** | **string** | | [optional] [default to undefined] -**contextKind** | **string** | | [default to undefined] +**bucketBy** | **string** | The context attribute used to bucket contexts | [optional] [default to undefined] +**contextKind** | **string** | The context kind used to bucket contexts | [default to undefined] **experimentAllocation** | [**AIConfigTargetingEnvironmentFallthroughRolloutExperimentationAllocation**](AIConfigTargetingEnvironmentFallthroughRolloutExperimentationAllocation.md) | | [optional] [default to undefined] -**seed** | **number** | | [optional] [default to undefined] -**variations** | [**Array<AIConfigTargetingEnvironmentFallthroughRolloutVariation>**](AIConfigTargetingEnvironmentFallthroughRolloutVariation.md) | | [default to undefined] +**seed** | **number** | The seed used for bucketing | [optional] [default to undefined] +**variations** | [**Array<AIConfigTargetingEnvironmentFallthroughRolloutVariation>**](AIConfigTargetingEnvironmentFallthroughRolloutVariation.md) | The variations and their weights | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingEnvironmentFallthroughRolloutExperimentationAllocation.md b/docs/AIConfigTargetingEnvironmentFallthroughRolloutExperimentationAllocation.md index f571ba6..a9950e6 100644 --- a/docs/AIConfigTargetingEnvironmentFallthroughRolloutExperimentationAllocation.md +++ b/docs/AIConfigTargetingEnvironmentFallthroughRolloutExperimentationAllocation.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**canReshuffle** | **boolean** | | [default to undefined] -**defaultVariation** | **number** | | [default to undefined] -**type** | **string** | | [default to undefined] +**canReshuffle** | **boolean** | Whether contexts can be reassigned to new buckets | [default to undefined] +**defaultVariation** | **number** | Index of the default variation | [default to undefined] +**type** | **string** | The allocation type | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingEnvironmentFallthroughRolloutVariation.md b/docs/AIConfigTargetingEnvironmentFallthroughRolloutVariation.md index 4026deb..bc2c922 100644 --- a/docs/AIConfigTargetingEnvironmentFallthroughRolloutVariation.md +++ b/docs/AIConfigTargetingEnvironmentFallthroughRolloutVariation.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_untracked** | **boolean** | | [optional] [default to undefined] -**variation** | **number** | | [default to undefined] -**weight** | **number** | | [default to undefined] +**_untracked** | **boolean** | Whether this variation is excluded from experiment tracking | [optional] [default to undefined] +**variation** | **number** | Index of the variation | [default to undefined] +**weight** | **number** | The weight of this variation, in thousandths of a percent | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingEnvironmentRule.md b/docs/AIConfigTargetingEnvironmentRule.md index 0db9d75..4fee3a1 100644 --- a/docs/AIConfigTargetingEnvironmentRule.md +++ b/docs/AIConfigTargetingEnvironmentRule.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**clauses** | [**Array<AIConfigTargetingEnvironmentRuleClause>**](AIConfigTargetingEnvironmentRuleClause.md) | | [default to undefined] -**trackEvents** | **boolean** | | [default to undefined] +**clauses** | [**Array<AIConfigTargetingEnvironmentRuleClause>**](AIConfigTargetingEnvironmentRuleClause.md) | The clauses a context must match | [default to undefined] +**trackEvents** | **boolean** | Whether to send detailed events for evaluations that match this rule | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingEnvironmentRuleClause.md b/docs/AIConfigTargetingEnvironmentRuleClause.md index cc6dce1..4dad543 100644 --- a/docs/AIConfigTargetingEnvironmentRuleClause.md +++ b/docs/AIConfigTargetingEnvironmentRuleClause.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**attribute** | **string** | | [default to undefined] -**id** | **string** | | [default to undefined] -**negate** | **boolean** | | [default to undefined] -**op** | **string** | | [default to undefined] -**values** | **Array<any>** | | [default to undefined] +**attribute** | **string** | The context attribute to match | [default to undefined] +**id** | **string** | The clause ID | [default to undefined] +**negate** | **boolean** | Whether to negate the match | [default to undefined] +**op** | **string** | The operator to use | [default to undefined] +**values** | **Array<any>** | The values to match against | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingEnvironmentTarget.md b/docs/AIConfigTargetingEnvironmentTarget.md index ec4311f..d44fddc 100644 --- a/docs/AIConfigTargetingEnvironmentTarget.md +++ b/docs/AIConfigTargetingEnvironmentTarget.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contextKind** | **string** | | [default to undefined] -**values** | **Array<string>** | | [default to undefined] -**variation** | **number** | | [default to undefined] +**contextKind** | **string** | The context kind | [default to undefined] +**values** | **Array<string>** | The context keys to target | [default to undefined] +**variation** | **number** | Index of the variation to serve | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingPatch.md b/docs/AIConfigTargetingPatch.md index 21e2239..b0de321 100644 --- a/docs/AIConfigTargetingPatch.md +++ b/docs/AIConfigTargetingPatch.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**comment** | **string** | | [optional] [default to undefined] -**environmentKey** | **string** | | [default to undefined] -**instructions** | **Array<{ [key: string]: any; }>** | | [default to undefined] +**comment** | **string** | A comment describing the change | [optional] [default to undefined] +**environmentKey** | **string** | The environment key | [default to undefined] +**instructions** | **Array<{ [key: string]: any; }>** | The semantic patch instructions to apply | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingVariation.md b/docs/AIConfigTargetingVariation.md index 64f14dd..8c8a421 100644 --- a/docs/AIConfigTargetingVariation.md +++ b/docs/AIConfigTargetingVariation.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_id** | **string** | | [default to undefined] -**description** | **string** | | [default to undefined] -**name** | **string** | | [default to undefined] +**_id** | **string** | The variation ID | [default to undefined] +**description** | **string** | A description of the variation | [default to undefined] +**name** | **string** | The variation name | [default to undefined] **value** | [**AIConfigTargetingVariationValue**](AIConfigTargetingVariationValue.md) | | [default to undefined] ## Example diff --git a/docs/AIConfigTargetingVariationValue.md b/docs/AIConfigTargetingVariationValue.md index 7f5f853..7eaf4ed 100644 --- a/docs/AIConfigTargetingVariationValue.md +++ b/docs/AIConfigTargetingVariationValue.md @@ -1,5 +1,6 @@ # AIConfigTargetingVariationValue +The variation value ## Properties diff --git a/docs/AIConfigVariation.md b/docs/AIConfigVariation.md index 23e1e06..9d06435 100644 --- a/docs/AIConfigVariation.md +++ b/docs/AIConfigVariation.md @@ -6,26 +6,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**ParentLink**](ParentLink.md) | | [optional] [default to undefined] -**color** | **string** | | [optional] [default to undefined] -**comment** | **string** | | [optional] [default to undefined] +**color** | **string** | The color used for this variation in the UI | [optional] [default to undefined] +**classifiers** | [**Array<Classifier>**](Classifier.md) | Classifier rules for a judge variation. When this array is non-empty, messages must be empty. | [optional] [default to undefined] +**comment** | **string** | A comment describing this version of the variation | [optional] [default to undefined] **description** | **string** | Returns the description for the agent. This is only returned for agent variations. | [optional] [default to undefined] **instructions** | **string** | Returns the instructions for the agent. This is only returned for agent variations. | [optional] [default to undefined] -**key** | **string** | | [default to undefined] -**_id** | **string** | | [default to undefined] -**messages** | [**Array<Message>**](Message.md) | | [optional] [default to undefined] -**model** | **object** | | [default to undefined] -**modelConfigKey** | **string** | | [optional] [default to undefined] -**name** | **string** | | [default to undefined] +**key** | **string** | The variation key | [default to undefined] +**_id** | **string** | The variation ID | [default to undefined] +**messages** | [**Array<Message>**](Message.md) | The prompt messages for this variation | [optional] [default to undefined] +**model** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [default to undefined] +**modelConfigKey** | **string** | The key of the model config that this variation uses, not the provider model ID. Absent when the variation does not use a model config. | [optional] [default to undefined] +**modelConfigVersion** | **number** | The version of the model config that this variation is pinned to, when it references a custom model config. Absent when the variation does not reference a model config, when the variation is not pinned to a specific version, or when custom model config versioning is not enabled for the project. | [optional] [default to undefined] +**name** | **string** | The variation name | [default to undefined] **outputFormat** | **{ [key: string]: any; }** | JSON Schema defining the structured output format for the variation. | [optional] [default to undefined] **createdAt** | **number** | | [default to undefined] -**version** | **number** | | [default to undefined] -**state** | **string** | | [optional] [default to undefined] +**version** | **number** | The version number of this resource | [default to undefined] +**state** | **string** | The state of the variation. - `archived`: The variation is archived. To restore it, update the variation with `state` set to `published`. - `published`: The variation is active. | [optional] [default to undefined] **_archivedAt** | **number** | | [optional] [default to undefined] **_publishedAt** | **number** | | [optional] [default to undefined] -**tools** | [**Array<VariationTool>**](VariationTool.md) | | [optional] [default to undefined] -**skills** | [**Array<VariationSkill>**](VariationSkill.md) | | [optional] [default to undefined] +**tools** | [**Array<VariationTool>**](VariationTool.md) | The tools this variation can use | [optional] [default to undefined] +**skills** | [**Array<VariationSkill>**](VariationSkill.md) | The agent skills this variation can use | [optional] [default to undefined] **judgeConfiguration** | [**JudgeConfiguration**](JudgeConfiguration.md) | | [optional] [default to undefined] -**judgingConfigKeys** | **Array<string>** | | [optional] [default to undefined] +**judgingConfigKeys** | **Array<string>** | Keys of the judge AI Configs attached to this variation | [optional] [default to undefined] ## Example @@ -35,6 +37,7 @@ import { AIConfigVariation } from 'launchdarkly-api-typescript'; const instance: AIConfigVariation = { _links, color, + classifiers, comment, description, instructions, @@ -43,6 +46,7 @@ const instance: AIConfigVariation = { messages, model, modelConfigKey, + modelConfigVersion, name, outputFormat, createdAt, diff --git a/docs/AIConfigVariationPatch.md b/docs/AIConfigVariationPatch.md index e9631ee..58c7351 100644 --- a/docs/AIConfigVariationPatch.md +++ b/docs/AIConfigVariationPatch.md @@ -5,16 +5,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**classifiers** | [**Array<Classifier>**](Classifier.md) | Replaces classifier rules on a judge variation. An empty array clears them. When this array is non-empty, messages must be empty. | [optional] [default to undefined] **comment** | **string** | Human-readable description of what this patch changes | [optional] [default to undefined] **description** | **string** | Description for agent when the config is in agent mode. | [optional] [default to undefined] **instructions** | **string** | Instructions for agent when the config is in agent mode. | [optional] [default to undefined] -**messages** | [**Array<Message>**](Message.md) | | [optional] [default to undefined] -**model** | **object** | | [optional] [default to undefined] -**modelConfigKey** | **string** | | [optional] [default to undefined] -**name** | **string** | | [optional] [default to undefined] +**messages** | [**Array<Message>**](Message.md) | The prompt messages for this variation | [optional] [default to undefined] +**model** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [optional] [default to undefined] +**modelConfigKey** | **string** | The key that GET /api/v2/projects/{projectKey}/ai-configs/model-configs returns for the model config. Do not use a custom model config\'s ID, which is the provider model ID. | [optional] [default to undefined] +**modelConfigVersion** | **number** | The exact model config version to set this variation to. Requires modelConfigKey to be set (either in this patch or already on the variation), and the version must exist for that model config. When omitted, the variation keeps the version it is currently set to, unless the patch changes modelConfigKey, in which case the variation records the new model config\'s current (latest) version. | [optional] [default to undefined] +**name** | **string** | A human-readable name for the variation | [optional] [default to undefined] **outputFormat** | **{ [key: string]: any; }** | JSON Schema defining the structured output format for the variation. | [optional] [default to undefined] -**published** | **boolean** | | [optional] [default to undefined] -**state** | **string** | One of \'archived\', \'published\' | [optional] [default to undefined] +**published** | **boolean** | Whether to publish this version of the variation | [optional] [default to undefined] +**state** | **string** | The state to move the variation to. Omit this field to keep the current state. - `archived`: Archive a published variation. You cannot archive a variation that is already archived. You also cannot archive the only variation of an AI Config. An AI Config itself cannot be archived. - `published`: Restore an archived variation. You cannot publish a variation that is already published. | [optional] [default to undefined] **tools** | [**Array<VariationToolPost>**](VariationToolPost.md) | List of tools to use for this variation. The latest version of the tool will be used. | [optional] [default to undefined] **toolKeys** | **Array<string>** | List of tool keys to use for this variation. The latest version of the tool will be used. | [optional] [default to undefined] **skills** | [**Array<VariationSkillPost>**](VariationSkillPost.md) | List of agent skills to attach to this variation. Replaces the current attachments. | [optional] [default to undefined] @@ -26,12 +28,14 @@ Name | Type | Description | Notes import { AIConfigVariationPatch } from 'launchdarkly-api-typescript'; const instance: AIConfigVariationPatch = { + classifiers, comment, description, instructions, messages, model, modelConfigKey, + modelConfigVersion, name, outputFormat, published, diff --git a/docs/AIConfigVariationPost.md b/docs/AIConfigVariationPost.md index ef8b25e..d52339a 100644 --- a/docs/AIConfigVariationPost.md +++ b/docs/AIConfigVariationPost.md @@ -5,14 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**classifiers** | [**Array<Classifier>**](Classifier.md) | Classifier rules for a judge variation. When this array is non-empty, messages must be empty. | [optional] [default to undefined] **comment** | **string** | Human-readable description of this variation | [optional] [default to undefined] **description** | **string** | Returns the description for the agent. This is only returned for agent variations. | [optional] [default to undefined] **instructions** | **string** | Returns the instructions for the agent. This is only returned for agent variations. | [optional] [default to undefined] -**key** | **string** | | [default to undefined] -**messages** | [**Array<Message>**](Message.md) | | [optional] [default to undefined] -**model** | **object** | | [optional] [default to undefined] -**name** | **string** | | [default to undefined] -**modelConfigKey** | **string** | | [optional] [default to undefined] +**key** | **string** | A unique key for the variation | [default to undefined] +**messages** | [**Array<Message>**](Message.md) | The prompt messages for this variation | [optional] [default to undefined] +**model** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [optional] [default to undefined] +**name** | **string** | A human-readable name for the variation | [default to undefined] +**modelConfigKey** | **string** | The key that GET /api/v2/projects/{projectKey}/ai-configs/model-configs returns for the model config. Do not use a custom model config\'s ID, which is the provider model ID. | [optional] [default to undefined] +**modelConfigVersion** | **number** | The exact model config version to set this variation to. Requires modelConfigKey to be set, and the version must exist for that model config. When omitted, the variation records the model config\'s current (latest) version. | [optional] [default to undefined] **outputFormat** | **{ [key: string]: any; }** | JSON Schema defining the structured output format for the variation. | [optional] [default to undefined] **tools** | [**Array<VariationToolPost>**](VariationToolPost.md) | List of tools to use for this variation. The latest version of the tool will be used. | [optional] [default to undefined] **toolKeys** | **Array<string>** | List of tool keys to use for this variation. The latest version of the tool will be used. | [optional] [default to undefined] @@ -25,6 +27,7 @@ Name | Type | Description | Notes import { AIConfigVariationPost } from 'launchdarkly-api-typescript'; const instance: AIConfigVariationPost = { + classifiers, comment, description, instructions, @@ -33,6 +36,7 @@ const instance: AIConfigVariationPost = { model, name, modelConfigKey, + modelConfigVersion, outputFormat, tools, toolKeys, diff --git a/docs/AIConfigVariationsResponse.md b/docs/AIConfigVariationsResponse.md index 79960a0..2d59581 100644 --- a/docs/AIConfigVariationsResponse.md +++ b/docs/AIConfigVariationsResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**items** | [**Array<AIConfigVariation>**](AIConfigVariation.md) | | [default to undefined] -**totalCount** | **number** | | [default to undefined] +**items** | [**Array<AIConfigVariation>**](AIConfigVariation.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [default to undefined] ## Example diff --git a/docs/AIConfigs.md b/docs/AIConfigs.md index faafe73..a3730c0 100644 --- a/docs/AIConfigs.md +++ b/docs/AIConfigs.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<AIConfig>**](AIConfig.md) | | [default to undefined] -**totalCount** | **number** | | [default to undefined] +**items** | [**Array<AIConfig>**](AIConfig.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [default to undefined] ## Example diff --git a/docs/AIConfigsApi.md b/docs/AIConfigsApi.md deleted file mode 100644 index 43aeb7f..0000000 --- a/docs/AIConfigsApi.md +++ /dev/null @@ -1,137 +0,0 @@ -# AIConfigsApi - -All URIs are relative to *https://app.launchdarkly.com* - -|Method | HTTP request | Description| -|------------- | ------------- | -------------| -|[**listAIToolReferences**](#listaitoolreferences) | **GET** /api/v2/projects/{projectKey}/ai-tools/{toolKey}/references | List AI tool references| -|[**listAgentOptimizationRuns**](#listagentoptimizationruns) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs | List agent optimization runs| - -# **listAIToolReferences** -> ToolReferences listAIToolReferences() - -Get all AgentControl config variations that currently reference this tool. - -### Example - -```typescript -import { - AIConfigsApi, - Configuration -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new AIConfigsApi(configuration); - -let projectKey: string; // (default to undefined) -let toolKey: string; // (default to undefined) -let limit: number; //The number of resources to return. (optional) (default to undefined) -let offset: number; //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`. (optional) (default to undefined) - -const { status, data } = await apiInstance.listAIToolReferences( - projectKey, - toolKey, - limit, - offset -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **toolKey** | [**string**] | | defaults to undefined| -| **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| -| **offset** | [**number**] | 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`. | (optional) defaults to undefined| - - -### Return type - -**ToolReferences** - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**200** | AI tool references | - | -|**400** | Bad request | - | -|**403** | Forbidden | - | -|**404** | Not found | - | -|**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **listAgentOptimizationRuns** -> AgentOptimizationRuns listAgentOptimizationRuns() - -Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. - -### Example - -```typescript -import { - AIConfigsApi, - Configuration -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new AIConfigsApi(configuration); - -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) -let limit: number; //The number of resources to return. (optional) (default to undefined) -let offset: number; //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`. (optional) (default to undefined) - -const { status, data } = await apiInstance.listAgentOptimizationRuns( - projectKey, - optimizationKey, - limit, - offset -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| -| **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| -| **offset** | [**number**] | 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`. | (optional) defaults to undefined| - - -### Return type - -**AgentOptimizationRuns** - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**200** | Agent optimization run list | - | -|**400** | Bad request | - | -|**403** | Forbidden | - | -|**404** | Not found | - | -|**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/AITool.md b/docs/AITool.md index 34c11e2..fd95e27 100644 --- a/docs/AITool.md +++ b/docs/AITool.md @@ -5,15 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] +**key** | **string** | The tool key | [default to undefined] **_access** | [**AiConfigsAccess**](AiConfigsAccess.md) | | [optional] [default to undefined] **_links** | [**ParentAndSelfLinks**](ParentAndSelfLinks.md) | | [optional] [default to undefined] +**_site** | [**CoreLink**](CoreLink.md) | | [optional] [default to undefined] **_maintainer** | [**AIConfigMaintainer**](AIConfigMaintainer.md) | | [optional] [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**description** | **string** | A description of the tool | [optional] [default to undefined] **schema** | **object** | JSON Schema defining the tool\'s parameters for LLM consumption | [default to undefined] **customParameters** | **object** | Custom metadata and configuration for application-level use (not sent to LLM) | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] -**version** | **number** | | [default to undefined] +**tags** | **Array<string>** | Tags for the tool. Tags can be used in custom role policies. | [optional] [default to undefined] +**version** | **number** | Version of the tool. Starts at 1, and each update that changes the description, schema, custom parameters, or tags creates a new version. Pass this value with `key` in a variation\'s `tools: [{key, version}]`. | [default to undefined] **createdAt** | **number** | | [default to undefined] ## Example @@ -25,6 +26,7 @@ const instance: AITool = { key, _access, _links, + _site, _maintainer, description, schema, diff --git a/docs/AIToolPatch.md b/docs/AIToolPatch.md index a308dd2..403c2f9 100644 --- a/docs/AIToolPatch.md +++ b/docs/AIToolPatch.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this resource | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains this resource | [optional] [default to undefined] +**description** | **string** | A description of the tool | [optional] [default to undefined] **schema** | **object** | JSON Schema defining the tool\'s parameters for LLM consumption | [optional] [default to undefined] **customParameters** | **object** | Custom metadata and configuration for application-level use (not sent to LLM) | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] +**tags** | **Array<string>** | Replaces the tags on the tool. Tags can be used in custom role policies. | [optional] [default to undefined] ## Example diff --git a/docs/AIToolPost.md b/docs/AIToolPost.md index 3b5346a..4bcd8dd 100644 --- a/docs/AIToolPost.md +++ b/docs/AIToolPost.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**key** | **string** | A unique key for the tool | [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this resource | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains this resource | [optional] [default to undefined] +**description** | **string** | A description of the tool | [optional] [default to undefined] **schema** | **object** | JSON Schema defining the tool\'s parameters for LLM consumption | [default to undefined] **customParameters** | **object** | Custom metadata and configuration for application-level use (not sent to LLM) | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for the tool. Tags can be used in custom role policies. | [optional] [default to undefined] ## Example diff --git a/docs/AITools.md b/docs/AITools.md index 98a3c3e..c5ba002 100644 --- a/docs/AITools.md +++ b/docs/AITools.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<AITool>**](AITool.md) | | [default to undefined] -**totalCount** | **number** | | [default to undefined] +**items** | [**Array<AITool>**](AITool.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [default to undefined] ## Example diff --git a/docs/AccessTokenPost.md b/docs/AccessTokenPost.md index 615b371..62e89d8 100644 --- a/docs/AccessTokenPost.md +++ b/docs/AccessTokenPost.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **inlineRole** | [**Array<StatementPost>**](StatementPost.md) | A JSON array of statements represented as JSON objects with three attributes: effect, resources, actions. May be used in place of a role. | [optional] [default to undefined] **serviceToken** | **boolean** | Whether the token is a service token | [optional] [default to undefined] **defaultApiVersion** | **number** | The default API version for this token | [optional] [default to undefined] +**expiry** | **number** | | [optional] [default to undefined] ## Example @@ -26,6 +27,7 @@ const instance: AccessTokenPost = { inlineRole, serviceToken, defaultApiVersion, + expiry, }; ``` diff --git a/docs/AccessTokensApi.md b/docs/AccessTokensApi.md index 95c0a6b..b7f0681 100644 --- a/docs/AccessTokensApi.md +++ b/docs/AccessTokensApi.md @@ -9,7 +9,7 @@ All URIs are relative to *https://app.launchdarkly.com* |[**getTokens**](#gettokens) | **GET** /api/v2/tokens | List access tokens| |[**patchToken**](#patchtoken) | **PATCH** /api/v2/tokens/{id} | Patch access token| |[**postToken**](#posttoken) | **POST** /api/v2/tokens | Create access token| -|[**resetToken**](#resettoken) | **POST** /api/v2/tokens/{id}/reset | Reset access token| +|[**resetToken**](#resettoken) | **POST** /api/v2/tokens/{id}/reset | Reset access token (legacy)| # **deleteToken** > deleteToken() @@ -301,7 +301,7 @@ const { status, data } = await apiInstance.postToken( # **resetToken** > Token resetToken() -Reset an access token\'s secret key with an optional expiry time for the old key. +Reset an access token\'s secret key with an optional expiry time for the old key. Use of this legacy handler is discouraged. Patch the `expiry` field on the token directly instead. ### Example diff --git a/docs/AccountMembersApi.md b/docs/AccountMembersApi.md index 9112a47..21ab40d 100644 --- a/docs/AccountMembersApi.md +++ b/docs/AccountMembersApi.md @@ -374,7 +374,7 @@ const { status, data } = await apiInstance.postMemberTeams( # **postMembers** > Members postMembers(newMemberForm) -Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). +Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the \"message\" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. You can assign new members to teams with the `teamKeys` field. Teams are available only on Enterprise plans. If your plan does not include teams, a request that includes a non-empty `teamKeys` field returns an HTTP response code of 403 (Forbidden). Omit `teamKeys` to invite members without assigning them to a team. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request). ### Example diff --git a/docs/AccountUsageBetaApi.md b/docs/AccountUsageBetaApi.md index dc1ac35..29d4aa3 100644 --- a/docs/AccountUsageBetaApi.md +++ b/docs/AccountUsageBetaApi.md @@ -9,6 +9,7 @@ All URIs are relative to *https://app.launchdarkly.com* |[**getContextsServersideUsage**](#getcontextsserversideusage) | **GET** /api/v2/usage/serverside-contexts | Get contexts serverside usage| |[**getContextsTotalUsage**](#getcontextstotalusage) | **GET** /api/v2/usage/total-contexts | Get contexts total usage| |[**getDataExportEventsUsage**](#getdataexporteventsusage) | **GET** /api/v2/usage/data-export-events | Get data export events usage| +|[**getDataExportProjectRanking**](#getdataexportprojectranking) | **GET** /api/v2/usage/data-export-events/projects/ranking | Rank Streaming usage by project| |[**getEvaluationsUsage**](#getevaluationsusage) | **GET** /api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey} | Get evaluations usage| |[**getEventsUsage**](#geteventsusage) | **GET** /api/v2/usage/events/{type} | Get events usage| |[**getExperimentationEventsUsage**](#getexperimentationeventsusage) | **GET** /api/v2/usage/experimentation-events | Get experimentation events usage| @@ -368,9 +369,9 @@ const { status, data } = await apiInstance.getContextsTotalUsage( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getDataExportEventsUsage** -> SeriesListRep getDataExportEventsUsage() +> DataExportSeriesListRep getDataExportEventsUsage() -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. +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. `groupBy=projectId` resolves legacy rows through the account\'s current environment-to-project mapping and returns `409` instead of a partial series when any successful row remains unattributed. Plain project filtering keeps its current-environment compatibility behavior. ### Example @@ -385,10 +386,11 @@ const apiInstance = new AccountUsageBetaApi(configuration); let from: string; //The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. (optional) (default to undefined) let to: string; //The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. (optional) (default to undefined) -let projectKey: string; //A project key to filter results by. Can be specified multiple times, one query parameter per project key. (optional) (default to undefined) +let projectKey: string; //A project key to filter results by. Without `groupBy=projectId`, filters to the project\'s current environments so retained pre-materialization usage remains visible. Can be specified multiple times, one query parameter per project key. (optional) (default to undefined) let environmentKey: string; //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. (optional) (default to undefined) let eventKind: string; //An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. (optional) (default to undefined) -let groupBy: string; //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`. (optional) (default to undefined) +let destinationKind: string; //A Streaming configuration kind to filter results by. Values preserve raw product identity; `snowflake` is legacy Streaming Snowflake and is distinct from Warehouse `snowflake-v2`. Can be specified multiple times.
Valid values: `kinesis`, `google-pubsub`, `mparticle`, `segment`, `azure-event-hubs`, `snowflake`, `unknown`. (optional) (default to undefined) +let groupBy: string; //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. `projectId` requires one or more explicit `projectKey` filters and is capped at 100 selected projects. `destinationId` returns one series per streaming destination with `destinationName` metadata, plus `destinationViewable` when the destination is in the current configuration. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. A destination ID absent from the current configuration is named `Unknown historical destination`. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`.
Valid values: `projectId`, `environmentId`, `eventKind`, `destinationKind`, `destinationId`. (optional) (default to undefined) let aggregationType: string; //Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`. (optional) (default to undefined) let granularity: string; //Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`. (optional) (default to undefined) @@ -398,6 +400,7 @@ const { status, data } = await apiInstance.getDataExportEventsUsage( projectKey, environmentKey, eventKind, + destinationKind, groupBy, aggregationType, granularity @@ -410,17 +413,18 @@ const { status, data } = await apiInstance.getDataExportEventsUsage( |------------- | ------------- | ------------- | -------------| | **from** | [**string**] | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | (optional) defaults to undefined| | **to** | [**string**] | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | (optional) defaults to undefined| -| **projectKey** | [**string**] | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | (optional) defaults to undefined| +| **projectKey** | [**string**] | A project key to filter results by. Without `groupBy=projectId`, filters to the project\'s current environments so retained pre-materialization usage remains visible. Can be specified multiple times, one query parameter per project key. | (optional) defaults to undefined| | **environmentKey** | [**string**] | 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. | (optional) defaults to undefined| | **eventKind** | [**string**] | An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. | (optional) defaults to undefined| -| **groupBy** | [**string**] | 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.<br/>Valid values: `environmentId`, `eventKind`. | (optional) defaults to undefined| +| **destinationKind** | [**string**] | A Streaming configuration kind to filter results by. Values preserve raw product identity; `snowflake` is legacy Streaming Snowflake and is distinct from Warehouse `snowflake-v2`. Can be specified multiple times.<br/>Valid values: `kinesis`, `google-pubsub`, `mparticle`, `segment`, `azure-event-hubs`, `snowflake`, `unknown`. | (optional) defaults to undefined| +| **groupBy** | [**string**] | 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. `projectId` requires one or more explicit `projectKey` filters and is capped at 100 selected projects. `destinationId` returns one series per streaming destination with `destinationName` metadata, plus `destinationViewable` when the destination is in the current configuration. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. A destination ID absent from the current configuration is named `Unknown historical destination`. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`.<br/>Valid values: `projectId`, `environmentId`, `eventKind`, `destinationKind`, `destinationId`. | (optional) defaults to undefined| | **aggregationType** | [**string**] | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. | (optional) defaults to undefined| | **granularity** | [**string**] | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. | (optional) defaults to undefined| ### Return type -**SeriesListRep** +**DataExportSeriesListRep** ### Authorization @@ -439,15 +443,94 @@ const { status, data } = await apiInstance.getDataExportEventsUsage( |**400** | Invalid request | - | |**401** | Invalid access token | - | |**403** | Forbidden | - | +|**409** | Project identity is incomplete for the requested range | - | |**429** | Rate limited | - | |**503** | Service unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **getDataExportProjectRanking** +> DataExportProjectRankingRep getDataExportProjectRanking() + +Rank projects with usage in the requested range by successful Streaming transfers. Legacy rows are attributed through the account\'s complete current environment-to-project mapping. If any successful row remains unattributed after resolution, the operation returns `409` instead of a partial ranking. The result limit does not cap the account-wide project universe or environment mapping. This source-specific operation does not provide Combined or Warehouse ranking. + +### Example + +```typescript +import { + AccountUsageBetaApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AccountUsageBetaApi(configuration); + +let from: number; //Inclusive UTC range start in Unix milliseconds. (default to undefined) +let to: number; //Exclusive UTC range end in Unix milliseconds. (default to undefined) +let source: string; //The source scope. Only `streaming` is supported. (optional) (default to 'streaming') +let dimension: string; //The ranking dimension. Only `project` is supported. (optional) (default to 'project') +let projectKey: Array; //A canonical project key to include. Can be specified multiple times, with at most 100 unique explicit selections; duplicates do not consume the limit. When omitted, all account projects with usage in the requested range are ranked. (optional) (default to undefined) +let search: string; //A case-insensitive substring matched against canonical project keys before querying usage. Project names are not searched. (optional) (default to undefined) +let cursor: string; //An opaque cursor returned by a previous response. Cursors are bound to the account and ranking inputs. (optional) (default to undefined) +let limit: number; //The maximum number of ranked projects to return. This bounds response rows and look-ahead, not the account-wide candidate universe. (optional) (default to 5) + +const { status, data } = await apiInstance.getDataExportProjectRanking( + from, + to, + source, + dimension, + projectKey, + search, + cursor, + limit +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **from** | [**number**] | Inclusive UTC range start in Unix milliseconds. | defaults to undefined| +| **to** | [**number**] | Exclusive UTC range end in Unix milliseconds. | defaults to undefined| +| **source** | [**string**] | The source scope. Only `streaming` is supported. | (optional) defaults to 'streaming'| +| **dimension** | [**string**] | The ranking dimension. Only `project` is supported. | (optional) defaults to 'project'| +| **projectKey** | **Array<string>** | A canonical project key to include. Can be specified multiple times, with at most 100 unique explicit selections; duplicates do not consume the limit. When omitted, all account projects with usage in the requested range are ranked. | (optional) defaults to undefined| +| **search** | [**string**] | A case-insensitive substring matched against canonical project keys before querying usage. Project names are not searched. | (optional) defaults to undefined| +| **cursor** | [**string**] | An opaque cursor returned by a previous response. Cursors are bound to the account and ranking inputs. | (optional) defaults to undefined| +| **limit** | [**number**] | The maximum number of ranked projects to return. This bounds response rows and look-ahead, not the account-wide candidate universe. | (optional) defaults to 5| + + +### Return type + +**DataExportProjectRankingRep** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Bounded project ranking | - | +|**400** | Invalid request | - | +|**401** | Invalid access token | - | +|**403** | Forbidden | - | +|**409** | Current account metadata cannot attribute every successful usage row in the requested range to a project | - | +|**429** | Rate limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **getEvaluationsUsage** > SeriesListRep getEvaluationsUsage() -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. +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 returned data depends on the length of the requested time range: ranges shorter than two hours return minutely data, ranges shorter than two days return hourly data, and ranges of two days or longer return daily data. Minutely data is retained for 70 days; a range shorter than two hours that starts before then is returned at hourly granularity instead, with the start of the range widened to the containing hour. Ranges that predate available data return an empty series list. If a flag has served many distinct variation values in the requested range, the least recently seen values may be aggregated into a single additional series labeled \"Other Variations\". ### Example @@ -595,7 +678,7 @@ const apiInstance = new AccountUsageBetaApi(configuration); let from: string; //The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. (optional) (default to undefined) let to: string; //The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. (optional) (default to undefined) -let projectKey: string; //A project key to filter results by. Can be specified multiple times, one query parameter per project key. (optional) (default to undefined) +let projectKey: string; //A project key to filter results by. Without `environmentKey`, filters to the project\'s current environments. Can be specified multiple times, one query parameter per project key. (optional) (default to undefined) let environmentKey: string; //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. (optional) (default to undefined) let eventKey: string; //An event key to filter results by. Can be specified multiple times, one query parameter per event key. (optional) (default to undefined) let eventKind: string; //An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. (optional) (default to undefined) @@ -622,7 +705,7 @@ const { status, data } = await apiInstance.getExperimentationEventsUsage( |------------- | ------------- | ------------- | -------------| | **from** | [**string**] | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | (optional) defaults to undefined| | **to** | [**string**] | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | (optional) defaults to undefined| -| **projectKey** | [**string**] | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | (optional) defaults to undefined| +| **projectKey** | [**string**] | A project key to filter results by. Without `environmentKey`, filters to the project\'s current environments. Can be specified multiple times, one query parameter per project key. | (optional) defaults to undefined| | **environmentKey** | [**string**] | 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. | (optional) defaults to undefined| | **eventKey** | [**string**] | An event key to filter results by. Can be specified multiple times, one query parameter per event key. | (optional) defaults to undefined| | **eventKind** | [**string**] | An event kind to filter results by. Can be specified multiple times, one query parameter per event kind. | (optional) defaults to undefined| @@ -675,7 +758,7 @@ const apiInstance = new AccountUsageBetaApi(configuration); let from: string; //The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. (optional) (default to undefined) let to: string; //The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. (optional) (default to undefined) -let projectKey: string; //A project key to filter results by. Can be specified multiple times, one query parameter per project key. (optional) (default to undefined) +let projectKey: string; //A project key to filter results by. Without `environmentKey`, filters by project, including projects that currently have no environments. Can be specified multiple times, one query parameter per project key. (optional) (default to undefined) let environmentKey: string; //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. (optional) (default to undefined) let experimentId: string; //An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID. (optional) (default to undefined) let groupBy: string; //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`. (optional) (default to undefined) @@ -700,7 +783,7 @@ const { status, data } = await apiInstance.getExperimentationKeysUsage( |------------- | ------------- | ------------- | -------------| | **from** | [**string**] | The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month. | (optional) defaults to undefined| | **to** | [**string**] | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | (optional) defaults to undefined| -| **projectKey** | [**string**] | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | (optional) defaults to undefined| +| **projectKey** | [**string**] | A project key to filter results by. Without `environmentKey`, filters by project, including projects that currently have no environments. Can be specified multiple times, one query parameter per project key. | (optional) defaults to undefined| | **environmentKey** | [**string**] | 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. | (optional) defaults to undefined| | **experimentId** | [**string**] | An experiment ID to filter results by. Can be specified multiple times, one query parameter per experiment ID. | (optional) defaults to undefined| | **groupBy** | [**string**] | 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.<br/>Valid values: `projectId`, `environmentId`, `experimentId`. | (optional) defaults to undefined| @@ -1583,9 +1666,9 @@ let connectionType: string; //A connection type to filter results by. Can be spe let relayVersion: string; //A relay version to filter results by. Can be specified multiple times, one query parameter per relay version. (optional) (default to undefined) let sdkName: string; //An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. (optional) (default to undefined) let sdkVersion: string; //An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version. (optional) (default to undefined) -let sdkType: string; //An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. (optional) (default to undefined) +let sdkType: string; //Deprecated. This endpoint reports server-side connections only, so `server` is the only value that returns data and omitting the parameter is equivalent. Any other value returns an empty series. To report client-side connections, use `GET /api/v2/usage/streams/{source}`. (optional) (default to undefined) let sdkAppId: string; //An SDK app ID to filter results by. Can be specified multiple times, one query parameter per SDK app ID. (optional) (default to undefined) -let groupBy: string; //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`, `sdkAppId`. (optional) (default to undefined) +let groupBy: string; //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`, `sdkAppId`.
`sdkType` is no longer offered: this endpoint reports server-side connections only, so grouping by it returns a single group. It is still accepted, for compatibility. (optional) (default to undefined) let aggregationType: string; //Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`. (optional) (default to undefined) let granularity: string; //Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`. (optional) (default to undefined) @@ -1618,9 +1701,9 @@ const { status, data } = await apiInstance.getServiceConnectionsUsage( | **relayVersion** | [**string**] | A relay version to filter results by. Can be specified multiple times, one query parameter per relay version. | (optional) defaults to undefined| | **sdkName** | [**string**] | An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name. | (optional) defaults to undefined| | **sdkVersion** | [**string**] | An SDK version to filter results by. Can be specified multiple times, one query parameter per SDK version. | (optional) defaults to undefined| -| **sdkType** | [**string**] | An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type. | (optional) defaults to undefined| +| **sdkType** | [**string**] | Deprecated. This endpoint reports server-side connections only, so `server` is the only value that returns data and omitting the parameter is equivalent. Any other value returns an empty series. To report client-side connections, use `GET /api/v2/usage/streams/{source}`. | (optional) defaults to undefined| | **sdkAppId** | [**string**] | An SDK app ID to filter results by. Can be specified multiple times, one query parameter per SDK app ID. | (optional) defaults to undefined| -| **groupBy** | [**string**] | 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkType`, `sdkAppId`. | (optional) defaults to undefined| +| **groupBy** | [**string**] | 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.<br/>Valid values: `projectId`, `environmentId`, `connectionType`, `relayVersion`, `sdkName`, `sdkVersion`, `sdkAppId`.<br/>`sdkType` is no longer offered: this endpoint reports server-side connections only, so grouping by it returns a single group. It is still accepted, for compatibility. | (optional) defaults to undefined| | **aggregationType** | [**string**] | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. | (optional) defaults to undefined| | **granularity** | [**string**] | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. | (optional) defaults to undefined| @@ -1910,7 +1993,7 @@ const { status, data } = await apiInstance.getVegaAIUsage( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getWarehouseExportUsage** -> SeriesListRep getWarehouseExportUsage() +> DataExportSeriesListRep getWarehouseExportUsage() Get a time series array showing the number of rows exported to your warehouse Data Export destinations. The supported granularity varies by aggregation type. The maximum time range is 365 days. @@ -1929,8 +2012,9 @@ let from: string; //The series of data returned starts from this timestamp (Unix let to: string; //The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. (optional) (default to undefined) let projectKey: string; //A project key to filter results by. Can be specified multiple times, one query parameter per project key. (optional) (default to undefined) let environmentKey: string; //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. (optional) (default to undefined) -let destination: string; //A destination kind to filter results by. Can be specified multiple times, one query parameter per destination kind.
Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. (optional) (default to undefined) -let groupBy: string; //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`, `destination`. (optional) (default to undefined) +let destinationKind: string; //A Warehouse configuration kind to filter results by. Cannot be combined with `destination`. Can be specified multiple times.
Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`, `s3`. (optional) (default to undefined) +let destination: string; //A Warehouse configuration kind to filter results by. Cannot be combined with `destinationKind`. Existing behavior is unchanged. Can be specified multiple times.
Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. (optional) (default to undefined) +let groupBy: string; //If specified, returns data for each distinct value of the given field. Can be specified multiple times.
Valid values: `projectId`, `environmentId`, `destination`, `destinationKind`, `destinationId`. `destination` and `destinationKind` return the same raw Warehouse configuration kinds. `destinationId` returns one series per warehouse destination with `destinationName` metadata. When a current destination you can view matches, its `destinationId` is the LaunchDarkly destination ID, with `destinationViewable`. Otherwise, it is the warehouse provider\'s destination ID, named `Unknown destination`. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`. (optional) (default to undefined) let aggregationType: string; //Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`. (optional) (default to undefined) let granularity: string; //Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.
Valid values: `daily`, `hourly`, `monthly`. (optional) (default to undefined) @@ -1939,6 +2023,7 @@ const { status, data } = await apiInstance.getWarehouseExportUsage( to, projectKey, environmentKey, + destinationKind, destination, groupBy, aggregationType, @@ -1954,15 +2039,16 @@ const { status, data } = await apiInstance.getWarehouseExportUsage( | **to** | [**string**] | The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time. | (optional) defaults to undefined| | **projectKey** | [**string**] | A project key to filter results by. Can be specified multiple times, one query parameter per project key. | (optional) defaults to undefined| | **environmentKey** | [**string**] | 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. | (optional) defaults to undefined| -| **destination** | [**string**] | A destination kind to filter results by. Can be specified multiple times, one query parameter per destination kind.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. | (optional) defaults to undefined| -| **groupBy** | [**string**] | 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.<br/>Valid values: `projectId`, `environmentId`, `destination`. | (optional) defaults to undefined| +| **destinationKind** | [**string**] | A Warehouse configuration kind to filter results by. Cannot be combined with `destination`. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`, `s3`. | (optional) defaults to undefined| +| **destination** | [**string**] | A Warehouse configuration kind to filter results by. Cannot be combined with `destinationKind`. Existing behavior is unchanged. Can be specified multiple times.<br/>Valid values: `snowflake-v2`, `databricks`, `bigquery`, `redshift`, `clickhouse`. | (optional) defaults to undefined| +| **groupBy** | [**string**] | If specified, returns data for each distinct value of the given field. Can be specified multiple times.<br/>Valid values: `projectId`, `environmentId`, `destination`, `destinationKind`, `destinationId`. `destination` and `destinationKind` return the same raw Warehouse configuration kinds. `destinationId` returns one series per warehouse destination with `destinationName` metadata. When a current destination you can view matches, its `destinationId` is the LaunchDarkly destination ID, with `destinationViewable`. Otherwise, it is the warehouse provider\'s destination ID, named `Unknown destination`. The destination\'s own kind is added as `destinationKind` only when you can view the destination. A kind requested with `groupBy=destinationKind` is returned unchanged. Destinations you cannot view are reported together in one `Unknown destination` series with `destinationId` `hidden` and `destinationViewable` `false`, one per combination of the other requested dimensions, such as `destinationKind`. Usage without a destination ID is one series with an empty `destinationId` named `Unattributed`. | (optional) defaults to undefined| | **aggregationType** | [**string**] | Specifies the aggregation method. Defaults to `month_to_date`.<br/>Valid values: `month_to_date`, `incremental`. | (optional) defaults to undefined| | **granularity** | [**string**] | Specifies the data granularity. Defaults to `daily`. `monthly` granularity is only supported with the **month_to_date** aggregation type.<br/>Valid values: `daily`, `hourly`, `monthly`. | (optional) defaults to undefined| ### Return type -**SeriesListRep** +**DataExportSeriesListRep** ### Authorization diff --git a/docs/AdaptiveTrigger.md b/docs/AdaptiveTrigger.md new file mode 100644 index 0000000..f5f45a9 --- /dev/null +++ b/docs/AdaptiveTrigger.md @@ -0,0 +1,36 @@ +# AdaptiveTrigger + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [default to undefined] +**name** | **string** | | [default to undefined] +**resourceKind** | [**AdaptiveTriggerResourceKind**](AdaptiveTriggerResourceKind.md) | | [default to undefined] +**resourceKey** | **string** | | [default to undefined] +**enabled** | **boolean** | | [default to undefined] +**triggerSource** | [**ObservabilityAlertSource**](ObservabilityAlertSource.md) | | [default to undefined] +**task** | [**AdaptiveTriggerTask**](AdaptiveTriggerTask.md) | | [default to undefined] +**createdAt** | **number** | | [default to undefined] +**updatedAt** | **number** | | [default to undefined] + +## Example + +```typescript +import { AdaptiveTrigger } from 'launchdarkly-api-typescript'; + +const instance: AdaptiveTrigger = { + id, + name, + resourceKind, + resourceKey, + enabled, + triggerSource, + task, + createdAt, + updatedAt, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdaptiveTriggerInstruction.md b/docs/AdaptiveTriggerInstruction.md new file mode 100644 index 0000000..6ad2881 --- /dev/null +++ b/docs/AdaptiveTriggerInstruction.md @@ -0,0 +1,24 @@ +# AdaptiveTriggerInstruction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kind** | **string** | | [default to undefined] +**variationId** | **string** | | [default to undefined] +**ruleId** | **string** | The targeting rule this adaptive trigger acts on. Required for updateRuleVariationOrRollout instructions. | [optional] [default to undefined] + +## Example + +```typescript +import { AdaptiveTriggerInstruction } from 'launchdarkly-api-typescript'; + +const instance: AdaptiveTriggerInstruction = { + kind, + variationId, + ruleId, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdaptiveTriggerResourceKind.md b/docs/AdaptiveTriggerResourceKind.md new file mode 100644 index 0000000..410cb88 --- /dev/null +++ b/docs/AdaptiveTriggerResourceKind.md @@ -0,0 +1,10 @@ +# AdaptiveTriggerResourceKind + + +## Enum + +* `Flag` (value: `'flag'`) + +* `AiConfig` (value: `'ai-config'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdaptiveTriggerTask.md b/docs/AdaptiveTriggerTask.md new file mode 100644 index 0000000..49168a7 --- /dev/null +++ b/docs/AdaptiveTriggerTask.md @@ -0,0 +1,20 @@ +# AdaptiveTriggerTask + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instructions** | [**Array<AdaptiveTriggerInstruction>**](AdaptiveTriggerInstruction.md) | | [default to undefined] + +## Example + +```typescript +import { AdaptiveTriggerTask } from 'launchdarkly-api-typescript'; + +const instance: AdaptiveTriggerTask = { + instructions, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdaptiveTriggers.md b/docs/AdaptiveTriggers.md new file mode 100644 index 0000000..23360bd --- /dev/null +++ b/docs/AdaptiveTriggers.md @@ -0,0 +1,24 @@ +# AdaptiveTriggers + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**AdaptiveTriggersPaginatedLinks**](AdaptiveTriggersPaginatedLinks.md) | | [optional] [default to undefined] +**items** | [**Array<AdaptiveTrigger>**](AdaptiveTrigger.md) | | [default to undefined] +**totalCount** | **number** | | [default to undefined] + +## Example + +```typescript +import { AdaptiveTriggers } from 'launchdarkly-api-typescript'; + +const instance: AdaptiveTriggers = { + _links, + items, + totalCount, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdaptiveTriggersApi.md b/docs/AdaptiveTriggersApi.md new file mode 100644 index 0000000..0edffd3 --- /dev/null +++ b/docs/AdaptiveTriggersApi.md @@ -0,0 +1,463 @@ +# AdaptiveTriggersApi + +All URIs are relative to *https://app.launchdarkly.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**deleteAdaptiveTrigger**](#deleteadaptivetrigger) | **DELETE** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} | Delete an adaptive trigger| +|[**getAdaptiveTrigger**](#getadaptivetrigger) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} | Get an adaptive trigger| +|[**listAdaptiveTriggers**](#listadaptivetriggers) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers | List adaptive triggers| +|[**patchAdaptiveTrigger**](#patchadaptivetrigger) | **PATCH** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID} | Update an adaptive trigger| +|[**postAdaptiveTrigger**](#postadaptivetrigger) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers | Create an adaptive trigger| +|[**postDisableAdaptiveTrigger**](#postdisableadaptivetrigger) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/disable | Disable an adaptive trigger| +|[**postEnableAdaptiveTrigger**](#postenableadaptivetrigger) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/enable | Enable an adaptive trigger| + +# **deleteAdaptiveTrigger** +> deleteAdaptiveTrigger() + +Delete a single adaptive trigger. + +### Example + +```typescript +import { + AdaptiveTriggersApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AdaptiveTriggersApi(configuration); + +let projectKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let triggerID: string; // (default to undefined) + +const { status, data } = await apiInstance.deleteAdaptiveTrigger( + projectKey, + environmentKey, + triggerID +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **triggerID** | [**string**] | | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | No content | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**429** | Rate Limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getAdaptiveTrigger** +> AdaptiveTrigger getAdaptiveTrigger() + +Get a single adaptive trigger. + +### Example + +```typescript +import { + AdaptiveTriggersApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AdaptiveTriggersApi(configuration); + +let projectKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let triggerID: string; // (default to undefined) + +const { status, data } = await apiInstance.getAdaptiveTrigger( + projectKey, + environmentKey, + triggerID +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **triggerID** | [**string**] | | defaults to undefined| + + +### Return type + +**AdaptiveTrigger** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Trigger | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**429** | Rate Limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listAdaptiveTriggers** +> AdaptiveTriggers listAdaptiveTriggers() + +List all adaptive triggers for a resource. + +### Example + +```typescript +import { + AdaptiveTriggersApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AdaptiveTriggersApi(configuration); + +let projectKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let resourceKind: AdaptiveTriggerResourceKind; // (default to undefined) +let resourceKey: string; // (default to undefined) +let limit: number; //The number of items to return. (optional) (default to 25) +let offset: number; //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`. (optional) (default to 0) + +const { status, data } = await apiInstance.listAdaptiveTriggers( + projectKey, + environmentKey, + resourceKind, + resourceKey, + limit, + offset +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **resourceKind** | **AdaptiveTriggerResourceKind** | | defaults to undefined| +| **resourceKey** | [**string**] | | defaults to undefined| +| **limit** | [**number**] | The number of items to return. | (optional) defaults to 25| +| **offset** | [**number**] | 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`. | (optional) defaults to 0| + + +### Return type + +**AdaptiveTriggers** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Adaptive Triggers list | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**429** | Rate Limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **patchAdaptiveTrigger** +> AdaptiveTrigger patchAdaptiveTrigger(updateAdaptiveTriggerRequest) + +Update a single adaptive trigger. + +### Example + +```typescript +import { + AdaptiveTriggersApi, + Configuration, + UpdateAdaptiveTriggerRequest +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AdaptiveTriggersApi(configuration); + +let projectKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let triggerID: string; // (default to undefined) +let updateAdaptiveTriggerRequest: UpdateAdaptiveTriggerRequest; // + +const { status, data } = await apiInstance.patchAdaptiveTrigger( + projectKey, + environmentKey, + triggerID, + updateAdaptiveTriggerRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **updateAdaptiveTriggerRequest** | **UpdateAdaptiveTriggerRequest**| | | +| **projectKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **triggerID** | [**string**] | | defaults to undefined| + + +### Return type + +**AdaptiveTrigger** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Adaptive Trigger updated | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**429** | Rate Limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **postAdaptiveTrigger** +> AdaptiveTrigger postAdaptiveTrigger(createAdaptiveTriggerRequest) + +Create a new adaptive trigger for a resource. + +### Example + +```typescript +import { + AdaptiveTriggersApi, + Configuration, + CreateAdaptiveTriggerRequest +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AdaptiveTriggersApi(configuration); + +let projectKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let createAdaptiveTriggerRequest: CreateAdaptiveTriggerRequest; // + +const { status, data } = await apiInstance.postAdaptiveTrigger( + projectKey, + environmentKey, + createAdaptiveTriggerRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **createAdaptiveTriggerRequest** | **CreateAdaptiveTriggerRequest**| | | +| **projectKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| + + +### Return type + +**AdaptiveTrigger** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**201** | Adaptive Trigger created | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**409** | Conflict | - | +|**429** | Rate Limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **postDisableAdaptiveTrigger** +> postDisableAdaptiveTrigger() + +Disable an adaptive trigger. + +### Example + +```typescript +import { + AdaptiveTriggersApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AdaptiveTriggersApi(configuration); + +let projectKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let triggerID: string; // (default to undefined) + +const { status, data } = await apiInstance.postDisableAdaptiveTrigger( + projectKey, + environmentKey, + triggerID +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **triggerID** | [**string**] | | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | No content | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**429** | Rate Limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **postEnableAdaptiveTrigger** +> postEnableAdaptiveTrigger() + +Enable an adaptive trigger. + +### Example + +```typescript +import { + AdaptiveTriggersApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AdaptiveTriggersApi(configuration); + +let projectKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let triggerID: string; // (default to undefined) + +const { status, data } = await apiInstance.postEnableAdaptiveTrigger( + projectKey, + environmentKey, + triggerID +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **triggerID** | [**string**] | | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | No content | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**429** | Rate Limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AdaptiveTriggersPaginatedLinks.md b/docs/AdaptiveTriggersPaginatedLinks.md new file mode 100644 index 0000000..e26856f --- /dev/null +++ b/docs/AdaptiveTriggersPaginatedLinks.md @@ -0,0 +1,28 @@ +# AdaptiveTriggersPaginatedLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first** | [**ExperimentationLink**](ExperimentationLink.md) | | [optional] [default to undefined] +**last** | [**ExperimentationLink**](ExperimentationLink.md) | | [optional] [default to undefined] +**next** | [**ExperimentationLink**](ExperimentationLink.md) | | [optional] [default to undefined] +**prev** | [**ExperimentationLink**](ExperimentationLink.md) | | [optional] [default to undefined] +**self** | [**ExperimentationLink**](ExperimentationLink.md) | | [default to undefined] + +## Example + +```typescript +import { AdaptiveTriggersPaginatedLinks } from 'launchdarkly-api-typescript'; + +const instance: AdaptiveTriggersPaginatedLinks = { + first, + last, + next, + prev, + self, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentControlApi.md b/docs/AgentControlApi.md index 92226ea..4adefd2 100644 --- a/docs/AgentControlApi.md +++ b/docs/AgentControlApi.md @@ -27,11 +27,13 @@ All URIs are relative to *https://app.launchdarkly.com* |[**getAgentSkill**](#getagentskill) | **GET** /api/v2/projects/{projectKey}/ai-configs/skills/{skillKey} | Get an agent skill| |[**getModelConfig**](#getmodelconfig) | **GET** /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey} | Get AI model config| |[**getPromptSnippet**](#getpromptsnippet) | **GET** /api/v2/projects/{projectKey}/ai-configs/prompt-snippets/{snippetKey} | Get a prompt snippet| +|[**listAIToolReferences**](#listaitoolreferences) | **GET** /api/v2/projects/{projectKey}/ai-tools/{toolKey}/references | List AI tool references| |[**listAIToolVersions**](#listaitoolversions) | **GET** /api/v2/projects/{projectKey}/ai-tools/{toolKey}/versions | List AI tool versions| |[**listAITools**](#listaitools) | **GET** /api/v2/projects/{projectKey}/ai-tools | List AI tools| |[**listAgentGraphs**](#listagentgraphs) | **GET** /api/v2/projects/{projectKey}/agent-graphs | List agent graphs| -|[**listAgentOptimizationResults**](#listagentoptimizationresults) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/results | List agent optimization runs| +|[**listAgentOptimizationResults**](#listagentoptimizationresults) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/results | List latest agent optimization result per run| |[**listAgentOptimizationResultsByRunId**](#listagentoptimizationresultsbyrunid) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs/{runId}/results | List agent optimization results for a run| +|[**listAgentOptimizationRuns**](#listagentoptimizationruns) | **GET** /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs | List agent optimization runs| |[**listAgentOptimizations**](#listagentoptimizations) | **GET** /api/v2/projects/{projectKey}/agent-optimizations | List agent optimizations| |[**listAgentSkillReferences**](#listagentskillreferences) | **GET** /api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}/references | List agent skill references| |[**listAgentSkillVersions**](#listagentskillversions) | **GET** /api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}/versions | List agent skill versions| @@ -79,8 +81,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) const { status, data } = await apiInstance.deleteAIConfig( projectKey, @@ -92,8 +94,8 @@ const { status, data } = await apiInstance.deleteAIConfig( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| ### Return type @@ -137,9 +139,9 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) -let variationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) +let variationKey: string; //The AI Config variation key (default to undefined) const { status, data } = await apiInstance.deleteAIConfigVariation( projectKey, @@ -152,9 +154,9 @@ const { status, data } = await apiInstance.deleteAIConfigVariation( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| -| **variationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| +| **variationKey** | [**string**] | The AI Config variation key | defaults to undefined| ### Return type @@ -198,8 +200,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let toolKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let toolKey: string; //The AI tool key (default to undefined) const { status, data } = await apiInstance.deleteAITool( projectKey, @@ -211,8 +213,8 @@ const { status, data } = await apiInstance.deleteAITool( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **toolKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **toolKey** | [**string**] | The AI tool key | defaults to undefined| ### Return type @@ -257,8 +259,8 @@ const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) -let projectKey: string; // (default to undefined) -let graphKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let graphKey: string; //The agent graph key (default to undefined) const { status, data } = await apiInstance.deleteAgentGraph( lDAPIVersion, @@ -272,8 +274,8 @@ const { status, data } = await apiInstance.deleteAgentGraph( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| -| **projectKey** | [**string**] | | defaults to undefined| -| **graphKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **graphKey** | [**string**] | The agent graph key | defaults to undefined| ### Return type @@ -317,8 +319,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) const { status, data } = await apiInstance.deleteAgentOptimization( projectKey, @@ -330,8 +332,8 @@ const { status, data } = await apiInstance.deleteAgentOptimization( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| ### Return type @@ -375,9 +377,9 @@ const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) -let runId: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) +let runId: string; //The agent optimization run ID (default to undefined) const { status, data } = await apiInstance.deleteAgentOptimizationRun( lDAPIVersion, @@ -392,9 +394,9 @@ const { status, data } = await apiInstance.deleteAgentOptimizationRun( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| -| **runId** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| +| **runId** | [**string**] | The agent optimization run ID | defaults to undefined| ### Return type @@ -437,8 +439,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let skillKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let skillKey: string; //The agent skill key (default to undefined) const { status, data } = await apiInstance.deleteAgentSkill( projectKey, @@ -450,8 +452,8 @@ const { status, data } = await apiInstance.deleteAgentSkill( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **skillKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **skillKey** | [**string**] | The agent skill key | defaults to undefined| ### Return type @@ -495,8 +497,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let modelConfigKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let modelConfigKey: string; //The AI model config key (default to undefined) const { status, data } = await apiInstance.deleteModelConfig( projectKey, @@ -508,8 +510,8 @@ const { status, data } = await apiInstance.deleteModelConfig( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **modelConfigKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **modelConfigKey** | [**string**] | The AI model config key | defaults to undefined| ### Return type @@ -553,8 +555,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let snippetKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let snippetKey: string; //The prompt snippet key (default to undefined) const { status, data } = await apiInstance.deletePromptSnippet( projectKey, @@ -566,8 +568,8 @@ const { status, data } = await apiInstance.deletePromptSnippet( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **snippetKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **snippetKey** | [**string**] | The prompt snippet key | defaults to undefined| ### Return type @@ -611,7 +613,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let restrictedModelsRequest: RestrictedModelsRequest; //List of AI model keys to remove from the restricted list const { status, data } = await apiInstance.deleteRestrictedModels( @@ -625,7 +627,7 @@ const { status, data } = await apiInstance.deleteRestrictedModels( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **restrictedModelsRequest** | **RestrictedModelsRequest**| List of AI model keys to remove from the restricted list | | -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type @@ -669,8 +671,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) const { status, data } = await apiInstance.getAIConfig( projectKey, @@ -682,8 +684,8 @@ const { status, data } = await apiInstance.getAIConfig( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| ### Return type @@ -727,8 +729,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) let from: number; //The starting time, as milliseconds since epoch (inclusive). (default to undefined) let to: number; //The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. (default to undefined) let env: string; //An environment key. Only metrics from this environment will be included. (default to undefined) @@ -750,8 +752,8 @@ const { status, data } = await apiInstance.getAIConfigMetrics( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| | **from** | [**number**] | The starting time, as milliseconds since epoch (inclusive). | defaults to undefined| | **to** | [**number**] | The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. | defaults to undefined| | **env** | [**string**] | An environment key. Only metrics from this environment will be included. | defaults to undefined| @@ -800,8 +802,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) let from: number; //The starting time, as milliseconds since epoch (inclusive). (default to undefined) let to: number; //The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. (default to undefined) let env: string; //An environment key. Only metrics from this environment will be included. (default to undefined) @@ -823,8 +825,8 @@ const { status, data } = await apiInstance.getAIConfigMetricsByVariation( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| | **from** | [**number**] | The starting time, as milliseconds since epoch (inclusive). | defaults to undefined| | **to** | [**number**] | The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`. | defaults to undefined| | **env** | [**string**] | An environment key. Only metrics from this environment will be included. | defaults to undefined| @@ -873,7 +875,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let env: string; //An environment key. Only metrics from this environment will be included. (default to undefined) const { status, data } = await apiInstance.getAIConfigQuickStats( @@ -886,7 +888,7 @@ const { status, data } = await apiInstance.getAIConfigQuickStats( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| | **env** | [**string**] | An environment key. Only metrics from this environment will be included. | defaults to undefined| @@ -931,8 +933,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) const { status, data } = await apiInstance.getAIConfigTargeting( projectKey, @@ -944,8 +946,8 @@ const { status, data } = await apiInstance.getAIConfigTargeting( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| ### Return type @@ -988,9 +990,9 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) -let variationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) +let variationKey: string; //The AI Config variation key (default to undefined) const { status, data } = await apiInstance.getAIConfigVariation( projectKey, @@ -1003,9 +1005,9 @@ const { status, data } = await apiInstance.getAIConfigVariation( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| -| **variationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| +| **variationKey** | [**string**] | The AI Config variation key | defaults to undefined| ### Return type @@ -1049,7 +1051,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let sort: string; //A sort to apply to the list of AgentControl configs. (optional) (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -1068,7 +1070,7 @@ const { status, data } = await apiInstance.getAIConfigs( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| | **sort** | [**string**] | A sort to apply to the list of AgentControl configs. | (optional) defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -1116,8 +1118,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let toolKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let toolKey: string; //The AI tool key (default to undefined) const { status, data } = await apiInstance.getAITool( projectKey, @@ -1129,8 +1131,8 @@ const { status, data } = await apiInstance.getAITool( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **toolKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **toolKey** | [**string**] | The AI tool key | defaults to undefined| ### Return type @@ -1175,8 +1177,8 @@ const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) -let projectKey: string; // (default to undefined) -let graphKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let graphKey: string; //The agent graph key (default to undefined) const { status, data } = await apiInstance.getAgentGraph( lDAPIVersion, @@ -1190,8 +1192,8 @@ const { status, data } = await apiInstance.getAgentGraph( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| -| **projectKey** | [**string**] | | defaults to undefined| -| **graphKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **graphKey** | [**string**] | The agent graph key | defaults to undefined| ### Return type @@ -1235,8 +1237,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) const { status, data } = await apiInstance.getAgentOptimization( projectKey, @@ -1248,8 +1250,8 @@ const { status, data } = await apiInstance.getAgentOptimization( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| ### Return type @@ -1292,8 +1294,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let skillKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let skillKey: string; //The agent skill key (default to undefined) const { status, data } = await apiInstance.getAgentSkill( projectKey, @@ -1305,8 +1307,8 @@ const { status, data } = await apiInstance.getAgentSkill( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **skillKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **skillKey** | [**string**] | The agent skill key | defaults to undefined| ### Return type @@ -1349,8 +1351,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let modelConfigKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let modelConfigKey: string; //The AI model config key (default to undefined) let version: number; //Specific model config version to return. Omit to return the latest version. (optional) (default to undefined) const { status, data } = await apiInstance.getModelConfig( @@ -1364,8 +1366,8 @@ const { status, data } = await apiInstance.getModelConfig( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **modelConfigKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **modelConfigKey** | [**string**] | The AI model config key | defaults to undefined| | **version** | [**number**] | Specific model config version to return. Omit to return the latest version. | (optional) defaults to undefined| @@ -1410,8 +1412,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let snippetKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let snippetKey: string; //The prompt snippet key (default to undefined) const { status, data } = await apiInstance.getPromptSnippet( projectKey, @@ -1423,8 +1425,8 @@ const { status, data } = await apiInstance.getPromptSnippet( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **snippetKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **snippetKey** | [**string**] | The prompt snippet key | defaults to undefined| ### Return type @@ -1451,6 +1453,70 @@ const { status, data } = await apiInstance.getPromptSnippet( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **listAIToolReferences** +> ToolReferences listAIToolReferences() + +Get all AgentControl config variations that currently reference this tool. + +### Example + +```typescript +import { + AgentControlApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AgentControlApi(configuration); + +let projectKey: string; //The project key (default to undefined) +let toolKey: string; //The AI tool key (default to undefined) +let limit: number; //The number of resources to return. (optional) (default to undefined) +let offset: number; //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`. (optional) (default to undefined) + +const { status, data } = await apiInstance.listAIToolReferences( + projectKey, + toolKey, + limit, + offset +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **toolKey** | [**string**] | The AI tool key | defaults to undefined| +| **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| +| **offset** | [**number**] | 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`. | (optional) defaults to undefined| + + +### Return type + +**ToolReferences** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | AI tool references | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **listAIToolVersions** > AITools listAIToolVersions() @@ -1467,8 +1533,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let toolKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let toolKey: string; //The AI tool key (default to undefined) let sort: string; //A sort to apply to the list of AgentControl configs. (optional) (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -1486,8 +1552,8 @@ const { status, data } = await apiInstance.listAIToolVersions( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **toolKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **toolKey** | [**string**] | The AI tool key | defaults to undefined| | **sort** | [**string**] | A sort to apply to the list of AgentControl configs. | (optional) defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -1533,7 +1599,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let sort: string; //A sort to apply to the list of AgentControl configs. (optional) (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -1552,7 +1618,7 @@ const { status, data } = await apiInstance.listAITools( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| | **sort** | [**string**] | A sort to apply to the list of AgentControl configs. | (optional) defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -1600,7 +1666,7 @@ const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) let filter: string; //A filter to apply to the list. (optional) (default to undefined) @@ -1619,7 +1685,7 @@ const { status, data } = await apiInstance.listAgentGraphs( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| | **filter** | [**string**] | A filter to apply to the list. | (optional) defaults to undefined| @@ -1665,8 +1731,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -1682,8 +1748,8 @@ const { status, data } = await apiInstance.listAgentOptimizationResults( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -1728,9 +1794,9 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) -let runId: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) +let runId: string; //The agent optimization run ID (default to undefined) const { status, data } = await apiInstance.listAgentOptimizationResultsByRunId( projectKey, @@ -1743,9 +1809,9 @@ const { status, data } = await apiInstance.listAgentOptimizationResultsByRunId( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| -| **runId** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| +| **runId** | [**string**] | The agent optimization run ID | defaults to undefined| ### Return type @@ -1772,6 +1838,70 @@ const { status, data } = await apiInstance.listAgentOptimizationResultsByRunId( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **listAgentOptimizationRuns** +> AgentOptimizationRuns listAgentOptimizationRuns() + +Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC. + +### Example + +```typescript +import { + AgentControlApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new AgentControlApi(configuration); + +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) +let limit: number; //The number of resources to return. (optional) (default to undefined) +let offset: number; //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`. (optional) (default to undefined) + +const { status, data } = await apiInstance.listAgentOptimizationRuns( + projectKey, + optimizationKey, + limit, + offset +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| +| **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| +| **offset** | [**number**] | 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`. | (optional) defaults to undefined| + + +### Return type + +**AgentOptimizationRuns** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Agent optimization run list | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **listAgentOptimizations** > AgentOptimizations listAgentOptimizations() @@ -1788,7 +1918,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) let filter: string; //A filter to apply to the list. (optional) (default to undefined) @@ -1805,7 +1935,7 @@ const { status, data } = await apiInstance.listAgentOptimizations( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| | **filter** | [**string**] | A filter to apply to the list. | (optional) defaults to undefined| @@ -1852,8 +1982,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let skillKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let skillKey: string; //The agent skill key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -1869,8 +1999,8 @@ const { status, data } = await apiInstance.listAgentSkillReferences( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **skillKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **skillKey** | [**string**] | The agent skill key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -1915,8 +2045,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let skillKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let skillKey: string; //The agent skill key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -1932,8 +2062,8 @@ const { status, data } = await apiInstance.listAgentSkillVersions( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **skillKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **skillKey** | [**string**] | The agent skill key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -1979,7 +2109,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) let filter: string; //A filter to apply to the list. (optional) (default to undefined) @@ -1996,7 +2126,7 @@ const { status, data } = await apiInstance.listAgentSkills( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| | **filter** | [**string**] | A filter to apply to the list. | (optional) defaults to undefined| @@ -2043,8 +2173,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -2060,8 +2190,8 @@ const { status, data } = await apiInstance.listAllAgentOptimizationResults( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -2106,8 +2236,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let modelConfigKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let modelConfigKey: string; //The AI model config key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -2123,8 +2253,8 @@ const { status, data } = await apiInstance.listModelConfigVersions( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **modelConfigKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **modelConfigKey** | [**string**] | The AI model config key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -2170,12 +2300,16 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let restricted: boolean; //Whether to return only restricted models (optional) (default to undefined) +let sort: string; //A sort to apply to the list of AgentControl configs. (optional) (default to undefined) +let filter: string; //A filter to apply to the list. (optional) (default to undefined) const { status, data } = await apiInstance.listModelConfigs( projectKey, - restricted + restricted, + sort, + filter ); ``` @@ -2183,8 +2317,10 @@ const { status, data } = await apiInstance.listModelConfigs( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| | **restricted** | [**boolean**] | Whether to return only restricted models | (optional) defaults to undefined| +| **sort** | [**string**] | A sort to apply to the list of AgentControl configs. | (optional) defaults to undefined| +| **filter** | [**string**] | A filter to apply to the list. | (optional) defaults to undefined| ### Return type @@ -2228,8 +2364,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let snippetKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let snippetKey: string; //The prompt snippet key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -2245,8 +2381,8 @@ const { status, data } = await apiInstance.listPromptSnippetReferences( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **snippetKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **snippetKey** | [**string**] | The prompt snippet key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -2291,8 +2427,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let snippetKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let snippetKey: string; //The prompt snippet key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) @@ -2308,8 +2444,8 @@ const { status, data } = await apiInstance.listPromptSnippetVersions( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| -| **snippetKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **snippetKey** | [**string**] | The prompt snippet key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| @@ -2355,7 +2491,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let limit: number; //The number of resources to return. (optional) (default to undefined) let offset: number; //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`. (optional) (default to undefined) let filter: string; //A filter to apply to the list. (optional) (default to undefined) @@ -2372,7 +2508,7 @@ const { status, data } = await apiInstance.listPromptSnippets( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| | **limit** | [**number**] | The number of resources to return. | (optional) defaults to undefined| | **offset** | [**number**] | 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`. | (optional) defaults to undefined| | **filter** | [**string**] | A filter to apply to the list. | (optional) defaults to undefined| @@ -2420,8 +2556,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) let aIConfigPatch: AIConfigPatch; //AI Config object to update (optional) const { status, data } = await apiInstance.patchAIConfig( @@ -2436,8 +2572,8 @@ const { status, data } = await apiInstance.patchAIConfig( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **aIConfigPatch** | **AIConfigPatch**| AI Config object to update | | -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| ### Return type @@ -2482,8 +2618,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) let aIConfigTargetingPatch: AIConfigTargetingPatch; //AI Config targeting semantic patch instructions (optional) const { status, data } = await apiInstance.patchAIConfigTargeting( @@ -2498,8 +2634,8 @@ const { status, data } = await apiInstance.patchAIConfigTargeting( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **aIConfigTargetingPatch** | **AIConfigTargetingPatch**| AI Config targeting semantic patch instructions | | -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| ### Return type @@ -2530,7 +2666,7 @@ const { status, data } = await apiInstance.patchAIConfigTargeting( # **patchAIConfigVariation** > AIConfigVariation patchAIConfigVariation() -Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` +Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the variation is in use in a project environment where approval settings require review for this AI Config, this endpoint returns 403 and the change must be submitted through an approval request. Here\'s an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ``` ### Example @@ -2544,9 +2680,9 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) -let variationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) +let variationKey: string; //The AI Config variation key (default to undefined) let aIConfigVariationPatch: AIConfigVariationPatch; //AI Config variation object to update (optional) const { status, data } = await apiInstance.patchAIConfigVariation( @@ -2562,9 +2698,9 @@ const { status, data } = await apiInstance.patchAIConfigVariation( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **aIConfigVariationPatch** | **AIConfigVariationPatch**| AI Config variation object to update | | -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| -| **variationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| +| **variationKey** | [**string**] | The AI Config variation key | defaults to undefined| ### Return type @@ -2609,8 +2745,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let toolKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let toolKey: string; //The AI tool key (default to undefined) let aIToolPatch: AIToolPatch; //AI tool object to update (optional) const { status, data } = await apiInstance.patchAITool( @@ -2625,8 +2761,8 @@ const { status, data } = await apiInstance.patchAITool( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **aIToolPatch** | **AIToolPatch**| AI tool object to update | | -| **projectKey** | [**string**] | | defaults to undefined| -| **toolKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **toolKey** | [**string**] | The AI tool key | defaults to undefined| ### Return type @@ -2672,8 +2808,8 @@ const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) -let projectKey: string; // (default to undefined) -let graphKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let graphKey: string; //The agent graph key (default to undefined) let agentGraphPatch: AgentGraphPatch; //Agent graph object to update (optional) const { status, data } = await apiInstance.patchAgentGraph( @@ -2690,8 +2826,8 @@ const { status, data } = await apiInstance.patchAgentGraph( |------------- | ------------- | ------------- | -------------| | **agentGraphPatch** | **AgentGraphPatch**| Agent graph object to update | | | **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| -| **projectKey** | [**string**] | | defaults to undefined| -| **graphKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **graphKey** | [**string**] | The agent graph key | defaults to undefined| ### Return type @@ -2736,8 +2872,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) let agentOptimizationPatch: AgentOptimizationPatch; //Agent optimization fields to update const { status, data } = await apiInstance.patchAgentOptimization( @@ -2752,8 +2888,8 @@ const { status, data } = await apiInstance.patchAgentOptimization( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **agentOptimizationPatch** | **AgentOptimizationPatch**| Agent optimization fields to update | | -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| ### Return type @@ -2799,9 +2935,9 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) -let resultId: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) +let resultId: string; //The agent optimization result ID (default to undefined) let agentOptimizationResultPatch: AgentOptimizationResultPatch; //Agent optimization result fields to update const { status, data } = await apiInstance.patchAgentOptimizationResult( @@ -2817,9 +2953,9 @@ const { status, data } = await apiInstance.patchAgentOptimizationResult( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **agentOptimizationResultPatch** | **AgentOptimizationResultPatch**| Agent optimization result fields to update | | -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| -| **resultId** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| +| **resultId** | [**string**] | The agent optimization result ID | defaults to undefined| ### Return type @@ -2864,8 +3000,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let skillKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let skillKey: string; //The agent skill key (default to undefined) let agentSkillPatch: AgentSkillPatch; //Agent skill fields to update const { status, data } = await apiInstance.patchAgentSkill( @@ -2880,8 +3016,8 @@ const { status, data } = await apiInstance.patchAgentSkill( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **agentSkillPatch** | **AgentSkillPatch**| Agent skill fields to update | | -| **projectKey** | [**string**] | | defaults to undefined| -| **skillKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **skillKey** | [**string**] | The agent skill key | defaults to undefined| ### Return type @@ -2927,8 +3063,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let modelConfigKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let modelConfigKey: string; //The AI model config key (default to undefined) let modelConfigPatch: ModelConfigPatch; //AI model config object to update const { status, data } = await apiInstance.patchModelConfig( @@ -2943,8 +3079,8 @@ const { status, data } = await apiInstance.patchModelConfig( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **modelConfigPatch** | **ModelConfigPatch**| AI model config object to update | | -| **projectKey** | [**string**] | | defaults to undefined| -| **modelConfigKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **modelConfigKey** | [**string**] | The AI model config key | defaults to undefined| ### Return type @@ -2989,8 +3125,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let snippetKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let snippetKey: string; //The prompt snippet key (default to undefined) let promptSnippetPatch: PromptSnippetPatch; //Prompt snippet fields to update const { status, data } = await apiInstance.patchPromptSnippet( @@ -3005,8 +3141,8 @@ const { status, data } = await apiInstance.patchPromptSnippet( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **promptSnippetPatch** | **PromptSnippetPatch**| Prompt snippet fields to update | | -| **projectKey** | [**string**] | | defaults to undefined| -| **snippetKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **snippetKey** | [**string**] | The prompt snippet key | defaults to undefined| ### Return type @@ -3052,7 +3188,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let aIConfigPost: AIConfigPost; //AI Config object to create const { status, data } = await apiInstance.postAIConfig( @@ -3066,7 +3202,7 @@ const { status, data } = await apiInstance.postAIConfig( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **aIConfigPost** | **AIConfigPost**| AI Config object to create | | -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type @@ -3111,8 +3247,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let configKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let configKey: string; //The AI Config key (default to undefined) let aIConfigVariationPost: AIConfigVariationPost; //AI Config variation object to create const { status, data } = await apiInstance.postAIConfigVariation( @@ -3127,8 +3263,8 @@ const { status, data } = await apiInstance.postAIConfigVariation( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **aIConfigVariationPost** | **AIConfigVariationPost**| AI Config variation object to create | | -| **projectKey** | [**string**] | | defaults to undefined| -| **configKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **configKey** | [**string**] | The AI Config key | defaults to undefined| ### Return type @@ -3173,7 +3309,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let aIToolPost: AIToolPost; //AI tool object to create const { status, data } = await apiInstance.postAITool( @@ -3187,7 +3323,7 @@ const { status, data } = await apiInstance.postAITool( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **aIToolPost** | **AIToolPost**| AI tool object to create | | -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type @@ -3233,7 +3369,7 @@ const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let agentGraphPost: AgentGraphPost; //Agent graph object to create const { status, data } = await apiInstance.postAgentGraph( @@ -3249,7 +3385,7 @@ const { status, data } = await apiInstance.postAgentGraph( |------------- | ------------- | ------------- | -------------| | **agentGraphPost** | **AgentGraphPost**| Agent graph object to create | | | **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type @@ -3294,7 +3430,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let agentOptimizationPost: AgentOptimizationPost; //Agent optimization object to create const { status, data } = await apiInstance.postAgentOptimization( @@ -3308,7 +3444,7 @@ const { status, data } = await apiInstance.postAgentOptimization( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **agentOptimizationPost** | **AgentOptimizationPost**| Agent optimization object to create | | -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type @@ -3353,8 +3489,8 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) -let optimizationKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) +let optimizationKey: string; //The agent optimization key (default to undefined) let agentOptimizationResultPost: AgentOptimizationResultPost; //Agent optimization result to create const { status, data } = await apiInstance.postAgentOptimizationResult( @@ -3369,8 +3505,8 @@ const { status, data } = await apiInstance.postAgentOptimizationResult( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **agentOptimizationResultPost** | **AgentOptimizationResultPost**| Agent optimization result to create | | -| **projectKey** | [**string**] | | defaults to undefined| -| **optimizationKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **optimizationKey** | [**string**] | The agent optimization key | defaults to undefined| ### Return type @@ -3416,7 +3552,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let agentSkillPost: AgentSkillPost; //Agent skill object to create const { status, data } = await apiInstance.postAgentSkill( @@ -3430,7 +3566,7 @@ const { status, data } = await apiInstance.postAgentSkill( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **agentSkillPost** | **AgentSkillPost**| Agent skill object to create | | -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type @@ -3476,7 +3612,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let modelConfigPost: ModelConfigPost; //AI model config object to create const { status, data } = await apiInstance.postModelConfig( @@ -3490,7 +3626,7 @@ const { status, data } = await apiInstance.postModelConfig( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **modelConfigPost** | **ModelConfigPost**| AI model config object to create | | -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type @@ -3535,7 +3671,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let promptSnippetPost: PromptSnippetPost; //Prompt snippet object to create const { status, data } = await apiInstance.postPromptSnippet( @@ -3549,7 +3685,7 @@ const { status, data } = await apiInstance.postPromptSnippet( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **promptSnippetPost** | **PromptSnippetPost**| Prompt snippet object to create | | -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type @@ -3595,7 +3731,7 @@ import { const configuration = new Configuration(); const apiInstance = new AgentControlApi(configuration); -let projectKey: string; // (default to undefined) +let projectKey: string; //The project key (default to undefined) let restrictedModelsRequest: RestrictedModelsRequest; //List of AI model keys to add to the restricted list. const { status, data } = await apiInstance.postRestrictedModels( @@ -3609,7 +3745,7 @@ const { status, data } = await apiInstance.postRestrictedModels( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **restrictedModelsRequest** | **RestrictedModelsRequest**| List of AI model keys to add to the restricted list. | | -| **projectKey** | [**string**] | | defaults to undefined| +| **projectKey** | [**string**] | The project key | defaults to undefined| ### Return type diff --git a/docs/AgentGraph.md b/docs/AgentGraph.md index 4d78c75..cc56909 100644 --- a/docs/AgentGraph.md +++ b/docs/AgentGraph.md @@ -7,6 +7,7 @@ An agent graph representing a directed graph of configs Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_access** | [**AiConfigsAccess**](AiConfigsAccess.md) | | [optional] [default to undefined] +**_site** | [**CoreLink**](CoreLink.md) | | [optional] [default to undefined] **key** | **string** | A unique key for the agent graph | [default to undefined] **name** | **string** | A human-readable name for the agent graph | [default to undefined] **description** | **string** | A description of the agent graph | [optional] [default to undefined] @@ -23,6 +24,7 @@ import { AgentGraph } from 'launchdarkly-api-typescript'; const instance: AgentGraph = { _access, + _site, key, name, description, diff --git a/docs/AgentGraphMaintainer.md b/docs/AgentGraphMaintainer.md index da821ea..75840ae 100644 --- a/docs/AgentGraphMaintainer.md +++ b/docs/AgentGraphMaintainer.md @@ -1,18 +1,19 @@ # AgentGraphMaintainer +The member or team that maintains this agent graph ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **kind** | **string** | | [optional] [default to undefined] -**_id** | **string** | | [default to undefined] -**email** | **string** | | [default to undefined] -**firstName** | **string** | | [optional] [default to undefined] -**lastName** | **string** | | [optional] [default to undefined] -**role** | **string** | | [default to undefined] -**key** | **string** | | [default to undefined] -**name** | **string** | | [default to undefined] +**_id** | **string** | The member ID | [default to undefined] +**email** | **string** | The member email address | [default to undefined] +**firstName** | **string** | The member first name | [optional] [default to undefined] +**lastName** | **string** | The member last name | [optional] [default to undefined] +**role** | **string** | The member role | [default to undefined] +**key** | **string** | The team key | [default to undefined] +**name** | **string** | The team name | [default to undefined] ## Example diff --git a/docs/AgentGraphs.md b/docs/AgentGraphs.md index 89c9239..861f8b5 100644 --- a/docs/AgentGraphs.md +++ b/docs/AgentGraphs.md @@ -7,8 +7,8 @@ A collection of agent graphs Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<AgentGraph>**](AgentGraph.md) | | [default to undefined] -**totalCount** | **number** | | [default to undefined] +**items** | [**Array<AgentGraph>**](AgentGraph.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [default to undefined] ## Example diff --git a/docs/AgentOptimization.md b/docs/AgentOptimization.md index 88bb06b..e5c2880 100644 --- a/docs/AgentOptimization.md +++ b/docs/AgentOptimization.md @@ -7,26 +7,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_access** | [**AiConfigsAccess**](AiConfigsAccess.md) | | [optional] [default to undefined] **_links** | [**ParentAndSelfLinks**](ParentAndSelfLinks.md) | | [optional] [default to undefined] -**id** | **string** | | [default to undefined] -**key** | **string** | | [default to undefined] -**aiConfigKey** | **string** | | [default to undefined] -**maxAttempts** | **number** | | [default to undefined] -**modelChoices** | **Array<string>** | | [default to undefined] -**judgeModel** | **string** | | [default to undefined] -**variableChoices** | **Array<{ [key: string]: any; }>** | | [default to undefined] -**acceptanceStatements** | [**Array<AgentOptimizationAcceptanceStatement>**](AgentOptimizationAcceptanceStatement.md) | | [default to undefined] -**judges** | [**Array<AgentOptimizationJudge>**](AgentOptimizationJudge.md) | | [default to undefined] -**userInputOptions** | **Array<string>** | | [default to undefined] -**groundTruthResponses** | **Array<string>** | | [default to undefined] -**metricKey** | **string** | | [optional] [default to undefined] -**tokenLimit** | **number** | | [optional] [default to undefined] -**variationKey** | **string** | | [optional] [default to undefined] -**label** | **string** | | [optional] [default to undefined] -**latencyOptimization** | **boolean** | | [optional] [default to undefined] -**tokenOptimization** | **boolean** | | [optional] [default to undefined] -**autoCommit** | **boolean** | | [optional] [default to undefined] -**version** | **number** | | [default to undefined] -**createdAt** | **number** | | [default to undefined] +**id** | **string** | The agent optimization ID | [default to undefined] +**key** | **string** | The agent optimization key | [default to undefined] +**aiConfigKey** | **string** | The key of the AI Config to optimize | [default to undefined] +**maxAttempts** | **number** | The maximum number of attempts | [default to undefined] +**modelChoices** | **Array<string>** | The models to try | [default to undefined] +**judgeModel** | **string** | The model used to judge responses | [default to undefined] +**variableChoices** | **Array<{ [key: string]: any; }>** | Sets of prompt variable values to try | [default to undefined] +**acceptanceStatements** | [**Array<AgentOptimizationAcceptanceStatement>**](AgentOptimizationAcceptanceStatement.md) | Statements a response must satisfy to pass | [default to undefined] +**judges** | [**Array<AgentOptimizationJudge>**](AgentOptimizationJudge.md) | Judges that score each response | [default to undefined] +**userInputOptions** | **Array<string>** | User inputs to test with | [default to undefined] +**groundTruthResponses** | **Array<string>** | Expected responses to compare against | [default to undefined] +**metricKey** | **string** | The key of the metric to optimize | [optional] [default to undefined] +**tokenLimit** | **number** | The maximum number of tokens to use | [optional] [default to undefined] +**variationKey** | **string** | The key of the variation to start from | [optional] [default to undefined] +**label** | **string** | A label for the optimization | [optional] [default to undefined] +**latencyOptimization** | **boolean** | Whether to optimize for lower latency | [optional] [default to undefined] +**tokenOptimization** | **boolean** | Whether to optimize for lower token use | [optional] [default to undefined] +**autoCommit** | **boolean** | Whether to save the best result as a new variation automatically | [optional] [default to undefined] +**version** | **number** | The version number of this resource | [default to undefined] +**createdAt** | **number** | When this resource was created, in Unix milliseconds | [default to undefined] ## Example diff --git a/docs/AgentOptimizationAcceptanceStatement.md b/docs/AgentOptimizationAcceptanceStatement.md index 062ea4b..56c79e7 100644 --- a/docs/AgentOptimizationAcceptanceStatement.md +++ b/docs/AgentOptimizationAcceptanceStatement.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**statement** | **string** | | [default to undefined] -**threshold** | **number** | | [default to undefined] +**statement** | **string** | A statement the response must satisfy | [default to undefined] +**threshold** | **number** | The minimum score needed to pass | [default to undefined] ## Example diff --git a/docs/AgentOptimizationJudge.md b/docs/AgentOptimizationJudge.md index e136eb0..cce3b61 100644 --- a/docs/AgentOptimizationJudge.md +++ b/docs/AgentOptimizationJudge.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] -**threshold** | **number** | | [default to undefined] +**key** | **string** | The key of the judge AI Config | [default to undefined] +**threshold** | **number** | The minimum score needed to pass | [default to undefined] ## Example diff --git a/docs/AgentOptimizationPatch.md b/docs/AgentOptimizationPatch.md index 4dc7d8c..70d80bc 100644 --- a/docs/AgentOptimizationPatch.md +++ b/docs/AgentOptimizationPatch.md @@ -5,21 +5,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**maxAttempts** | **number** | | [optional] [default to undefined] -**modelChoices** | **Array<string>** | | [optional] [default to undefined] -**judgeModel** | **string** | | [optional] [default to undefined] -**variableChoices** | **Array<{ [key: string]: any; }>** | | [optional] [default to undefined] -**acceptanceStatements** | [**Array<AgentOptimizationAcceptanceStatement>**](AgentOptimizationAcceptanceStatement.md) | | [optional] [default to undefined] -**judges** | [**Array<AgentOptimizationJudge>**](AgentOptimizationJudge.md) | | [optional] [default to undefined] -**userInputOptions** | **Array<string>** | | [optional] [default to undefined] -**groundTruthResponses** | **Array<string>** | | [optional] [default to undefined] -**metricKey** | **string** | | [optional] [default to undefined] -**tokenLimit** | **number** | | [optional] [default to undefined] -**variationKey** | **string** | | [optional] [default to undefined] -**label** | **string** | | [optional] [default to undefined] -**latencyOptimization** | **boolean** | | [optional] [default to undefined] -**tokenOptimization** | **boolean** | | [optional] [default to undefined] -**autoCommit** | **boolean** | | [optional] [default to undefined] +**maxAttempts** | **number** | The maximum number of attempts | [optional] [default to undefined] +**modelChoices** | **Array<string>** | The models to try | [optional] [default to undefined] +**judgeModel** | **string** | The model used to judge responses | [optional] [default to undefined] +**variableChoices** | **Array<{ [key: string]: any; }>** | Sets of prompt variable values to try | [optional] [default to undefined] +**acceptanceStatements** | [**Array<AgentOptimizationAcceptanceStatement>**](AgentOptimizationAcceptanceStatement.md) | Statements a response must satisfy to pass | [optional] [default to undefined] +**judges** | [**Array<AgentOptimizationJudge>**](AgentOptimizationJudge.md) | Judges that score each response | [optional] [default to undefined] +**userInputOptions** | **Array<string>** | User inputs to test with | [optional] [default to undefined] +**groundTruthResponses** | **Array<string>** | Expected responses to compare against | [optional] [default to undefined] +**metricKey** | **string** | The key of the metric to optimize | [optional] [default to undefined] +**tokenLimit** | **number** | The maximum number of tokens to use | [optional] [default to undefined] +**variationKey** | **string** | The key of the variation to start from | [optional] [default to undefined] +**label** | **string** | A label for the optimization | [optional] [default to undefined] +**latencyOptimization** | **boolean** | Whether to optimize for lower latency | [optional] [default to undefined] +**tokenOptimization** | **boolean** | Whether to optimize for lower token use | [optional] [default to undefined] +**autoCommit** | **boolean** | Whether to save the best result as a new variation automatically | [optional] [default to undefined] ## Example diff --git a/docs/AgentOptimizationPost.md b/docs/AgentOptimizationPost.md index bb36cb2..5cd1761 100644 --- a/docs/AgentOptimizationPost.md +++ b/docs/AgentOptimizationPost.md @@ -5,23 +5,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] -**aiConfigKey** | **string** | | [default to undefined] -**maxAttempts** | **number** | | [default to undefined] -**modelChoices** | **Array<string>** | | [optional] [default to undefined] -**judgeModel** | **string** | | [default to undefined] -**variableChoices** | **Array<{ [key: string]: any; }>** | | [optional] [default to undefined] -**acceptanceStatements** | [**Array<AgentOptimizationAcceptanceStatement>**](AgentOptimizationAcceptanceStatement.md) | | [optional] [default to undefined] -**judges** | [**Array<AgentOptimizationJudge>**](AgentOptimizationJudge.md) | | [optional] [default to undefined] -**userInputOptions** | **Array<string>** | | [optional] [default to undefined] -**groundTruthResponses** | **Array<string>** | | [optional] [default to undefined] -**metricKey** | **string** | | [optional] [default to undefined] -**tokenLimit** | **number** | | [optional] [default to undefined] -**variationKey** | **string** | | [optional] [default to undefined] -**label** | **string** | | [optional] [default to undefined] -**latencyOptimization** | **boolean** | | [optional] [default to undefined] -**tokenOptimization** | **boolean** | | [optional] [default to undefined] -**autoCommit** | **boolean** | | [optional] [default to undefined] +**key** | **string** | A unique key for the agent optimization | [default to undefined] +**aiConfigKey** | **string** | The key of the AI Config to optimize | [default to undefined] +**maxAttempts** | **number** | The maximum number of attempts | [default to undefined] +**modelChoices** | **Array<string>** | The models to try | [optional] [default to undefined] +**judgeModel** | **string** | The model used to judge responses | [default to undefined] +**variableChoices** | **Array<{ [key: string]: any; }>** | Sets of prompt variable values to try | [optional] [default to undefined] +**acceptanceStatements** | [**Array<AgentOptimizationAcceptanceStatement>**](AgentOptimizationAcceptanceStatement.md) | Statements a response must satisfy to pass | [optional] [default to undefined] +**judges** | [**Array<AgentOptimizationJudge>**](AgentOptimizationJudge.md) | Judges that score each response | [optional] [default to undefined] +**userInputOptions** | **Array<string>** | User inputs to test with | [optional] [default to undefined] +**groundTruthResponses** | **Array<string>** | Expected responses to compare against | [optional] [default to undefined] +**metricKey** | **string** | The key of the metric to optimize | [optional] [default to undefined] +**tokenLimit** | **number** | The maximum number of tokens to use | [optional] [default to undefined] +**variationKey** | **string** | The key of the variation to start from | [optional] [default to undefined] +**label** | **string** | A label for the optimization | [optional] [default to undefined] +**latencyOptimization** | **boolean** | Whether to optimize for lower latency | [optional] [default to undefined] +**tokenOptimization** | **boolean** | Whether to optimize for lower token use | [optional] [default to undefined] +**autoCommit** | **boolean** | Whether to save the best result as a new variation automatically | [optional] [default to undefined] ## Example diff --git a/docs/AgentOptimizationResult.md b/docs/AgentOptimizationResult.md index 17db108..590bd32 100644 --- a/docs/AgentOptimizationResult.md +++ b/docs/AgentOptimizationResult.md @@ -7,27 +7,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_access** | [**AiConfigsAccess**](AiConfigsAccess.md) | | [optional] [default to undefined] **_links** | [**ParentAndSelfLinks**](ParentAndSelfLinks.md) | | [optional] [default to undefined] -**id** | **string** | | [default to undefined] -**runId** | **string** | | [default to undefined] -**agentOptimizationId** | **string** | | [default to undefined] -**agentOptimizationVersion** | **number** | | [default to undefined] +**id** | **string** | The result ID | [default to undefined] +**runId** | **string** | The ID of the run this result belongs to | [default to undefined] +**agentOptimizationId** | **string** | The agent optimization ID | [default to undefined] +**agentOptimizationVersion** | **number** | The version of the agent optimization used | [default to undefined] **status** | [**AgentOptimizationResultStatus**](AgentOptimizationResultStatus.md) | | [default to undefined] **activity** | [**AgentOptimizationResultActivity**](AgentOptimizationResultActivity.md) | | [default to undefined] -**iteration** | **number** | | [default to undefined] -**instructions** | **string** | | [default to undefined] -**parameters** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**userInput** | **string** | | [default to undefined] -**completionResponse** | **string** | | [optional] [default to undefined] -**variation** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**scores** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**generationTokens** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**evaluationTokens** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**generationLatency** | **number** | | [optional] [default to undefined] -**evaluationLatencies** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**completedAt** | **number** | | [optional] [default to undefined] -**createdVariationKey** | **string** | | [optional] [default to undefined] -**createdAt** | **number** | | [default to undefined] -**updatedAt** | **number** | | [default to undefined] +**iteration** | **number** | The iteration number within the run | [default to undefined] +**instructions** | **string** | The instructions used for this attempt | [default to undefined] +**parameters** | **{ [key: string]: any; }** | The model parameters used for this attempt | [optional] [default to undefined] +**userInput** | **string** | The user input used for this attempt | [default to undefined] +**completionResponse** | **string** | The model response | [optional] [default to undefined] +**variation** | **{ [key: string]: any; }** | The variation that was tested | [optional] [default to undefined] +**scores** | **{ [key: string]: any; }** | The scores for the response | [optional] [default to undefined] +**generationTokens** | **{ [key: string]: any; }** | Token usage for generating the response | [optional] [default to undefined] +**evaluationTokens** | **{ [key: string]: any; }** | Token usage for judging the response | [optional] [default to undefined] +**generationLatency** | **number** | How long the response took to generate | [optional] [default to undefined] +**evaluationLatencies** | **{ [key: string]: any; }** | How long each evaluation took | [optional] [default to undefined] +**completedAt** | **number** | When this finished, in Unix milliseconds | [optional] [default to undefined] +**createdVariationKey** | **string** | The key of the variation created from this result | [optional] [default to undefined] +**createdAt** | **number** | When this resource was created, in Unix milliseconds | [default to undefined] +**updatedAt** | **number** | When this resource was last updated, in Unix milliseconds | [default to undefined] ## Example diff --git a/docs/AgentOptimizationResultPatch.md b/docs/AgentOptimizationResultPatch.md index c4de861..bb0845e 100644 --- a/docs/AgentOptimizationResultPatch.md +++ b/docs/AgentOptimizationResultPatch.md @@ -7,14 +7,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**AgentOptimizationResultStatus**](AgentOptimizationResultStatus.md) | | [optional] [default to undefined] **activity** | [**AgentOptimizationResultActivity**](AgentOptimizationResultActivity.md) | | [optional] [default to undefined] -**completionResponse** | **string** | | [optional] [default to undefined] -**variation** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**scores** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**generationTokens** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**evaluationTokens** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**generationLatency** | **number** | | [optional] [default to undefined] -**evaluationLatencies** | **{ [key: string]: any; }** | | [optional] [default to undefined] -**createdVariationKey** | **string** | | [optional] [default to undefined] +**completionResponse** | **string** | The model response | [optional] [default to undefined] +**variation** | **{ [key: string]: any; }** | The variation that was tested | [optional] [default to undefined] +**scores** | **{ [key: string]: any; }** | The scores for the response | [optional] [default to undefined] +**generationTokens** | **{ [key: string]: any; }** | Token usage for generating the response | [optional] [default to undefined] +**evaluationTokens** | **{ [key: string]: any; }** | Token usage for judging the response | [optional] [default to undefined] +**generationLatency** | **number** | How long the response took to generate | [optional] [default to undefined] +**evaluationLatencies** | **{ [key: string]: any; }** | How long each evaluation took | [optional] [default to undefined] +**createdVariationKey** | **string** | The key of the variation created from this result | [optional] [default to undefined] ## Example diff --git a/docs/AgentOptimizationResultPost.md b/docs/AgentOptimizationResultPost.md index ffd8b64..b9e7938 100644 --- a/docs/AgentOptimizationResultPost.md +++ b/docs/AgentOptimizationResultPost.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**runId** | **string** | | [default to undefined] -**agentOptimizationVersion** | **number** | | [default to undefined] -**iteration** | **number** | | [default to undefined] -**instructions** | **string** | | [default to undefined] -**userInput** | **string** | | [default to undefined] -**parameters** | **{ [key: string]: any; }** | | [optional] [default to undefined] +**runId** | **string** | The ID of the run this result belongs to | [default to undefined] +**agentOptimizationVersion** | **number** | The version of the agent optimization used | [default to undefined] +**iteration** | **number** | The iteration number within the run | [default to undefined] +**instructions** | **string** | The instructions used for this attempt | [default to undefined] +**userInput** | **string** | The user input used for this attempt | [default to undefined] +**parameters** | **{ [key: string]: any; }** | The model parameters used for this attempt | [optional] [default to undefined] ## Example diff --git a/docs/AgentOptimizationResults.md b/docs/AgentOptimizationResults.md index ca536fe..a0e247c 100644 --- a/docs/AgentOptimizationResults.md +++ b/docs/AgentOptimizationResults.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<AgentOptimizationResult>**](AgentOptimizationResult.md) | | [default to undefined] -**totalCount** | **number** | | [optional] [default to undefined] +**items** | [**Array<AgentOptimizationResult>**](AgentOptimizationResult.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [optional] [default to undefined] ## Example diff --git a/docs/AgentOptimizationRun.md b/docs/AgentOptimizationRun.md index 6da93e0..ea566e0 100644 --- a/docs/AgentOptimizationRun.md +++ b/docs/AgentOptimizationRun.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**runId** | **string** | | [default to undefined] -**optimizationKey** | **string** | | [default to undefined] -**agentOptimizationId** | **string** | | [default to undefined] -**agentOptimizationVersion** | **number** | | [default to undefined] +**runId** | **string** | The run ID | [default to undefined] +**optimizationKey** | **string** | The agent optimization key | [default to undefined] +**agentOptimizationId** | **string** | The agent optimization ID | [default to undefined] +**agentOptimizationVersion** | **number** | The version of the agent optimization used | [default to undefined] **status** | [**AgentOptimizationResultStatus**](AgentOptimizationResultStatus.md) | | [default to undefined] **activity** | [**AgentOptimizationResultActivity**](AgentOptimizationResultActivity.md) | | [default to undefined] -**createdAt** | **number** | | [default to undefined] -**completedAt** | **number** | | [optional] [default to undefined] +**createdAt** | **number** | When this resource was created, in Unix milliseconds | [default to undefined] +**completedAt** | **number** | When this finished, in Unix milliseconds | [optional] [default to undefined] ## Example diff --git a/docs/AgentOptimizationRuns.md b/docs/AgentOptimizationRuns.md index 69546d7..f9cb019 100644 --- a/docs/AgentOptimizationRuns.md +++ b/docs/AgentOptimizationRuns.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<AgentOptimizationRun>**](AgentOptimizationRun.md) | | [default to undefined] -**totalCount** | **number** | | [optional] [default to undefined] +**items** | [**Array<AgentOptimizationRun>**](AgentOptimizationRun.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [optional] [default to undefined] ## Example diff --git a/docs/AgentOptimizations.md b/docs/AgentOptimizations.md index b48ff71..89d3382 100644 --- a/docs/AgentOptimizations.md +++ b/docs/AgentOptimizations.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<AgentOptimization>**](AgentOptimization.md) | | [default to undefined] -**totalCount** | **number** | | [default to undefined] +**items** | [**Array<AgentOptimization>**](AgentOptimization.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [default to undefined] ## Example diff --git a/docs/AgentSkill.md b/docs/AgentSkill.md index c8b9e7f..088cb0c 100644 --- a/docs/AgentSkill.md +++ b/docs/AgentSkill.md @@ -5,15 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] +**key** | **string** | The agent skill key | [default to undefined] **_access** | [**AiConfigsAccess**](AiConfigsAccess.md) | | [optional] [default to undefined] **_links** | [**ParentAndSelfLinks**](ParentAndSelfLinks.md) | | [optional] [default to undefined] **_maintainer** | [**AIConfigMaintainer**](AIConfigMaintainer.md) | | [optional] [default to undefined] -**name** | **string** | | [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**name** | **string** | Human-readable name of the agent skill. | [default to undefined] +**description** | **string** | Human-readable description of what the agent skill does. | [optional] [default to undefined] **markdown** | **string** | The verbatim SKILL.md content of the agent skill | [default to undefined] -**tags** | **Array<string>** | | [default to undefined] -**version** | **number** | | [default to undefined] +**tags** | **Array<string>** | Tags for the agent skill. Tags can be used in custom role policies. | [default to undefined] +**version** | **number** | Version of the agent skill. Starts at 1, and each update that changes the name, description, or markdown creates a new version. Pass this value with `key` in a variation\'s `skills: [{key, version}]`. | [default to undefined] **createdAt** | **number** | | [default to undefined] ## Example diff --git a/docs/AgentSkillPatch.md b/docs/AgentSkillPatch.md index c05a4cb..6fe12c7 100644 --- a/docs/AgentSkillPatch.md +++ b/docs/AgentSkillPatch.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**name** | **string** | Human-readable name of the agent skill. | [optional] [default to undefined] +**description** | **string** | Human-readable description of what the agent skill does. | [optional] [default to undefined] **markdown** | **string** | The verbatim SKILL.md content of the agent skill | [optional] [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this resource | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains this resource | [optional] [default to undefined] +**tags** | **Array<string>** | Replaces the tags on the agent skill. Tags can be used in custom role policies. Changing only the tags does not create a new version. | [optional] [default to undefined] ## Example diff --git a/docs/AgentSkillPost.md b/docs/AgentSkillPost.md index a5fbb27..f08748e 100644 --- a/docs/AgentSkillPost.md +++ b/docs/AgentSkillPost.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] -**name** | **string** | | [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**key** | **string** | A unique key for the agent skill. The key must match `^[a-z0-9][a-z0-9-]*$`: it can only contain lowercase letters, numbers, or \'-\', and must start with a lowercase letter or number. The key can be at most 64 characters, and Windows reserved file names (`con`, `prn`, `aux`, `nul`, `com0`-`com9`, and `lpt0`-`lpt9`) aren\'t allowed. | [default to undefined] +**name** | **string** | Human-readable name of the agent skill. | [default to undefined] +**description** | **string** | Human-readable description of what the agent skill does. | [optional] [default to undefined] **markdown** | **string** | The verbatim SKILL.md content of the agent skill | [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this resource | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains this resource | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for the agent skill. Tags can be used in custom role policies. | [optional] [default to undefined] ## Example diff --git a/docs/AgentSkillReferences.md b/docs/AgentSkillReferences.md index e7aaedd..f7ac9b6 100644 --- a/docs/AgentSkillReferences.md +++ b/docs/AgentSkillReferences.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] **resourceKey** | **string** | The key of the agent skill. | [default to undefined] **resourceType** | **string** | The type of the resource being referenced. | [default to undefined] -**items** | [**Array<AgentSkillReference>**](AgentSkillReference.md) | | [default to undefined] +**items** | [**Array<AgentSkillReference>**](AgentSkillReference.md) | The resources that reference this agent skill | [default to undefined] **totalCount** | **number** | The total number of references. | [default to undefined] ## Example diff --git a/docs/AgentSkills.md b/docs/AgentSkills.md index 2dfd537..6f8de41 100644 --- a/docs/AgentSkills.md +++ b/docs/AgentSkills.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<AgentSkill>**](AgentSkill.md) | | [default to undefined] -**totalCount** | **number** | | [default to undefined] +**items** | [**Array<AgentSkill>**](AgentSkill.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [default to undefined] ## Example diff --git a/docs/AiConfigsMaintainerTeam.md b/docs/AiConfigsMaintainerTeam.md index ef4dd89..8699f7f 100644 --- a/docs/AiConfigsMaintainerTeam.md +++ b/docs/AiConfigsMaintainerTeam.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] -**name** | **string** | | [default to undefined] +**key** | **string** | The team key | [default to undefined] +**name** | **string** | The team name | [default to undefined] ## Example diff --git a/docs/AiConfigsMetricListingRep.md b/docs/AiConfigsMetricListingRep.md index c7804c7..74dc0e6 100644 --- a/docs/AiConfigsMetricListingRep.md +++ b/docs/AiConfigsMetricListingRep.md @@ -52,6 +52,7 @@ Name | Type | Description | Notes **winsorIncludeImputed** | **boolean** | When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn\'t send events. | [optional] [default to undefined] **traceQuery** | **string** | For trace metrics, the trace query to use for the metric. | [optional] [default to undefined] **traceValueLocation** | **string** | For trace metrics, the location in the trace to use for numeric values. | [optional] [default to undefined] +**unitAggregationField** | **string** | For count_distinct metrics, the column to count distinct values of | [optional] [default to undefined] **denominator** | [**AiConfigsMetricDenominatorRep**](AiConfigsMetricDenominatorRep.md) | | [optional] [default to undefined] ## Example @@ -107,6 +108,7 @@ const instance: AiConfigsMetricListingRep = { winsorIncludeImputed, traceQuery, traceValueLocation, + unitAggregationField, denominator, }; ``` diff --git a/docs/ApprovalRequestResponse.md b/docs/ApprovalRequestResponse.md index 022c406..e21f08e 100644 --- a/docs/ApprovalRequestResponse.md +++ b/docs/ApprovalRequestResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **reviewStatus** | **string** | Current status of the review of this approval request | [default to undefined] **allReviews** | [**Array<ReviewResponse>**](ReviewResponse.md) | An array of individual reviews of this approval request | [default to undefined] **notifyMemberIds** | **Array<string>** | An array of member IDs. These members are notified to review the approval request. | [default to undefined] +**notifyTeamKeys** | **Array<string>** | An array of team keys, if teams were specified when the approval request was created. The members of these teams are listed in <code>notifyMemberIds</code>, resolved when the request was made. Team membership may have changed since then. | [optional] [default to undefined] **appliedDate** | **number** | | [optional] [default to undefined] **appliedByMemberId** | **string** | The member ID of the member who applied the approval request | [optional] [default to undefined] **appliedByServiceTokenId** | **string** | The service token ID of the service token which applied the approval request | [optional] [default to undefined] @@ -44,6 +45,7 @@ const instance: ApprovalRequestResponse = { reviewStatus, allReviews, notifyMemberIds, + notifyTeamKeys, appliedDate, appliedByMemberId, appliedByServiceTokenId, diff --git a/docs/AudienceConfiguration.md b/docs/AudienceConfiguration.md index 7c32e23..184e9b5 100644 --- a/docs/AudienceConfiguration.md +++ b/docs/AudienceConfiguration.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **requireApproval** | **boolean** | Whether or not the audience requires approval | [default to undefined] **notifyMemberIds** | **Array<string>** | An array of member IDs. These members are notified to review the approval request. | [optional] [default to undefined] **notifyTeamKeys** | **Array<string>** | An array of team keys. The members of these teams are notified to review the approval request. | [optional] [default to undefined] -**releaseGuardianConfiguration** | [**ReleaseGuardianConfiguration**](ReleaseGuardianConfiguration.md) | | [optional] [default to undefined] +**releaseGuardianConfiguration** | [**PipelineReleaseGuardianConfiguration**](PipelineReleaseGuardianConfiguration.md) | | [optional] [default to undefined] ## Example diff --git a/docs/AuditLogApi.md b/docs/AuditLogApi.md index ac0d2f7..044f5cb 100644 --- a/docs/AuditLogApi.md +++ b/docs/AuditLogApi.md @@ -12,7 +12,7 @@ All URIs are relative to *https://app.launchdarkly.com* # **getAuditLogEntries** > AuditLogEntryListingRepCollection getAuditLogEntries() -Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). +Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). ### Example @@ -30,13 +30,17 @@ let after: number; //A timestamp filter, expressed as a Unix epoch time in milli let q: string; //Text to search for. You can search for the full or partial name of the resource. (optional) (default to undefined) let limit: number; //A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. (optional) (default to undefined) let spec: string; //A resource specifier that lets you filter audit log listings by resource (optional) (default to undefined) +let member: string; //A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. (optional) (default to undefined) +let token: string; //An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. (optional) (default to undefined) const { status, data } = await apiInstance.getAuditLogEntries( before, after, q, limit, - spec + spec, + member, + token ); ``` @@ -49,6 +53,8 @@ const { status, data } = await apiInstance.getAuditLogEntries( | **q** | [**string**] | Text to search for. You can search for the full or partial name of the resource. | (optional) defaults to undefined| | **limit** | [**number**] | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. | (optional) defaults to undefined| | **spec** | [**string**] | A resource specifier that lets you filter audit log listings by resource | (optional) defaults to undefined| +| **member** | [**string**] | A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. | (optional) defaults to undefined| +| **token** | [**string**] | An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. | (optional) defaults to undefined| ### Return type @@ -134,7 +140,7 @@ const { status, data } = await apiInstance.getAuditLogEntry( # **postAuditLogEntries** > AuditLogEntryListingRepCollection postAuditLogEntries() -Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://launchdarkly.com/docs/home/account/role-resources#about-the-resource-specifier-syntax). +Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Specifying resources in the advanced editor](https://launchdarkly.com/docs/home/account/roles/role-resources#specifying-resources-in-the-advanced-editor). ### Example @@ -151,6 +157,8 @@ let before: number; //A timestamp filter, expressed as a Unix epoch time in mill let after: number; //A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. (optional) (default to undefined) let q: string; //Text to search for. You can search for the full or partial name of the resource. (optional) (default to undefined) let limit: number; //A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. (optional) (default to undefined) +let member: string; //A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. (optional) (default to undefined) +let token: string; //An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. (optional) (default to undefined) let statementPost: Array; // (optional) const { status, data } = await apiInstance.postAuditLogEntries( @@ -158,6 +166,8 @@ const { status, data } = await apiInstance.postAuditLogEntries( after, q, limit, + member, + token, statementPost ); ``` @@ -171,6 +181,8 @@ const { status, data } = await apiInstance.postAuditLogEntries( | **after** | [**number**] | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. | (optional) defaults to undefined| | **q** | [**string**] | Text to search for. You can search for the full or partial name of the resource. | (optional) defaults to undefined| | **limit** | [**number**] | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. | (optional) defaults to undefined| +| **member** | [**string**] | A member ID that lets you filter audit log listings by the member who made the change. Repeat the parameter to filter by multiple members. | (optional) defaults to undefined| +| **token** | [**string**] | An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens. | (optional) defaults to undefined| ### Return type @@ -218,12 +230,16 @@ let after: number; //A timestamp filter, expressed as a Unix epoch time in milli let statementPost: Array; // let before: number; //A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. (optional) (default to undefined) let buckets: number; //Number of time buckets to divide the range into. Default 50, max 500. (optional) (default to undefined) +let member: string; //A member ID that lets you filter counts to changes made by that member. Repeat the parameter to filter by multiple members. (optional) (default to undefined) +let token: string; //An access token ID that lets you filter counts to changes made by that token. Repeat the parameter to filter by multiple tokens. (optional) (default to undefined) const { status, data } = await apiInstance.postAuditLogEntryCounts( after, statementPost, before, - buckets + buckets, + member, + token ); ``` @@ -235,6 +251,8 @@ const { status, data } = await apiInstance.postAuditLogEntryCounts( | **after** | [**number**] | A timestamp filter, expressed as a Unix epoch time in milliseconds. Required. | defaults to undefined| | **before** | [**number**] | A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. | (optional) defaults to undefined| | **buckets** | [**number**] | Number of time buckets to divide the range into. Default 50, max 500. | (optional) defaults to undefined| +| **member** | [**string**] | A member ID that lets you filter counts to changes made by that member. Repeat the parameter to filter by multiple members. | (optional) defaults to undefined| +| **token** | [**string**] | An access token ID that lets you filter counts to changes made by that token. Repeat the parameter to filter by multiple tokens. | (optional) defaults to undefined| ### Return type diff --git a/docs/AuthorizedAppDataRep.md b/docs/AuthorizedAppDataRep.md index 6158307..9e14c97 100644 --- a/docs/AuthorizedAppDataRep.md +++ b/docs/AuthorizedAppDataRep.md @@ -9,7 +9,9 @@ Name | Type | Description | Notes **_id** | **string** | The ID of the authorized application | [optional] [default to undefined] **isScim** | **boolean** | Whether the application is authorized through SCIM | [optional] [default to undefined] **name** | **string** | The authorized application name | [optional] [default to undefined] +**iconUrl** | **string** | The icon for this authorized application, if it has one | [optional] [default to undefined] **maintainerName** | **string** | The name of the maintainer for this authorized application | [optional] [default to undefined] +**isAgent** | **boolean** | Whether this application acted on behalf of the member in this entry. When true, the member and the application are co-authors of the change rather than the member acting alone. Omitted for applications that act on their own. | [optional] [default to undefined] ## Example @@ -21,7 +23,9 @@ const instance: AuthorizedAppDataRep = { _id, isScim, name, + iconUrl, maintainerName, + isAgent, }; ``` diff --git a/docs/CallerIdentityRep.md b/docs/CallerIdentityRep.md index 5216f30..f243ac3 100644 --- a/docs/CallerIdentityRep.md +++ b/docs/CallerIdentityRep.md @@ -13,6 +13,9 @@ Name | Type | Description | Notes **authKind** | **string** | | [optional] [default to undefined] **tokenKind** | **string** | | [optional] [default to undefined] **clientId** | **string** | | [optional] [default to undefined] +**clientName** | **string** | The registered name of the OAuth client the access token was issued to. Only present for OAuth access tokens, and omitted when the client\'s name can\'t be resolved. | [optional] [default to undefined] +**audience** | **Array<string>** | The resources (RFC 8707) the OAuth access token was issued for. Only present for OAuth access tokens issued for a specific resource. | [optional] [default to undefined] +**expiresAt** | **number** | | [optional] [default to undefined] **tokenName** | **string** | | [optional] [default to undefined] **tokenId** | **string** | | [optional] [default to undefined] **memberId** | **string** | | [optional] [default to undefined] @@ -33,6 +36,9 @@ const instance: CallerIdentityRep = { authKind, tokenKind, clientId, + clientName, + audience, + expiresAt, tokenName, tokenId, memberId, diff --git a/docs/Classifier.md b/docs/Classifier.md new file mode 100644 index 0000000..b13fd02 --- /dev/null +++ b/docs/Classifier.md @@ -0,0 +1,26 @@ +# Classifier + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | | [default to undefined] +**type** | **string** | | [default to undefined] +**instructions** | **string** | | [default to undefined] +**criteria** | **any** | Type-specific criteria. An enum classifier uses a map of option keys to descriptions. A float classifier uses an ordered list of level labels. A bool classifier uses optional true and false descriptions. | [optional] [default to undefined] + +## Example + +```typescript +import { Classifier } from 'launchdarkly-api-typescript'; + +const instance: Classifier = { + key, + type, + instructions, + criteria, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CleanupBehavior.md b/docs/CleanupBehavior.md new file mode 100644 index 0000000..49d0cf9 --- /dev/null +++ b/docs/CleanupBehavior.md @@ -0,0 +1,11 @@ +# CleanupBehavior + +What happens to the release rules when the final phase completes, either on its own or because a stop rolls it forward while it\'s running: - `remove_rules_and_update_default_rule`: The release rules are removed and the default rule serves the target variation. - `leave_rules_in_place`: The release rules stay and serve the target variation. In every other case, including a revert, it has no effect: release rules left on the flag keep serving the variation the release ended on, ahead of rules added later without `beforeRuleId`. + +## Enum + +* `CleanupBehaviorRemoveRulesAndUpdateDefaultRule` (value: `'remove_rules_and_update_default_rule'`) + +* `CleanupBehaviorLeaveRulesInPlace` (value: `'leave_rules_in_place'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContextInstanceRecord.md b/docs/ContextInstanceRecord.md deleted file mode 100644 index 41b5387..0000000 --- a/docs/ContextInstanceRecord.md +++ /dev/null @@ -1,32 +0,0 @@ -# ContextInstanceRecord - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lastSeen** | **string** | Timestamp of the last time an evaluation occurred for this context instance | [optional] [default to undefined] -**id** | **string** | The context instance ID | [default to undefined] -**applicationId** | **string** | An identifier representing the application where the LaunchDarkly SDK is running | [optional] [default to undefined] -**anonymousKinds** | **Array<string>** | A list of the context kinds this context was associated with that the SDK removed because they were marked as anonymous at flag evaluation | [optional] [default to undefined] -**context** | **any** | The context, including its kind and attributes | [default to undefined] -**_links** | [**{ [key: string]: Link; }**](Link.md) | The location and content type of related resources | [optional] [default to undefined] -**_access** | [**Access**](Access.md) | | [optional] [default to undefined] - -## Example - -```typescript -import { ContextInstanceRecord } from 'launchdarkly-api-typescript'; - -const instance: ContextInstanceRecord = { - lastSeen, - id, - applicationId, - anonymousKinds, - context, - _links, - _access, -}; -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContextInstanceSearch.md b/docs/ContextInstanceSearch.md deleted file mode 100644 index 70ea4b9..0000000 --- a/docs/ContextInstanceSearch.md +++ /dev/null @@ -1,26 +0,0 @@ -# ContextInstanceSearch - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**filter** | **string** | A collection of context instance filters | [optional] [default to undefined] -**sort** | **string** | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying <code>ts</code> for this value, or descending order by specifying <code>-ts</code>. | [optional] [default to undefined] -**limit** | **number** | Specifies the maximum number of items in the collection to return (max: 50, default: 20) | [optional] [default to undefined] -**continuationToken** | **string** | Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the <code>next</code> link instead, because this value is an obfuscated string. | [optional] [default to undefined] - -## Example - -```typescript -import { ContextInstanceSearch } from 'launchdarkly-api-typescript'; - -const instance: ContextInstanceSearch = { - filter, - sort, - limit, - continuationToken, -}; -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContextInstances.md b/docs/ContextInstances.md deleted file mode 100644 index 3424625..0000000 --- a/docs/ContextInstances.md +++ /dev/null @@ -1,28 +0,0 @@ -# ContextInstances - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_links** | [**{ [key: string]: Link; }**](Link.md) | The location and content type of related resources | [optional] [default to undefined] -**totalCount** | **number** | The number of unique context instances | [optional] [default to undefined] -**_environmentId** | **string** | The environment ID | [default to undefined] -**continuationToken** | **string** | An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the <code>next</code> link instead. | [optional] [default to undefined] -**items** | [**Array<ContextInstanceRecord>**](ContextInstanceRecord.md) | A collection of context instances. Can include multiple versions of context instances that have the same <code>id</code>, but different <code>applicationId</code>s. | [default to undefined] - -## Example - -```typescript -import { ContextInstances } from 'launchdarkly-api-typescript'; - -const instance: ContextInstances = { - _links, - totalCount, - _environmentId, - continuationToken, - items, -}; -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContextRecord.md b/docs/ContextRecord.md index 0ed0328..3789532 100644 --- a/docs/ContextRecord.md +++ b/docs/ContextRecord.md @@ -6,11 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **lastSeen** | **string** | Timestamp of the last time an evaluation occurred for this context | [optional] [default to undefined] -**applicationId** | **string** | An identifier representing the application where the LaunchDarkly SDK is running | [optional] [default to undefined] +**applicationId** | **string** | An identifier representing the application where the LaunchDarkly SDK is running. Populated when you get contexts by kind and key. Empty in search results, which return each context\'s most recently reported data. | [optional] [default to undefined] **context** | **any** | The context, including its kind and attributes | [default to undefined] **_links** | [**{ [key: string]: Link; }**](Link.md) | The location and content type of related resources | [optional] [default to undefined] **_access** | [**Access**](Access.md) | | [optional] [default to undefined] -**associatedContexts** | **number** | 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. | [optional] [default to undefined] +**associatedContexts** | **number** | Deprecated. This value is always 1. | [optional] [default to undefined] ## Example diff --git a/docs/Contexts.md b/docs/Contexts.md index f88c0a5..fd899c9 100644 --- a/docs/Contexts.md +++ b/docs/Contexts.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**{ [key: string]: Link; }**](Link.md) | The location and content type of related resources | [optional] [default to undefined] -**totalCount** | **number** | The number of contexts | [optional] [default to undefined] +**totalCount** | **number** | The number of matching contexts. This value is approximate and may be omitted if it is unavailable. | [optional] [default to undefined] **_environmentId** | **string** | The environment ID where the context was evaluated | [default to undefined] -**continuationToken** | **string** | An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the <code>next</code> link instead. | [optional] [default to undefined] +**continuationToken** | **string** | An obfuscated string that references the last context on the previous page of results. You can use this for pagination, however, we recommend using the <code>next</code> link instead. | [optional] [default to undefined] **items** | [**Array<ContextRecord>**](ContextRecord.md) | A collection of contexts. Can include multiple versions of contexts that have the same <code>kind</code> and <code>key</code>, but different <code>applicationId</code>s. | [default to undefined] ## Example diff --git a/docs/ContextsApi.md b/docs/ContextsApi.md index e167a34..1c470cc 100644 --- a/docs/ContextsApi.md +++ b/docs/ContextsApi.md @@ -4,80 +4,14 @@ All URIs are relative to *https://app.launchdarkly.com* |Method | HTTP request | Description| |------------- | ------------- | -------------| -|[**deleteContextInstances**](#deletecontextinstances) | **DELETE** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id} | Delete context instances| |[**evaluateContextInstance**](#evaluatecontextinstance) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate | Evaluate flags for context instance| |[**getContextAttributeNames**](#getcontextattributenames) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes | Get context attribute names| |[**getContextAttributeValues**](#getcontextattributevalues) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName} | Get context attribute values| -|[**getContextInstances**](#getcontextinstances) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id} | Get context instances| |[**getContextKindsByProjectKey**](#getcontextkindsbyprojectkey) | **GET** /api/v2/projects/{projectKey}/context-kinds | Get context kinds| |[**getContexts**](#getcontexts) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key} | Get contexts| |[**putContextKind**](#putcontextkind) | **PUT** /api/v2/projects/{projectKey}/context-kinds/{key} | Create or update context kind| -|[**searchContextInstances**](#searchcontextinstances) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search | Search for context instances| |[**searchContexts**](#searchcontexts) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search | Search for contexts| -# **deleteContextInstances** -> deleteContextInstances() - -Delete context instances by ID. - -### Example - -```typescript -import { - ContextsApi, - Configuration -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new ContextsApi(configuration); - -let projectKey: string; //The project key (default to undefined) -let environmentKey: string; //The environment key (default to undefined) -let id: string; //The context instance ID (default to undefined) - -const { status, data } = await apiInstance.deleteContextInstances( - projectKey, - environmentKey, - id -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | The project key | defaults to undefined| -| **environmentKey** | [**string**] | The environment key | defaults to undefined| -| **id** | [**string**] | The context instance ID | defaults to undefined| - - -### Return type - -void (empty response body) - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**204** | Action succeeded | - | -|**400** | Invalid request | - | -|**401** | Invalid access token | - | -|**403** | Forbidden | - | -|**404** | Invalid resource identifier | - | -|**410** | Endpoint deprecated | - | -|**429** | Rate limited | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **evaluateContextInstance** > ContextInstanceEvaluations evaluateContextInstance(requestBody) @@ -170,7 +104,7 @@ const apiInstance = new ContextsApi(configuration); let projectKey: string; //The project key (default to undefined) let environmentKey: string; //The environment key (default to undefined) -let filter: string; //A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). (optional) (default to undefined) +let filter: string; //A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). (optional) (default to undefined) let limit: number; //Specifies the maximum number of items in the collection to return (max: 100, default: 100) (optional) (default to undefined) const { status, data } = await apiInstance.getContextAttributeNames( @@ -187,7 +121,7 @@ const { status, data } = await apiInstance.getContextAttributeNames( |------------- | ------------- | ------------- | -------------| | **projectKey** | [**string**] | The project key | defaults to undefined| | **environmentKey** | [**string**] | The environment key | defaults to undefined| -| **filter** | [**string**] | A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). | (optional) defaults to undefined| +| **filter** | [**string**] | A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). | (optional) defaults to undefined| | **limit** | [**number**] | Specifies the maximum number of items in the collection to return (max: 100, default: 100) | (optional) defaults to undefined| @@ -235,7 +169,7 @@ const apiInstance = new ContextsApi(configuration); let projectKey: string; //The project key (default to undefined) let environmentKey: string; //The environment key (default to undefined) let attributeName: string; //The attribute name (default to undefined) -let filter: string; //A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `value` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). (optional) (default to undefined) +let filter: string; //A comma-separated list of context filters. This endpoint requires a `kind` filter, with the `equals` operator, and also accepts a `value` filter, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). (optional) (default to undefined) let limit: number; //Specifies the maximum number of items in the collection to return (max: 100, default: 50) (optional) (default to undefined) const { status, data } = await apiInstance.getContextAttributeValues( @@ -254,7 +188,7 @@ const { status, data } = await apiInstance.getContextAttributeValues( | **projectKey** | [**string**] | The project key | defaults to undefined| | **environmentKey** | [**string**] | The environment key | defaults to undefined| | **attributeName** | [**string**] | The attribute name | defaults to undefined| -| **filter** | [**string**] | A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `value` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). | (optional) defaults to undefined| +| **filter** | [**string**] | A comma-separated list of context filters. This endpoint requires a `kind` filter, with the `equals` operator, and also accepts a `value` filter, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). | (optional) defaults to undefined| | **limit** | [**number**] | Specifies the maximum number of items in the collection to return (max: 100, default: 50) | (optional) defaults to undefined| @@ -283,82 +217,6 @@ const { status, data } = await apiInstance.getContextAttributeValues( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **getContextInstances** -> ContextInstances getContextInstances() - -Get context instances by ID. - -### Example - -```typescript -import { - ContextsApi, - Configuration -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new ContextsApi(configuration); - -let projectKey: string; //The project key (default to undefined) -let environmentKey: string; //The environment key (default to undefined) -let id: string; //The context instance ID (default to undefined) -let limit: number; //Specifies the maximum number of context instances to return (max: 50, default: 20) (optional) (default to undefined) -let continuationToken: string; //Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. (optional) (default to undefined) -let sort: string; //Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. (optional) (default to undefined) -let filter: string; //A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). (optional) (default to undefined) -let includeTotalCount: boolean; //Specifies whether to include or omit the total count of matching context instances. Defaults to true. (optional) (default to undefined) - -const { status, data } = await apiInstance.getContextInstances( - projectKey, - environmentKey, - id, - limit, - continuationToken, - sort, - filter, - includeTotalCount -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | The project key | defaults to undefined| -| **environmentKey** | [**string**] | The environment key | defaults to undefined| -| **id** | [**string**] | The context instance ID | defaults to undefined| -| **limit** | [**number**] | Specifies the maximum number of context instances to return (max: 50, default: 20) | (optional) defaults to undefined| -| **continuationToken** | [**string**] | Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. | (optional) defaults to undefined| -| **sort** | [**string**] | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. | (optional) defaults to undefined| -| **filter** | [**string**] | A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). | (optional) defaults to undefined| -| **includeTotalCount** | [**boolean**] | Specifies whether to include or omit the total count of matching context instances. Defaults to true. | (optional) defaults to undefined| - - -### Return type - -**ContextInstances** - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**200** | Context instances collection response | - | -|**400** | Invalid request | - | -|**401** | Invalid access token | - | -|**403** | Forbidden | - | -|**429** | Rate limited | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **getContextKindsByProjectKey** > ContextKindsCollectionRep getContextKindsByProjectKey() @@ -419,7 +277,7 @@ const { status, data } = await apiInstance.getContextKindsByProjectKey( # **getContexts** > Contexts getContexts() -Get contexts based on kind and key. +Get contexts based on kind and key. Returns one item for each application from which LaunchDarkly has received the context, with the `applicationId` field populated. ### Example @@ -437,9 +295,9 @@ let environmentKey: string; //The environment key (default to undefined) let kind: string; //The context kind (default to undefined) let key: string; //The context key (default to undefined) let limit: number; //Specifies the maximum number of items in the collection to return (max: 50, default: 20) (optional) (default to undefined) -let continuationToken: string; //Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. (optional) (default to undefined) -let sort: string; //Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. (optional) (default to undefined) -let filter: string; //A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). (optional) (default to undefined) +let continuationToken: string; //An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. (optional) (default to undefined) +let sort: string; //Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. (optional) (default to undefined) +let filter: string; //A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). (optional) (default to undefined) let includeTotalCount: boolean; //Specifies whether to include or omit the total count of matching contexts. Defaults to true. (optional) (default to undefined) const { status, data } = await apiInstance.getContexts( @@ -464,9 +322,9 @@ const { status, data } = await apiInstance.getContexts( | **kind** | [**string**] | The context kind | defaults to undefined| | **key** | [**string**] | The context key | defaults to undefined| | **limit** | [**number**] | Specifies the maximum number of items in the collection to return (max: 50, default: 20) | (optional) defaults to undefined| -| **continuationToken** | [**string**] | Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. | (optional) defaults to undefined| -| **sort** | [**string**] | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. | (optional) defaults to undefined| -| **filter** | [**string**] | A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). | (optional) defaults to undefined| +| **continuationToken** | [**string**] | An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. | (optional) defaults to undefined| +| **sort** | [**string**] | Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. | (optional) defaults to undefined| +| **filter** | [**string**] | A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). | (optional) defaults to undefined| | **includeTotalCount** | [**boolean**] | Specifies whether to include or omit the total count of matching contexts. Defaults to true. | (optional) defaults to undefined| @@ -557,87 +415,10 @@ const { status, data } = await apiInstance.putContextKind( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **searchContextInstances** -> ContextInstances searchContextInstances(contextInstanceSearch) - - Search for context instances. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). - -### Example - -```typescript -import { - ContextsApi, - Configuration, - ContextInstanceSearch -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new ContextsApi(configuration); - -let projectKey: string; //The project key (default to undefined) -let environmentKey: string; //The environment key (default to undefined) -let contextInstanceSearch: ContextInstanceSearch; // -let limit: number; //Specifies the maximum number of items in the collection to return (max: 50, default: 20) (optional) (default to undefined) -let continuationToken: string; //Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. (optional) (default to undefined) -let sort: string; //Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. (optional) (default to undefined) -let filter: string; //A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). (optional) (default to undefined) -let includeTotalCount: boolean; //Specifies whether to include or omit the total count of matching context instances. Defaults to true. (optional) (default to undefined) - -const { status, data } = await apiInstance.searchContextInstances( - projectKey, - environmentKey, - contextInstanceSearch, - limit, - continuationToken, - sort, - filter, - includeTotalCount -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **contextInstanceSearch** | **ContextInstanceSearch**| | | -| **projectKey** | [**string**] | The project key | defaults to undefined| -| **environmentKey** | [**string**] | The environment key | defaults to undefined| -| **limit** | [**number**] | Specifies the maximum number of items in the collection to return (max: 50, default: 20) | (optional) defaults to undefined| -| **continuationToken** | [**string**] | Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. | (optional) defaults to undefined| -| **sort** | [**string**] | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. | (optional) defaults to undefined| -| **filter** | [**string**] | A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts-and-context-instances). | (optional) defaults to undefined| -| **includeTotalCount** | [**boolean**] | Specifies whether to include or omit the total count of matching context instances. Defaults to true. | (optional) defaults to undefined| - - -### Return type - -**ContextInstances** - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**200** | Context instances collection response | - | -|**400** | Invalid request | - | -|**401** | Invalid access token | - | -|**403** | Forbidden | - | -|**429** | Rate limited | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **searchContexts** > Contexts searchContexts(contextSearch) - Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://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). + Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. Results are sorted by context kind and key. Each context appears once, with its most recently reported attributes. Results include contexts that LaunchDarkly has received within the last 30 days. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/api/contexts#filtering-contexts). To learn more about contexts, read [Contexts](https://launchdarkly.com/docs/home/flags/contexts). ### Example @@ -655,10 +436,10 @@ let projectKey: string; //The project key (default to undefined) let environmentKey: string; //The environment key (default to undefined) let contextSearch: ContextSearch; // let limit: number; //Specifies the maximum number of items in the collection to return (max: 50, default: 20) (optional) (default to undefined) -let continuationToken: string; //Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. (optional) (default to undefined) -let sort: string; //Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. (optional) (default to undefined) -let filter: string; //A comma-separated list of context filters. To 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). (optional) (default to undefined) -let includeTotalCount: boolean; //Specifies whether to include or omit the total count of matching contexts. Defaults to true. (optional) (default to undefined) +let continuationToken: string; //An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. (optional) (default to undefined) +let sort: string; //Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. (optional) (default to undefined) +let filter: string; //A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). (optional) (default to undefined) +let includeTotalCount: boolean; //Specifies whether to include or omit the total count of matching contexts. Defaults to true. The total count is approximate and may be omitted if it is unavailable. (optional) (default to undefined) const { status, data } = await apiInstance.searchContexts( projectKey, @@ -680,10 +461,10 @@ const { status, data } = await apiInstance.searchContexts( | **projectKey** | [**string**] | The project key | defaults to undefined| | **environmentKey** | [**string**] | The environment key | defaults to undefined| | **limit** | [**number**] | Specifies the maximum number of items in the collection to return (max: 50, default: 20) | (optional) defaults to undefined| -| **continuationToken** | [**string**] | Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. | (optional) defaults to undefined| -| **sort** | [**string**] | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. | (optional) defaults to undefined| -| **filter** | [**string**] | A comma-separated list of context filters. To 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). | (optional) defaults to undefined| -| **includeTotalCount** | [**boolean**] | Specifies whether to include or omit the total count of matching contexts. Defaults to true. | (optional) defaults to undefined| +| **continuationToken** | [**string**] | An opaque cursor that identifies the next page of results. You can use this for pagination, however, we recommend using the `next` link we provide instead. | (optional) defaults to undefined| +| **sort** | [**string**] | Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a `400` response, so omit it. Results are always sorted by context kind and key. | (optional) defaults to undefined| +| **filter** | [**string**] | A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts](https://launchdarkly.com/docs/ld-docs/api/contexts#filtering-contexts). | (optional) defaults to undefined| +| **includeTotalCount** | [**boolean**] | Specifies whether to include or omit the total count of matching contexts. Defaults to true. The total count is approximate and may be omitted if it is unavailable. | (optional) defaults to undefined| ### Return type diff --git a/docs/CreateAdaptiveTriggerRequest.md b/docs/CreateAdaptiveTriggerRequest.md new file mode 100644 index 0000000..6583660 --- /dev/null +++ b/docs/CreateAdaptiveTriggerRequest.md @@ -0,0 +1,28 @@ +# CreateAdaptiveTriggerRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [default to undefined] +**resourceKind** | [**AdaptiveTriggerResourceKind**](AdaptiveTriggerResourceKind.md) | | [default to undefined] +**resourceKey** | **string** | | [default to undefined] +**triggerSource** | [**ObservabilityAlertSource**](ObservabilityAlertSource.md) | | [default to undefined] +**task** | [**AdaptiveTriggerTask**](AdaptiveTriggerTask.md) | | [default to undefined] + +## Example + +```typescript +import { CreateAdaptiveTriggerRequest } from 'launchdarkly-api-typescript'; + +const instance: CreateAdaptiveTriggerRequest = { + name, + resourceKind, + resourceKey, + triggerSource, + task, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateReleaseInput.md b/docs/CreatePipelineReleaseInput.md similarity index 79% rename from docs/CreateReleaseInput.md rename to docs/CreatePipelineReleaseInput.md index 56054ba..88ab8b8 100644 --- a/docs/CreateReleaseInput.md +++ b/docs/CreatePipelineReleaseInput.md @@ -1,4 +1,4 @@ -# CreateReleaseInput +# CreatePipelineReleaseInput ## Properties @@ -11,9 +11,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { CreateReleaseInput } from 'launchdarkly-api-typescript'; +import { CreatePipelineReleaseInput } from 'launchdarkly-api-typescript'; -const instance: CreateReleaseInput = { +const instance: CreatePipelineReleaseInput = { releaseVariationId, releasePipelineKey, }; diff --git a/docs/DataExportDestinationsApi.md b/docs/DataExportDestinationsApi.md index 56828d6..eaaffd5 100644 --- a/docs/DataExportDestinationsApi.md +++ b/docs/DataExportDestinationsApi.md @@ -18,7 +18,7 @@ All URIs are relative to *https://app.launchdarkly.com* # **deleteDestination** > deleteDestination() -Delete a Data Export destination by ID. +Delete a Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. ### Example @@ -79,7 +79,7 @@ void (empty response body) # **getDestination** > Destination getDestination() -Get a single Data Export destination by ID. +Get a single Data Export destination by ID. The destination must belong to the environment in the URL. Otherwise, the response is 404. ### Example @@ -187,7 +187,7 @@ This endpoint does not have any parameters. # **patchDestination** > Destination patchDestination(patchOperation) -Update a Data Export destination. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). +Update a Data Export destination. The destination must belong to the environment in the URL. Otherwise, the response is 404. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). ### Example diff --git a/docs/DataExportProjectIdentityIncompleteError.md b/docs/DataExportProjectIdentityIncompleteError.md new file mode 100644 index 0000000..2d66106 --- /dev/null +++ b/docs/DataExportProjectIdentityIncompleteError.md @@ -0,0 +1,22 @@ +# DataExportProjectIdentityIncompleteError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **string** | | [default to undefined] +**code** | **string** | | [default to undefined] + +## Example + +```typescript +import { DataExportProjectIdentityIncompleteError } from 'launchdarkly-api-typescript'; + +const instance: DataExportProjectIdentityIncompleteError = { + message, + code, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DataExportProjectIdentityIncompleteErrorRep.md b/docs/DataExportProjectIdentityIncompleteErrorRep.md new file mode 100644 index 0000000..d06e7fb --- /dev/null +++ b/docs/DataExportProjectIdentityIncompleteErrorRep.md @@ -0,0 +1,22 @@ +# DataExportProjectIdentityIncompleteErrorRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | | [optional] [default to undefined] +**message** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { DataExportProjectIdentityIncompleteErrorRep } from 'launchdarkly-api-typescript'; + +const instance: DataExportProjectIdentityIncompleteErrorRep = { + code, + message, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DataExportProjectRankComponentsRep.md b/docs/DataExportProjectRankComponentsRep.md new file mode 100644 index 0000000..53f3c64 --- /dev/null +++ b/docs/DataExportProjectRankComponentsRep.md @@ -0,0 +1,20 @@ +# DataExportProjectRankComponentsRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**streaming** | **number** | Successful Streaming transfers attributed to this project in the requested range. | [default to undefined] + +## Example + +```typescript +import { DataExportProjectRankComponentsRep } from 'launchdarkly-api-typescript'; + +const instance: DataExportProjectRankComponentsRep = { + streaming, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DataExportProjectRankRep.md b/docs/DataExportProjectRankRep.md new file mode 100644 index 0000000..8b1de02 --- /dev/null +++ b/docs/DataExportProjectRankRep.md @@ -0,0 +1,28 @@ +# DataExportProjectRankRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projectKey** | **string** | The canonical project key. | [default to undefined] +**projectName** | **string** | The current project name. | [default to undefined] +**rank** | **number** | The one-based rank within all matching projects. | [default to undefined] +**usage** | **number** | Successful Streaming transfers in the requested range. | [default to undefined] +**components** | [**DataExportProjectRankComponentsRep**](DataExportProjectRankComponentsRep.md) | | [default to undefined] + +## Example + +```typescript +import { DataExportProjectRankRep } from 'launchdarkly-api-typescript'; + +const instance: DataExportProjectRankRep = { + projectKey, + projectName, + rank, + usage, + components, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DataExportProjectRankingPageRep.md b/docs/DataExportProjectRankingPageRep.md new file mode 100644 index 0000000..b5d8728 --- /dev/null +++ b/docs/DataExportProjectRankingPageRep.md @@ -0,0 +1,26 @@ +# DataExportProjectRankingPageRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **number** | The bounded page size requested. | [default to undefined] +**count** | **number** | The number of items on this page. | [default to undefined] +**totalCount** | **number** | The number of matching projects with usage. | [default to undefined] +**nextCursor** | **string** | An opaque cursor for the next page. | [optional] [default to undefined] + +## Example + +```typescript +import { DataExportProjectRankingPageRep } from 'launchdarkly-api-typescript'; + +const instance: DataExportProjectRankingPageRep = { + limit, + count, + totalCount, + nextCursor, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DataExportProjectRankingRep.md b/docs/DataExportProjectRankingRep.md new file mode 100644 index 0000000..9b53c78 --- /dev/null +++ b/docs/DataExportProjectRankingRep.md @@ -0,0 +1,25 @@ +# DataExportProjectRankingRep + +A bounded Streaming project ranking. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**Array<DataExportProjectRankRep>**](DataExportProjectRankRep.md) | Projects in deterministic rank order. | [default to undefined] +**page** | [**DataExportProjectRankingPageRep**](DataExportProjectRankingPageRep.md) | | [default to undefined] +**scope** | [**DataExportProjectRankingScopeRep**](DataExportProjectRankingScopeRep.md) | | [default to undefined] + +## Example + +```typescript +import { DataExportProjectRankingRep } from 'launchdarkly-api-typescript'; + +const instance: DataExportProjectRankingRep = { + items, + page, + scope, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DataExportProjectRankingScopeRep.md b/docs/DataExportProjectRankingScopeRep.md new file mode 100644 index 0000000..00b866d --- /dev/null +++ b/docs/DataExportProjectRankingScopeRep.md @@ -0,0 +1,26 @@ +# DataExportProjectRankingScopeRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **string** | The included usage source. | [default to undefined] +**dimension** | **string** | The ranked dimension. | [default to undefined] +**from** | **number** | Inclusive UTC range start in Unix milliseconds. | [default to undefined] +**to** | **number** | Exclusive UTC range end in Unix milliseconds. | [default to undefined] + +## Example + +```typescript +import { DataExportProjectRankingScopeRep } from 'launchdarkly-api-typescript'; + +const instance: DataExportProjectRankingScopeRep = { + source, + dimension, + from, + to, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DataExportSeriesListRep.md b/docs/DataExportSeriesListRep.md new file mode 100644 index 0000000..d47d4de --- /dev/null +++ b/docs/DataExportSeriesListRep.md @@ -0,0 +1,28 @@ +# DataExportSeriesListRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | **{ [key: string]: any; }** | The location and content type of related resources | [default to undefined] +**metadata** | **Array<{ [key: string]: any; }>** | Metadata about each series | [default to undefined] +**series** | **Array<{ [key: string]: number; }>** | An array of data points with timestamps. Each element of the array is an object with a \'time\' field, whose value is the timestamp, and one or more key fields. If there are multiple key fields, they are labeled \'0\', \'1\', and so on, and are explained in the <code>metadata</code>. | [default to undefined] +**dataThrough** | **string** | The end of the latest hour written by this source\'s usage pipeline, as an RFC 3339 UTC timestamp. It is measured across all accounts, not only yours, and usage after this time is not counted yet. Omitted when the watermark is unavailable. | [optional] [default to undefined] +**delayed** | **boolean** | Whether this source\'s usage pipeline is late: it wrote every hour of the 24 hours ending at <code>dataThrough</code>, and more than three hours have passed since <code>dataThrough</code>. Always <code>false</code> for a source with gaps in those 24 hours, where gaps usually mean no usage rather than a stalled pipeline. Omitted when <code>dataThrough</code> is omitted. | [optional] [default to undefined] + +## Example + +```typescript +import { DataExportSeriesListRep } from 'launchdarkly-api-typescript'; + +const instance: DataExportSeriesListRep = { + _links, + metadata, + series, + dataThrough, + delayed, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DependentMeasuredRolloutRep.md b/docs/DependentReleasePhaseRep.md similarity index 82% rename from docs/DependentMeasuredRolloutRep.md rename to docs/DependentReleasePhaseRep.md index c58e890..d90ae93 100644 --- a/docs/DependentMeasuredRolloutRep.md +++ b/docs/DependentReleasePhaseRep.md @@ -1,11 +1,11 @@ -# DependentMeasuredRolloutRep +# DependentReleasePhaseRep ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_id** | **string** | The guarded rollout measured rollout Id | [default to undefined] +**_id** | **string** | The guarded rollout release phase ID | [default to undefined] **flagKey** | **string** | The guarded rollout flag key | [default to undefined] **flagName** | **string** | The guarded rollout flag name | [default to undefined] **flagPurpose** | **string** | The guarded rollout flag purpose | [optional] [default to undefined] @@ -18,9 +18,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { DependentMeasuredRolloutRep } from 'launchdarkly-api-typescript'; +import { DependentReleasePhaseRep } from 'launchdarkly-api-typescript'; -const instance: DependentMeasuredRolloutRep = { +const instance: DependentReleasePhaseRep = { _id, flagKey, flagName, diff --git a/docs/DynamicOptionFiltersItems.md b/docs/DynamicOptionFiltersItems.md new file mode 100644 index 0000000..11bebdb --- /dev/null +++ b/docs/DynamicOptionFiltersItems.md @@ -0,0 +1,22 @@ +# DynamicOptionFiltersItems + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute** | **string** | | [optional] [default to undefined] +**variableKey** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { DynamicOptionFiltersItems } from 'launchdarkly-api-typescript'; + +const instance: DynamicOptionFiltersItems = { + attribute, + variableKey, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DynamicOptions.md b/docs/DynamicOptions.md index c6edd4e..3f616e5 100644 --- a/docs/DynamicOptions.md +++ b/docs/DynamicOptions.md @@ -5,8 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allowUnknownValue** | **boolean** | | [optional] [default to undefined] **endpoint** | [**Endpoint**](Endpoint.md) | | [optional] [default to undefined] +**filters** | [**Array<DynamicOptionFiltersItems>**](DynamicOptionFiltersItems.md) | | [optional] [default to undefined] **parser** | [**DynamicOptionsParser**](DynamicOptionsParser.md) | | [optional] [default to undefined] +**source** | [**DynamicOptionsSource**](DynamicOptionsSource.md) | | [optional] [default to undefined] ## Example @@ -14,8 +17,11 @@ Name | Type | Description | Notes import { DynamicOptions } from 'launchdarkly-api-typescript'; const instance: DynamicOptions = { + allowUnknownValue, endpoint, + filters, parser, + source, }; ``` diff --git a/docs/DynamicOptionsSource.md b/docs/DynamicOptionsSource.md new file mode 100644 index 0000000..046303e --- /dev/null +++ b/docs/DynamicOptionsSource.md @@ -0,0 +1,22 @@ +# DynamicOptionsSource + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | | [optional] [default to undefined] +**type** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { DynamicOptionsSource } from 'launchdarkly-api-typescript'; + +const instance: DynamicOptionsSource = { + key, + type, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Environment.md b/docs/Environment.md index 11efe91..904ff59 100644 --- a/docs/Environment.md +++ b/docs/Environment.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **defaultTtl** | **number** | The default time (in minutes) that the PHP SDK can cache feature flag rules locally | [default to undefined] **secureMode** | **boolean** | Ensures that one end user of the client-side SDK cannot inspect the variations for another end user | [default to undefined] **_access** | [**Access**](Access.md) | | [optional] [default to undefined] -**defaultTrackEvents** | **boolean** | Enables tracking detailed information for new flags by default | [default to undefined] +**defaultTrackEvents** | **boolean** | The initial value of trackEvents for flags created in this environment. Does not affect existing flags. Required for Data Export, but doesn\'t enable Data Export on its own. | [default to undefined] **requireComments** | **boolean** | Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment | [default to undefined] **confirmChanges** | **boolean** | Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes | [default to undefined] **tags** | **Array<string>** | A list of tags for this environment | [default to undefined] diff --git a/docs/EnvironmentPost.md b/docs/EnvironmentPost.md index 0535b82..c15aabe 100644 --- a/docs/EnvironmentPost.md +++ b/docs/EnvironmentPost.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **color** | **string** | A color to indicate this environment in the UI | [default to undefined] **defaultTtl** | **number** | The default time (in minutes) that the PHP SDK can cache feature flag rules locally | [optional] [default to undefined] **secureMode** | **boolean** | Ensures that one end user of the client-side SDK cannot inspect the variations for another end user | [optional] [default to undefined] -**defaultTrackEvents** | **boolean** | Enables tracking detailed information for new flags by default | [optional] [default to undefined] +**defaultTrackEvents** | **boolean** | The initial value of trackEvents for flags created in this environment. Does not affect existing flags. Required for Data Export, but doesn\'t enable Data Export on its own. | [optional] [default to undefined] **confirmChanges** | **boolean** | Requires confirmation for all flag and segment changes via the UI in this environment | [optional] [default to undefined] **requireComments** | **boolean** | Requires comments for all flag and segment changes via the UI in this environment | [optional] [default to undefined] **tags** | **Array<string>** | Tags to apply to the new environment | [optional] [default to undefined] diff --git a/docs/EnvironmentRelease.md b/docs/EnvironmentRelease.md new file mode 100644 index 0000000..a70e872 --- /dev/null +++ b/docs/EnvironmentRelease.md @@ -0,0 +1,61 @@ +# EnvironmentRelease + +A flag release in one environment, made up of one or more ordered phases. The top-level status is derived from the phases: it reflects the active phase, reports `waiting` between successfully completed phases, and reports the terminal outcome of the release. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [default to undefined] +**status** | [**ReleaseStatus**](ReleaseStatus.md) | | [default to undefined] +**statusReason** | [**ReleaseStatusReason**](ReleaseStatusReason.md) | | [optional] [default to undefined] +**projectKey** | **string** | | [default to undefined] +**environmentKey** | **string** | | [default to undefined] +**flagKey** | **string** | | [default to undefined] +**originalVariationId** | **string** | ID of the variation the release started from. | [default to undefined] +**originalVariationValue** | **any** | The value of the variation. This may be a string, boolean, number, JSON object, or array. | [default to undefined] +**targetVariationId** | **string** | ID of the variation being released. | [default to undefined] +**targetVariationValue** | **any** | The value of the variation. This may be a string, boolean, number, JSON object, or array. | [default to undefined] +**randomizationUnit** | **string** | Key of the context kind the release randomizes on. | [default to undefined] +**cleanupBehavior** | [**CleanupBehavior**](CleanupBehavior.md) | | [default to undefined] +**kind** | [**ReleaseType**](ReleaseType.md) | | [default to undefined] +**metrics** | [**Array<ReleaseMetric>**](ReleaseMetric.md) | | [default to undefined] +**phases** | [**Array<EnvironmentReleasePhase>**](EnvironmentReleasePhase.md) | | [default to undefined] +**currentPhaseIndex** | **number** | Zero-based index of the active phase. Null before the first phase, between phases, and after the release reaches a terminal status. | [default to undefined] +**advancementMode** | [**EnvironmentReleaseAdvancementMode**](EnvironmentReleaseAdvancementMode.md) | | [default to undefined] +**createdAt** | **number** | Creation time in Unix milliseconds. | [default to undefined] +**startedAt** | **number** | Start of the first phase in Unix milliseconds. Absent until a phase has started. | [optional] [readonly] [default to undefined] +**endedAt** | **number** | End of the last started phase in Unix milliseconds. Present only after the release reaches a terminal status of `completed` or `reverted`. | [optional] [readonly] [default to undefined] +**_links** | [**{ [key: string]: EnvironmentReleaseLink; }**](EnvironmentReleaseLink.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { EnvironmentRelease } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentRelease = { + id, + status, + statusReason, + projectKey, + environmentKey, + flagKey, + originalVariationId, + originalVariationValue, + targetVariationId, + targetVariationValue, + randomizationUnit, + cleanupBehavior, + kind, + metrics, + phases, + currentPhaseIndex, + advancementMode, + createdAt, + startedAt, + endedAt, + _links, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseAdvancementMode.md b/docs/EnvironmentReleaseAdvancementMode.md new file mode 100644 index 0000000..fde86c9 --- /dev/null +++ b/docs/EnvironmentReleaseAdvancementMode.md @@ -0,0 +1,11 @@ +# EnvironmentReleaseAdvancementMode + +Whether a multi-phase release advances to the next phase automatically once the current phase\'s steps complete, or waits for an explicit advance. Has no effect on a single-phase release. + +## Enum + +* `EnvironmentReleaseAdvancementModeManual` (value: `'manual'`) + +* `EnvironmentReleaseAdvancementModeAutomatic` (value: `'automatic'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseClause.md b/docs/EnvironmentReleaseClause.md new file mode 100644 index 0000000..6fec0d1 --- /dev/null +++ b/docs/EnvironmentReleaseClause.md @@ -0,0 +1,29 @@ +# EnvironmentReleaseClause + +One targeting clause of a rule created for the release. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contextKind** | **string** | Context kind the clause applies to. Omit for `segmentMatch`. | [optional] [default to undefined] +**attribute** | **string** | | [default to undefined] +**op** | **string** | One of `in`, `endsWith`, `startsWith`, `matches`, `contains`, `lessThan`, `lessThanOrEqual`, `greaterThan`, `greaterThanOrEqual`, `before`, `after`, `segmentMatch`, `semVerEqual`, `semVerLessThan`, `semVerGreaterThan`. | [default to undefined] +**values** | **Array<any>** | JSON primitives only (strings, numbers, booleans); objects, arrays, and null are rejected. | [default to undefined] +**negate** | **boolean** | | [optional] [default to false] + +## Example + +```typescript +import { EnvironmentReleaseClause } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleaseClause = { + contextKind, + attribute, + op, + values, + negate, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseCollection.md b/docs/EnvironmentReleaseCollection.md new file mode 100644 index 0000000..28b1c35 --- /dev/null +++ b/docs/EnvironmentReleaseCollection.md @@ -0,0 +1,25 @@ +# EnvironmentReleaseCollection + +One page of environment releases for one flag in one environment, newest first. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**Array<EnvironmentRelease>**](EnvironmentRelease.md) | The releases on this page. | [default to undefined] +**totalCount** | **number** | The total number of releases that match the request, before `limit` and `offset` are applied. | [default to undefined] +**_links** | [**{ [key: string]: EnvironmentReleaseLink; }**](EnvironmentReleaseLink.md) | Links to this page (`self`), the flag (`parent`), and, where they apply, the `first`, `prev`, `next`, and `last` pages. | [optional] [default to undefined] + +## Example + +```typescript +import { EnvironmentReleaseCollection } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleaseCollection = { + items, + totalCount, + _links, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseExistingRulePhaseInput.md b/docs/EnvironmentReleaseExistingRulePhaseInput.md new file mode 100644 index 0000000..733935b --- /dev/null +++ b/docs/EnvironmentReleaseExistingRulePhaseInput.md @@ -0,0 +1,23 @@ +# EnvironmentReleaseExistingRulePhaseInput + +A phase that releases on an existing rule. Allowed only on a single-phase release. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ruleId** | **string** | Existing rule to release on. The rule must already include the `kind` clause for `randomizationUnit` described in `startEnvironmentRelease`. | [default to undefined] +**steps** | [**Array<EnvironmentReleaseStepInput>**](EnvironmentReleaseStepInput.md) | | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleaseExistingRulePhaseInput } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleaseExistingRulePhaseInput = { + ruleId, + steps, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseLink.md b/docs/EnvironmentReleaseLink.md new file mode 100644 index 0000000..3f3714e --- /dev/null +++ b/docs/EnvironmentReleaseLink.md @@ -0,0 +1,22 @@ +# EnvironmentReleaseLink + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | | [default to undefined] +**type** | **string** | | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleaseLink } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleaseLink = { + href, + type, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseMetricInput.md b/docs/EnvironmentReleaseMetricInput.md new file mode 100644 index 0000000..7a11872 --- /dev/null +++ b/docs/EnvironmentReleaseMetricInput.md @@ -0,0 +1,23 @@ +# EnvironmentReleaseMetricInput + +A metric to monitor across every phase of a guarded release. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metricKey** | **string** | | [default to undefined] +**autoRollback** | **boolean** | Whether a regression on this metric automatically reverts the release. When `false`, a detected regression pauses the release instead: it reports `waiting` with reason `waiting_regression_detected` and does not advance until the regression is dismissed or the release is stopped. | [optional] [default to false] + +## Example + +```typescript +import { EnvironmentReleaseMetricInput } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleaseMetricInput = { + metricKey, + autoRollback, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseNewRulePhaseInput.md b/docs/EnvironmentReleaseNewRulePhaseInput.md new file mode 100644 index 0000000..c1716fb --- /dev/null +++ b/docs/EnvironmentReleaseNewRulePhaseInput.md @@ -0,0 +1,25 @@ +# EnvironmentReleaseNewRulePhaseInput + +A phase that creates a new rule. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**clauses** | [**Array<EnvironmentReleaseClause>**](EnvironmentReleaseClause.md) | Clauses for a new rule. Must include the `kind` clause for `randomizationUnit` described in `startEnvironmentRelease`. A new rule that exactly duplicates an existing rule on the flag returns `400` with `new rule is exact duplicate of an existing rule at index <n>`. | [default to undefined] +**description** | **string** | Description for a new rule. Must differ from the description of every other rule on the flag, including rules an earlier release left in place, or the request returns `400` with `duplicate rule description not allowed`. | [optional] [default to undefined] +**steps** | [**Array<EnvironmentReleaseStepInput>**](EnvironmentReleaseStepInput.md) | | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleaseNewRulePhaseInput } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleaseNewRulePhaseInput = { + clauses, + description, + steps, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasePhase.md b/docs/EnvironmentReleasePhase.md new file mode 100644 index 0000000..3792a96 --- /dev/null +++ b/docs/EnvironmentReleasePhase.md @@ -0,0 +1,41 @@ +# EnvironmentReleasePhase + +One ordered phase of an environment release. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [default to undefined] +**phaseIndex** | **number** | Zero-based index of this phase. | [readonly] [default to undefined] +**ruleId** | **string** | ID of the flag rule for this phase. New public-API releases always have a rule ID. `null` is retained only when reading a historical release that ran on the default rule. | [default to undefined] +**description** | **string** | The description of the flag rule when this release was created. Omitted for default-rule phases. | [optional] [readonly] [default to undefined] +**status** | [**ReleaseStatus**](ReleaseStatus.md) | | [default to undefined] +**statusReason** | [**ReleaseStatusReason**](ReleaseStatusReason.md) | | [optional] [default to undefined] +**steps** | [**Array<ReleaseStep>**](ReleaseStep.md) | | [default to undefined] +**currentStepIndex** | **number** | Zero-based index of the step the phase is on. Omitted until the first step starts. Once the phase completes or reverts, it stays at the last step that started, unlike `currentPhaseIndex`, which becomes `null` when the release reaches a terminal status. | [optional] [readonly] [default to undefined] +**startedAt** | **number** | Start of the phase in Unix milliseconds. | [optional] [readonly] [default to undefined] +**endedAt** | **number** | End of the phase in Unix milliseconds. | [optional] [readonly] [default to undefined] +**metricStatuses** | [**{ [key: string]: ReleaseMetricStatus; }**](ReleaseMetricStatus.md) | Per-phase metric status keyed by metric key. Empty for progressive releases. Metric definitions and monitoring preferences live once in the parent release\'s `metrics` array. | [readonly] [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasePhase } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasePhase = { + id, + phaseIndex, + ruleId, + description, + status, + statusReason, + steps, + currentStepIndex, + startedAt, + endedAt, + metricStatuses, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasePhaseInput.md b/docs/EnvironmentReleasePhaseInput.md new file mode 100644 index 0000000..70fe424 --- /dev/null +++ b/docs/EnvironmentReleasePhaseInput.md @@ -0,0 +1,27 @@ +# EnvironmentReleasePhaseInput + +One phase of a release. Each phase creates a flag rule unless it sets `ruleId`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ruleId** | **string** | Existing rule to release on. The rule must already include the `kind` clause for `randomizationUnit` described in `startEnvironmentRelease`. | [default to undefined] +**steps** | [**Array<EnvironmentReleaseStepInput>**](EnvironmentReleaseStepInput.md) | | [default to undefined] +**clauses** | [**Array<EnvironmentReleaseClause>**](EnvironmentReleaseClause.md) | Clauses for a new rule. Must include the `kind` clause for `randomizationUnit` described in `startEnvironmentRelease`. A new rule that exactly duplicates an existing rule on the flag returns `400` with `new rule is exact duplicate of an existing rule at index <n>`. | [default to undefined] +**description** | **string** | Description for a new rule. Must differ from the description of every other rule on the flag, including rules an earlier release left in place, or the request returns `400` with `duplicate rule description not allowed`. | [optional] [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasePhaseInput } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasePhaseInput = { + ruleId, + steps, + clauses, + description, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseResolution.md b/docs/EnvironmentReleaseResolution.md new file mode 100644 index 0000000..f95d91e --- /dev/null +++ b/docs/EnvironmentReleaseResolution.md @@ -0,0 +1,15 @@ +# EnvironmentReleaseResolution + +How to resolve each phase of the release when you stop it: - `roll_forward_all_phases`: All phases serve the target variation. Pending phases stay on the flag and are enabled. - `roll_forward_current_phase_and_remove_pending_phases`: Current and completed phases serve the target variation. Pending phases are removed. - `roll_back_all_phases_and_remove_pending_phases`: Current and completed phases serve the original variation. Pending phases are removed. - `roll_back_current_phase_and_remove_pending_phases`: The current phase serves the original variation, and completed phases keep serving the target variation. Pending phases are removed. For a single-phase release there are no completed or pending phases, so the two roll-forward values are equivalent, as are the two roll-back values. The `current_phase` values return `400` if the release is between phases. Use an `all_phases` value instead. A terminal release returns `200` unchanged for every resolution. + +## Enum + +* `EnvironmentReleaseResolutionRollForwardAllPhases` (value: `'roll_forward_all_phases'`) + +* `EnvironmentReleaseResolutionRollForwardCurrentPhaseAndRemovePendingPhases` (value: `'roll_forward_current_phase_and_remove_pending_phases'`) + +* `EnvironmentReleaseResolutionRollBackAllPhasesAndRemovePendingPhases` (value: `'roll_back_all_phases_and_remove_pending_phases'`) + +* `EnvironmentReleaseResolutionRollBackCurrentPhaseAndRemovePendingPhases` (value: `'roll_back_current_phase_and_remove_pending_phases'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleaseStepInput.md b/docs/EnvironmentReleaseStepInput.md new file mode 100644 index 0000000..d2992d0 --- /dev/null +++ b/docs/EnvironmentReleaseStepInput.md @@ -0,0 +1,23 @@ +# EnvironmentReleaseStepInput + +One step of a phase\'s rollout schedule. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allocation** | **number** | Thousandths of a percent. `100000` is 100%, and `10000` is 10%. Guarded releases cannot exceed `50000`, preserving a control group. Each step\'s allocation must be greater than the previous step\'s. In a progressive release, an allocation of N% serves the target variation to N% of the phase\'s contexts and the original variation to the rest. In a guarded release, it serves the target variation to N%, the original variation to another N% as the measured control group, and the original variation to the rest without measuring them. | [default to undefined] +**durationMillis** | **number** | | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleaseStepInput } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleaseStepInput = { + allocation, + durationMillis, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasesAccess.md b/docs/EnvironmentReleasesAccess.md new file mode 100644 index 0000000..4f1aa0c --- /dev/null +++ b/docs/EnvironmentReleasesAccess.md @@ -0,0 +1,22 @@ +# EnvironmentReleasesAccess + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**denied** | [**Array<EnvironmentReleasesAccessDenied>**](EnvironmentReleasesAccessDenied.md) | | [default to undefined] +**allowed** | [**Array<EnvironmentReleasesAccessAllowedRep>**](EnvironmentReleasesAccessAllowedRep.md) | | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasesAccess } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasesAccess = { + denied, + allowed, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasesAccessAllowedRep.md b/docs/EnvironmentReleasesAccessAllowedRep.md new file mode 100644 index 0000000..e7dd6b7 --- /dev/null +++ b/docs/EnvironmentReleasesAccessAllowedRep.md @@ -0,0 +1,22 @@ +# EnvironmentReleasesAccessAllowedRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **string** | | [default to undefined] +**reason** | [**AccessAllowedReason**](AccessAllowedReason.md) | | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasesAccessAllowedRep } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasesAccessAllowedRep = { + action, + reason, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasesAccessDenied.md b/docs/EnvironmentReleasesAccessDenied.md new file mode 100644 index 0000000..09d4c94 --- /dev/null +++ b/docs/EnvironmentReleasesAccessDenied.md @@ -0,0 +1,22 @@ +# EnvironmentReleasesAccessDenied + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **string** | | [default to undefined] +**reason** | [**AccessDeniedReason**](AccessDeniedReason.md) | | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasesAccessDenied } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasesAccessDenied = { + action, + reason, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasesBetaApi.md b/docs/EnvironmentReleasesBetaApi.md new file mode 100644 index 0000000..1a630a0 --- /dev/null +++ b/docs/EnvironmentReleasesBetaApi.md @@ -0,0 +1,309 @@ +# EnvironmentReleasesBetaApi + +All URIs are relative to *https://app.launchdarkly.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getEnvironmentRelease**](#getenvironmentrelease) | **GET** /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId} | Get an environment release| +|[**listEnvironmentReleases**](#listenvironmentreleases) | **GET** /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases | List environment releases| +|[**startEnvironmentRelease**](#startenvironmentrelease) | **POST** /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases | Start an environment release| +|[**stopEnvironmentRelease**](#stopenvironmentrelease) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId}/stop | Stop an environment release| + +# **getEnvironmentRelease** +> EnvironmentRelease getEnvironmentRelease() + +Returns an environment release and all its phases in phase-index order. The release ID must belong to the flag and environment in the path. Returns `404` for a release that ended more than 90 days ago. Pass `expand=metrics` to attach each metric\'s definition to the top-level `metrics` array. Analysis settings come from the version pinned when the release started (`metricVersionId`); name, description, tags, maintainer, and archive state reflect the current metric and may change afterwards. + +### Example + +```typescript +import { + EnvironmentReleasesBetaApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new EnvironmentReleasesBetaApi(configuration); + +let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) +let projectKey: string; // (default to undefined) +let flagKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let releaseId: string; // (default to undefined) +let expand: Set<'metrics'>; //Optional fields to expand. (optional) (default to undefined) + +const { status, data } = await apiInstance.getEnvironmentRelease( + lDAPIVersion, + projectKey, + flagKey, + environmentKey, + releaseId, + expand +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| +| **projectKey** | [**string**] | | defaults to undefined| +| **flagKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **releaseId** | [**string**] | | defaults to undefined| +| **expand** | **Array<'metrics'>** | Optional fields to expand. | (optional) defaults to undefined| + + +### Return type + +**EnvironmentRelease** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Environment release. | - | +|**400** | Bad request | - | +|**401** | Invalid access token | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**429** | Rate limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listEnvironmentReleases** +> EnvironmentReleaseCollection listEnvironmentReleases() + +Returns the environment releases for the flag in the environment, newest first. Each release includes its phases in phase-index order. Metric definitions are not included. To get them, call `getEnvironmentRelease` with `expand=metrics`. Returns an empty `items` array when the flag has no releases in the environment, or when no release matches the `filter`. Releases that ended more than 90 days ago are not returned. Results are paginated. By default, the first 25 releases are returned. Use `limit` and `offset` to page through the rest, and `totalCount` to learn how many releases match in total. The `_links` object includes `first`, `prev`, `next`, and `last` links where they apply. + +### Example + +```typescript +import { + EnvironmentReleasesBetaApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new EnvironmentReleasesBetaApi(configuration); + +let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) +let projectKey: string; // (default to undefined) +let flagKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let filter: string; //A queryfilter expression that narrows the list. Supported fields and operators: `kind` (`equals`) with values `progressive` or `guarded`. (optional) (default to undefined) +let limit: number; //The number of releases to return. Defaults to 25. Maximum is 100. (optional) (default to 25) +let offset: number; //Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten releases and then returns the next releases in the list, up to the query `limit`. (optional) (default to 0) +let snapshot: string; //Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored. (optional) (default to undefined) + +const { status, data } = await apiInstance.listEnvironmentReleases( + lDAPIVersion, + projectKey, + flagKey, + environmentKey, + filter, + limit, + offset, + snapshot +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| +| **projectKey** | [**string**] | | defaults to undefined| +| **flagKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **filter** | [**string**] | A queryfilter expression that narrows the list. Supported fields and operators: `kind` (`equals`) with values `progressive` or `guarded`. | (optional) defaults to undefined| +| **limit** | [**number**] | The number of releases to return. Defaults to 25. Maximum is 100. | (optional) defaults to 25| +| **offset** | [**number**] | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten releases and then returns the next releases in the list, up to the query `limit`. | (optional) defaults to 0| +| **snapshot** | [**string**] | Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored. | (optional) defaults to undefined| + + +### Return type + +**EnvironmentReleaseCollection** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Environment releases. | - | +|**400** | Bad request | - | +|**401** | Invalid access token | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**429** | Rate limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **startEnvironmentRelease** +> EnvironmentRelease startEnvironmentRelease(startEnvironmentReleaseRequest) + +Creates and starts a release on a flag in an environment, either from inline configuration or from an environment release plan. A release has one or more phases. Each phase is an audience, targeted by one flag rule, and has its own steps: the schedule of allocations at which that rule serves the target variation. After all of a phase\'s steps complete, the phase serves the target variation to 100% of its contexts. **Inline configuration.** Each entry in `phases` must specify exactly one targeting mode: - **Existing rule**: set `ruleId`. The rule must be enabled. Only a single-phase release can use an existing rule. - **New rule**: set `clauses`, with an optional `description`. New rules are appended to the end of the flag\'s rule list. To insert them before an existing rule instead, set the top-level `beforeRuleId`, which applies to every phase. Every phase\'s rule, including an existing rule passed by `ruleId`, must include `{\"contextKind\": \"\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\"]}`, not negated and with no other values, so the release only reaches contexts of the `randomizationUnit` kind, or multi-contexts containing the `randomizationUnit` kind. An existing rule needs the clause even if its other clauses only match that context kind. A phase without it returns `400`. For multiple phases, set `phases` with at least two entries. Each phase creates a rule. The first rule is enabled and starts immediately. Subsequent rules stay disabled until the release advances to them: automatically when `advancementMode` is `automatic`, or by an explicit advance when it is `manual`. `advancementMode` is required for a multi-phase release. Releases on the flag\'s default rule are not supported. A phase that omits both targeting modes is rejected. The flag must be on in the environment, or the request returns `409`. The release only reaches contexts that match a phase\'s rule. Other contexts keep getting the flag\'s default rule, which may already serve the target variation. The release type is inferred from `metrics`: an omitted or empty array creates a progressive release; one or more metrics creates a guarded release. Metrics must be listed individually; metric groups are not accepted. Every start runs release health checks, described in `ReleaseHealthCheckKind`. A flag that hasn\'t recently been evaluated for contexts of the `randomizationUnit` kind fails `flag_evaluations_with_context`, and one with no recent evaluations at all also fails `flag_evaluations_any`. Guarded releases also check that each metric receives events. A failing check returns `400` with code `health_checks_failed`. To start the release anyway, list the failing kinds in `bypassHealthChecks`. **From a release plan.** Set `releasePlanKey` to start from a plan in this environment instead of configuring the release inline; a request that also sets fields the plan supplies is rejected. The plan\'s current version runs as stored, with metric groups expanded into their members. Health checks run against the plan\'s randomization unit and metrics. Returns `400` if the plan is missing or incomplete, and `422` until environment release plans are available for the account. Requires the `updateRules` action on the flag in this environment, plus `updateFallthrough` when `cleanupBehavior` is `remove_rules_and_update_default_rule`. A release started from a plan requires both. The start is recorded in the flag\'s audit log as a targeting change that carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to start the release directly. This operation is not idempotent. Retrying a request that already started a release returns `409` with code `release_already_active`. The earlier request may have succeeded; call `listEnvironmentReleases` to confirm the running release is yours. + +### Example + +```typescript +import { + EnvironmentReleasesBetaApi, + Configuration, + StartEnvironmentReleaseRequest +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new EnvironmentReleasesBetaApi(configuration); + +let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) +let projectKey: string; // (default to undefined) +let flagKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let startEnvironmentReleaseRequest: StartEnvironmentReleaseRequest; // + +const { status, data } = await apiInstance.startEnvironmentRelease( + lDAPIVersion, + projectKey, + flagKey, + environmentKey, + startEnvironmentReleaseRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **startEnvironmentReleaseRequest** | **StartEnvironmentReleaseRequest**| | | +| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| +| **projectKey** | [**string**] | | defaults to undefined| +| **flagKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| + + +### Return type + +**EnvironmentRelease** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**201** | Environment release created and started. | - | +|**400** | The request is invalid. When `code` is `health_checks_failed`, `failingChecks` describes the release health checks that failed. Fix the failing checks, or list their kinds in `bypassHealthChecks` to start the release anyway. | - | +|**401** | Invalid access token | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**405** | Approval is required to make this change | - | +|**409** | The flag\'s current state does not allow the start. `code` is `release_already_active` when a release is already running on the flag or on the targeted rule; if this is a retry, the first request may have succeeded, so call `listEnvironmentReleases` to confirm. Any other conflict returns `optimistic_locking_error` with the cause in `message`. | - | +|**422** | The request set `releasePlanKey` before environment release plans are available for the account. Configure the release inline instead. | - | +|**429** | Rate limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **stopEnvironmentRelease** +> EnvironmentRelease stopEnvironmentRelease(stopEnvironmentReleaseRequest) + +Stops a release and resolves its phases according to the `resolution` you specify. To learn how each resolution treats completed and pending phases, read the `resolution` schema. Requires the `updateRules` action on the flag in this environment, or `updateFallthrough` for a historical release that ran on the default rule. The stop is recorded in the flag\'s audit log as a targeting change that names the resolution and carries `comment`. In an environment that requires approvals, this endpoint fails with `405`. Tokens granted the `bypassRequiredApproval` action can still call it to stop the release directly. Stopping a release that has already completed or been stopped returns `200` and makes no changes. Returns `404` for a release that ended more than 90 days ago. + +### Example + +```typescript +import { + EnvironmentReleasesBetaApi, + Configuration, + StopEnvironmentReleaseRequest +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new EnvironmentReleasesBetaApi(configuration); + +let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) +let projectKey: string; // (default to undefined) +let flagKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let releaseId: string; // (default to undefined) +let stopEnvironmentReleaseRequest: StopEnvironmentReleaseRequest; // + +const { status, data } = await apiInstance.stopEnvironmentRelease( + lDAPIVersion, + projectKey, + flagKey, + environmentKey, + releaseId, + stopEnvironmentReleaseRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **stopEnvironmentReleaseRequest** | **StopEnvironmentReleaseRequest**| | | +| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| +| **projectKey** | [**string**] | | defaults to undefined| +| **flagKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **releaseId** | [**string**] | | defaults to undefined| + + +### Return type + +**EnvironmentRelease** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Environment release stopped, or already in a terminal status. | - | +|**400** | Bad request | - | +|**401** | Invalid access token | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**405** | Approval is required to make this change | - | +|**409** | The flag\'s current state does not allow the stop. The response returns `optimistic_locking_error` with the cause in `message`. Resolve the cause, then retry. | - | +|**429** | Rate limited | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/EnvironmentReleasesFilter.md b/docs/EnvironmentReleasesFilter.md new file mode 100644 index 0000000..a440a71 --- /dev/null +++ b/docs/EnvironmentReleasesFilter.md @@ -0,0 +1,30 @@ +# EnvironmentReleasesFilter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | Filter type. One of [contextAttribute, eventProperty, group] | [default to undefined] +**attribute** | **string** | If not a group node, the context attribute name or event property name to filter on | [optional] [default to undefined] +**op** | **string** | | [default to undefined] +**values** | **Array<any>** | The context attribute / event property values or group member nodes | [default to undefined] +**contextKind** | **string** | For context attribute filters, the context kind. | [optional] [default to undefined] +**negate** | **boolean** | If set, then take the inverse of the operator. \'in\' becomes \'not in\'. | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasesFilter } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasesFilter = { + type, + attribute, + op, + values, + contextKind, + negate, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasesMemberSummary.md b/docs/EnvironmentReleasesMemberSummary.md new file mode 100644 index 0000000..c918a74 --- /dev/null +++ b/docs/EnvironmentReleasesMemberSummary.md @@ -0,0 +1,30 @@ +# EnvironmentReleasesMemberSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**{ [key: string]: Link; }**](Link.md) | The location and content type of related resources | [default to undefined] +**_id** | **string** | The member\'s ID | [default to undefined] +**firstName** | **string** | The member\'s first name | [optional] [default to undefined] +**lastName** | **string** | The member\'s last name | [optional] [default to undefined] +**role** | **string** | The member\'s base role. If the member has no additional roles, this role will be in effect. | [default to undefined] +**email** | **string** | The member\'s email address | [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasesMemberSummary } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasesMemberSummary = { + _links, + _id, + firstName, + lastName, + role, + email, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasesMetricDenominatorRep.md b/docs/EnvironmentReleasesMetricDenominatorRep.md new file mode 100644 index 0000000..0adb1e5 --- /dev/null +++ b/docs/EnvironmentReleasesMetricDenominatorRep.md @@ -0,0 +1,42 @@ +# EnvironmentReleasesMetricDenominatorRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eventName** | **string** | The warehouse event column for the denominator | [optional] [default to undefined] +**isNumeric** | **boolean** | Whether the denominator aggregates a numeric value | [optional] [default to undefined] +**unitAggregationType** | **string** | How individual unit values are aggregated for the denominator | [optional] [default to undefined] +**unitAggregationField** | **string** | The column to count distinct values of; required when unitAggregationType is count_distinct | [optional] [default to undefined] +**valueColumn** | **string** | For a numeric denominator, the column holding the numeric value | [optional] [default to undefined] +**dataSource** | [**MetricDataSourceRefRep**](MetricDataSourceRefRep.md) | | [optional] [default to undefined] +**filters** | [**EnvironmentReleasesFilter**](EnvironmentReleasesFilter.md) | | [optional] [default to undefined] +**windowStartOffset** | **number** | Start of the measurement window in milliseconds | [optional] [default to undefined] +**windowEndOffset** | **number** | End of the measurement window in milliseconds | [optional] [default to undefined] +**winsorLowerPercentile** | **number** | Lower winsorization percentile in the open interval (0, 100) | [optional] [default to undefined] +**winsorUpperPercentile** | **number** | Upper winsorization percentile in the open interval (0, 100) | [optional] [default to undefined] +**winsorIncludeImputed** | **boolean** | When true, the percentile bound calculation includes imputed zeros | [optional] [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasesMetricDenominatorRep } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasesMetricDenominatorRep = { + eventName, + isNumeric, + unitAggregationType, + unitAggregationField, + valueColumn, + dataSource, + filters, + windowStartOffset, + windowEndOffset, + winsorLowerPercentile, + winsorUpperPercentile, + winsorIncludeImputed, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasesMetricListingRep.md b/docs/EnvironmentReleasesMetricListingRep.md new file mode 100644 index 0000000..985ee0f --- /dev/null +++ b/docs/EnvironmentReleasesMetricListingRep.md @@ -0,0 +1,116 @@ +# EnvironmentReleasesMetricListingRep + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**experimentCount** | **number** | The number of experiments using this metric | [optional] [default to undefined] +**metricGroupCount** | **number** | The number of metric groups using this metric | [optional] [default to undefined] +**guardedRolloutCount** | **number** | The number of guarded rollouts using this metric | [optional] [default to undefined] +**releasePolicyCount** | **number** | The number of release policies using this metric | [optional] [default to undefined] +**activeExperimentCount** | **number** | The number of active experiments using this metric | [optional] [default to undefined] +**activeGuardedRolloutCount** | **number** | The number of active guarded rollouts using this metric | [optional] [default to undefined] +**_id** | **string** | The ID of this metric | [default to undefined] +**_versionId** | **string** | The version ID of the metric | [default to undefined] +**_version** | **number** | Version of the metric | [optional] [default to undefined] +**key** | **string** | A unique key to reference the metric | [default to undefined] +**name** | **string** | A human-friendly name for the metric | [default to undefined] +**kind** | **string** | The kind of event the metric tracks | [default to undefined] +**_attachedFlagCount** | **number** | The number of feature flags currently attached to this metric | [optional] [default to undefined] +**_links** | [**{ [key: string]: Link; }**](Link.md) | The location and content type of related resources | [default to undefined] +**_site** | [**Link**](Link.md) | | [optional] [default to undefined] +**_access** | [**EnvironmentReleasesAccess**](EnvironmentReleasesAccess.md) | | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for the metric | [default to undefined] +**_creationDate** | **number** | | [default to undefined] +**lastModified** | [**EnvironmentReleasesModification**](EnvironmentReleasesModification.md) | | [optional] [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this metric | [optional] [default to undefined] +**_maintainer** | [**EnvironmentReleasesMemberSummary**](EnvironmentReleasesMemberSummary.md) | | [optional] [default to undefined] +**description** | **string** | Description of the metric | [optional] [default to undefined] +**category** | **string** | The category of the metric | [optional] [default to undefined] +**isNumeric** | **boolean** | For custom and trace metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>). | [optional] [default to undefined] +**successCriteria** | **string** | For custom and trace metrics, the success criteria | [optional] [default to undefined] +**unit** | **string** | For numeric custom and trace metrics, the unit of measure | [optional] [default to undefined] +**eventKey** | **string** | For custom metrics, the event key to use in your code | [optional] [default to undefined] +**randomizationUnits** | **Array<string>** | Deprecated, use <code>analysisUnits</code> instead. | [optional] [default to undefined] +**analysisUnits** | **Array<string>** | An array of analysis units allowed for this metric. | [optional] [default to undefined] +**filters** | [**EnvironmentReleasesFilter**](EnvironmentReleasesFilter.md) | | [optional] [default to undefined] +**unitAggregationType** | **string** | The method by which multiple unit event values are aggregated | [optional] [default to undefined] +**analysisType** | **string** | The method for analyzing metric events | [optional] [default to undefined] +**percentileValue** | **number** | The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>. | [optional] [default to undefined] +**eventDefault** | [**MetricEventDefaultRep**](MetricEventDefaultRep.md) | | [optional] [default to undefined] +**dataSource** | [**MetricDataSourceRefRep**](MetricDataSourceRefRep.md) | | [default to undefined] +**lastSeen** | **number** | | [optional] [default to undefined] +**archived** | **boolean** | Whether the metric version is archived | [optional] [default to undefined] +**archivedAt** | **number** | | [optional] [default to undefined] +**selector** | **string** | For click metrics, the CSS selectors | [optional] [default to undefined] +**urls** | **Array<{ [key: string]: any; }>** | | [optional] [default to undefined] +**windowStartOffset** | **number** | Not yet implemented - The start of the measurement window, in milliseconds relative to the unit\'s first exposure to a flag variation | [optional] [default to undefined] +**windowEndOffset** | **number** | Not yet implemented - The end of the measurement window, in milliseconds relative to the unit\'s first exposure to a flag variation | [optional] [default to undefined] +**winsorLowerPercentile** | **number** | Lower winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, defines a two-sided clamp range. Otherwise lower-only winsorization. | [optional] [default to undefined] +**winsorUpperPercentile** | **number** | Upper winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, must be greater than winsorLowerPercentile. | [optional] [default to undefined] +**winsorIncludeImputed** | **boolean** | When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn\'t send events. | [optional] [default to undefined] +**traceQuery** | **string** | For trace metrics, the trace query to use for the metric. | [optional] [default to undefined] +**traceValueLocation** | **string** | For trace metrics, the location in the trace to use for numeric values. | [optional] [default to undefined] +**unitAggregationField** | **string** | For count_distinct metrics, the column to count distinct values of | [optional] [default to undefined] +**denominator** | [**EnvironmentReleasesMetricDenominatorRep**](EnvironmentReleasesMetricDenominatorRep.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasesMetricListingRep } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasesMetricListingRep = { + experimentCount, + metricGroupCount, + guardedRolloutCount, + releasePolicyCount, + activeExperimentCount, + activeGuardedRolloutCount, + _id, + _versionId, + _version, + key, + name, + kind, + _attachedFlagCount, + _links, + _site, + _access, + tags, + _creationDate, + lastModified, + maintainerId, + _maintainer, + description, + category, + isNumeric, + successCriteria, + unit, + eventKey, + randomizationUnits, + analysisUnits, + filters, + unitAggregationType, + analysisType, + percentileValue, + eventDefault, + dataSource, + lastSeen, + archived, + archivedAt, + selector, + urls, + windowStartOffset, + windowEndOffset, + winsorLowerPercentile, + winsorUpperPercentile, + winsorIncludeImputed, + traceQuery, + traceValueLocation, + unitAggregationField, + denominator, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentReleasesModification.md b/docs/EnvironmentReleasesModification.md new file mode 100644 index 0000000..746d1f2 --- /dev/null +++ b/docs/EnvironmentReleasesModification.md @@ -0,0 +1,20 @@ +# EnvironmentReleasesModification + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { EnvironmentReleasesModification } from 'launchdarkly-api-typescript'; + +const instance: EnvironmentReleasesModification = { + date, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnvironmentsApi.md b/docs/EnvironmentsApi.md index 6c980a5..6e1c070 100644 --- a/docs/EnvironmentsApi.md +++ b/docs/EnvironmentsApi.md @@ -131,7 +131,7 @@ const { status, data } = await apiInstance.getEnvironment( # **getEnvironmentsByProject** > Environments getEnvironmentsByProject() -Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports two fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. +Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the environments\' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. - `critical` is a boolean filter. `critical:true` returns only environments marked as critical, and `critical:false` returns only non-critical environments. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order. ### Example diff --git a/docs/ExpandableApprovalRequestResponse.md b/docs/ExpandableApprovalRequestResponse.md index 215095f..ba3c231 100644 --- a/docs/ExpandableApprovalRequestResponse.md +++ b/docs/ExpandableApprovalRequestResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **reviewStatus** | **string** | Current status of the review of this approval request | [default to undefined] **allReviews** | [**Array<ReviewResponse>**](ReviewResponse.md) | An array of individual reviews of this approval request | [default to undefined] **notifyMemberIds** | **Array<string>** | An array of member IDs. These members are notified to review the approval request. | [default to undefined] +**notifyTeamKeys** | **Array<string>** | An array of team keys, if teams were specified when the approval request was created. The members of these teams are listed in <code>notifyMemberIds</code>, resolved when the request was made. Team membership may have changed since then. | [optional] [default to undefined] **appliedDate** | **number** | | [optional] [default to undefined] **appliedByMemberId** | **string** | The member ID of the member who applied the approval request | [optional] [default to undefined] **appliedByServiceTokenId** | **string** | The service token ID of the service token which applied the approval request | [optional] [default to undefined] @@ -48,6 +49,7 @@ const instance: ExpandableApprovalRequestResponse = { reviewStatus, allReviews, notifyMemberIds, + notifyTeamKeys, appliedDate, appliedByMemberId, appliedByServiceTokenId, diff --git a/docs/ExperimentPost.md b/docs/ExperimentPost.md index 4704464..33fe85b 100644 --- a/docs/ExperimentPost.md +++ b/docs/ExperimentPost.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **iteration** | [**IterationInput**](IterationInput.md) | | [default to undefined] **holdoutId** | **string** | The ID of the holdout | [optional] [default to undefined] **tags** | **Array<string>** | Tags for the experiment | [optional] [default to undefined] -**methodology** | **string** | The results analysis approach. | [optional] [default to undefined] +**methodology** | **string** | The results analysis approach. Defaults to \"frequentist\" when not provided, or \"bayesian\" for multi-armed bandit experiments. | [optional] [default to undefined] **analysisConfig** | [**AnalysisConfigInput**](AnalysisConfigInput.md) | | [optional] [default to undefined] **dataSource** | **string** | The source of metric data in order to analyze results. Defaults to \"launchdarkly\" when not provided. | [optional] [default to undefined] **type** | **string** | The type of experiment. | [optional] [default to undefined] diff --git a/docs/ExperimentationLink.md b/docs/ExperimentationLink.md new file mode 100644 index 0000000..be529b3 --- /dev/null +++ b/docs/ExperimentationLink.md @@ -0,0 +1,22 @@ +# ExperimentationLink + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | | [optional] [default to undefined] +**type** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { ExperimentationLink } from 'launchdarkly-api-typescript'; + +const instance: ExperimentationLink = { + href, + type, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExperimentsApi.md b/docs/ExperimentsApi.md index 1b8bfe2..1f63557 100644 --- a/docs/ExperimentsApi.md +++ b/docs/ExperimentsApi.md @@ -16,7 +16,7 @@ All URIs are relative to *https://app.launchdarkly.com* # **createExperiment** > Experiment createExperiment(experimentPost) -Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `bayesian` (default) or `frequentist`. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). +Create an experiment. To 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. ### Experiment types Use the `type` field to specify the experiment type: `experiment` (default), `mab` (multi-armed bandit), or `holdout`. For multi-armed bandit experiments, set `reallocationFrequencyMillis` on the iteration to control how often traffic is reallocated across variations. ### Results analysis Use the `methodology` field to specify the results analysis approach: `frequentist` (default) or `bayesian`. Multi-armed bandit experiments support only `bayesian`, which is their default. Use the `dataSource` field to specify the source of metric data: `launchdarkly` (default), `snowflake`, or `databricks`. Use the `analysisConfig` field to customize analysis settings such as the Bayesian threshold, significance threshold, or multiple comparison correction method. To learn more, read [Creating experiments](https://launchdarkly.com/docs/home/experimentation/create). ### Example @@ -475,6 +475,7 @@ const { status, data } = await apiInstance.patchExperiment( |**403** | Forbidden | - | |**404** | Invalid resource identifier | - | |**409** | Conflict | - | +|**422** | The patch cannot be applied | - | |**429** | Rate limited | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/FeatureFlagConfig.md b/docs/FeatureFlagConfig.md index a024256..9f9cc3e 100644 --- a/docs/FeatureFlagConfig.md +++ b/docs/FeatureFlagConfig.md @@ -20,8 +20,8 @@ Name | Type | Description | Notes **_site** | [**Link**](Link.md) | | [default to undefined] **_access** | [**Access**](Access.md) | | [optional] [default to undefined] **_environmentName** | **string** | The environment name | [default to undefined] -**trackEvents** | **boolean** | Whether LaunchDarkly tracks events for the feature flag, for all rules | [default to undefined] -**trackEventsFallthrough** | **boolean** | Whether LaunchDarkly tracks events for the feature flag, for the default rule | [default to undefined] +**trackEvents** | **boolean** | Whether the SDK sends a detailed event for every evaluation of this flag, across all rules, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. | [default to undefined] +**trackEventsFallthrough** | **boolean** | Whether the SDK sends a detailed event for every evaluation of this flag\'s default rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. | [default to undefined] **_debugEventsUntilDate** | **number** | | [optional] [default to undefined] **_summary** | [**FlagSummary**](FlagSummary.md) | | [optional] [default to undefined] **evaluation** | [**FlagConfigEvaluation**](FlagConfigEvaluation.md) | | [optional] [default to undefined] diff --git a/docs/FeatureFlagsApi.md b/docs/FeatureFlagsApi.md index 35ab52e..0586f0c 100644 --- a/docs/FeatureFlagsApi.md +++ b/docs/FeatureFlagsApi.md @@ -727,7 +727,7 @@ const { status, data } = await apiInstance.patchExpiringUserTargets( # **patchFeatureFlag** > FeatureFlag patchFeatureFlag(patchWithComment) -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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

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

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). +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). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags.
Click to expand instructions for turning flags on and off These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag\'s targeting state to **Off**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### turnFlagOn Sets the flag\'s targeting state to **On**. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ```

Click to expand instructions for working with targeting and variations These instructions require the `environmentKey` parameter. Several of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://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. #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addPrerequisite Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter. ##### Parameters - `key`: Flag key of the prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addPrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addRule Adds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a flag rule. - Either - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addUserTargets Adds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### addVariation Adds a variation to the flag. ##### Parameters - `value`: The variation value. - `name`: (Optional) The variation name. - `description`: (Optional) A description for the variation. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### clearUserTargets Removes all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction. ##### Parameters - `variationId`: ID of a variation on the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseIds`: Array of IDs of clauses in the rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removePrerequisite Removes the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeUserTargets Removes user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a flag variation. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeUserTargets\", \"values\": [\"user-key-123abc\", \"user-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeVariation Removes a variation from the flag. ##### Parameters - `variationId`: ID of a variation of the flag to remove. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replacePrerequisites Removes all existing prerequisites and replaces them with the list you provide. ##### Parameters - `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"prereq-flag-key-123abc\", \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\" }, { \"key\": \"another-prereq-flag-key-456def\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\" } ] } ] } ``` #### replaceRules Removes all targeting rules for the flag and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### replaceUserTargets Removes all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag\'s variations. If you are working with contexts, use `replaceTargets` instead of this instruction. ##### Parameters - `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\", \"user-key-456def\"] }, { \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"user-key-789ghi\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the flag. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here\'s an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The flag serves the default off variation when the flag\'s targeting is **Off**. ##### Parameters - `variationId`: ID of a variation of the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updatePrerequisite Changes the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updatePrerequisite\", \"key\": \"example-prereq-flag-key\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateRuleDescription Updates the description of the feature flag rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. - `trackEvents`: Whether or not detailed events are sent for this rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule in the flag. - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for this flag. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether the SDK sends detailed evaluation events for the flag\'s default rule. Required for Data Export, but doesn\'t enable Data Export on its own. ##### Parameters - `trackEvents`: Whether or not detailed events are sent for the default rule. Here\'s an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` #### updateVariation Updates a variation of the flag. ##### Parameters - `variationId`: The ID of the variation to update. - `name`: (Optional) The updated variation name. - `value`: (Optional) The updated variation value. - `description`: (Optional) The updated variation description. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ] } ```

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

Click to expand instructions for updating the flag lifecycle These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { \"instructions\": [ { \"kind\": \"archiveFlag\" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deleteFlag\" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"deprecateFlag\" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here\'s an example: ```json { \"instructions\": [ { \"kind\": \"restoreFlag\" } ] } ```
### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/releasePipelineKey\", \"value\": \"example-release-pipeline-key\" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag\'s response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag\'s response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration). ### Example diff --git a/docs/FlagConfigApprovalRequestResponse.md b/docs/FlagConfigApprovalRequestResponse.md index 155faa3..2a3d6af 100644 --- a/docs/FlagConfigApprovalRequestResponse.md +++ b/docs/FlagConfigApprovalRequestResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **reviewStatus** | **string** | Current status of the review of this approval request | [default to undefined] **allReviews** | [**Array<ReviewResponse>**](ReviewResponse.md) | An array of individual reviews of this approval request | [default to undefined] **notifyMemberIds** | **Array<string>** | An array of member IDs. These members are notified to review the approval request. | [default to undefined] +**notifyTeamKeys** | **Array<string>** | An array of team keys, if teams were specified when the approval request was created. The members of these teams are listed in <code>notifyMemberIds</code>, resolved when the request was made. Team membership may have changed since then. | [optional] [default to undefined] **appliedDate** | **number** | | [optional] [default to undefined] **appliedByMemberId** | **string** | The member ID of the member who applied the approval request | [optional] [default to undefined] **appliedByServiceTokenId** | **string** | The service token ID of the service token which applied the approval request | [optional] [default to undefined] @@ -42,6 +43,7 @@ const instance: FlagConfigApprovalRequestResponse = { reviewStatus, allReviews, notifyMemberIds, + notifyTeamKeys, appliedDate, appliedByMemberId, appliedByServiceTokenId, diff --git a/docs/FlagTriggersApi.md b/docs/FlagTriggersApi.md index 020b4c9..c18d8bb 100644 --- a/docs/FlagTriggersApi.md +++ b/docs/FlagTriggersApi.md @@ -72,6 +72,7 @@ const { status, data } = await apiInstance.createTriggerWorkflow( |**401** | Invalid access token | - | |**403** | Forbidden | - | |**404** | Invalid resource identifier | - | +|**405** | Method not allowed | - | |**429** | Rate limited | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -330,6 +331,7 @@ const { status, data } = await apiInstance.patchTriggerWorkflow( |**401** | Invalid access token | - | |**403** | Forbidden | - | |**404** | Invalid resource identifier | - | +|**405** | Method not allowed | - | |**409** | Status conflict | - | |**429** | Rate limited | - | diff --git a/docs/GuardedReleaseConfig.md b/docs/GuardedReleaseConfig.md index 921fd34..f886634 100644 --- a/docs/GuardedReleaseConfig.md +++ b/docs/GuardedReleaseConfig.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **rollbackOnRegression** | **boolean** | Whether to roll back on regression | [optional] [default to undefined] **metricKeys** | **Array<string>** | List of metric keys | [optional] [default to undefined] **metricGroupKeys** | **Array<string>** | List of metric group keys | [optional] [default to undefined] -**stages** | [**Array<ReleasePolicyStage>**](ReleasePolicyStage.md) | List of stages | [optional] [default to undefined] +**stages** | [**Array<ReleasePolicyStage>**](ReleasePolicyStage.md) | List of stages. At most 10 stages by default; the server enforces the per-account limit, which is never more than 20. | [optional] [default to undefined] ## Example diff --git a/docs/IPAllowlistBetaApi.md b/docs/IPAllowlistBetaApi.md index 5a82d70..244c04f 100644 --- a/docs/IPAllowlistBetaApi.md +++ b/docs/IPAllowlistBetaApi.md @@ -142,7 +142,7 @@ const configuration = new Configuration(); const apiInstance = new IPAllowlistBetaApi(configuration); let search: string; //A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description. (optional) (default to undefined) -let limit: number; //The number of entries to return. When omitted, all matching entries are returned. Maximum is 100. (optional) (default to undefined) +let limit: number; //The number of entries to return. Defaults to 20. Maximum is 100. (optional) (default to undefined) let offset: number; //The number of entries to skip. Used for pagination. (optional) (default to undefined) const { status, data } = await apiInstance.getIpAllowlist( @@ -157,7 +157,7 @@ const { status, data } = await apiInstance.getIpAllowlist( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **search** | [**string**] | A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description. | (optional) defaults to undefined| -| **limit** | [**number**] | The number of entries to return. When omitted, all matching entries are returned. Maximum is 100. | (optional) defaults to undefined| +| **limit** | [**number**] | The number of entries to return. Defaults to 20. Maximum is 100. | (optional) defaults to undefined| | **offset** | [**number**] | The number of entries to skip. Used for pagination. | (optional) defaults to undefined| diff --git a/docs/IntegrationConfigurationsRep.md b/docs/IntegrationConfigurationsRep.md index 428a125..a47e943 100644 --- a/docs/IntegrationConfigurationsRep.md +++ b/docs/IntegrationConfigurationsRep.md @@ -16,9 +16,10 @@ Name | Type | Description | Notes **configValues** | **{ [key: string]: any; }** | Details on configuration for an integration of this type. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> for a full list of fields for each integration. | [optional] [default to undefined] **capabilityConfig** | [**CapabilityConfigRep**](CapabilityConfigRep.md) | | [optional] [default to undefined] **snowflakeSetupScript** | **string** | Consolidated SQL script for Snowflake Warehouse Native Experimentation setup. Present only for setup endpoint responses. | [optional] [default to undefined] -**redshiftSetupScripts** | **Array<string>** | SQL setup scripts (4 parts) for Redshift Native Experimentation setup. Present only for setup endpoint responses. | [optional] [default to undefined] +**redshiftSetupScripts** | **Array<string>** | SQL setup scripts (4 parts) for Redshift native Experimentation setup. Present on setup endpoint responses and, rehydrated from the persisted config, on active (finalized) Redshift native Experimentation configurations. | [optional] [default to undefined] **redshiftIAMPermissionsPolicy** | **string** | IAM permissions policy JSON for the customer\'s Redshift IAM role. Present only for setup endpoint responses. | [optional] [default to undefined] **redshiftIAMTrustPolicy** | **string** | IAM trust policy JSON for the customer\'s Redshift IAM role. Present only for setup endpoint responses. | [optional] [default to undefined] +**clickHouseSetupScript** | **string** | SQL setup script for ClickHouse native Experimentation. On setup endpoint responses it also creates the experimentation user with the submitted password. When the two-step setup flow is enabled, it is rehydrated from the persisted config on other responses with only the grants, never the password. | [optional] [default to undefined] **_maintainerId** | **string** | The ID of the member who maintains this integration configuration. Defaults to the member who created it. | [optional] [default to undefined] ## Example @@ -41,6 +42,7 @@ const instance: IntegrationConfigurationsRep = { redshiftSetupScripts, redshiftIAMPermissionsPolicy, redshiftIAMTrustPolicy, + clickHouseSetupScript, _maintainerId, }; ``` diff --git a/docs/IntegrationsBetaApi.md b/docs/IntegrationsBetaApi.md index c585a4e..80c91ea 100644 --- a/docs/IntegrationsBetaApi.md +++ b/docs/IntegrationsBetaApi.md @@ -143,10 +143,12 @@ import { const configuration = new Configuration(); const apiInstance = new IntegrationsBetaApi(configuration); -let integrationKey: string; //Integration key (default to undefined) +let integrationKey: string; //A key that corresponds to the third-party integration you are configuring. For example, `mezmo`. (default to undefined) +let includePending: boolean; //When `true`, includes pending two-step setup drafts that were created using `/setup` but are not yet finalized. Defaults to `false`, which returns only active configurations. (optional) (default to undefined) const { status, data } = await apiInstance.getAllIntegrationConfigurations( - integrationKey + integrationKey, + includePending ); ``` @@ -154,7 +156,8 @@ const { status, data } = await apiInstance.getAllIntegrationConfigurations( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **integrationKey** | [**string**] | Integration key | defaults to undefined| +| **integrationKey** | [**string**] | A key that corresponds to the third-party integration you are configuring. For example, `mezmo`. | defaults to undefined| +| **includePending** | [**boolean**] | When `true`, includes pending two-step setup drafts that were created using `/setup` but are not yet finalized. Defaults to `false`, which returns only active configurations. | (optional) defaults to undefined| ### Return type diff --git a/docs/MaintainerMember.md b/docs/MaintainerMember.md index 59b7ffc..6c943aa 100644 --- a/docs/MaintainerMember.md +++ b/docs/MaintainerMember.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_id** | **string** | | [default to undefined] -**email** | **string** | | [default to undefined] -**firstName** | **string** | | [optional] [default to undefined] -**lastName** | **string** | | [optional] [default to undefined] -**role** | **string** | | [default to undefined] +**_id** | **string** | The member ID | [default to undefined] +**email** | **string** | The member email address | [default to undefined] +**firstName** | **string** | The member first name | [optional] [default to undefined] +**lastName** | **string** | The member last name | [optional] [default to undefined] +**role** | **string** | The member role | [default to undefined] ## Example diff --git a/docs/Message.md b/docs/Message.md index 6da8400..1b16b28 100644 --- a/docs/Message.md +++ b/docs/Message.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | **string** | | [default to undefined] -**role** | **string** | | [default to undefined] +**content** | **string** | The message text | [default to undefined] +**role** | **string** | The message role, such as system, user, or assistant | [default to undefined] ## Example diff --git a/docs/MetricByVariation.md b/docs/MetricByVariation.md index 1724d20..b6b909a 100644 --- a/docs/MetricByVariation.md +++ b/docs/MetricByVariation.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**variationKey** | **string** | | [optional] [default to undefined] +**variationKey** | **string** | The variation key | [optional] [default to undefined] **metrics** | [**Metrics**](Metrics.md) | | [optional] [default to undefined] ## Example diff --git a/docs/MetricGroupPost.md b/docs/MetricGroupPost.md index 8d4fa9f..f5f7aea 100644 --- a/docs/MetricGroupPost.md +++ b/docs/MetricGroupPost.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | A unique key to reference the metric group | [optional] [default to undefined] +**key** | **string** | A unique key to reference the metric group | [default to undefined] **name** | **string** | A human-friendly name for the metric group | [default to undefined] **kind** | **string** | The type of the metric group | [default to undefined] **description** | **string** | Description of the metric group | [optional] [default to undefined] diff --git a/docs/MetricListingRep.md b/docs/MetricListingRep.md index 512b97b..d4e116a 100644 --- a/docs/MetricListingRep.md +++ b/docs/MetricListingRep.md @@ -50,6 +50,7 @@ Name | Type | Description | Notes **winsorIncludeImputed** | **boolean** | When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn\'t send events. | [optional] [default to undefined] **traceQuery** | **string** | For trace metrics, the trace query to use for the metric. | [optional] [default to undefined] **traceValueLocation** | **string** | For trace metrics, the location in the trace to use for numeric values. | [optional] [default to undefined] +**unitAggregationField** | **string** | For count_distinct metrics, the column to count distinct values of | [optional] [default to undefined] **denominator** | [**MetricDenominatorRep**](MetricDenominatorRep.md) | | [optional] [default to undefined] ## Example @@ -103,6 +104,7 @@ const instance: MetricListingRep = { winsorIncludeImputed, traceQuery, traceValueLocation, + unitAggregationField, denominator, }; ``` diff --git a/docs/MetricRep.md b/docs/MetricRep.md index f1edbfe..f32b28f 100644 --- a/docs/MetricRep.md +++ b/docs/MetricRep.md @@ -50,11 +50,12 @@ Name | Type | Description | Notes **winsorIncludeImputed** | **boolean** | When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn\'t send events. | [optional] [default to undefined] **traceQuery** | **string** | For trace metrics, the trace query to use for the metric. | [optional] [default to undefined] **traceValueLocation** | **string** | For trace metrics, the location in the trace to use for numeric values. | [optional] [default to undefined] +**unitAggregationField** | **string** | For count_distinct metrics, the column to count distinct values of | [optional] [default to undefined] **denominator** | [**MetricDenominatorRep**](MetricDenominatorRep.md) | | [optional] [default to undefined] **experiments** | [**Array<DependentExperimentRep>**](DependentExperimentRep.md) | | [optional] [default to undefined] **metricGroups** | [**Array<DependentMetricGroupRep>**](DependentMetricGroupRep.md) | Metric groups that use this metric | [optional] [default to undefined] **lastUsedInExperiment** | [**DependentExperimentRep**](DependentExperimentRep.md) | | [optional] [default to undefined] -**lastUsedInGuardedRollout** | [**DependentMeasuredRolloutRep**](DependentMeasuredRolloutRep.md) | | [optional] [default to undefined] +**lastUsedInGuardedRollout** | [**DependentReleasePhaseRep**](DependentReleasePhaseRep.md) | | [optional] [default to undefined] **isActive** | **boolean** | Whether the metric is active | [optional] [default to undefined] **_attachedFeatures** | [**Array<FlagListingRep>**](FlagListingRep.md) | Details on the flags attached to this metric | [optional] [default to undefined] @@ -109,6 +110,7 @@ const instance: MetricRep = { winsorIncludeImputed, traceQuery, traceValueLocation, + unitAggregationField, denominator, experiments, metricGroups, diff --git a/docs/Metrics.md b/docs/Metrics.md index fe5f231..7d2140d 100644 --- a/docs/Metrics.md +++ b/docs/Metrics.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**inputTokens** | **number** | | [optional] [default to undefined] -**outputTokens** | **number** | | [optional] [default to undefined] -**totalTokens** | **number** | | [optional] [default to undefined] +**inputTokens** | **number** | Number of input tokens | [optional] [default to undefined] +**outputTokens** | **number** | Number of output tokens | [optional] [default to undefined] +**totalTokens** | **number** | Total number of tokens | [optional] [default to undefined] **generationCount** | **number** | Number of attempted generations | [optional] [default to undefined] **generationSuccessCount** | **number** | Number of successful generations | [optional] [default to undefined] **generationErrorCount** | **number** | Number of generations with errors | [optional] [default to undefined] -**thumbsUp** | **number** | | [optional] [default to undefined] -**thumbsDown** | **number** | | [optional] [default to undefined] -**durationMs** | **number** | | [optional] [default to undefined] -**timeToFirstTokenMs** | **number** | | [optional] [default to undefined] +**thumbsUp** | **number** | Number of positive feedback ratings | [optional] [default to undefined] +**thumbsDown** | **number** | Number of negative feedback ratings | [optional] [default to undefined] +**durationMs** | **number** | Total generation duration, in milliseconds | [optional] [default to undefined] +**timeToFirstTokenMs** | **number** | Time to the first token, in milliseconds | [optional] [default to undefined] **satisfactionRating** | **number** | A value between 0 and 1 representing satisfaction rating | [optional] [default to undefined] **inputCost** | **number** | Cost of input tokens in USD | [optional] [default to undefined] **outputCost** | **number** | Cost of output tokens in USD | [optional] [default to undefined] diff --git a/docs/ModelConfig.md b/docs/ModelConfig.md index 025dd8f..a11afe6 100644 --- a/docs/ModelConfig.md +++ b/docs/ModelConfig.md @@ -8,19 +8,20 @@ Name | Type | Description | Notes **_access** | [**AiConfigsAccess**](AiConfigsAccess.md) | | [optional] [default to undefined] **_maintainer** | [**AIConfigMaintainer**](AIConfigMaintainer.md) | | [optional] [default to undefined] **name** | **string** | Human-readable name of the model | [default to undefined] -**key** | **string** | Unique key for the model | [default to undefined] -**id** | **string** | Identifier for the model, for use with third party providers | [default to undefined] +**key** | **string** | Unique key for the model config in the project, in the format `Provider.model-id`. Use this value as `modelConfigKey` on a config variation. | [default to undefined] +**id** | **string** | Model ID that the provider\'s API uses. This is different from `key`. Use this value as `modelName` on a config variation. | [default to undefined] **icon** | **string** | Icon for the model | [optional] [default to undefined] -**provider** | **string** | Provider for the model | [optional] [default to undefined] -**global** | **boolean** | Whether the model is global | [default to undefined] -**params** | **object** | | [optional] [default to undefined] -**customParams** | **object** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [default to undefined] -**version** | **number** | | [default to undefined] +**provider** | **string** | Provider for the model. Matches the provider prefix of `key`. | [optional] [default to undefined] +**global** | **boolean** | Whether the model is in the LaunchDarkly global catalog. Global models are read-only. Model configs that you create are always custom, with `global` set to `false`. | [default to undefined] +**params** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [optional] [default to undefined] +**customParams** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for the model config. Tags can be used in custom role policies. | [default to undefined] +**version** | **number** | Version of the model config. Starts at 1, and each update that changes the model config adds a new version. | [default to undefined] **costPerInputToken** | **number** | Cost per input token in USD | [optional] [default to undefined] **costPerOutputToken** | **number** | Cost per output token in USD | [optional] [default to undefined] **costPerCachedInputToken** | **number** | Cost per cached input token in USD | [optional] [default to undefined] -**isRestricted** | **boolean** | Whether the model is restricted | [default to undefined] +**isRestricted** | **boolean** | Whether the model is on the project\'s restricted list. Config variations cannot select a restricted model. To change this, use the add or remove restricted models endpoints. | [default to undefined] +**usedInCount** | **number** | Number of distinct AgentControl configs that reference this model | [optional] [default to undefined] ## Example @@ -44,6 +45,7 @@ const instance: ModelConfig = { costPerOutputToken, costPerCachedInputToken, isRestricted, + usedInCount, }; ``` diff --git a/docs/ModelConfigPatch.md b/docs/ModelConfigPatch.md index e1d6497..ef64859 100644 --- a/docs/ModelConfigPatch.md +++ b/docs/ModelConfigPatch.md @@ -1,5 +1,6 @@ # ModelConfigPatch +Fields to update. Omitted fields keep their current values. `params`, `customParams`, and `tags` replace the current values. Global model configs cannot be updated. ## Properties @@ -11,11 +12,11 @@ Name | Type | Description | Notes **costPerInputToken** | **number** | Cost per input token in USD | [optional] [default to undefined] **costPerOutputToken** | **number** | Cost per output token in USD | [optional] [default to undefined] **costPerCachedInputToken** | **number** | Cost per cached input token in USD | [optional] [default to undefined] -**params** | **object** | | [optional] [default to undefined] -**customParams** | **object** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] +**params** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [optional] [default to undefined] +**customParams** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for the model config. Replaces the current tags. | [optional] [default to undefined] +**maintainerId** | **string** | The member ID of the new maintainer. Set `maintainerId` or `maintainerTeamKey`, not both. An empty string removes the maintainer. | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team to set as the new maintainer. Set `maintainerId` or `maintainerTeamKey`, not both. | [optional] [default to undefined] ## Example diff --git a/docs/ModelConfigPost.md b/docs/ModelConfigPost.md index 8a02233..ae4452c 100644 --- a/docs/ModelConfigPost.md +++ b/docs/ModelConfigPost.md @@ -6,15 +6,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Human readable name of the model | [default to undefined] -**key** | **string** | Unique key for the model | [default to undefined] -**id** | **string** | Identifier for the model, for use with third party providers | [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] +**key** | **string** | Unique key for the model config in the project, in the format `Provider.model-id`. Config variations reject other formats. Keys of global catalog models are reserved. | [default to undefined] +**id** | **string** | Model ID that the provider\'s API uses. Cannot be changed after creation. | [default to undefined] +**maintainerId** | **string** | The member ID of the maintainer. Not applied on create. To set the maintainer, update the model config after you create it. | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains the model config. Not applied on create. To set the maintainer, update the model config after you create it. | [optional] [default to undefined] **icon** | **string** | Icon for the model | [optional] [default to undefined] -**provider** | **string** | Provider for the model | [optional] [default to undefined] -**params** | **object** | | [optional] [default to undefined] -**customParams** | **object** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] +**provider** | **string** | Provider for the model. Use the provider prefix of `key`. Cannot be changed after creation. | [optional] [default to undefined] +**params** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [optional] [default to undefined] +**customParams** | **object** | Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider\'s API accepts, for example `{\"temperature\": 0.7, \"maxTokens\": 4096}`. | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for the model config | [optional] [default to undefined] **costPerInputToken** | **number** | Cost per input token in USD | [optional] [default to undefined] **costPerOutputToken** | **number** | Cost per output token in USD | [optional] [default to undefined] **costPerCachedInputToken** | **number** | Cost per cached input token in USD | [optional] [default to undefined] diff --git a/docs/ModelConfigs.md b/docs/ModelConfigs.md index 8754250..e5e4d64 100644 --- a/docs/ModelConfigs.md +++ b/docs/ModelConfigs.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<ModelConfig>**](ModelConfig.md) | | [default to undefined] -**totalCount** | **number** | | [default to undefined] +**items** | [**Array<ModelConfig>**](ModelConfig.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [default to undefined] ## Example diff --git a/docs/ObservabilityAlertSource.md b/docs/ObservabilityAlertSource.md new file mode 100644 index 0000000..e211961 --- /dev/null +++ b/docs/ObservabilityAlertSource.md @@ -0,0 +1,22 @@ +# ObservabilityAlertSource + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [default to undefined] +**alertId** | **number** | | [default to undefined] + +## Example + +```typescript +import { ObservabilityAlertSource } from 'launchdarkly-api-typescript'; + +const instance: ObservabilityAlertSource = { + type, + alertId, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Release.md b/docs/PipelineRelease.md similarity index 81% rename from docs/Release.md rename to docs/PipelineRelease.md index d4f1418..8584676 100644 --- a/docs/Release.md +++ b/docs/PipelineRelease.md @@ -1,4 +1,4 @@ -# Release +# PipelineRelease ## Properties @@ -9,7 +9,7 @@ Name | Type | Description | Notes **name** | **string** | The release pipeline name | [default to undefined] **releasePipelineKey** | **string** | The release pipeline key | [default to undefined] **releasePipelineDescription** | **string** | The release pipeline description | [default to undefined] -**phases** | [**Array<ReleasePhase>**](ReleasePhase.md) | An ordered list of the release pipeline phases | [default to undefined] +**phases** | [**Array<PipelineReleasePhase>**](PipelineReleasePhase.md) | An ordered list of the release pipeline phases | [default to undefined] **_version** | **number** | The release version | [default to undefined] **_releaseVariationId** | **string** | The chosen release variation ID to use across all phases of a release | [optional] [default to undefined] **_canceledAt** | **number** | | [optional] [default to undefined] @@ -17,9 +17,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { Release } from 'launchdarkly-api-typescript'; +import { PipelineRelease } from 'launchdarkly-api-typescript'; -const instance: Release = { +const instance: PipelineRelease = { _links, name, releasePipelineKey, diff --git a/docs/ReleaseAudience.md b/docs/PipelineReleaseAudience.md similarity index 89% rename from docs/ReleaseAudience.md rename to docs/PipelineReleaseAudience.md index 069a94d..42b30b5 100644 --- a/docs/ReleaseAudience.md +++ b/docs/PipelineReleaseAudience.md @@ -1,4 +1,4 @@ -# ReleaseAudience +# PipelineReleaseAudience ## Properties @@ -17,9 +17,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { ReleaseAudience } from 'launchdarkly-api-typescript'; +import { PipelineReleaseAudience } from 'launchdarkly-api-typescript'; -const instance: ReleaseAudience = { +const instance: PipelineReleaseAudience = { _id, _links, environment, diff --git a/docs/ReleaserAudienceConfigInput.md b/docs/PipelineReleaseAudienceConfigInput.md similarity index 70% rename from docs/ReleaserAudienceConfigInput.md rename to docs/PipelineReleaseAudienceConfigInput.md index 683f156..669a005 100644 --- a/docs/ReleaserAudienceConfigInput.md +++ b/docs/PipelineReleaseAudienceConfigInput.md @@ -1,4 +1,4 @@ -# ReleaserAudienceConfigInput +# PipelineReleaseAudienceConfigInput ## Properties @@ -6,16 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **audienceId** | **string** | UUID of the audience. | [optional] [default to undefined] -**releaseGuardianConfiguration** | [**ReleaseGuardianConfigurationInput**](ReleaseGuardianConfigurationInput.md) | | [optional] [default to undefined] +**releaseGuardianConfiguration** | [**PipelineReleaseGuardianConfigurationInput**](PipelineReleaseGuardianConfigurationInput.md) | | [optional] [default to undefined] **notifyMemberIds** | **Array<string>** | An array of member IDs. These members are notified to review the approval request. | [optional] [default to undefined] **notifyTeamKeys** | **Array<string>** | An array of team keys. The members of these teams are notified to review the approval request. | [optional] [default to undefined] ## Example ```typescript -import { ReleaserAudienceConfigInput } from 'launchdarkly-api-typescript'; +import { PipelineReleaseAudienceConfigInput } from 'launchdarkly-api-typescript'; -const instance: ReleaserAudienceConfigInput = { +const instance: PipelineReleaseAudienceConfigInput = { audienceId, releaseGuardianConfiguration, notifyMemberIds, diff --git a/docs/ReleaseGuardianConfiguration.md b/docs/PipelineReleaseGuardianConfiguration.md similarity index 82% rename from docs/ReleaseGuardianConfiguration.md rename to docs/PipelineReleaseGuardianConfiguration.md index 4df84f7..26a695b 100644 --- a/docs/ReleaseGuardianConfiguration.md +++ b/docs/PipelineReleaseGuardianConfiguration.md @@ -1,4 +1,4 @@ -# ReleaseGuardianConfiguration +# PipelineReleaseGuardianConfiguration ## Properties @@ -13,9 +13,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { ReleaseGuardianConfiguration } from 'launchdarkly-api-typescript'; +import { PipelineReleaseGuardianConfiguration } from 'launchdarkly-api-typescript'; -const instance: ReleaseGuardianConfiguration = { +const instance: PipelineReleaseGuardianConfiguration = { monitoringWindowMilliseconds, rolloutWeight, rollbackOnRegression, diff --git a/docs/ReleaseGuardianConfigurationInput.md b/docs/PipelineReleaseGuardianConfigurationInput.md similarity index 81% rename from docs/ReleaseGuardianConfigurationInput.md rename to docs/PipelineReleaseGuardianConfigurationInput.md index acf8a00..18f73b9 100644 --- a/docs/ReleaseGuardianConfigurationInput.md +++ b/docs/PipelineReleaseGuardianConfigurationInput.md @@ -1,4 +1,4 @@ -# ReleaseGuardianConfigurationInput +# PipelineReleaseGuardianConfigurationInput ## Properties @@ -13,9 +13,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { ReleaseGuardianConfigurationInput } from 'launchdarkly-api-typescript'; +import { PipelineReleaseGuardianConfigurationInput } from 'launchdarkly-api-typescript'; -const instance: ReleaseGuardianConfigurationInput = { +const instance: PipelineReleaseGuardianConfigurationInput = { monitoringWindowMilliseconds, rolloutWeight, rollbackOnRegression, diff --git a/docs/ReleasePhase.md b/docs/PipelineReleasePhase.md similarity index 78% rename from docs/ReleasePhase.md rename to docs/PipelineReleasePhase.md index 1702a4e..ed159a4 100644 --- a/docs/ReleasePhase.md +++ b/docs/PipelineReleasePhase.md @@ -1,4 +1,4 @@ -# ReleasePhase +# PipelineReleasePhase ## Properties @@ -11,7 +11,7 @@ Name | Type | Description | Notes **_creationDate** | **number** | | [default to undefined] **_completionDate** | **number** | | [optional] [default to undefined] **_completedBy** | [**CompletedBy**](CompletedBy.md) | | [optional] [default to undefined] -**_audiences** | [**Array<ReleaseAudience>**](ReleaseAudience.md) | A logical grouping of one or more environments that share attributes for rolling out changes | [default to undefined] +**_audiences** | [**Array<PipelineReleaseAudience>**](PipelineReleaseAudience.md) | A logical grouping of one or more environments that share attributes for rolling out changes | [default to undefined] **status** | **string** | | [optional] [default to undefined] **started** | **boolean** | Whether or not this phase has started | [optional] [default to undefined] **_startedDate** | **number** | | [optional] [default to undefined] @@ -20,9 +20,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { ReleasePhase } from 'launchdarkly-api-typescript'; +import { PipelineReleasePhase } from 'launchdarkly-api-typescript'; -const instance: ReleasePhase = { +const instance: PipelineReleasePhase = { _id, _name, complete, diff --git a/docs/ReleaseProgression.md b/docs/PipelineReleaseProgression.md similarity index 85% rename from docs/ReleaseProgression.md rename to docs/PipelineReleaseProgression.md index 4afc352..74f9a3f 100644 --- a/docs/ReleaseProgression.md +++ b/docs/PipelineReleaseProgression.md @@ -1,4 +1,4 @@ -# ReleaseProgression +# PipelineReleaseProgression ## Properties @@ -15,9 +15,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { ReleaseProgression } from 'launchdarkly-api-typescript'; +import { PipelineReleaseProgression } from 'launchdarkly-api-typescript'; -const instance: ReleaseProgression = { +const instance: PipelineReleaseProgression = { _createdAt, _completedAt, flagKey, diff --git a/docs/ReleaseProgressionCollection.md b/docs/PipelineReleaseProgressionCollection.md similarity index 72% rename from docs/ReleaseProgressionCollection.md rename to docs/PipelineReleaseProgressionCollection.md index 0ac427d..b74748d 100644 --- a/docs/ReleaseProgressionCollection.md +++ b/docs/PipelineReleaseProgressionCollection.md @@ -1,4 +1,4 @@ -# ReleaseProgressionCollection +# PipelineReleaseProgressionCollection ## Properties @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **activeCount** | **number** | The number of active releases | [default to undefined] **completedCount** | **number** | The number of completed releases | [default to undefined] -**items** | [**Array<ReleaseProgression>**](ReleaseProgression.md) | A list of details for each release, across all flags, for this release pipeline | [default to undefined] +**items** | [**Array<PipelineReleaseProgression>**](PipelineReleaseProgression.md) | A list of details for each release, across all flags, for this release pipeline | [default to undefined] **phases** | [**Array<PhaseInfo>**](PhaseInfo.md) | A list of details for each phase, across all releases, for this release pipeline | [default to undefined] **totalCount** | **number** | The total number of releases for this release pipeline | [default to undefined] **_links** | [**{ [key: string]: Link; }**](Link.md) | The location and content type of related resources | [default to undefined] @@ -15,9 +15,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { ReleaseProgressionCollection } from 'launchdarkly-api-typescript'; +import { PipelineReleaseProgressionCollection } from 'launchdarkly-api-typescript'; -const instance: ReleaseProgressionCollection = { +const instance: PipelineReleaseProgressionCollection = { activeCount, completedCount, items, diff --git a/docs/ProgressiveReleaseConfig.md b/docs/ProgressiveReleaseConfig.md index a64d588..0dc14c5 100644 --- a/docs/ProgressiveReleaseConfig.md +++ b/docs/ProgressiveReleaseConfig.md @@ -7,7 +7,7 @@ Configuration for progressive releases Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rolloutContextKindKey** | **string** | Context kind key to use as the randomization unit for the rollout | [optional] [default to undefined] -**stages** | [**Array<ReleasePolicyStage>**](ReleasePolicyStage.md) | List of stages | [optional] [default to undefined] +**stages** | [**Array<ReleasePolicyStage>**](ReleasePolicyStage.md) | List of stages. At most 10 stages by default; the server enforces the per-account limit, which is never more than 20. | [optional] [default to undefined] ## Example diff --git a/docs/PromptSnippet.md b/docs/PromptSnippet.md index b650ac0..165f086 100644 --- a/docs/PromptSnippet.md +++ b/docs/PromptSnippet.md @@ -5,15 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] +**key** | **string** | The prompt snippet key | [default to undefined] **_access** | [**AiConfigsAccess**](AiConfigsAccess.md) | | [optional] [default to undefined] **_links** | [**ParentAndSelfLinks**](ParentAndSelfLinks.md) | | [optional] [default to undefined] +**_site** | [**CoreLink**](CoreLink.md) | | [optional] [default to undefined] **_maintainer** | [**AIConfigMaintainer**](AIConfigMaintainer.md) | | [optional] [default to undefined] -**name** | **string** | | [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**name** | **string** | The prompt snippet name | [default to undefined] +**description** | **string** | A description of the prompt snippet | [optional] [default to undefined] **text** | **string** | The text content of the prompt snippet | [default to undefined] -**tags** | **Array<string>** | | [default to undefined] -**version** | **number** | | [default to undefined] +**tags** | **Array<string>** | Tags for this resource | [default to undefined] +**version** | **number** | The version number of this resource | [default to undefined] **createdAt** | **number** | | [default to undefined] ## Example @@ -25,6 +26,7 @@ const instance: PromptSnippet = { key, _access, _links, + _site, _maintainer, name, description, diff --git a/docs/PromptSnippetPatch.md b/docs/PromptSnippetPatch.md index 2c53387..b6af595 100644 --- a/docs/PromptSnippetPatch.md +++ b/docs/PromptSnippetPatch.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**name** | **string** | A human-readable name for the prompt snippet | [optional] [default to undefined] +**description** | **string** | A description of the prompt snippet | [optional] [default to undefined] **text** | **string** | The text content of the prompt snippet | [optional] [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this resource | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains this resource | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for this resource | [optional] [default to undefined] ## Example diff --git a/docs/PromptSnippetPost.md b/docs/PromptSnippetPost.md index 0502d5d..24e12ac 100644 --- a/docs/PromptSnippetPost.md +++ b/docs/PromptSnippetPost.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] -**name** | **string** | | [default to undefined] -**description** | **string** | | [optional] [default to undefined] +**key** | **string** | A unique key for the prompt snippet | [default to undefined] +**name** | **string** | A human-readable name for the prompt snippet | [default to undefined] +**description** | **string** | A description of the prompt snippet | [optional] [default to undefined] **text** | **string** | The text content of the prompt snippet | [default to undefined] -**maintainerId** | **string** | | [optional] [default to undefined] -**maintainerTeamKey** | **string** | | [optional] [default to undefined] -**tags** | **Array<string>** | | [optional] [default to undefined] +**maintainerId** | **string** | The ID of the member who maintains this resource | [optional] [default to undefined] +**maintainerTeamKey** | **string** | The key of the team that maintains this resource | [optional] [default to undefined] +**tags** | **Array<string>** | Tags for this resource | [optional] [default to undefined] ## Example diff --git a/docs/PromptSnippets.md b/docs/PromptSnippets.md index c418e9e..0f276d4 100644 --- a/docs/PromptSnippets.md +++ b/docs/PromptSnippets.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] -**items** | [**Array<PromptSnippet>**](PromptSnippet.md) | | [default to undefined] -**totalCount** | **number** | | [default to undefined] +**items** | [**Array<PromptSnippet>**](PromptSnippet.md) | The items on this page | [default to undefined] +**totalCount** | **number** | The total number of items | [default to undefined] ## Example diff --git a/docs/QuickStats.md b/docs/QuickStats.md index aa5233f..a016a6d 100644 --- a/docs/QuickStats.md +++ b/docs/QuickStats.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**activeConfigs** | **number** | | [default to undefined] -**activeExperiments** | **number** | | [default to undefined] -**averageSatisfaction7D** | **number** | | [optional] [default to undefined] -**spendMonthToDate** | **number** | | [optional] [default to undefined] +**activeConfigs** | **number** | Number of active AI Configs | [default to undefined] +**activeExperiments** | **number** | Number of active experiments on AI Configs | [default to undefined] +**averageSatisfaction7D** | **number** | Average satisfaction rating over the last 7 days | [optional] [default to undefined] +**spendMonthToDate** | **number** | Spend so far this month | [optional] [default to undefined] ## Example diff --git a/docs/RedshiftDataExportCompletedArtifactsRep.md b/docs/RedshiftDataExportCompletedArtifactsRep.md index 6dca747..1488f66 100644 --- a/docs/RedshiftDataExportCompletedArtifactsRep.md +++ b/docs/RedshiftDataExportCompletedArtifactsRep.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sqlSetupScript** | **string** | The SQL setup script originally run against the Redshift cluster, rehydrated from the destination\'s persisted custom names. | [optional] [default to undefined] -**s3BucketName** | **string** | The auto-generated S3 staging bucket name. | [optional] [default to undefined] +**s3BucketName** | **string** | The S3 staging bucket name used by the destination. This is the customer-supplied bucket name, or the auto-generated name for destinations that did not set one. | [optional] [default to undefined] ## Example diff --git a/docs/ReleaseHealthCheckFailure.md b/docs/ReleaseHealthCheckFailure.md new file mode 100644 index 0000000..d89d9f7 --- /dev/null +++ b/docs/ReleaseHealthCheckFailure.md @@ -0,0 +1,24 @@ +# ReleaseHealthCheckFailure + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kind** | [**ReleaseHealthCheckKind**](ReleaseHealthCheckKind.md) | | [default to undefined] +**metricKey** | **string** | The metric key associated with a metric event check. | [optional] [default to undefined] +**message** | **string** | A description of the failed health check. | [default to undefined] + +## Example + +```typescript +import { ReleaseHealthCheckFailure } from 'launchdarkly-api-typescript'; + +const instance: ReleaseHealthCheckFailure = { + kind, + metricKey, + message, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReleaseHealthCheckKind.md b/docs/ReleaseHealthCheckKind.md new file mode 100644 index 0000000..5252d6d --- /dev/null +++ b/docs/ReleaseHealthCheckKind.md @@ -0,0 +1,15 @@ +# ReleaseHealthCheckKind + +A release health check: - `flag_evaluations_any`: The flag has recently been evaluated. - `flag_evaluations_with_context`: The flag has recently been evaluated for contexts of the `randomizationUnit` kind. - `metric_events_any`: Guarded releases only. The metric has received events. - `metric_events_with_context`: Guarded releases only. The metric has received events for contexts of the `randomizationUnit` kind. + +## Enum + +* `ReleaseHealthCheckKindFlagEvaluationsAny` (value: `'flag_evaluations_any'`) + +* `ReleaseHealthCheckKindFlagEvaluationsWithContext` (value: `'flag_evaluations_with_context'`) + +* `ReleaseHealthCheckKindMetricEventsAny` (value: `'metric_events_any'`) + +* `ReleaseHealthCheckKindMetricEventsWithContext` (value: `'metric_events_with_context'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReleaseMetric.md b/docs/ReleaseMetric.md new file mode 100644 index 0000000..f63d282 --- /dev/null +++ b/docs/ReleaseMetric.md @@ -0,0 +1,27 @@ +# ReleaseMetric + +A metric shared by every phase of a guarded release. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metricKey** | **string** | | [default to undefined] +**metricVersionId** | **string** | | [optional] [readonly] [default to undefined] +**autoRollback** | **boolean** | Whether a regression automatically reverts the release. | [default to undefined] +**definition** | [**EnvironmentReleasesMetricListingRep**](EnvironmentReleasesMetricListingRep.md) | Present only when the caller requests `expand=metrics` and the pinned metric version still exists. A metric whose pinned version has been deleted keeps its `metricKey` and `metricVersionId` but has no definition. | [optional] [readonly] [default to undefined] + +## Example + +```typescript +import { ReleaseMetric } from 'launchdarkly-api-typescript'; + +const instance: ReleaseMetric = { + metricKey, + metricVersionId, + autoRollback, + definition, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReleaseMetricStatus.md b/docs/ReleaseMetricStatus.md new file mode 100644 index 0000000..7a1cd40 --- /dev/null +++ b/docs/ReleaseMetricStatus.md @@ -0,0 +1,12 @@ +# ReleaseMetricStatus + + +## Enum + +* `ReleaseMetricStatusOK` (value: `'ok'`) + +* `ReleaseMetricStatusRegressed` (value: `'regressed'`) + +* `ReleaseMetricStatusRegressionDismissed` (value: `'regression_dismissed'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReleasePipelinesBetaApi.md b/docs/ReleasePipelinesDeprecatedApi.md similarity index 56% rename from docs/ReleasePipelinesBetaApi.md rename to docs/ReleasePipelinesDeprecatedApi.md index 4992d07..6f04d6e 100644 --- a/docs/ReleasePipelinesBetaApi.md +++ b/docs/ReleasePipelinesDeprecatedApi.md @@ -1,15 +1,138 @@ -# ReleasePipelinesBetaApi +# ReleasePipelinesDeprecatedApi All URIs are relative to *https://app.launchdarkly.com* |Method | HTTP request | Description| |------------- | ------------- | -------------| +|[**createReleaseForFlag**](#createreleaseforflag) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/release | Create a new release for flag| +|[**deleteReleaseByFlagKey**](#deletereleasebyflagkey) | **DELETE** /api/v2/flags/{projectKey}/{flagKey}/release | Delete a release for flag| |[**deleteReleasePipeline**](#deletereleasepipeline) | **DELETE** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Delete release pipeline| |[**getAllReleasePipelines**](#getallreleasepipelines) | **GET** /api/v2/projects/{projectKey}/release-pipelines | Get all release pipelines| |[**getAllReleaseProgressionsForReleasePipeline**](#getallreleaseprogressionsforreleasepipeline) | **GET** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}/releases | Get release progressions for release pipeline| +|[**getReleaseByFlagKey**](#getreleasebyflagkey) | **GET** /api/v2/flags/{projectKey}/{flagKey}/release | Get release for flag| |[**getReleasePipelineByKey**](#getreleasepipelinebykey) | **GET** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Get release pipeline by key| +|[**patchReleaseByFlagKey**](#patchreleasebyflagkey) | **PATCH** /api/v2/flags/{projectKey}/{flagKey}/release | Patch release for flag| |[**postReleasePipeline**](#postreleasepipeline) | **POST** /api/v2/projects/{projectKey}/release-pipelines | Create a release pipeline| |[**putReleasePipeline**](#putreleasepipeline) | **PUT** /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} | Update a release pipeline| +|[**updatePhaseStatus**](#updatephasestatus) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId} | Update phase status for release| + +# **createReleaseForFlag** +> PipelineRelease createReleaseForFlag(createPipelineReleaseInput) + +Creates a release by adding a flag to a release pipeline + +### Example + +```typescript +import { + ReleasePipelinesDeprecatedApi, + Configuration, + CreatePipelineReleaseInput +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); + +let projectKey: string; //The project key (default to undefined) +let flagKey: string; //The flag key (default to undefined) +let createPipelineReleaseInput: CreatePipelineReleaseInput; // + +const { status, data } = await apiInstance.createReleaseForFlag( + projectKey, + flagKey, + createPipelineReleaseInput +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **createPipelineReleaseInput** | **CreatePipelineReleaseInput**| | | +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **flagKey** | [**string**] | The flag key | defaults to undefined| + + +### Return type + +**PipelineRelease** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Release response | - | +|**400** | Invalid request | - | +|**401** | Invalid access token | - | +|**404** | Invalid resource identifier | - | +|**429** | Rate limit exceeded | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteReleaseByFlagKey** +> deleteReleaseByFlagKey() + +Deletes a release from a flag + +### Example + +```typescript +import { + ReleasePipelinesDeprecatedApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); + +let projectKey: string; //The project key (default to undefined) +let flagKey: string; //The flag key (default to undefined) + +const { status, data } = await apiInstance.deleteReleaseByFlagKey( + projectKey, + flagKey +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **flagKey** | [**string**] | The flag key | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | Action succeeded | - | +|**403** | Forbidden | - | +|**404** | Invalid resource identifier | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deleteReleasePipeline** > deleteReleasePipeline() @@ -20,12 +143,12 @@ Deletes a release pipeline. You cannot delete the default release pipeline. If ```typescript import { - ReleasePipelinesBetaApi, + ReleasePipelinesDeprecatedApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ReleasePipelinesBetaApi(configuration); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); let projectKey: string; //The project key (default to undefined) let pipelineKey: string; //The release pipeline key (default to undefined) @@ -76,12 +199,12 @@ Get all release pipelines for a project. ### Filtering release pipelines Launc ```typescript import { - ReleasePipelinesBetaApi, + ReleasePipelinesDeprecatedApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ReleasePipelinesBetaApi(configuration); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); let projectKey: string; //The project key (default to undefined) let filter: string; //A comma-separated list of filters. Each filter is of the form field:value. Read the endpoint description for a full list of available filter fields. (optional) (default to undefined) @@ -129,7 +252,7 @@ const { status, data } = await apiInstance.getAllReleasePipelines( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getAllReleaseProgressionsForReleasePipeline** -> ReleaseProgressionCollection getAllReleaseProgressionsForReleasePipeline() +> PipelineReleaseProgressionCollection getAllReleaseProgressionsForReleasePipeline() Get details on the progression of all releases, across all flags, for a release pipeline @@ -137,12 +260,12 @@ Get details on the progression of all releases, across all flags, for a release ```typescript import { - ReleasePipelinesBetaApi, + ReleasePipelinesDeprecatedApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ReleasePipelinesBetaApi(configuration); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); let projectKey: string; //The project key (default to undefined) let pipelineKey: string; //The pipeline key (default to undefined) @@ -172,7 +295,7 @@ const { status, data } = await apiInstance.getAllReleaseProgressionsForReleasePi ### Return type -**ReleaseProgressionCollection** +**PipelineReleaseProgressionCollection** ### Authorization @@ -192,6 +315,61 @@ const { status, data } = await apiInstance.getAllReleaseProgressionsForReleasePi [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **getReleaseByFlagKey** +> PipelineRelease getReleaseByFlagKey() + +Get currently active release for a flag + +### Example + +```typescript +import { + ReleasePipelinesDeprecatedApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); + +let projectKey: string; //The project key (default to undefined) +let flagKey: string; //The flag key (default to undefined) + +const { status, data } = await apiInstance.getReleaseByFlagKey( + projectKey, + flagKey +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **flagKey** | [**string**] | The flag key | defaults to undefined| + + +### Return type + +**PipelineRelease** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Release response | - | +|**404** | Invalid resource identifier | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **getReleasePipelineByKey** > ReleasePipeline getReleasePipelineByKey() @@ -201,12 +379,12 @@ Get a release pipeline by key ```typescript import { - ReleasePipelinesBetaApi, + ReleasePipelinesDeprecatedApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ReleasePipelinesBetaApi(configuration); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); let projectKey: string; //The project key (default to undefined) let pipelineKey: string; //The release pipeline key (default to undefined) @@ -247,6 +425,68 @@ const { status, data } = await apiInstance.getReleasePipelineByKey( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **patchReleaseByFlagKey** +> PipelineRelease patchReleaseByFlagKey(patchOperation) + +This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/release-pipelines-deprecated/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` + +### Example + +```typescript +import { + ReleasePipelinesDeprecatedApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); + +let projectKey: string; //The project key (default to undefined) +let flagKey: string; //The flag key (default to undefined) +let patchOperation: Array; // + +const { status, data } = await apiInstance.patchReleaseByFlagKey( + projectKey, + flagKey, + patchOperation +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **patchOperation** | **Array**| | | +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **flagKey** | [**string**] | The flag key | defaults to undefined| + + +### Return type + +**PipelineRelease** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Release response | - | +|**400** | Invalid request | - | +|**401** | Invalid access token | - | +|**403** | Forbidden | - | +|**404** | Invalid resource identifier | - | +|**429** | Rate limited | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **postReleasePipeline** > ReleasePipeline postReleasePipeline(createReleasePipelineInput) @@ -256,13 +496,13 @@ Creates a new release pipeline. The first release pipeline you create is automa ```typescript import { - ReleasePipelinesBetaApi, + ReleasePipelinesDeprecatedApi, Configuration, CreateReleasePipelineInput } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ReleasePipelinesBetaApi(configuration); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); let projectKey: string; //The project key (default to undefined) let createReleasePipelineInput: CreateReleasePipelineInput; // @@ -315,13 +555,13 @@ Updates a release pipeline. ```typescript import { - ReleasePipelinesBetaApi, + ReleasePipelinesDeprecatedApi, Configuration, UpdateReleasePipelineInput } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ReleasePipelinesBetaApi(configuration); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); let projectKey: string; //The project key (default to undefined) let pipelineKey: string; //The release pipeline key (default to undefined) @@ -367,3 +607,68 @@ const { status, data } = await apiInstance.putReleasePipeline( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **updatePhaseStatus** +> PipelineRelease updatePhaseStatus(updatePhaseStatusInput) + +Updates the execution status of a phase of a release + +### Example + +```typescript +import { + ReleasePipelinesDeprecatedApi, + Configuration, + UpdatePhaseStatusInput +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new ReleasePipelinesDeprecatedApi(configuration); + +let projectKey: string; //The project key (default to undefined) +let flagKey: string; //The flag key (default to undefined) +let phaseId: string; //The phase ID (default to undefined) +let updatePhaseStatusInput: UpdatePhaseStatusInput; // + +const { status, data } = await apiInstance.updatePhaseStatus( + projectKey, + flagKey, + phaseId, + updatePhaseStatusInput +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **updatePhaseStatusInput** | **UpdatePhaseStatusInput**| | | +| **projectKey** | [**string**] | The project key | defaults to undefined| +| **flagKey** | [**string**] | The flag key | defaults to undefined| +| **phaseId** | [**string**] | The phase ID | defaults to undefined| + + +### Return type + +**PipelineRelease** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Action succeeded | - | +|**400** | Invalid request | - | +|**401** | Invalid access token | - | +|**404** | release or phase not found | - | +|**429** | Rate limit exceeded | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ReleasePolicyScope.md b/docs/ReleasePolicyScope.md index f6b1e32..b40d776 100644 --- a/docs/ReleasePolicyScope.md +++ b/docs/ReleasePolicyScope.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **environmentKeys** | **Array<string>** | List of environment keys this policy applies to | [optional] [default to undefined] -**flagTagKeys** | **Array<string>** | List of flag tag keys this policy applies to | [optional] [default to undefined] +**flagTagKeys** | **Array<string>** | List of flag tag keys this policy applies to. At most 1000 keys. Each key must only contain letters, numbers, \'-\', \'_\', or \'.\', and be at most 64 characters. | [optional] [default to undefined] ## Example diff --git a/docs/ReleaseStatus.md b/docs/ReleaseStatus.md new file mode 100644 index 0000000..3470c8d --- /dev/null +++ b/docs/ReleaseStatus.md @@ -0,0 +1,17 @@ +# ReleaseStatus + +High-level status of an environment release or release phase. - `pending`: The release or phase has not started. - `in_progress`: The release or phase is progressing without requiring action. - `waiting`: The release is partially rolled out, but is paused and waiting for action from the user. - `completed`: The release or phase reached the target variation. - `reverted`: The release or phase returned to the original variation. + +## Enum + +* `ReleaseStatusPending` (value: `'pending'`) + +* `ReleaseStatusInProgress` (value: `'in_progress'`) + +* `ReleaseStatusWaiting` (value: `'waiting'`) + +* `ReleaseStatusCompleted` (value: `'completed'`) + +* `ReleaseStatusReverted` (value: `'reverted'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReleaseStatusReason.md b/docs/ReleaseStatusReason.md new file mode 100644 index 0000000..535c74d --- /dev/null +++ b/docs/ReleaseStatusReason.md @@ -0,0 +1,23 @@ +# ReleaseStatusReason + +Additional detail for a `waiting`, `completed`, or `reverted` status. The field may be absent for a `waiting` status when there is no specific reason. `waiting_phase_ended` appears only on the release, never on a phase. It means a phase of a multi-phase release with `advancementMode` `manual` ended and the release must be advanced to the next phase. `reverted_discarded` means the phase ended without a regression or a member rolling it back. A running phase is discarded when the flag changes underneath it, for example when the flag is turned off, archived, or deleted. A pending phase is discarded when the release ends before it starts, either because an earlier phase reverted or because the release was stopped with a resolution that removes pending phases. A release reports `reverted_discarded` only when the last phase that started was discarded. + +## Enum + +* `ReleaseStatusReasonWaitingRegressionDetected` (value: `'waiting_regression_detected'`) + +* `ReleaseStatusReasonWaitingPhaseEnded` (value: `'waiting_phase_ended'`) + +* `ReleaseStatusReasonCompletedAutomatic` (value: `'completed_automatic'`) + +* `ReleaseStatusReasonCompletedManual` (value: `'completed_manual'`) + +* `ReleaseStatusReasonRevertedRegressionDetected` (value: `'reverted_regression_detected'`) + +* `ReleaseStatusReasonRevertedManual` (value: `'reverted_manual'`) + +* `ReleaseStatusReasonRevertedDiscarded` (value: `'reverted_discarded'`) + +* `ReleaseStatusReasonRevertedInsufficientData` (value: `'reverted_insufficient_data'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReleaseStep.md b/docs/ReleaseStep.md new file mode 100644 index 0000000..14983b5 --- /dev/null +++ b/docs/ReleaseStep.md @@ -0,0 +1,29 @@ +# ReleaseStep + +One step in a phase\'s rollout schedule. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stepIndex** | **number** | Zero-based index of this step. | [readonly] [default to undefined] +**allocation** | **number** | Thousandths of a percent. `100000` is 100%, and `10000` is 10%. Guarded releases cannot exceed `50000`, preserving a control group. | [default to undefined] +**durationMillis** | **number** | | [default to undefined] +**startedAt** | **number** | Start of the step in Unix milliseconds. | [optional] [readonly] [default to undefined] +**endedAt** | **number** | End of the step in Unix milliseconds. | [optional] [readonly] [default to undefined] + +## Example + +```typescript +import { ReleaseStep } from 'launchdarkly-api-typescript'; + +const instance: ReleaseStep = { + stepIndex, + allocation, + durationMillis, + startedAt, + endedAt, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReleaseType.md b/docs/ReleaseType.md new file mode 100644 index 0000000..2ce05a9 --- /dev/null +++ b/docs/ReleaseType.md @@ -0,0 +1,11 @@ +# ReleaseType + +Whether the release uses metric monitoring. + +## Enum + +* `ReleaseTypeProgressive` (value: `'progressive'`) + +* `ReleaseTypeGuarded` (value: `'guarded'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReleasesBetaApi.md b/docs/ReleasesBetaApi.md deleted file mode 100644 index 6629acb..0000000 --- a/docs/ReleasesBetaApi.md +++ /dev/null @@ -1,312 +0,0 @@ -# ReleasesBetaApi - -All URIs are relative to *https://app.launchdarkly.com* - -|Method | HTTP request | Description| -|------------- | ------------- | -------------| -|[**createReleaseForFlag**](#createreleaseforflag) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/release | Create a new release for flag| -|[**deleteReleaseByFlagKey**](#deletereleasebyflagkey) | **DELETE** /api/v2/flags/{projectKey}/{flagKey}/release | Delete a release for flag| -|[**getReleaseByFlagKey**](#getreleasebyflagkey) | **GET** /api/v2/flags/{projectKey}/{flagKey}/release | Get release for flag| -|[**patchReleaseByFlagKey**](#patchreleasebyflagkey) | **PATCH** /api/v2/flags/{projectKey}/{flagKey}/release | Patch release for flag| -|[**updatePhaseStatus**](#updatephasestatus) | **PUT** /api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId} | Update phase status for release| - -# **createReleaseForFlag** -> Release createReleaseForFlag(createReleaseInput) - -Creates a release by adding a flag to a release pipeline - -### Example - -```typescript -import { - ReleasesBetaApi, - Configuration, - CreateReleaseInput -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new ReleasesBetaApi(configuration); - -let projectKey: string; //The project key (default to undefined) -let flagKey: string; //The flag key (default to undefined) -let createReleaseInput: CreateReleaseInput; // - -const { status, data } = await apiInstance.createReleaseForFlag( - projectKey, - flagKey, - createReleaseInput -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **createReleaseInput** | **CreateReleaseInput**| | | -| **projectKey** | [**string**] | The project key | defaults to undefined| -| **flagKey** | [**string**] | The flag key | defaults to undefined| - - -### Return type - -**Release** - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**200** | Release response | - | -|**400** | Invalid request | - | -|**401** | Invalid access token | - | -|**404** | Invalid resource identifier | - | -|**429** | Rate limit exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **deleteReleaseByFlagKey** -> deleteReleaseByFlagKey() - -Deletes a release from a flag - -### Example - -```typescript -import { - ReleasesBetaApi, - Configuration -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new ReleasesBetaApi(configuration); - -let projectKey: string; //The project key (default to undefined) -let flagKey: string; //The flag key (default to undefined) - -const { status, data } = await apiInstance.deleteReleaseByFlagKey( - projectKey, - flagKey -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | The project key | defaults to undefined| -| **flagKey** | [**string**] | The flag key | defaults to undefined| - - -### Return type - -void (empty response body) - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**204** | Action succeeded | - | -|**403** | Forbidden | - | -|**404** | Invalid resource identifier | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getReleaseByFlagKey** -> Release getReleaseByFlagKey() - -Get currently active release for a flag - -### Example - -```typescript -import { - ReleasesBetaApi, - Configuration -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new ReleasesBetaApi(configuration); - -let projectKey: string; //The project key (default to undefined) -let flagKey: string; //The flag key (default to undefined) - -const { status, data } = await apiInstance.getReleaseByFlagKey( - projectKey, - flagKey -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **projectKey** | [**string**] | The project key | defaults to undefined| -| **flagKey** | [**string**] | The flag key | defaults to undefined| - - -### Return type - -**Release** - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**200** | Release response | - | -|**404** | Invalid resource identifier | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **patchReleaseByFlagKey** -> Release patchReleaseByFlagKey(patchOperation) - -This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/releases-beta/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { \"op\": \"replace\", \"path\": \"/phase/0/complete\", \"value\": true } ] ``` - -### Example - -```typescript -import { - ReleasesBetaApi, - Configuration -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new ReleasesBetaApi(configuration); - -let projectKey: string; //The project key (default to undefined) -let flagKey: string; //The flag key (default to undefined) -let patchOperation: Array; // - -const { status, data } = await apiInstance.patchReleaseByFlagKey( - projectKey, - flagKey, - patchOperation -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **patchOperation** | **Array**| | | -| **projectKey** | [**string**] | The project key | defaults to undefined| -| **flagKey** | [**string**] | The flag key | defaults to undefined| - - -### Return type - -**Release** - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**200** | Release response | - | -|**400** | Invalid request | - | -|**401** | Invalid access token | - | -|**403** | Forbidden | - | -|**404** | Invalid resource identifier | - | -|**429** | Rate limited | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **updatePhaseStatus** -> Release updatePhaseStatus(updatePhaseStatusInput) - -Updates the execution status of a phase of a release - -### Example - -```typescript -import { - ReleasesBetaApi, - Configuration, - UpdatePhaseStatusInput -} from 'launchdarkly-api-typescript'; - -const configuration = new Configuration(); -const apiInstance = new ReleasesBetaApi(configuration); - -let projectKey: string; //The project key (default to undefined) -let flagKey: string; //The flag key (default to undefined) -let phaseId: string; //The phase ID (default to undefined) -let updatePhaseStatusInput: UpdatePhaseStatusInput; // - -const { status, data } = await apiInstance.updatePhaseStatus( - projectKey, - flagKey, - phaseId, - updatePhaseStatusInput -); -``` - -### Parameters - -|Name | Type | Description | Notes| -|------------- | ------------- | ------------- | -------------| -| **updatePhaseStatusInput** | **UpdatePhaseStatusInput**| | | -| **projectKey** | [**string**] | The project key | defaults to undefined| -| **flagKey** | [**string**] | The flag key | defaults to undefined| -| **phaseId** | [**string**] | The phase ID | defaults to undefined| - - -### Return type - -**Release** - -### Authorization - -[ApiKey](../README.md#ApiKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -|**200** | Action succeeded | - | -|**400** | Invalid request | - | -|**401** | Invalid access token | - | -|**404** | release or phase not found | - | -|**429** | Rate limit exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/RestrictedModelError.md b/docs/RestrictedModelError.md index 0700526..bc34b00 100644 --- a/docs/RestrictedModelError.md +++ b/docs/RestrictedModelError.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | | [default to undefined] -**message** | **string** | | [default to undefined] -**code** | **number** | | [default to undefined] +**key** | **string** | The model config key that was not added | [default to undefined] +**message** | **string** | Why the key was not added. A key that a config variation uses cannot be restricted. Move those variations to a different model first. | [default to undefined] +**code** | **number** | HTTP status code for this key. `400` means a config variation uses the key. `404` means the key does not exist in the project. | [default to undefined] ## Example diff --git a/docs/RestrictedModelsRequest.md b/docs/RestrictedModelsRequest.md index 2f5f1d3..c28809d 100644 --- a/docs/RestrictedModelsRequest.md +++ b/docs/RestrictedModelsRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**keys** | **Array<string>** | | [default to undefined] +**keys** | **Array<string>** | Model config keys, not provider model IDs. Get keys from the list AI model configs endpoint. | [default to undefined] ## Example diff --git a/docs/RestrictedModelsResponse.md b/docs/RestrictedModelsResponse.md index a913d94..04d1ec7 100644 --- a/docs/RestrictedModelsResponse.md +++ b/docs/RestrictedModelsResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**successes** | **Array<string>** | | [default to undefined] -**errors** | [**Array<RestrictedModelError>**](RestrictedModelError.md) | | [default to undefined] +**successes** | **Array<string>** | Model config keys that were added to the restricted list | [default to undefined] +**errors** | [**Array<RestrictedModelError>**](RestrictedModelError.md) | Model config keys that were not added, with the reason for each key | [default to undefined] ## Example diff --git a/docs/Rule.md b/docs/Rule.md index 0e43b27..b60597f 100644 --- a/docs/Rule.md +++ b/docs/Rule.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **variation** | **number** | The index of the variation, from the array of variations for this flag | [optional] [default to undefined] **rollout** | [**Rollout**](Rollout.md) | | [optional] [default to undefined] **clauses** | [**Array<Clause>**](Clause.md) | An array of clauses used for individual targeting based on attributes | [default to undefined] -**trackEvents** | **boolean** | Whether LaunchDarkly tracks events for this rule | [default to undefined] +**trackEvents** | **boolean** | Whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn\'t enable Data Export on its own. | [default to undefined] **description** | **string** | The rule description | [optional] [default to undefined] **ref** | **string** | | [optional] [default to undefined] diff --git a/docs/SDKKeysBetaApi.md b/docs/SDKKeysBetaApi.md index 24b4d72..a4c1f70 100644 --- a/docs/SDKKeysBetaApi.md +++ b/docs/SDKKeysBetaApi.md @@ -5,10 +5,12 @@ All URIs are relative to *https://app.launchdarkly.com* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**deleteSdkKeyByKey**](#deletesdkkeybykey) | **DELETE** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey} | Delete SDK key| +|[**getProjectSdkKeys**](#getprojectsdkkeys) | **GET** /api/v2/projects/{projectKey}/sdk-keys | Get all project SDK keys| |[**getSdkKeyByKey**](#getsdkkeybykey) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey} | Get SDK key| |[**getSdkKeys**](#getsdkkeys) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys | Get all environment SDK keys| |[**patchSdkKeyByKey**](#patchsdkkeybykey) | **PATCH** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey} | Update SDK key| |[**postSdkKey**](#postsdkkey) | **POST** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys | Create SDK key| +|[**putSdkKeyViews**](#putsdkkeyviews) | **PUT** /api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}/views | Replace SDK key views| # **deleteSdkKeyByKey** > deleteSdkKeyByKey() @@ -75,6 +77,79 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **getProjectSdkKeys** +> SdkKeys getProjectSdkKeys() + +Get all SDK keys for a given project across environments. + +### Example + +```typescript +import { + SDKKeysBetaApi, + Configuration +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new SDKKeysBetaApi(configuration); + +let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) +let projectKey: string; // (default to undefined) +let filter: string; //A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: `kind` (`equals`, `anyOf`; values: \"sdk\", \"mobile\"), `active` (`equals`, `anyOf`; values: `true`, `false`), `environmentKey` (`equals`, `anyOf`; values: environment keys), `viewKey` (`equals`, `anyOf`; values: view key strings — returns only SDK keys linked to the specified view(s)), `name` (`equals` only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: `kind anyOf [\"sdk\",\"mobile\"], environmentKey anyOf [\"production\",\"test\"], viewKey equals my-view, name equals \"production\"`. (optional) (default to undefined) +let limit: number; //The number of SDK keys to return. Defaults to 20. Maximum is 100. (optional) (default to undefined) +let offset: number; //The number of SDK keys to skip. Used for pagination. (optional) (default to undefined) +let expand: string; //A comma-separated list of fields to expand in the response. Supported fields: `environmentSummary`, `viewSummaries`. (optional) (default to undefined) +let sort: 'createdAt' | '-createdAt' | 'environmentKey'; //A sort to apply to the list of SDK keys. Supported fields: `createdAt` and `environmentKey`. Prefix `createdAt` with `-` to sort in descending order (for example, `-createdAt`). `environmentKey` orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous. (optional) (default to undefined) + +const { status, data } = await apiInstance.getProjectSdkKeys( + lDAPIVersion, + projectKey, + filter, + limit, + offset, + expand, + sort +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| +| **projectKey** | [**string**] | | defaults to undefined| +| **filter** | [**string**] | A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: `kind` (`equals`, `anyOf`; values: \"sdk\", \"mobile\"), `active` (`equals`, `anyOf`; values: `true`, `false`), `environmentKey` (`equals`, `anyOf`; values: environment keys), `viewKey` (`equals`, `anyOf`; values: view key strings — returns only SDK keys linked to the specified view(s)), `name` (`equals` only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: `kind anyOf [\"sdk\",\"mobile\"], environmentKey anyOf [\"production\",\"test\"], viewKey equals my-view, name equals \"production\"`. | (optional) defaults to undefined| +| **limit** | [**number**] | The number of SDK keys to return. Defaults to 20. Maximum is 100. | (optional) defaults to undefined| +| **offset** | [**number**] | The number of SDK keys to skip. Used for pagination. | (optional) defaults to undefined| +| **expand** | [**string**] | A comma-separated list of fields to expand in the response. Supported fields: `environmentSummary`, `viewSummaries`. | (optional) defaults to undefined| +| **sort** | [**'createdAt' | '-createdAt' | 'environmentKey'**]**Array<'createdAt' | '-createdAt' | 'environmentKey'>** | A sort to apply to the list of SDK keys. Supported fields: `createdAt` and `environmentKey`. Prefix `createdAt` with `-` to sort in descending order (for example, `-createdAt`). `environmentKey` orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous. | (optional) defaults to undefined| + + +### Return type + +**SdkKeys** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful response | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **getSdkKeyByKey** > SdkKey getSdkKeyByKey() @@ -287,7 +362,7 @@ const { status, data } = await apiInstance.patchSdkKeyByKey( # **postSdkKey** > SdkKey postSdkKey(sdkKeyPost) -Create a new server-side or mobile SDK key. +Create a new server-side or mobile SDK key. Deleted SDK keys are retained for 180 days. During that period you cannot reuse the `key` of a deleted SDK key, even though the deleted key no longer appears in the list of SDK keys for the environment. ### Example @@ -350,3 +425,74 @@ const { status, data } = await apiInstance.postSdkKey( [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **putSdkKeyViews** +> SdkKeyForPutSdkKeyViews putSdkKeyViews(sdkKeyViewsPut) + +Replace the set of views associated with an SDK key. The `viewKeys` field is required. To remove all views from the SDK key, pass an empty `viewKeys` array. + +### Example + +```typescript +import { + SDKKeysBetaApi, + Configuration, + SdkKeyViewsPut +} from 'launchdarkly-api-typescript'; + +const configuration = new Configuration(); +const apiInstance = new SDKKeysBetaApi(configuration); + +let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) +let projectKey: string; // (default to undefined) +let environmentKey: string; // (default to undefined) +let sdkKeyKey: string; // (default to undefined) +let sdkKeyViewsPut: SdkKeyViewsPut; // +let expand: string; //A comma-separated list of fields to expand in the response. Supported fields: `viewSummaries`. (optional) (default to undefined) + +const { status, data } = await apiInstance.putSdkKeyViews( + lDAPIVersion, + projectKey, + environmentKey, + sdkKeyKey, + sdkKeyViewsPut, + expand +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **sdkKeyViewsPut** | **SdkKeyViewsPut**| | | +| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| +| **projectKey** | [**string**] | | defaults to undefined| +| **environmentKey** | [**string**] | | defaults to undefined| +| **sdkKeyKey** | [**string**] | | defaults to undefined| +| **expand** | [**string**] | A comma-separated list of fields to expand in the response. Supported fields: `viewSummaries`. | (optional) defaults to undefined| + + +### Return type + +**SdkKeyForPutSdkKeyViews** + +### Authorization + +[ApiKey](../README.md#ApiKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful response | - | +|**400** | Bad request | - | +|**403** | Forbidden | - | +|**404** | Not found | - | +|**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SdkKeyListItem.md b/docs/SdkKeyListItem.md index 686cbd8..6952703 100644 --- a/docs/SdkKeyListItem.md +++ b/docs/SdkKeyListItem.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **_updatedAt** | **number** | | [default to undefined] **_version** | **number** | The auto-incremented version number of the SDK key. | [default to undefined] **environmentSummary** | [**SdkKeysEnvironmentSummary**](SdkKeysEnvironmentSummary.md) | | [optional] [default to undefined] +**viewSummaries** | [**Array<ViewSummary>**](ViewSummary.md) | Summaries of views associated with the SDK key. | [optional] [default to undefined] ## Example @@ -38,6 +39,7 @@ const instance: SdkKeyListItem = { _updatedAt, _version, environmentSummary, + viewSummaries, }; ``` diff --git a/docs/SdkKeyPost.md b/docs/SdkKeyPost.md index a3ee928..17671ce 100644 --- a/docs/SdkKeyPost.md +++ b/docs/SdkKeyPost.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **name** | **string** | The human-readable name of the SDK key. | [default to undefined] **description** | **string** | The optional description of the SDK key. | [optional] [default to undefined] **expiry** | **number** | | [optional] [default to undefined] +**viewKeys** | **Array<string>** | List of view keys to associate with the SDK key. | [optional] [default to undefined] ## Example @@ -22,6 +23,7 @@ const instance: SdkKeyPost = { name, description, expiry, + viewKeys, }; ``` diff --git a/docs/SdkKeyViewsPut.md b/docs/SdkKeyViewsPut.md new file mode 100644 index 0000000..aa1563e --- /dev/null +++ b/docs/SdkKeyViewsPut.md @@ -0,0 +1,20 @@ +# SdkKeyViewsPut + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**viewKeys** | **Array<string>** | The complete target list of view keys to associate with this SDK key. An empty array removes all views from the SDK key. | [default to undefined] + +## Example + +```typescript +import { SdkKeyViewsPut } from 'launchdarkly-api-typescript'; + +const instance: SdkKeyViewsPut = { + viewKeys, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SdkKeys.md b/docs/SdkKeys.md new file mode 100644 index 0000000..ccf242e --- /dev/null +++ b/docs/SdkKeys.md @@ -0,0 +1,24 @@ +# SdkKeys + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**SdkKeysSelfLink**](SdkKeysSelfLink.md) | | [optional] [default to undefined] +**items** | [**Array<SdkKeyListItem>**](SdkKeyListItem.md) | | [default to undefined] +**totalCount** | **number** | The total number of SDK keys matching the query, before pagination. | [default to undefined] + +## Example + +```typescript +import { SdkKeys } from 'launchdarkly-api-typescript'; + +const instance: SdkKeys = { + _links, + items, + totalCount, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SegmentsApi.md b/docs/SegmentsApi.md index f2d7866..7ccb441 100644 --- a/docs/SegmentsApi.md +++ b/docs/SegmentsApi.md @@ -986,7 +986,7 @@ const { status, data } = await apiInstance.patchSegment( # **postSegment** > UserSegment postSegment(segmentBody) -Create a new segment. +Create a new segment. The new segment has no individual targets or rules. The request body only accepts the fields documented below. If you include targeting fields such as `included`, `excluded`, `includedContexts`, `excludedContexts`, or `rules`, LaunchDarkly ignores them and does not return an error. These fields are empty in the response. To add individual targets or rules after you create the segment, use [Update segment](https://launchdarkly.com/docs/api/segments/patch-segment) with a semantic patch. For example, use the `addIncludedTargets` or `addExcludedTargets` instruction to add individual targets, and the `addRule` instruction to add a rule. For big segments, use the `addBigSegmentIncludedTargets` or `addBigSegmentExcludedTargets` instruction. ### Example diff --git a/docs/SnippetReferences.md b/docs/SnippetReferences.md index 419dfa1..4969dfa 100644 --- a/docs/SnippetReferences.md +++ b/docs/SnippetReferences.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] **resourceKey** | **string** | The key of the prompt snippet. | [default to undefined] **resourceType** | **string** | The type of the resource being referenced. | [default to undefined] -**items** | [**Array<SnippetReference>**](SnippetReference.md) | | [default to undefined] +**items** | [**Array<SnippetReference>**](SnippetReference.md) | The resources that reference this prompt snippet | [default to undefined] **totalCount** | **number** | The total number of references. | [default to undefined] ## Example diff --git a/docs/StartEnvironmentReleaseBadRequest.md b/docs/StartEnvironmentReleaseBadRequest.md new file mode 100644 index 0000000..58cba8b --- /dev/null +++ b/docs/StartEnvironmentReleaseBadRequest.md @@ -0,0 +1,24 @@ +# StartEnvironmentReleaseBadRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | | [default to undefined] +**message** | **string** | | [default to undefined] +**failingChecks** | [**Array<ReleaseHealthCheckFailure>**](ReleaseHealthCheckFailure.md) | Present when `code` is `health_checks_failed`. | [optional] [default to undefined] + +## Example + +```typescript +import { StartEnvironmentReleaseBadRequest } from 'launchdarkly-api-typescript'; + +const instance: StartEnvironmentReleaseBadRequest = { + code, + message, + failingChecks, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StartEnvironmentReleaseRequest.md b/docs/StartEnvironmentReleaseRequest.md new file mode 100644 index 0000000..6bb94ee --- /dev/null +++ b/docs/StartEnvironmentReleaseRequest.md @@ -0,0 +1,40 @@ +# StartEnvironmentReleaseRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**beforeRuleId** | **string** | Insert the newly created rule or phase rules before this rule. If omitted, append them to the end of the rule list. | [optional] [default to undefined] +**originalVariationId** | **string** | ID of the variation the release starts from. The release gradually moves traffic from it to the target variation, and moves traffic back to it if the release reverts. | [default to undefined] +**targetVariationId** | **string** | ID of the variation being released. The release gradually moves traffic to it from the original variation, and moves traffic back to the original variation if the release reverts. | [default to undefined] +**releasePlanKey** | **string** | Key of an environment release plan in this environment. The plan supplies `randomizationUnit`, `phases`, `metrics`, `advancementMode`, and `cleanupBehavior`, so omit them. Omit this field to configure the release inline. | [optional] [default to undefined] +**randomizationUnit** | **string** | Key of an existing, non-archived context kind in the project that the release randomizes on, such as `user`. Each phase\'s rule must include the clause `{\"contextKind\": \"<unit>\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"<unit>\"]}`. Required unless `releasePlanKey` is set. | [optional] [default to undefined] +**advancementMode** | [**EnvironmentReleaseAdvancementMode**](EnvironmentReleaseAdvancementMode.md) | How the release moves between phases. Required when `phases` has more than one entry; a single-phase release ignores it and may omit it. Omit when `releasePlanKey` is set. | [optional] [default to undefined] +**phases** | [**Array<EnvironmentReleasePhaseInput>**](EnvironmentReleasePhaseInput.md) | Ordered phases of the release. Required unless `releasePlanKey` is set. | [optional] [default to undefined] +**metrics** | [**Array<EnvironmentReleaseMetricInput>**](EnvironmentReleaseMetricInput.md) | Metrics shared by every phase. Omit or pass an empty array for a progressive release. Metric groups cannot be listed inline; a release plan\'s metric groups expand into their member metrics at start. Omit when `releasePlanKey` is set. | [optional] [default to undefined] +**bypassHealthChecks** | [**Set<ReleaseHealthCheckKind>**](ReleaseHealthCheckKind.md) | Health check kinds that do not block this request. LaunchDarkly still runs and enforces every health check kind not listed here. | [optional] [default to undefined] +**cleanupBehavior** | [**CleanupBehavior**](CleanupBehavior.md) | What happens to the release rules after the release completes. Omit for `leave_rules_in_place`. Omit when `releasePlanKey` is set. | [optional] [default to undefined] +**comment** | **string** | Optional comment written to the flag\'s audit-log entry. | [optional] [default to undefined] + +## Example + +```typescript +import { StartEnvironmentReleaseRequest } from 'launchdarkly-api-typescript'; + +const instance: StartEnvironmentReleaseRequest = { + beforeRuleId, + originalVariationId, + targetVariationId, + releasePlanKey, + randomizationUnit, + advancementMode, + phases, + metrics, + bypassHealthChecks, + cleanupBehavior, + comment, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StopEnvironmentReleaseRequest.md b/docs/StopEnvironmentReleaseRequest.md new file mode 100644 index 0000000..a18af7f --- /dev/null +++ b/docs/StopEnvironmentReleaseRequest.md @@ -0,0 +1,22 @@ +# StopEnvironmentReleaseRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resolution** | [**EnvironmentReleaseResolution**](EnvironmentReleaseResolution.md) | | [default to undefined] +**comment** | **string** | Optional comment written to the flag\'s audit-log entry. | [optional] [default to undefined] + +## Example + +```typescript +import { StopEnvironmentReleaseRequest } from 'launchdarkly-api-typescript'; + +const instance: StopEnvironmentReleaseRequest = { + resolution, + comment, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TagsApi.md b/docs/TagsApi.md index f9aaa47..3bd3e5e 100644 --- a/docs/TagsApi.md +++ b/docs/TagsApi.md @@ -22,7 +22,7 @@ import { const configuration = new Configuration(); const apiInstance = new TagsApi(configuration); -let kind: Array; //Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, and `view`. Returns all types by default. (optional) (default to undefined) +let kind: Array; //Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, `agent-skill`, and `view`. Returns all types by default. (optional) (default to undefined) let pre: string; //Return tags with the specified prefix (optional) (default to undefined) let archived: boolean; //Whether or not to return archived flags (optional) (default to undefined) let limit: number; //The number of tags to return. Maximum is 1000. (optional) (default to undefined) @@ -43,7 +43,7 @@ const { status, data } = await apiInstance.getTags( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **kind** | **Array<string>** | Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, and `view`. Returns all types by default. | (optional) defaults to undefined| +| **kind** | **Array<string>** | Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, `agent-skill`, and `view`. Returns all types by default. | (optional) defaults to undefined| | **pre** | [**string**] | Return tags with the specified prefix | (optional) defaults to undefined| | **archived** | [**boolean**] | Whether or not to return archived flags | (optional) defaults to undefined| | **limit** | [**number**] | The number of tags to return. Maximum is 1000. | (optional) defaults to undefined| diff --git a/docs/TeamsApi.md b/docs/TeamsApi.md index f4391a3..9dae6a6 100644 --- a/docs/TeamsApi.md +++ b/docs/TeamsApi.md @@ -256,7 +256,7 @@ const { status, data } = await apiInstance.getTeamRoles( # **getTeams** > Teams getTeams() -Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. +Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don\'t exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams\' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Sorting teams LaunchDarkly supports the following fields for sorting: - `name` sorts by team name. It is not case-sensitive. - `memberCount` sorts by the number of members on the team. By default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by team name in ascending order, and `?sort=-memberCount` sorts by member count from largest to smallest. Combine fields with a comma to break ties, for example `?sort=-memberCount,name`. ### Expanding the teams response LaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `roleAttributes` includes a list of the role attributes that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response. ### Example @@ -272,12 +272,14 @@ const apiInstance = new TeamsApi(configuration); let limit: number; //The number of teams to return in the response. Defaults to 20. (optional) (default to undefined) let offset: number; //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. (optional) (default to undefined) let filter: string; //A comma-separated list of filters. Each filter is constructed as `field:value`. (optional) (default to undefined) +let sort: string; //A comma-separated list of fields to sort by. Fields are sorted in ascending order by default. Prefix a field with `-` to sort in descending order. Supported fields: `name`, `memberCount`. (optional) (default to undefined) let expand: string; //A comma-separated list of properties that can reveal additional information in the response. (optional) (default to undefined) const { status, data } = await apiInstance.getTeams( limit, offset, filter, + sort, expand ); ``` @@ -289,6 +291,7 @@ const { status, data } = await apiInstance.getTeams( | **limit** | [**number**] | The number of teams to return in the response. Defaults to 20. | (optional) defaults to undefined| | **offset** | [**number**] | 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. | (optional) defaults to undefined| | **filter** | [**string**] | A comma-separated list of filters. Each filter is constructed as `field:value`. | (optional) defaults to undefined| +| **sort** | [**string**] | A comma-separated list of fields to sort by. Fields are sorted in ascending order by default. Prefix a field with `-` to sort in descending order. Supported fields: `name`, `memberCount`. | (optional) defaults to undefined| | **expand** | [**string**] | A comma-separated list of properties that can reveal additional information in the response. | (optional) defaults to undefined| diff --git a/docs/Token.md b/docs/Token.md index 88d2ba8..7ab2863 100644 --- a/docs/Token.md +++ b/docs/Token.md @@ -21,6 +21,7 @@ Name | Type | Description | Notes **_links** | [**{ [key: string]: Link; }**](Link.md) | The location and content type of related resources | [default to undefined] **defaultApiVersion** | **number** | The default API version for this token | [optional] [default to undefined] **lastUsed** | **number** | | [optional] [default to undefined] +**expiry** | **number** | | [optional] [default to undefined] ## Example @@ -44,6 +45,7 @@ const instance: Token = { _links, defaultApiVersion, lastUsed, + expiry, }; ``` diff --git a/docs/ToolReferences.md b/docs/ToolReferences.md index 891385f..1f8aaaf 100644 --- a/docs/ToolReferences.md +++ b/docs/ToolReferences.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | [optional] [default to undefined] **resourceKey** | **string** | The key of the AI tool. | [default to undefined] **resourceType** | **string** | The type of the resource being referenced. | [default to undefined] -**items** | [**Array<ToolReference>**](ToolReference.md) | | [default to undefined] +**items** | [**Array<ToolReference>**](ToolReference.md) | The resources that reference this tool | [default to undefined] **totalCount** | **number** | The total number of references. | [default to undefined] ## Example diff --git a/docs/UpdateAdaptiveTriggerRequest.md b/docs/UpdateAdaptiveTriggerRequest.md new file mode 100644 index 0000000..627f8a9 --- /dev/null +++ b/docs/UpdateAdaptiveTriggerRequest.md @@ -0,0 +1,22 @@ +# UpdateAdaptiveTriggerRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] [default to undefined] +**task** | [**AdaptiveTriggerTask**](AdaptiveTriggerTask.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { UpdateAdaptiveTriggerRequest } from 'launchdarkly-api-typescript'; + +const instance: UpdateAdaptiveTriggerRequest = { + name, + task, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdatePhaseStatusInput.md b/docs/UpdatePhaseStatusInput.md index d8bdd8f..f4e72c8 100644 --- a/docs/UpdatePhaseStatusInput.md +++ b/docs/UpdatePhaseStatusInput.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **string** | | [optional] [default to undefined] -**audiences** | [**Array<ReleaserAudienceConfigInput>**](ReleaserAudienceConfigInput.md) | Extra configuration for audiences required upon phase initialization. | [optional] [default to undefined] +**audiences** | [**Array<PipelineReleaseAudienceConfigInput>**](PipelineReleaseAudienceConfigInput.md) | Extra configuration for audiences required upon phase initialization. | [optional] [default to undefined] ## Example diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 4954431..bb278d1 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -11,7 +11,7 @@ All URIs are relative to *https://app.launchdarkly.com* # **getSearchUsers** > Users getSearchUsers() -> ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). +> ### Use contexts instead > > 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. Search users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query. An 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`. To paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations). ### Example @@ -82,7 +82,7 @@ const { status, data } = await apiInstance.getSearchUsers( # **getUser** > UserRecord getUser() -> ### Use contexts instead > > 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. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. +> ### Use contexts instead > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get contexts](https://launchdarkly.com/docs/api/contexts/get-contexts) instead of this endpoint. Get a user by key. The `user` object contains all attributes sent in `variation` calls for that key. ### Example diff --git a/docs/ViewPost.md b/docs/ViewPost.md index c3520b2..2fbcb4a 100644 --- a/docs/ViewPost.md +++ b/docs/ViewPost.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **string** | Unique key for the view within the account/project | [default to undefined] +**key** | **string** | Unique key for the view within the account/project. The key is converted to lowercase when the view is created, so use the lowercase form to reference the view afterward. | [default to undefined] **name** | **string** | Human-readable name for the view | [default to undefined] **description** | **string** | Optional detailed description of the view | [optional] [default to ''] **maintainerId** | **string** | Member ID of the maintainer for this view. Only one of `maintainerId` or `maintainerTeamKey` can be specified. | [optional] [default to undefined] diff --git a/docs/ViewsBetaApi.md b/docs/ViewsApi.md similarity index 90% rename from docs/ViewsBetaApi.md rename to docs/ViewsApi.md index f048fd3..3f36054 100644 --- a/docs/ViewsBetaApi.md +++ b/docs/ViewsApi.md @@ -1,4 +1,4 @@ -# ViewsBetaApi +# ViewsApi All URIs are relative to *https://app.launchdarkly.com* @@ -23,20 +23,18 @@ Create a new view in the given project. ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration, ViewPost } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let viewPost: ViewPost; //View object to create const { status, data } = await apiInstance.createView( - lDAPIVersion, projectKey, viewPost ); @@ -47,7 +45,6 @@ const { status, data } = await apiInstance.createView( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **viewPost** | **ViewPost**| View object to create | | -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| @@ -85,19 +82,17 @@ Delete a specific view by its key. ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let viewKey: string; // (default to undefined) const { status, data } = await apiInstance.deleteView( - lDAPIVersion, projectKey, viewKey ); @@ -107,7 +102,6 @@ const { status, data } = await apiInstance.deleteView( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| | **viewKey** | [**string**] | | defaults to undefined| @@ -145,14 +139,13 @@ Get a list of all linked resources for a given view. ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let viewKey: string; // (default to undefined) let resourceType: 'flags' | 'segments' | 'aiConfigs'; // (default to undefined) @@ -164,7 +157,6 @@ let filter: string; //Optional resource filter expression for linked resources. let expand: Array<'maintainer' | 'resourceDetails'>; //A comma-separated list of fields to expand. (optional) (default to undefined) const { status, data } = await apiInstance.getLinkedResources( - lDAPIVersion, projectKey, viewKey, resourceType, @@ -181,7 +173,6 @@ const { status, data } = await apiInstance.getLinkedResources( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| | **viewKey** | [**string**] | | defaults to undefined| | **resourceType** | [**'flags' | 'segments' | 'aiConfigs'**]**Array<'flags' | 'segments' | 'aiConfigs'>** | | defaults to undefined| @@ -227,14 +218,13 @@ Get a list of all linked views for a resource. Flags and AI configs are identifi ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let resourceType: 'flags' | 'segments' | 'aiConfigs'; // (default to undefined) let resourceKey: string; // (default to undefined) @@ -243,7 +233,6 @@ let limit: number; //The number of views to return. (optional) (default to undef let offset: number; //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`. (optional) (default to undefined) const { status, data } = await apiInstance.getLinkedViews( - lDAPIVersion, projectKey, resourceType, resourceKey, @@ -257,7 +246,6 @@ const { status, data } = await apiInstance.getLinkedViews( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| | **resourceType** | [**'flags' | 'segments' | 'aiConfigs'**]**Array<'flags' | 'segments' | 'aiConfigs'>** | | defaults to undefined| | **resourceKey** | [**string**] | | defaults to undefined| @@ -300,14 +288,13 @@ Retrieve a specific view by its key. ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let viewKey: string; // (default to undefined) let sort: 'key' | 'name' | 'updatedAt'; //A sort to apply to the list of views. (optional) (default to undefined) @@ -317,7 +304,6 @@ let filter: string; //A filter to apply to the list of views. Supports the follo let expand: Array<'allFlags' | 'allSegments' | 'allMetrics' | 'allAIConfigs' | 'allResources' | 'maintainer' | 'flagsSummary' | 'segmentsSummary' | 'metricsSummary' | 'aiConfigsSummary' | 'resourceSummary'>; //A comma-separated list of fields to expand. (optional) (default to undefined) const { status, data } = await apiInstance.getView( - lDAPIVersion, projectKey, viewKey, sort, @@ -332,7 +318,6 @@ const { status, data } = await apiInstance.getView( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| | **viewKey** | [**string**] | | defaults to undefined| | **sort** | [**'key' | 'name' | 'updatedAt'**]**Array<'key' | 'name' | 'updatedAt'>** | A sort to apply to the list of views. | (optional) defaults to undefined| @@ -376,14 +361,13 @@ Get a list of all views in the given project. ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let sort: 'key' | 'name' | 'updatedAt'; //A sort to apply to the list of views. (optional) (default to undefined) let limit: number; //The number of views to return. (optional) (default to undefined) @@ -392,7 +376,6 @@ let filter: string; //A filter to apply to the list of views. Supports the follo let expand: Array<'flagsSummary' | 'segmentsSummary' | 'metricsSummary' | 'aiConfigsSummary' | 'resourceSummary'>; //A comma-separated list of fields to expand. (optional) (default to undefined) const { status, data } = await apiInstance.getViews( - lDAPIVersion, projectKey, sort, limit, @@ -406,7 +389,6 @@ const { status, data } = await apiInstance.getViews( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| | **sort** | [**'key' | 'name' | 'updatedAt'**]**Array<'key' | 'name' | 'updatedAt'>** | A sort to apply to the list of views. | (optional) defaults to undefined| | **limit** | [**number**] | The number of views to return. | (optional) defaults to undefined| @@ -449,22 +431,20 @@ Link one or multiple resources to a view by keys, filters, or both: - Link flags ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration, ViewLinkRequest } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let viewKey: string; // (default to undefined) let resourceType: 'flags' | 'segments' | 'aiConfigs'; // (default to undefined) let viewLinkRequest: ViewLinkRequest; //Resources to link to the view. You can provide explicit keys/IDs, filters, or both. - Flags: identified by key or filtered by maintainerId, maintainerTeamKey, tags, state, query - Segments: identified by segment ID or filtered by tags, query, unbounded const { status, data } = await apiInstance.linkResource( - lDAPIVersion, projectKey, viewKey, resourceType, @@ -477,7 +457,6 @@ const { status, data } = await apiInstance.linkResource( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **viewLinkRequest** | **ViewLinkRequest**| Resources to link to the view. You can provide explicit keys/IDs, filters, or both. - Flags: identified by key or filtered by maintainerId, maintainerTeamKey, tags, state, query - Segments: identified by segment ID or filtered by tags, query, unbounded | | -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| | **viewKey** | [**string**] | | defaults to undefined| | **resourceType** | [**'flags' | 'segments' | 'aiConfigs'**]**Array<'flags' | 'segments' | 'aiConfigs'>** | | defaults to undefined| @@ -517,22 +496,20 @@ Unlink one or multiple resources from a view: - Unlink flags using flag keys - U ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration, ViewLinkRequest } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let viewKey: string; // (default to undefined) let resourceType: 'flags' | 'segments' | 'aiConfigs'; // (default to undefined) let viewLinkRequest: ViewLinkRequest; //The resource to link to the view. Flags are identified by key. Segments are identified by segment ID. const { status, data } = await apiInstance.unlinkResource( - lDAPIVersion, projectKey, viewKey, resourceType, @@ -545,7 +522,6 @@ const { status, data } = await apiInstance.unlinkResource( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **viewLinkRequest** | **ViewLinkRequest**| The resource to link to the view. Flags are identified by key. Segments are identified by segment ID. | | -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| | **viewKey** | [**string**] | | defaults to undefined| | **resourceType** | [**'flags' | 'segments' | 'aiConfigs'**]**Array<'flags' | 'segments' | 'aiConfigs'>** | | defaults to undefined| @@ -585,21 +561,19 @@ Edit an existing view. The request body must be a JSON object of the fields to ```typescript import { - ViewsBetaApi, + ViewsApi, Configuration, ViewPatch } from 'launchdarkly-api-typescript'; const configuration = new Configuration(); -const apiInstance = new ViewsBetaApi(configuration); +const apiInstance = new ViewsApi(configuration); -let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined) let projectKey: string; // (default to undefined) let viewKey: string; // (default to undefined) let viewPatch: ViewPatch; //A JSON representation of the view including only the fields to update. const { status, data } = await apiInstance.updateView( - lDAPIVersion, projectKey, viewKey, viewPatch @@ -611,7 +585,6 @@ const { status, data } = await apiInstance.updateView( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **viewPatch** | **ViewPatch**| A JSON representation of the view including only the fields to update. | | -| **lDAPIVersion** | [**'beta'**]**Array<'beta'>** | Version of the endpoint. | defaults to undefined| | **projectKey** | [**string**] | | defaults to undefined| | **viewKey** | [**string**] | | defaults to undefined| diff --git a/docs/WarehouseDestinationSetupScriptRep.md b/docs/WarehouseDestinationSetupScriptRep.md index 0051191..98070ce 100644 --- a/docs/WarehouseDestinationSetupScriptRep.md +++ b/docs/WarehouseDestinationSetupScriptRep.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **publicKeyPkcs8** | **string** | The PKCS8 RSA public key (Snowflake only) | [optional] [default to undefined] **redshiftIAMPermissionsPolicy** | **string** | For Redshift, present only when clusterIdentifier, clusterRegion, and clusterAwsAccountId are supplied in the request body. | [optional] [default to undefined] **redshiftIAMTrustPolicy** | **string** | For Redshift, present only when clusterIdentifier, clusterRegion, and clusterAwsAccountId are supplied in the request body. | [optional] [default to undefined] -**s3BucketName** | **string** | The auto-generated S3 staging bucket name (ClickHouse and Redshift) | [optional] [default to undefined] +**s3BucketName** | **string** | The S3 staging bucket name (ClickHouse and Redshift). For Redshift this is the name chosen for setup, a previously saved name, or an auto-generated default. | [optional] [default to undefined] ## Example diff --git a/index.ts b/index.ts index bbe2914..6020a8f 100644 --- a/index.ts +++ b/index.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * LaunchDarkly REST API - * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). + * 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). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly\'s REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All 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. LaunchDarkly 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. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [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. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | 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 | | 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 | > #### Keep your access tokens and SDK keys private > > 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. > > The client-side ID is safe to embed in untrusted contexts. It\'s designed for use in client-side JavaScript. ### Authentication using request header The 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. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For 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. Depending 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. > ### Modifying the Origin header causes an error > > 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`. > > If the Origin header does not match what\'s expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, Cross-Origin Resource Sharing (CORS) extensions used during development can modify the Origin header and cause the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All 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). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. Unless an endpoint\'s documentation says otherwise, the API ignores request body fields that are not part of that endpoint\'s request schema, and does not return an error for them. A successful response does not mean that every field you sent was applied. To confirm the result, check the response body. ### Summary and detailed representations When 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. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes 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. To 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. ### Links and addressability The 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: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From 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. Collections 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. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources 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. When 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. ### Updates using JSON patch [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. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag\'s description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag\'s `version` is `10`, and if so, changes the feature flag\'s description. Attributes that are not editable, such as a resource\'s `_links`, have names that start with an underscore. ### Updates using JSON merge patch [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: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some 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. Semantic 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. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here\'s how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If 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. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `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. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic 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. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here\'s an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `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. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 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. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 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. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The 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: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You 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. ## Rate limiting We use several rate-limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code and include headers to indicate the current rate limit status. The specific headers returned depend on the API route that was called. Limits differ based on the route, authentication mechanism, and other factors. Each set of headers below appears only when the corresponding limit is being enforced for your call. A given route may be subject to any combination of these limits, so a response can include one, several, or none of these headers. A missing header indicates that the limit was not applied to this specific call; it does not necessarily indicate that the limit does not exist. To reduce usage before hitting a `429` status, program against whichever rate limit headers are present rather than expecting a specific header. We do not publicly document the specific number of calls permitted by any of these limits, and these limits may change. We encourage clients to program against the specification and rely on the headers described below, rather than hardcoding the current limits. > ### Rate limiting and SDKs > > 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. ### Global rate limits Authenticated 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: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Limit` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Global-Remaining` | The number of requests remaining in the current global rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | ### Route-level rate limits Some 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: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Limit` | The maximum number of requests to the current route permitted per ten seconds. | | `X-Ratelimit-Route-Remaining` | The number of requests remaining for the current route in the current rate limit window. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _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. ### Access token rate limits Some calls are rate limited per access token. Unlike the global and route-level limits, this limit applies to a single service or personal access token on its own. Exceeding a limit with one access token does not affect other tokens on the account. Calls that are subject to access token rate limits return these headers: | Header name | Description | | ---------------------------------- | --------------------------------------------------------------------------------------- | | `X-Ratelimit-Auth-Token-Limit` | The maximum number of requests the access token can make per ten seconds. | | `X-Ratelimit-Auth-Token-Remaining` | The number of requests remaining for the access token in the current rate limit window. | | `X-Ratelimit-Auth-Token-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | Unlike the other rate limits, access token rate limits report their own reset time in the `X-Ratelimit-Auth-Token-Reset` header instead of in `X-Ratelimit-Reset`. ### IP-based rate limiting We 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. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints\' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our 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. ## Method overriding Some 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. To 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. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We 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. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > 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). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To 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. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The 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. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The 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. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We 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. Updates 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. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The 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. ### Setting the API version per access token When 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. Tokens 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. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog
Version Changes End of life (EOL)
`20240415`
  • 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
Current
`20220603`
  • 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.
2025-04-15
`20210729`
  • 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.
2023-06-03
`20191212`
  • [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.
2022-07-29
`20160426`
  • Initial versioning of API. Tokens created before versioning have their version set to this.
2020-12-12
To learn more about how EOL is determined, read LaunchDarkly\'s [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/). * * The version of the OpenAPI document: 2.0 * Contact: support@launchdarkly.com diff --git a/package.json b/package.json index 70bad02..84cd7b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "launchdarkly-api-typescript", - "version": "24.0.0", + "version": "25.0.0", "description": "OpenAPI client for launchdarkly-api-typescript", "author": "OpenAPI-Generator Contributors", "repository": {