@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api LaunchDarkly REST API
@base https://app.launchdarkly.com
@version 2.0
@auth ApiKey Authorization in header
@endpoints 363
@hint download_for_search
@toc api(363)

@endpoint GET /api/v2
@returns(200) {links: map}
@errors {429}

@endpoint GET /api/v2/account/relay-auto-configs
@returns(200) {items: [map]}
@errors {401, 403, 429}

@endpoint POST /api/v2/account/relay-auto-configs
@required {name: str, policy: [map{resources: [str], notResources: [str], actions: [str], notActions: [str], effect!: str}]}
@returns(201) {_id: str, _creator: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, _access: map{denied: [map], allowed: [map]}, name: str, policy: [map], fullKey: str, displayKey: str, creationDate: int(int64), lastModified: int(int64)}
@errors {400, 401, 429}

@endpoint GET /api/v2/account/relay-auto-configs/{id}
@required {id: str(string)}
@returns(200) {_id: str, _creator: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, _access: map{denied: [map], allowed: [map]}, name: str, policy: [map], fullKey: str, displayKey: str, creationDate: int(int64), lastModified: int(int64)}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/account/relay-auto-configs/{id}
@required {id: str(string), patch: [map{op!: str, path!: str, value: any}]}
@optional {comment: str}
@returns(200) {_id: str, _creator: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, _access: map{denied: [map], allowed: [map]}, name: str, policy: [map], fullKey: str, displayKey: str, creationDate: int(int64), lastModified: int(int64)}
@errors {400, 401, 404, 409, 422, 429}

@endpoint DELETE /api/v2/account/relay-auto-configs/{id}
@required {id: str(string)}
@returns(204)
@errors {401, 404, 409, 429}

@endpoint POST /api/v2/account/relay-auto-configs/{id}/reset
@required {id: str(string)}
@optional {expiry: int(int64)}
@returns(200) {_id: str, _creator: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, _access: map{denied: [map], allowed: [map]}, name: str, policy: [map], fullKey: str, displayKey: str, creationDate: int(int64), lastModified: int(int64)}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/applications
@optional {filter: str(string), limit: int(int64), offset: int(int64), sort: str(string), expand: str(string)}
@returns(200) {_links: map, items: [map], totalCount: int}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/applications/{applicationKey}
@required {applicationKey: str(string)}
@optional {expand: str(string)}
@returns(200) {flags: map{items: [map], totalCount: int, _links: map}, _access: map{denied: [map], allowed: [map]}, _links: map, _version: int, autoAdded: bool, creationDate: int(int64), description: str, key: str, kind: str, _maintainer: map{member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, team: map{customRoleKeys: [str], key: str, _links: map, name: str}}, name: str}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/applications/{applicationKey}
@required {applicationKey: str(string)}
@returns(200) {flags: map{items: [map], totalCount: int, _links: map}, _access: map{denied: [map], allowed: [map]}, _links: map, _version: int, autoAdded: bool, creationDate: int(int64), description: str, key: str, kind: str, _maintainer: map{member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, team: map{customRoleKeys: [str], key: str, _links: map, name: str}}, name: str}
@errors {400, 401, 403, 404, 429}

@endpoint DELETE /api/v2/applications/{applicationKey}
@required {applicationKey: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/applications/{applicationKey}/versions
@required {applicationKey: str(string)}
@optional {filter: str(string), limit: int(int64), offset: int(int64), sort: str(string)}
@returns(200) {_links: map, items: [map], totalCount: int}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/applications/{applicationKey}/versions/{versionKey}
@required {applicationKey: str(string), versionKey: str(string)}
@returns(200) {_access: map{denied: [map], allowed: [map]}, _links: map, _version: int, autoAdded: bool, creationDate: int(int64), key: str, name: str, supported: bool}
@errors {400, 401, 403, 404, 429}

@endpoint DELETE /api/v2/applications/{applicationKey}/versions/{versionKey}
@required {applicationKey: str(string), versionKey: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/approval-requests
@optional {filter: str(string), expand: str(string), limit: int(int64), offset: int(int64)}
@returns(200) {items: [map], totalCount: int, _links: map}
@errors {400, 401, 403, 429}

@endpoint POST /api/v2/approval-requests
@required {resourceId: str, description: str, instructions: [map]}
@optional {comment: str, notifyMemberIds: [str], notifyTeamKeys: [str], integrationConfig: map}
@returns(201) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}, resourceId: str, approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/approval-requests/{id}
@required {id: str(string)}
@optional {expand: str(string)}
@returns(200) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}, resourceId: str, approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, project: map{_links: map, _id: str, key: str, includeInSnippetByDefault: bool, defaultClientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, name: str, _access: map{denied: [map], allowed: [map]}, tags: [str], defaultReleasePipelineKey: str, environments: map{_links: map, totalCount: int, items: [map]}}, environments: [map], flag: map{name: str, kind: str, description: str, key: str, _version: int, creationDate: int(int64), includeInSnippet: bool, clientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, variations: [map], temporary: bool, tags: [str], _links: map, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, customProperties: map, archived: bool, archivedDate: int(int64), defaults: map{onVariation: int, offVariation: int}}, resource: map{kind: str, aiConfig: map{key: str, name: str}, experiment: map{key: str, name: str, _access: map{denied: [map], allowed: [map]}}, flag: map{name: str, kind: str, description: str, key: str, _version: int, creationDate: int(int64), includeInSnippet: bool, clientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, variations: [map], temporary: bool, tags: [str], _links: map, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, customProperties: map, archived: bool, archivedDate: int(int64), defaults: map{onVariation: int, offVariation: int}}, segment: map{name: str, description: str, tags: [str], creationDate: int(int64), lastModifiedDate: int(int64), key: str, included: [str], excluded: [str], includedContexts: [map], excludedContexts: [map], _links: map, rules: [map], version: int, deleted: bool, _access: map{denied: [map], allowed: [map]}, _flags: [map], unbounded: bool, unboundedContextKind: str, generation: int, _unboundedMetadata: map{envId: str, segmentId: str, version: int, includedCount: int, excludedCount: int, lastModified: int(int64), deleted: bool}, _external: str, _externalLink: str, _importInProgress: bool}}}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/approval-requests/{id}
@required {id: str(string), instructions: [map]}
@optional {comment: str}
@returns(200) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}}
@errors {401, 403, 404, 429}

@endpoint DELETE /api/v2/approval-requests/{id}
@required {id: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/approval-requests/{id}/apply
@required {id: str(string)}
@optional {comment: str}
@returns(200) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}, resourceId: str, approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}}
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/approval-requests/{id}/reviews
@required {id: str(string)}
@optional {kind: str(approve/comment/decline), comment: str}
@returns(200) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}, resourceId: str, approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}}
@errors {400, 401, 404, 405, 409, 429}

@endpoint GET /api/v2/auditlog
@optional {before: int(int64), after: int(int64), q: str(string), limit: int(int64), spec: str(string)}
@returns(200) {items: [map], _links: map}
@errors {400, 401, 403, 429}

@endpoint POST /api/v2/auditlog
@optional {before: int(int64), after: int(int64), q: str(string), limit: int(int64)}
@returns(200) {items: [map], _links: map}
@errors {400, 401, 403, 429}

@endpoint POST /api/v2/auditlog/counts
@required {after: int(int64)}
@optional {before: int(int64), buckets: int(int64)}
@returns(200) {buckets: [map], totalCount: int(int64), bucketIntervalMs: int(int64)}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/auditlog/{id}
@required {id: str(string)}
@returns(200) {_links: map, _id: str, _accountId: str, date: int(int64), accesses: [map], kind: str, name: str, description: str, shortDescription: str, comment: str, subject: map{_links: map, name: str, avatarUrl: str}, member: map{_links: map, _id: str, email: str, firstName: str, lastName: str}, token: map{_links: map, _id: str, name: str, ending: str, serviceToken: bool}, app: map{_links: map, _id: str, isScim: bool, name: str, maintainerName: str}, titleVerb: str, title: str, target: map{_links: map, name: str, resources: [str]}, parent: map{_links: map, name: str, resource: str}, delta: any, triggerBody: any, merge: any, previousVersion: any, currentVersion: any, subentries: [map]}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/caller-identity
@returns(200) {accountId: str, environmentId: str, projectId: str, environmentName: str, projectName: str, authKind: str, tokenKind: str, clientId: str, tokenName: str, tokenId: str, memberId: str, serviceToken: bool, scopes: [str]}
@errors {401, 429}

@endpoint GET /api/v2/code-refs/extinctions
@optional {repoName: str(string), branchName: str(string), projKey: str(string), flagKey: str(string), from: int(int64), to: int(int64)}
@returns(200) {_links: map, items: map}
@errors {401, 403, 429}

@endpoint GET /api/v2/code-refs/repositories
@optional {withBranches: str(string), withReferencesForDefaultBranch: str(string), projKey: str(string), flagKey: str(string)}
@returns(200) {_links: map, items: [map]}
@errors {401, 403, 429}

@endpoint POST /api/v2/code-refs/repositories
@required {name: str}
@optional {sourceLink: str, commitUrlTemplate: str, hunkUrlTemplate: str, type: str(bitbucket/custom/github/gitlab), defaultBranch: str}
@returns(200) {name: str, sourceLink: str, commitUrlTemplate: str, hunkUrlTemplate: str, type: str, defaultBranch: str, enabled: bool, version: int, branches: [map], _links: map, _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 409, 429}

@endpoint GET /api/v2/code-refs/repositories/{repo}
@required {repo: str(string)}
@returns(200) {name: str, sourceLink: str, commitUrlTemplate: str, hunkUrlTemplate: str, type: str, defaultBranch: str, enabled: bool, version: int, branches: [map], _links: map, _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/code-refs/repositories/{repo}
@required {repo: str(string)}
@returns(200) {name: str, sourceLink: str, commitUrlTemplate: str, hunkUrlTemplate: str, type: str, defaultBranch: str, enabled: bool, version: int, branches: [map], _links: map, _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 404, 429}

@endpoint DELETE /api/v2/code-refs/repositories/{repo}
@required {repo: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/code-refs/repositories/{repo}/branch-delete-tasks
@required {repo: str(string)}
@returns(200)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/code-refs/repositories/{repo}/branches
@required {repo: str(string)}
@returns(200) {_links: map, items: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/code-refs/repositories/{repo}/branches/{branch}
@required {repo: str(string), branch: str(string)}
@optional {projKey: str(string), flagKey: str(string)}
@returns(200) {name: str, head: str, updateSequenceId: int(int64), syncTime: int(int64), references: [map], _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint PUT /api/v2/code-refs/repositories/{repo}/branches/{branch}
@required {repo: str(string), branch: str(string), name: str, head: str, syncTime: int(int64)}
@optional {updateSequenceId: int(int64), references: [map{path!: str, hint: str, hunks!: [map]}], commitTime: int(int64)}
@returns(200)
@errors {400, 401, 403, 404, 409, 429}

@endpoint POST /api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events
@required {repo: str(string), branch: str(string)}
@returns(200)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/code-refs/statistics
@returns(200) {projects: [map], self: map{href: str, type: str}}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/code-refs/statistics/{projectKey}
@required {projectKey: str(string)}
@optional {flagKey: str(string)}
@returns(200) {flags: map, _links: map}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/destinations
@returns(200) {_links: map, items: [map]}
@errors {401, 403, 429}

@endpoint POST /api/v2/destinations/generate-warehouse-destination-key-pair
@returns(201) {public_key: str, public_key_pkcs8: str}
@errors {400, 401, 403, 409, 429}

@endpoint POST /api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-trust-policy
@required {projKey: str(string), envKey: str(string)}
@returns(201) {awsTrustPolicy: map{Version: str, Statement: [map]}}
@errors {400, 401, 403, 409, 429}

@endpoint POST /api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-warehouse-destination-key-pair
@required {projKey: str(string), envKey: str(string)}
@returns(201) {public_key: str, public_key_pkcs8: str}
@errors {400, 401, 403, 409, 429}

@endpoint POST /api/v2/destinations/{projectKey}/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@optional {name: str, kind: str(google-pubsub/kinesis/mparticle/segment/azure-event-hubs/snowflake-v2/databricks/bigquery/redshift), config: any, on: bool}
@returns(201) {_id: str, _links: map, name: str, kind: str, version: num, config: any, on: bool, _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 409, 429}

@endpoint GET /api/v2/destinations/{projectKey}/{environmentKey}/{id}
@required {projectKey: str(string), environmentKey: str(string), id: str(string)}
@returns(200) {_id: str, _links: map, name: str, kind: str, version: num, config: any, on: bool, _access: map{denied: [map], allowed: [map]}}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/destinations/{projectKey}/{environmentKey}/{id}
@required {projectKey: str(string), environmentKey: str(string), id: str(string)}
@returns(200) {_id: str, _links: map, name: str, kind: str, version: num, config: any, on: bool, _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint DELETE /api/v2/destinations/{projectKey}/{environmentKey}/{id}
@required {projectKey: str(string), environmentKey: str(string), id: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}
@required {projectKey: str(string), featureFlagKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 403, 429}

@endpoint POST /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}
@required {projectKey: str(string), featureFlagKey: str(string)}
@optional {key: str, integrationKey: str, timestamp: int(int64), deepLink: str, title: str, description: str, metadata: map}
@returns(201) {_links: map, _key: str, _integrationKey: str, _id: str, _deepLink: str, _timestamp: map{milliseconds: int(int64), seconds: int(int64), rfc3339: str, simple: str}, title: str, description: str, _metadata: map, _createdAt: int(int64), _member: map{_links: map, _id: str, firstName: str, lastName: str}}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}
@required {projectKey: str(string), featureFlagKey: str(string), id: str(string)}
@returns(200) {_links: map, _key: str, _integrationKey: str, _id: str, _deepLink: str, _timestamp: map{milliseconds: int(int64), seconds: int(int64), rfc3339: str, simple: str}, title: str, description: str, _metadata: map, _createdAt: int(int64), _member: map{_links: map, _id: str, firstName: str, lastName: str}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint DELETE /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}
@required {projectKey: str(string), featureFlagKey: str(string), id: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/flag-status/{projectKey}/{featureFlagKey}
@required {projectKey: str(string), featureFlagKey: str(string)}
@optional {env: str(string)}
@returns(200) {environments: map, key: str, _links: map}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/flag-statuses/{projectKey}/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@returns(200) {_links: map, items: [map]}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string)}
@returns(200) {name: str, lastRequested: str(date-time), default: any, _links: map}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/flags/{projectKey}
@required {projectKey: str(string)}
@optional {env: str(string), tag: str(string), limit: int(int64), offset: int(int64), archived: bool, summary: bool, filter: str(string), sort: str(string), compare: bool, expand: str(string)}
@returns(200) {items: [map], _links: map, totalCount: int, totalCountWithDifferences: int}
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/flags/{projectKey}
@required {projectKey: str(string), name: str, key: str}
@optional {clone: str(string), description: str, includeInSnippet: bool, clientSideAvailability: map{usingEnvironmentId!: bool, usingMobileKey!: bool}, variations: [map{_id: str, value!: any, description: str, name: str}], temporary: bool, tags: [str], customProperties: map, defaults: map{onVariation!: int, offVariation!: int}, purpose: str(migration/holdout), migrationSettings: map{contextKind: str, stageCount!: int}, maintainerId: str, maintainerTeamKey: str, initialPrerequisites: [map{key!: str, variationId!: str}], isFlagOn: bool}
@returns(201) {name: str, kind: str, description: str, key: str, _version: int, creationDate: int(int64), includeInSnippet: bool, clientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, variations: [map], temporary: bool, tags: [str], _links: map, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, maintainerTeamKey: str, _maintainerTeam: map{key: str, name: str, _links: map}, goalIds: [str], experiments: map{baselineIdx: int, items: [map]}, customProperties: map, archived: bool, archivedDate: int(int64), deprecated: bool, deprecatedDate: int(int64), defaults: map{onVariation: int, offVariation: int}, _purpose: str, migrationSettings: map{contextKind: str, stageCount: int}, environments: map}
@errors {400, 401, 409, 429}

@endpoint GET /api/v2/flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string)}
@returns(200) {items: [map], _links: map, _site: map{href: str, type: str}}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/flags/{projectKey}/{featureFlagKey}
@required {projectKey: str(string), featureFlagKey: str(string)}
@optional {env: str(string), expand: str(string)}
@returns(200) {name: str, kind: str, description: str, key: str, _version: int, creationDate: int(int64), includeInSnippet: bool, clientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, variations: [map], temporary: bool, tags: [str], _links: map, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, maintainerTeamKey: str, _maintainerTeam: map{key: str, name: str, _links: map}, goalIds: [str], experiments: map{baselineIdx: int, items: [map]}, customProperties: map, archived: bool, archivedDate: int(int64), deprecated: bool, deprecatedDate: int(int64), defaults: map{onVariation: int, offVariation: int}, _purpose: str, migrationSettings: map{contextKind: str, stageCount: int}, environments: map}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/flags/{projectKey}/{featureFlagKey}
@required {projectKey: str(string), featureFlagKey: str(string), patch: [map{op!: str, path!: str, value: any}]}
@optional {ignoreConflicts: bool, dryRun: bool, comment: str}
@returns(200) {name: str, kind: str, description: str, key: str, _version: int, creationDate: int(int64), includeInSnippet: bool, clientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, variations: [map], temporary: bool, tags: [str], _links: map, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, maintainerTeamKey: str, _maintainerTeam: map{key: str, name: str, _links: map}, goalIds: [str], experiments: map{baselineIdx: int, items: [map]}, customProperties: map, archived: bool, archivedDate: int(int64), deprecated: bool, deprecatedDate: int(int64), defaults: map{onVariation: int, offVariation: int}, _purpose: str, migrationSettings: map{contextKind: str, stageCount: int}, environments: map}
@errors {400, 401, 404, 405, 409, 429}

@endpoint DELETE /api/v2/flags/{projectKey}/{featureFlagKey}
@required {projectKey: str(string), featureFlagKey: str(string)}
@returns(204)
@errors {401, 404, 409, 429}

@endpoint POST /api/v2/flags/{projectKey}/{featureFlagKey}/copy
@required {projectKey: str(string), featureFlagKey: str(string), source: map{key!: str, currentVersion: int}, target: map{key!: str, currentVersion: int}}
@optional {comment: str, includedActions: [str], excludedActions: [str]}
@returns(201) {name: str, kind: str, description: str, key: str, _version: int, creationDate: int(int64), includeInSnippet: bool, clientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, variations: [map], temporary: bool, tags: [str], _links: map, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, maintainerTeamKey: str, _maintainerTeam: map{key: str, name: str, _links: map}, goalIds: [str], experiments: map{baselineIdx: int, items: [map]}, customProperties: map, archived: bool, archivedDate: int(int64), deprecated: bool, deprecatedDate: int(int64), defaults: map{onVariation: int, offVariation: int}, _purpose: str, migrationSettings: map{contextKind: str, stageCount: int}, environments: map}
@errors {400, 401, 405, 409, 429}

@endpoint GET /api/v2/flags/{projectKey}/{featureFlagKey}/dependent-flags
@required {projectKey: str(string), featureFlagKey: str(string)}
@returns(200) {items: [map], _links: map, _site: map{href: str, type: str}}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string), instructions: [map]}
@optional {comment: str}
@returns(200) {items: [map], _links: map, totalInstructions: int, successfulInstructions: int, failedInstructions: int, errors: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string), instructions: [map]}
@optional {comment: str}
@returns(200) {items: [map], _links: map, totalInstructions: int, successfulInstructions: int, failedInstructions: int, errors: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 403, 429}

@endpoint POST /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string), integrationKey: str}
@optional {comment: str, instructions: [map]}
@returns(201) {_id: str, _version: int, _creationDate: int(int64), _maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, enabled: bool, _integrationKey: str, instructions: [map], _lastTriggeredAt: int(int64), _recentTriggerBodies: [map], _triggerCount: int, triggerURL: str, _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string)}
@returns(200) {_id: str, _version: int, _creationDate: int(int64), _maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, enabled: bool, _integrationKey: str, instructions: [map], _lastTriggeredAt: int(int64), _recentTriggerBodies: [map], _triggerCount: int, triggerURL: str, _links: map}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string), id: str(string)}
@optional {comment: str, instructions: [map]}
@returns(200) {_id: str, _version: int, _creationDate: int(int64), _maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, enabled: bool, _integrationKey: str, instructions: [map], _lastTriggeredAt: int(int64), _recentTriggerBodies: [map], _triggerCount: int, triggerURL: str, _links: map}
@errors {400, 401, 403, 404, 409, 429}

@endpoint DELETE /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string), id: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/flags/{projectKey}/{flagKey}/release
@required {projectKey: str(string), flagKey: str(string)}
@returns(200) {_links: map, name: str, releasePipelineKey: str, releasePipelineDescription: str, phases: [map], _version: int, _releaseVariationId: str, _canceledAt: int(int64)}
@errors {404}

@endpoint PATCH /api/v2/flags/{projectKey}/{flagKey}/release
@required {projectKey: str(string), flagKey: str(string)}
@returns(200) {_links: map, name: str, releasePipelineKey: str, releasePipelineDescription: str, phases: [map], _version: int, _releaseVariationId: str, _canceledAt: int(int64)}
@errors {400, 401, 403, 404, 429}

@endpoint DELETE /api/v2/flags/{projectKey}/{flagKey}/release
@required {projectKey: str(string), flagKey: str(string)}
@returns(204)
@errors {403, 404}

@endpoint GET /api/v2/integration-capabilities/big-segment-store
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, items: [map]}
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), config: map}
@optional {on: bool, tags: [str], name: str}
@returns(201) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}, environment: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, environmentKey: str, config: map, on: bool, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}, _status: map{available: bool, potentiallyStale: bool, lastSync: int(int64), lastError: int(int64), errors: [map]}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), integrationId: str(string)}
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}, environment: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, environmentKey: str, config: map, on: bool, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}, _status: map{available: bool, potentiallyStale: bool, lastSync: int(int64), lastError: int(int64), errors: [map]}}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), integrationId: str(string)}
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}, environment: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, environmentKey: str, config: map, on: bool, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}, _status: map{available: bool, potentiallyStale: bool, lastSync: int(int64), lastError: int(int64), errors: [map]}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint DELETE /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), integrationId: str(string)}
@returns(204)
@errors {401, 403, 404, 409, 429}

@endpoint GET /api/v2/integration-capabilities/featureStore
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, items: [map]}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, items: [map]}
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), config: map}
@optional {on: bool, tags: [str], name: str}
@returns(201) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}, environment: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, environmentKey: str, config: map, on: bool, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), id: str(string)}
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}, environment: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, environmentKey: str, config: map, on: bool, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}}
@errors {404, 429}

@endpoint PATCH /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), id: str(string)}
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}, environment: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, environmentKey: str, config: map, on: bool, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 404, 422, 429}

@endpoint DELETE /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), id: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}/validate
@required {projectKey: str(string), environmentKey: str(string), integrationKey: str(string), id: str(string)}
@returns(200) {statusCode: int, error: str, timestamp: int(int64), responseBody: str}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/integration-capabilities/flag-import
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, items: [map]}
@errors {400, 401, 403, 404, 409, 429}

@endpoint POST /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}
@required {projectKey: str(string), integrationKey: str(string), config: map}
@optional {tags: [str], name: str}
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, config: map, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}, _status: map{status: str, lastImport: int(int64), lastError: int(int64), errors: [map]}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}
@required {projectKey: str(string), integrationKey: str(string), integrationId: str(string)}
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, config: map, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}, _status: map{status: str, lastImport: int(int64), lastError: int(int64), errors: [map]}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint PATCH /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}
@required {projectKey: str(string), integrationKey: str(string), integrationId: str(string)}
@returns(200) {_links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}, project: map{href: str, type: str}}, _id: str, integrationKey: str, projectKey: str, config: map, tags: [str], name: str, version: int, _access: map{denied: [map], allowed: [map]}, _status: map{status: str, lastImport: int(int64), lastError: int(int64), errors: [map]}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint DELETE /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}
@required {projectKey: str(string), integrationKey: str(string), integrationId: str(string)}
@returns(204)
@errors {401, 403, 404, 409, 429}

@endpoint POST /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}/trigger
@required {projectKey: str(string), integrationKey: str(string), integrationId: str(string)}
@returns(201)
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/integration-configurations/keys/{integrationKey}
@required {integrationKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/integration-configurations/keys/{integrationKey}
@required {integrationKey: str(string), name: str, configValues: map}
@optional {enabled: bool, tags: [str], capabilityConfig: map{approvals: map, auditLogEventsHook: map}}
@returns(201) {_links: map, _id: str, name: str, _createdAt: int(int64), _integrationKey: str, tags: [str], enabled: bool, _access: map{denied: [map], allowed: [map]}, configValues: map, capabilityConfig: map{approvals: map{additionalFormVariables: [map]}, auditLogEventsHook: map{statements: [map]}}, snowflakeSetupScript: str}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/integration-configurations/{integrationConfigurationId}
@required {integrationConfigurationId: str(string)}
@returns(200) {_links: map, _id: str, name: str, _createdAt: int(int64), _integrationKey: str, tags: [str], enabled: bool, _access: map{denied: [map], allowed: [map]}, configValues: map, capabilityConfig: map{approvals: map{additionalFormVariables: [map]}, auditLogEventsHook: map{statements: [map]}}, snowflakeSetupScript: str}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/integration-configurations/{integrationConfigurationId}
@required {integrationConfigurationId: str(string)}
@returns(200) {_links: map, _id: str, name: str, _createdAt: int(int64), _integrationKey: str, tags: [str], enabled: bool, _access: map{denied: [map], allowed: [map]}, configValues: map, capabilityConfig: map{approvals: map{additionalFormVariables: [map]}, auditLogEventsHook: map{statements: [map]}}, snowflakeSetupScript: str}
@errors {400, 403, 404, 409, 429}

@endpoint DELETE /api/v2/integration-configurations/{integrationConfigurationId}
@required {integrationConfigurationId: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/integrations/{integrationKey}
@required {integrationKey: str(string)}
@returns(200) {_links: map, items: [map], key: str}
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/integrations/{integrationKey}
@required {integrationKey: str(string), name: str, config: map}
@optional {statements: [map{resources: [str], notResources: [str], actions: [str], notActions: [str], effect!: str}], on: bool, tags: [str], url: str, apiKey: str}
@returns(201) {_links: map, _id: str, kind: str, name: str, config: map, statements: [map], on: bool, tags: [str], _access: map{denied: [map], allowed: [map]}, _status: map{successCount: int, lastSuccess: int(int64), lastError: int(int64), errorCount: int, errors: [map]}, url: str, apiKey: str}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/integrations/{integrationKey}/{id}
@required {integrationKey: str(string), id: str(string)}
@returns(200) {_links: map, _id: str, kind: str, name: str, config: map, statements: [map], on: bool, tags: [str], _access: map{denied: [map], allowed: [map]}, _status: map{successCount: int, lastSuccess: int(int64), lastError: int(int64), errorCount: int, errors: [map]}, url: str, apiKey: str}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/integrations/{integrationKey}/{id}
@required {integrationKey: str(string), id: str(string)}
@returns(200) {_links: map, _id: str, kind: str, name: str, config: map, statements: [map], on: bool, tags: [str], _access: map{denied: [map], allowed: [map]}, _status: map{successCount: int, lastSuccess: int(int64), lastError: int(int64), errorCount: int, errors: [map]}, url: str, apiKey: str}
@errors {400, 403, 404, 409, 429}

@endpoint DELETE /api/v2/integrations/{integrationKey}/{id}
@required {integrationKey: str(string), id: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/members
@optional {limit: int(int64), offset: int(int64), filter: str(string), expand: str(string), sort: str(string)}
@returns(200) {items: [map], _links: map, totalCount: int}
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/members
@returns(201) {items: [map], _links: map, totalCount: int}
@errors {400, 401, 403, 409, 429}

@endpoint PATCH /api/v2/members
@required {instructions: [map]}
@optional {comment: str}
@returns(200) {members: [str], errors: [map]}
@errors {400, 401, 403, 409, 429}

@endpoint GET /api/v2/members/{id}
@required {id: str(string)}
@optional {expand: str(string)}
@returns(200) {_links: map, _id: str, firstName: str, lastName: str, role: str, email: str, _pendingInvite: bool, _verified: bool, _pendingEmail: str, customRoles: [str], mfa: str, excludedDashboards: [str], _lastSeen: int(int64), _lastSeenMetadata: map{tokenId: str}, _integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, teams: [map], permissionGrants: [map], creationDate: int(int64), oauthProviders: [str], version: int, roleAttributes: map}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/members/{id}
@required {id: str(string)}
@returns(200) {_links: map, _id: str, firstName: str, lastName: str, role: str, email: str, _pendingInvite: bool, _verified: bool, _pendingEmail: str, customRoles: [str], mfa: str, excludedDashboards: [str], _lastSeen: int(int64), _lastSeenMetadata: map{tokenId: str}, _integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, teams: [map], permissionGrants: [map], creationDate: int(int64), oauthProviders: [str], version: int, roleAttributes: map}
@errors {400, 401, 403, 404, 409, 429}

@endpoint DELETE /api/v2/members/{id}
@required {id: str(string)}
@returns(204)
@errors {401, 403, 404, 409, 429}

@endpoint POST /api/v2/members/{id}/teams
@required {id: str(string), teamKeys: [str]}
@returns(201) {_links: map, _id: str, firstName: str, lastName: str, role: str, email: str, _pendingInvite: bool, _verified: bool, _pendingEmail: str, customRoles: [str], mfa: str, excludedDashboards: [str], _lastSeen: int(int64), _lastSeenMetadata: map{tokenId: str}, _integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, teams: [map], permissionGrants: [map], creationDate: int(int64), oauthProviders: [str], version: int, roleAttributes: map}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/metrics/{projectKey}
@required {projectKey: str(string)}
@optional {expand: str(string), limit: int(int64), offset: int(int64), sort: str(string), filter: str(string)}
@returns(200) {items: [map], _links: map, totalCount: int}
@errors {401, 404}

@endpoint POST /api/v2/metrics/{projectKey}
@required {projectKey: str(string), key: str, kind: str(pageview/click/custom)}
@optional {name: str, description: str, selector: str, urls: [map{kind: str, url: str, substring: str, pattern: str}], isNumeric: bool, unit: str, eventKey: str, successCriteria: str(HigherThanBaseline/LowerThanBaseline), tags: [str], randomizationUnits: [str], maintainerId: str, unitAggregationType: str(average/sum), analysisType: str, percentileValue: int, eventDefault: map{disabled: bool, value: num}, dataSource: map{key!: str, environmentKey: str, _name: str, _integrationKey: str}, filters: map{type!: str, attribute: str, op!: str, values!: [any], contextKind: str, negate!: bool}, windowStartOffset: int(int64), windowEndOffset: int(int64), traceQuery: str, traceValueLocation: str}
@returns(201) {experimentCount: int, metricGroupCount: int, activeExperimentCount: int, activeGuardedRolloutCount: int, _id: str, _versionId: str, _version: int, key: str, name: str, kind: str, _attachedFlagCount: int, _links: map, _site: map{href: str, type: str}, _access: map{denied: [map], allowed: [map]}, tags: [str], _creationDate: int(int64), lastModified: map{date: str(date-time)}, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, description: str, category: str, isNumeric: bool, successCriteria: str, unit: str, eventKey: str, randomizationUnits: [str], filters: map{type: str, attribute: str, op: str, values: [any], contextKind: str, negate: bool}, unitAggregationType: str, analysisType: str, percentileValue: int, eventDefault: map{disabled: bool, value: num}, dataSource: map{key: str, environmentKey: str, _name: str, _integrationKey: str}, lastSeen: int(int64), archived: bool, archivedAt: int(int64), selector: str, urls: [map], windowStartOffset: int(int64), windowEndOffset: int(int64), traceQuery: str, traceValueLocation: str, experiments: [map], metricGroups: [map], lastUsedInExperiment: map{key: str, name: str, environmentId: str, environmentKey: str, creationDate: int(int64), archivedDate: int(int64), _links: map}, lastUsedInGuardedRollout: map{_id: str, flagKey: str, flagName: str, flagPurpose: str, environmentKey: str, environmentName: str, status: str, creationDate: int(int64), _links: map}, isActive: bool, _attachedFeatures: [map]}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/metrics/{projectKey}/{metricKey}
@required {projectKey: str(string), metricKey: str(string)}
@optional {expand: str(string), versionId: str(string)}
@returns(200) {experimentCount: int, metricGroupCount: int, activeExperimentCount: int, activeGuardedRolloutCount: int, _id: str, _versionId: str, _version: int, key: str, name: str, kind: str, _attachedFlagCount: int, _links: map, _site: map{href: str, type: str}, _access: map{denied: [map], allowed: [map]}, tags: [str], _creationDate: int(int64), lastModified: map{date: str(date-time)}, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, description: str, category: str, isNumeric: bool, successCriteria: str, unit: str, eventKey: str, randomizationUnits: [str], filters: map{type: str, attribute: str, op: str, values: [any], contextKind: str, negate: bool}, unitAggregationType: str, analysisType: str, percentileValue: int, eventDefault: map{disabled: bool, value: num}, dataSource: map{key: str, environmentKey: str, _name: str, _integrationKey: str}, lastSeen: int(int64), archived: bool, archivedAt: int(int64), selector: str, urls: [map], windowStartOffset: int(int64), windowEndOffset: int(int64), traceQuery: str, traceValueLocation: str, experiments: [map], metricGroups: [map], lastUsedInExperiment: map{key: str, name: str, environmentId: str, environmentKey: str, creationDate: int(int64), archivedDate: int(int64), _links: map}, lastUsedInGuardedRollout: map{_id: str, flagKey: str, flagName: str, flagPurpose: str, environmentKey: str, environmentName: str, status: str, creationDate: int(int64), _links: map}, isActive: bool, _attachedFeatures: [map]}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/metrics/{projectKey}/{metricKey}
@required {projectKey: str(string), metricKey: str(string)}
@returns(200) {experimentCount: int, metricGroupCount: int, activeExperimentCount: int, activeGuardedRolloutCount: int, _id: str, _versionId: str, _version: int, key: str, name: str, kind: str, _attachedFlagCount: int, _links: map, _site: map{href: str, type: str}, _access: map{denied: [map], allowed: [map]}, tags: [str], _creationDate: int(int64), lastModified: map{date: str(date-time)}, maintainerId: str, _maintainer: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, description: str, category: str, isNumeric: bool, successCriteria: str, unit: str, eventKey: str, randomizationUnits: [str], filters: map{type: str, attribute: str, op: str, values: [any], contextKind: str, negate: bool}, unitAggregationType: str, analysisType: str, percentileValue: int, eventDefault: map{disabled: bool, value: num}, dataSource: map{key: str, environmentKey: str, _name: str, _integrationKey: str}, lastSeen: int(int64), archived: bool, archivedAt: int(int64), selector: str, urls: [map], windowStartOffset: int(int64), windowEndOffset: int(int64), traceQuery: str, traceValueLocation: str, experiments: [map], metricGroups: [map], lastUsedInExperiment: map{key: str, name: str, environmentId: str, environmentKey: str, creationDate: int(int64), archivedDate: int(int64), _links: map}, lastUsedInGuardedRollout: map{_id: str, flagKey: str, flagName: str, flagPurpose: str, environmentKey: str, environmentName: str, status: str, creationDate: int(int64), _links: map}, isActive: bool, _attachedFeatures: [map]}
@errors {400, 401, 404, 409, 429}

@endpoint DELETE /api/v2/metrics/{projectKey}/{metricKey}
@required {projectKey: str(string), metricKey: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/oauth/clients
@returns(200) {_links: map, items: [map]}
@errors {400, 401, 403}

@endpoint POST /api/v2/oauth/clients
@optional {name: str, redirectUri: str, description: str}
@returns(201) {_links: map, name: str, description: str, _accountId: str, _clientId: str, _clientSecret: str, redirectUri: str, _creationDate: int(int64)}
@errors {400, 401, 403}

@endpoint GET /api/v2/oauth/clients/{clientId}
@required {clientId: str(string)}
@returns(200) {_links: map, name: str, description: str, _accountId: str, _clientId: str, _clientSecret: str, redirectUri: str, _creationDate: int(int64)}
@errors {400, 401, 403, 404}

@endpoint PATCH /api/v2/oauth/clients/{clientId}
@required {clientId: str(string)}
@returns(200) {_links: map, name: str, description: str, _accountId: str, _clientId: str, _clientSecret: str, redirectUri: str, _creationDate: int(int64)}
@errors {400, 401, 403, 404}

@endpoint DELETE /api/v2/oauth/clients/{clientId}
@required {clientId: str(string)}
@returns(204)
@errors {400, 401, 403, 404}

@endpoint GET /api/v2/openapi.json
@returns(200)
@errors {429}

@endpoint GET /api/v2/projects
@optional {limit: int(int64), offset: int(int64), filter: str(string), sort: str(string), expand: str(string)}
@returns(200) {_links: map, items: [map], totalCount: int}
@errors {400, 401, 403, 429}

@endpoint POST /api/v2/projects
@required {name: str, key: str}
@optional {includeInSnippetByDefault: bool, defaultClientSideAvailability: map{usingEnvironmentId!: bool, usingMobileKey!: bool}, tags: [str], environments: [map{name!: str, key!: str, color!: str, defaultTtl: int, secureMode: bool, defaultTrackEvents: bool, confirmChanges: bool, requireComments: bool, tags: [str], source: map, critical: bool}], namingConvention: map{case: str, prefix: str}}
@returns(201) {_links: map, _id: str, key: str, includeInSnippetByDefault: bool, defaultClientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, name: str, _access: map{denied: [map], allowed: [map]}, tags: [str], defaultReleasePipelineKey: str, environments: [map]}
@errors {400, 401, 403, 409, 429}

@endpoint GET /api/v2/projects/{projectKey}
@required {projectKey: str(string)}
@optional {expand: str(string)}
@returns(200) {_links: map, _id: str, key: str, includeInSnippetByDefault: bool, defaultClientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, name: str, _access: map{denied: [map], allowed: [map]}, tags: [str], defaultReleasePipelineKey: str, environments: map{_links: map, totalCount: int, items: [map]}}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/projects/{projectKey}
@required {projectKey: str(string)}
@returns(200) {_links: map, _id: str, key: str, includeInSnippetByDefault: bool, defaultClientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, name: str, _access: map{denied: [map], allowed: [map]}, tags: [str], defaultReleasePipelineKey: str, environments: [map]}
@errors {400, 401, 403, 404, 409, 429}

@endpoint DELETE /api/v2/projects/{projectKey}
@required {projectKey: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/projects/{projectKey}/context-kinds
@required {projectKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 403, 404}

@endpoint PUT /api/v2/projects/{projectKey}/context-kinds/{key}
@required {projectKey: str(string), key: str(string), name: str}
@optional {description: str, hideInTargeting: bool, archived: bool, version: int}
@returns(200) {status: str, _links: map}
@errors {400, 401, 403, 404}

@endpoint GET /api/v2/projects/{projectKey}/environments
@required {projectKey: str(string)}
@optional {limit: int(int64), offset: int(int64), filter: str(string), sort: str(string)}
@returns(200) {_links: map, totalCount: int, items: [map]}
@errors {400, 401, 403, 404, 405, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments
@required {projectKey: str(string), name: str, key: str, color: str}
@optional {defaultTtl: int, secureMode: bool, defaultTrackEvents: bool, confirmChanges: bool, requireComments: bool, tags: [str], source: map{key: str, version: int}, critical: bool}
@returns(201) {_links: map, _id: str, key: str, name: str, apiKey: str, mobileKey: str, color: str, defaultTtl: int, secureMode: bool, _access: map{denied: [map], allowed: [map]}, defaultTrackEvents: bool, requireComments: bool, confirmChanges: bool, tags: [str], approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, resourceApprovalSettings: map, critical: bool}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@returns(200) {_links: map, _id: str, key: str, name: str, apiKey: str, mobileKey: str, color: str, defaultTtl: int, secureMode: bool, _access: map{denied: [map], allowed: [map]}, defaultTrackEvents: bool, requireComments: bool, confirmChanges: bool, tags: [str], approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, resourceApprovalSettings: map, critical: bool}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/projects/{projectKey}/environments/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@returns(200) {_links: map, _id: str, key: str, name: str, apiKey: str, mobileKey: str, color: str, defaultTtl: int, secureMode: bool, _access: map{denied: [map], allowed: [map]}, defaultTrackEvents: bool, requireComments: bool, confirmChanges: bool, tags: [str], approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, resourceApprovalSettings: map, critical: bool}
@errors {400, 401, 404, 409, 429}

@endpoint DELETE /api/v2/projects/{projectKey}/environments/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey
@required {projectKey: str(string), environmentKey: str(string)}
@optional {expiry: int(int64)}
@returns(200) {_links: map, _id: str, key: str, name: str, apiKey: str, mobileKey: str, color: str, defaultTtl: int, secureMode: bool, _access: map{denied: [map], allowed: [map]}, defaultTrackEvents: bool, requireComments: bool, confirmChanges: bool, tags: [str], approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, resourceApprovalSettings: map, critical: bool}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes
@required {projectKey: str(string), environmentKey: str(string)}
@optional {filter: str(string), limit: int(int64)}
@returns(200) {items: [map]}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName}
@required {projectKey: str(string), environmentKey: str(string), attributeName: str(string)}
@optional {filter: str(string), limit: int(int64)}
@returns(200) {items: [map]}
@errors {400, 401, 403, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search
@required {projectKey: str(string), environmentKey: str(string)}
@optional {limit: int(int64), continuationToken: str(string), sort: str(string), filter: str(string), includeTotalCount: bool, filter: str, sort: str, limit: int, continuationToken: str}
@returns(200) {_links: map, totalCount: int, _environmentId: str, continuationToken: str, items: [map]}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}
@required {projectKey: str(string), environmentKey: str(string), id: str(string)}
@optional {limit: int(int64), continuationToken: str(string), sort: str(string), filter: str(string), includeTotalCount: bool}
@returns(200) {_links: map, totalCount: int, _environmentId: str, continuationToken: str, items: [map]}
@errors {400, 401, 403, 429}

@endpoint DELETE /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}
@required {projectKey: str(string), environmentKey: str(string), id: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search
@required {projectKey: str(string), environmentKey: str(string)}
@optional {limit: int(int64), continuationToken: str(string), sort: str(string), filter: str(string), includeTotalCount: bool, filter: str, sort: str, limit: int, continuationToken: str}
@returns(200) {_links: map, totalCount: int, _environmentId: str, continuationToken: str, items: [map]}
@errors {400, 401, 403, 429}

@endpoint PUT /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey}
@required {projectKey: str(string), environmentKey: str(string), contextKind: str(string), contextKey: str(string), featureFlagKey: str(string)}
@optional {setting: any, comment: str}
@returns(204)
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key}
@required {projectKey: str(string), environmentKey: str(string), kind: str(string), key: str(string)}
@optional {limit: int(int64), continuationToken: str(string), sort: str(string), filter: str(string), includeTotalCount: bool}
@returns(200) {_links: map, totalCount: int, _environmentId: str, continuationToken: str, items: [map]}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments
@required {projectKey: str(string), environmentKey: str(string)}
@optional {limit: int(int64), offset: int(int64), filter: str(string), expand: str(string), lifecycleState: str(string)}
@returns(200) {items: [map], total_count: int, _links: map}
@errors {400, 401, 403, 404, 405, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments
@required {projectKey: str(string), environmentKey: str(string), name: str, key: str, iteration: map{hypothesis!: str, canReshuffleTraffic: bool, metrics!: [map], primarySingleMetricKey: str, primaryFunnelKey: str, treatments!: [map], flags!: map, randomizationUnit: str, reallocationFrequencyMillis: int, covariateId: str, attributes: [str]}}
@optional {description: str, maintainerId: str, holdoutId: str, tags: [str], methodology: str(bayesian/frequentist/export_only), analysisConfig: map{bayesianThreshold: str, significanceThreshold: str, testDirection: str, multipleComparisonCorrectionMethod: str, multipleComparisonCorrectionScope: str, sequentialTestingEnabled: bool}, dataSource: str(launchdarkly/snowflake), type: str(experiment/mab/holdout)}
@returns(201) {_id: str, key: str, name: str, description: str, _maintainerId: str, _creationDate: int(int64), environmentKey: str, methodology: str, dataSource: str, archivedDate: int(int64), tags: [str], _links: map, holdoutId: str, currentIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, type: str, draftIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, previousIterations: [map], analysisConfig: map{bayesianThreshold: str, significanceThreshold: str, testDirection: str, multipleComparisonCorrectionMethod: str, multipleComparisonCorrectionScope: str, sequentialTestingEnabled: bool}}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}
@required {projectKey: str(string), environmentKey: str(string), experimentKey: str(string)}
@optional {expand: str(string)}
@returns(200) {_id: str, key: str, name: str, description: str, _maintainerId: str, _creationDate: int(int64), environmentKey: str, methodology: str, dataSource: str, archivedDate: int(int64), tags: [str], _links: map, holdoutId: str, currentIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, type: str, draftIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, previousIterations: [map], analysisConfig: map{bayesianThreshold: str, significanceThreshold: str, testDirection: str, multipleComparisonCorrectionMethod: str, multipleComparisonCorrectionScope: str, sequentialTestingEnabled: bool}}
@errors {400, 401, 403, 404, 405, 429}

@endpoint PATCH /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}
@required {projectKey: str(string), environmentKey: str(string), experimentKey: str(string), instructions: [map]}
@optional {comment: str}
@returns(200) {_id: str, key: str, name: str, description: str, _maintainerId: str, _creationDate: int(int64), environmentKey: str, methodology: str, dataSource: str, archivedDate: int(int64), tags: [str], _links: map, holdoutId: str, currentIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, type: str, draftIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, previousIterations: [map], analysisConfig: map{bayesianThreshold: str, significanceThreshold: str, testDirection: str, multipleComparisonCorrectionMethod: str, multipleComparisonCorrectionScope: str, sequentialTestingEnabled: bool}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations
@required {projectKey: str(string), environmentKey: str(string), experimentKey: str(string), hypothesis: str, metrics: [map{key!: str, isGroup: bool, primary: bool}], treatments: [map{name!: str, baseline!: bool, allocationPercent!: str, parameters!: [map]}], flags: map}
@optional {canReshuffleTraffic: bool, primarySingleMetricKey: str, primaryFunnelKey: str, randomizationUnit: str, reallocationFrequencyMillis: int, covariateId: str, attributes: [str]}
@returns(200) {_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate
@required {projectKey: str(string), environmentKey: str(string)}
@optional {limit: int(int64), offset: int(int64), sort: str(string), filter: str(string)}
@returns(200) {items: [map], totalCount: int, _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/followers
@required {projectKey: str(string), environmentKey: str(string)}
@returns(200) {_links: map, items: [map]}
@errors {400, 401, 403, 404}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts
@required {projectKey: str(string), environmentKey: str(string)}
@optional {limit: int(int64), offset: int(int64)}
@returns(200) {items: [map], _links: map, total_count: int}
@errors {400, 401, 403, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts
@required {projectKey: str(string), environmentKey: str(string)}
@optional {name: str, key: str, description: str, randomizationunit: str, attributes: [str], holdoutamount: str, primarymetrickey: str, metrics: [map{key!: str, isGroup: bool, primary: bool}], prerequisiteflagkey: str, maintainerId: str}
@returns(201) {_id: str, status: str, description: str, holdoutAmount: str, createdAt: int(int64), updatedAt: int(int64), baseExperiment: map{_id: str, key: str, name: str, description: str, _maintainerId: str, _creationDate: int(int64), environmentKey: str, methodology: str, dataSource: str, archivedDate: int(int64), tags: [str], _links: map, holdoutId: str, currentIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, type: str, draftIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, previousIterations: [map], analysisConfig: map{bayesianThreshold: str, significanceThreshold: str, testDirection: str, multipleComparisonCorrectionMethod: str, multipleComparisonCorrectionScope: str, sequentialTestingEnabled: bool}}, experiments: [map]}
@errors {400}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/id/{holdoutId}
@required {projectKey: str(string), environmentKey: str(string), holdoutId: str(string)}
@returns(200) {_id: str, status: str, description: str, holdoutAmount: str, createdAt: int(int64), updatedAt: int(int64), baseExperiment: map{_id: str, key: str, name: str, description: str, _maintainerId: str, _creationDate: int(int64), environmentKey: str, methodology: str, dataSource: str, archivedDate: int(int64), tags: [str], _links: map, holdoutId: str, currentIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, type: str, draftIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, previousIterations: [map], analysisConfig: map{bayesianThreshold: str, significanceThreshold: str, testDirection: str, multipleComparisonCorrectionMethod: str, multipleComparisonCorrectionScope: str, sequentialTestingEnabled: bool}}, experiments: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey}
@required {projectKey: str(string), environmentKey: str(string), holdoutKey: str(string)}
@optional {expand: str(string)}
@returns(200) {_id: str, status: str, description: str, holdoutAmount: str, isDirty: bool, createdAt: int(int64), updatedAt: int(int64), baseExperiment: map{_id: str, key: str, name: str, description: str, _maintainerId: str, _creationDate: int(int64), environmentKey: str, methodology: str, dataSource: str, archivedDate: int(int64), tags: [str], _links: map, holdoutId: str, currentIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, type: str, draftIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, previousIterations: [map], analysisConfig: map{bayesianThreshold: str, significanceThreshold: str, testDirection: str, multipleComparisonCorrectionMethod: str, multipleComparisonCorrectionScope: str, sequentialTestingEnabled: bool}}, relatedExperiments: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey}
@required {projectKey: str(string), environmentKey: str(string), holdoutKey: str(string), instructions: [map]}
@optional {comment: str}
@returns(200) {_id: str, status: str, description: str, holdoutAmount: str, createdAt: int(int64), updatedAt: int(int64), baseExperiment: map{_id: str, key: str, name: str, description: str, _maintainerId: str, _creationDate: int(int64), environmentKey: str, methodology: str, dataSource: str, archivedDate: int(int64), tags: [str], _links: map, holdoutId: str, currentIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, type: str, draftIteration: map{_id: str, hypothesis: str, status: str, createdAt: int(int64), startedAt: int(int64), endedAt: int(int64), winningTreatmentId: str, winningReason: str, canReshuffleTraffic: bool, flags: map, reallocationFrequencyMillis: int, version: int, primaryMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, eventKey: str, _links: map, isGroup: bool, metrics: [map]}, primarySingleMetric: map{key: str, _versionId: str, name: str, kind: str, isNumeric: bool, unitAggregationType: str, eventKey: str, _links: map}, primaryFunnel: map{key: str, name: str, kind: str, _links: map, metrics: [map]}, randomizationUnit: str, attributes: [str], treatments: [map], secondaryMetrics: [map], metrics: [map], layerSnapshot: map{key: str, name: str, reservationPercent: int, otherReservationPercent: int}, covariateInfo: map{id: str, fileName: str, createdAt: int(int64)}}, previousIterations: [map], analysisConfig: map{bayesianThreshold: str, significanceThreshold: str, testDirection: str, multipleComparisonCorrectionMethod: str, multipleComparisonCorrectionScope: str, sequentialTestingEnabled: bool}}, experiments: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey
@required {projectKey: str(string), environmentKey: str(string)}
@returns(200) {_links: map, _id: str, key: str, name: str, apiKey: str, mobileKey: str, color: str, defaultTtl: int, secureMode: bool, _access: map{denied: [map], allowed: [map]}, defaultTrackEvents: bool, requireComments: bool, confirmChanges: bool, tags: [str], approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, resourceApprovalSettings: map, critical: bool}
@errors {400, 401, 403, 404, 409, 429}

@endpoint POST /api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate
@required {projectKey: str(string), environmentKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {400, 401, 404}

@endpoint GET /api/v2/projects/{projectKey}/experimentation-settings
@required {projectKey: str(string)}
@returns(200) {_projectId: str, _projectKey: str, randomizationUnits: [map], _creationDate: int(int64), _links: map}
@errors {400, 401, 403, 404, 405, 429}

@endpoint PUT /api/v2/projects/{projectKey}/experimentation-settings
@required {projectKey: str(string), randomizationUnits: [map{randomizationUnit!: str, default: bool, standardRandomizationUnit: str}]}
@returns(200) {_projectId: str, _projectKey: str, randomizationUnits: [map], _creationDate: int(int64), _links: map}
@errors {400, 401, 403, 404, 405, 429}

@endpoint GET /api/v2/projects/{projectKey}/experiments
@required {projectKey: str(string)}
@optional {limit: int(int64), offset: int(int64), filter: str(string), expand: str(string), lifecycleState: str(string)}
@returns(200) {items: [map], total_count: int, _links: map}
@errors {400, 401, 403, 404, 405, 429}

@endpoint GET /api/v2/projects/{projectKey}/flag-defaults
@required {projectKey: str(string)}
@returns(200) {_links: map, key: str, tags: [str], temporary: bool, defaultClientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}, booleanDefaults: map{trueDisplayName: str, falseDisplayName: str, trueDescription: str, falseDescription: str, onVariation: int, offVariation: int}}
@errors {401, 403, 404}

@endpoint PATCH /api/v2/projects/{projectKey}/flag-defaults
@required {projectKey: str(string)}
@returns(200) {_links: map, tags: [str], temporary: bool, booleanDefaults: map{trueDisplayName: str, falseDisplayName: str, trueDescription: str, falseDescription: str, onVariation: int, offVariation: int}, defaultClientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint PUT /api/v2/projects/{projectKey}/flag-defaults
@required {projectKey: str(string), tags: [str], temporary: bool, booleanDefaults: map{trueDisplayName!: str, falseDisplayName!: str, trueDescription!: str, falseDescription!: str, onVariation!: int, offVariation!: int}, defaultClientSideAvailability: map{usingMobileKey!: bool, usingEnvironmentId!: bool}}
@returns(200) {_links: map, tags: [str], temporary: bool, booleanDefaults: map{trueDisplayName: str, falseDisplayName: str, trueDescription: str, falseDescription: str, onVariation: int, offVariation: int}, defaultClientSideAvailability: map{usingMobileKey: bool, usingEnvironmentId: bool}}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), description: str, instructions: [map]}
@optional {comment: str, notifyMemberIds: [str], notifyTeamKeys: [str], executionDate: int(int64), operatingOnId: str, integrationConfig: map}
@returns(201) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}}
@errors {400, 401, 403, 429}

@endpoint POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), description: str, source: map{key!: str, version: int}}
@optional {comment: str, notifyMemberIds: [str], notifyTeamKeys: [str], includedActions: [str], excludedActions: [str]}
@returns(201) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}}
@errors {400, 401, 403, 409, 429}

@endpoint GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string)}
@returns(200) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string)}
@returns(200) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}}
@errors {401, 403, 404, 429}

@endpoint DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string)}
@optional {comment: str}
@returns(200) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}}
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string)}
@optional {kind: str(approve/comment/decline), comment: str}
@returns(200) {_id: str, _version: int, creationDate: int(int64), serviceKind: str, requestorId: str, description: str, reviewStatus: str, allReviews: [map], notifyMemberIds: [str], appliedDate: int(int64), appliedByMemberId: str, appliedByServiceTokenId: str, status: str, instructions: [map], conflicts: [map], _links: map, executionDate: int(int64), operatingOnId: str, integrationMetadata: map{externalId: str, externalStatus: map{display: str, value: str}, externalUrl: str, lastChecked: int(int64)}, source: map{key: str, version: int}, customWorkflowMetadata: map{name: str, stage: map{index: int, name: str}}}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string)}
@returns(200) {_links: map, items: [map]}
@errors {400, 401, 403, 404}

@endpoint PUT /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), memberId: str(string)}
@returns(204)
@errors {400, 401, 403, 404}

@endpoint DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), memberId: str(string)}
@returns(204)
@errors {400, 401, 403, 404}

@endpoint GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {400, 401, 403, 404}

@endpoint POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), executionDate: int(int64), instructions: [map]}
@optional {ignoreConflicts: bool, comment: str}
@returns(201) {_id: str, _creationDate: int(int64), _maintainerId: str, _version: int, executionDate: int(int64), instructions: [map], conflicts: any, _links: map}
@errors {400, 401, 403, 404, 405, 409, 429}

@endpoint GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string)}
@returns(200) {_id: str, _creationDate: int(int64), _maintainerId: str, _version: int, executionDate: int(int64), instructions: [map], conflicts: any, _links: map}
@errors {401, 404, 429}

@endpoint PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string), instructions: [map]}
@optional {ignoreConflicts: bool, comment: str}
@returns(200) {_id: str, _creationDate: int(int64), _maintainerId: str, _version: int, executionDate: int(int64), instructions: [map], conflicts: any, _links: map}
@errors {400, 401, 403, 404, 405, 409, 429}

@endpoint DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), id: str(string)}
@returns(204)
@errors {401, 403, 404, 405, 409, 429}

@endpoint GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string)}
@optional {status: str(string), sort: str(string), limit: int(int64), offset: int(int64)}
@returns(200) {items: [map], totalCount: int, _links: map}
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), name: str}
@optional {templateKey: str(string), dryRun: bool, maintainerId: str, description: str, stages: [map{name: str, executeConditionsInSequence: bool, conditions: [map], action: map}], templateKey: str}
@returns(201) {_id: str, _version: int, _conflicts: [map], _creationDate: int(int64), _maintainerId: str, _links: map, name: str, description: str, kind: str, stages: [map], _execution: map{status: str, stopDate: int(int64)}, meta: map{parameters: [map]}, templateKey: str}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), workflowId: str(string)}
@returns(200) {_id: str, _version: int, _conflicts: [map], _creationDate: int(int64), _maintainerId: str, _links: map, name: str, description: str, kind: str, stages: [map], _execution: map{status: str, stopDate: int(int64)}, meta: map{parameters: [map]}, templateKey: str}
@errors {401, 403, 404, 429}

@endpoint DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}
@required {projectKey: str(string), featureFlagKey: str(string), environmentKey: str(string), workflowId: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues
@required {projectKey: str(string), flagKey: str(string), environmentKey: str(string), instructions: [map]}
@optional {comment: str}
@returns(200)
@returns(204)
@errors {400, 401, 403, 404, 429, 503}

@endpoint PUT /api/v2/projects/{projectKey}/flags/{flagKey}/release
@required {projectKey: str(string), flagKey: str(string), releasePipelineKey: str}
@optional {releaseVariationId: str}
@returns(200) {_links: map, name: str, releasePipelineKey: str, releasePipelineDescription: str, phases: [map], _version: int, _releaseVariationId: str, _canceledAt: int(int64)}
@errors {400, 401, 404, 429}

@endpoint PUT /api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId}
@required {projectKey: str(string), flagKey: str(string), phaseId: str(string)}
@optional {status: str, audiences: [map{audienceId: str, releaseGuardianConfiguration: map, notifyMemberIds: [str], notifyTeamKeys: [str]}]}
@returns(200) {_links: map, name: str, releasePipelineKey: str, releasePipelineDescription: str, phases: [map], _version: int, _releaseVariationId: str, _canceledAt: int(int64)}
@errors {400, 401, 404, 429}

@endpoint GET /api/v2/projects/{projectKey}/layers
@required {projectKey: str(string)}
@optional {filter: str(string)}
@returns(200) {items: [map], totalCount: int, _links: map}
@errors {400, 403, 404, 429}

@endpoint POST /api/v2/projects/{projectKey}/layers
@required {projectKey: str(string), key: str, name: str, description: str}
@returns(201) {key: str, name: str, description: str, createdAt: int(int64), randomizationUnit: str, environments: map}
@errors {400, 403, 404, 429}

@endpoint PATCH /api/v2/projects/{projectKey}/layers/{layerKey}
@required {projectKey: str(string), layerKey: str(string), instructions: [map]}
@optional {comment: str, environmentKey: str}
@returns(200) {key: str, name: str, description: str, createdAt: int(int64), randomizationUnit: str, environments: map}
@errors {400, 403, 404, 429}

@endpoint GET /api/v2/projects/{projectKey}/metric-groups
@required {projectKey: str(string)}
@optional {filter: str(string), sort: str(string), expand: str(string), limit: int(int64), offset: int(int64)}
@returns(200) {items: [map], _links: map, totalCount: int}
@errors {400, 401, 403, 404, 405, 429}

@endpoint POST /api/v2/projects/{projectKey}/metric-groups
@required {projectKey: str(string), name: str, kind: str(funnel/standard), maintainerId: str, tags: [str], metrics: [map{key!: str, nameInGroup!: str}]}
@optional {key: str, description: str}
@returns(201) {_id: str, key: str, name: str, kind: str, description: str, _links: map, _access: map{denied: [map], allowed: [map]}, tags: [str], _creationDate: int(int64), _lastModified: int(int64), maintainer: map{member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, team: map{customRoleKeys: [str], key: str, _links: map, name: str}}, metrics: [map], _version: int, experiments: [map], experimentCount: int, activeExperimentCount: int, activeGuardedRolloutCount: int}
@errors {400, 401, 403, 404, 405, 429}

@endpoint GET /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
@required {projectKey: str(string), metricGroupKey: str(string)}
@optional {expand: str(string)}
@returns(200) {_id: str, key: str, name: str, kind: str, description: str, _links: map, _access: map{denied: [map], allowed: [map]}, tags: [str], _creationDate: int(int64), _lastModified: int(int64), maintainer: map{member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, team: map{customRoleKeys: [str], key: str, _links: map, name: str}}, metrics: [map], _version: int, experiments: [map], experimentCount: int, activeExperimentCount: int, activeGuardedRolloutCount: int}
@errors {400, 401, 403, 404, 405, 429}

@endpoint PATCH /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
@required {projectKey: str(string), metricGroupKey: str(string)}
@returns(200) {_id: str, key: str, name: str, kind: str, description: str, _links: map, _access: map{denied: [map], allowed: [map]}, tags: [str], _creationDate: int(int64), _lastModified: int(int64), maintainer: map{member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, team: map{customRoleKeys: [str], key: str, _links: map, name: str}}, metrics: [map], _version: int, experiments: [map], experimentCount: int, activeExperimentCount: int, activeGuardedRolloutCount: int}
@errors {400, 401, 403, 404, 405, 429}

@endpoint DELETE /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
@required {projectKey: str(string), metricGroupKey: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 405, 429}

@endpoint GET /api/v2/projects/{projectKey}/release-pipelines
@required {projectKey: str(string)}
@optional {filter: str(string), limit: int(int64), offset: int(int64)}
@returns(200) {items: [map], totalCount: int}
@errors {404}

@endpoint POST /api/v2/projects/{projectKey}/release-pipelines
@required {projectKey: str(string), key: str, name: str, phases: [map{audiences!: [map], name!: str, configuration: map}]}
@optional {description: str, tags: [str], isProjectDefault: bool, isLegacy: bool}
@returns(201) {createdAt: str(date-time), description: str, key: str, name: str, phases: [map], tags: [str], _version: int, _access: map{denied: [map], allowed: [map]}, isProjectDefault: bool, _isLegacy: bool}
@errors {400, 403, 404, 409}

@endpoint GET /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
@required {projectKey: str(string), pipelineKey: str(string)}
@returns(200) {createdAt: str(date-time), description: str, key: str, name: str, phases: [map], tags: [str], _version: int, _access: map{denied: [map], allowed: [map]}, isProjectDefault: bool, _isLegacy: bool}
@errors {404}

@endpoint PUT /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
@required {projectKey: str(string), pipelineKey: str(string), name: str, phases: [map{audiences!: [map], name!: str, configuration: map}]}
@optional {description: str, tags: [str]}
@returns(200) {createdAt: str(date-time), description: str, key: str, name: str, phases: [map], tags: [str], _version: int, _access: map{denied: [map], allowed: [map]}, isProjectDefault: bool, _isLegacy: bool}
@errors {400, 403, 404}

@endpoint DELETE /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
@required {projectKey: str(string), pipelineKey: str(string)}
@returns(204)
@errors {403, 404}

@endpoint GET /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}/releases
@required {projectKey: str(string), pipelineKey: str(string)}
@optional {filter: str(string), limit: int(int64), offset: int(int64)}
@returns(200) {activeCount: int, completedCount: int, items: [map], phases: [map], totalCount: int, _links: map}
@errors {404}

@endpoint GET /api/v2/public-ip-list
@returns(200) {addresses: [str], outboundAddresses: [str]}
@errors {429}

@endpoint GET /api/v2/roles
@optional {limit: int(int64), offset: int(int64)}
@returns(200) {_links: map, items: [map], totalCount: int}
@errors {401, 403, 429}

@endpoint POST /api/v2/roles
@required {name: str, key: str, policy: [map{resources: [str], notResources: [str], actions: [str], notActions: [str], effect!: str}]}
@optional {description: str, basePermissions: str, resourceCategory: str}
@returns(201) {_id: str, _links: map, _access: map{denied: [map], allowed: [map]}, description: str, key: str, name: str, policy: [map], basePermissions: str, resourceCategory: str, assignedTo: map{membersCount: int, teamsCount: int}, _presetBundleVersion: int, _presetStatements: [map]}
@errors {400, 401, 403, 409, 429}

@endpoint GET /api/v2/roles/{customRoleKey}
@required {customRoleKey: str(string)}
@returns(200) {_id: str, _links: map, _access: map{denied: [map], allowed: [map]}, description: str, key: str, name: str, policy: [map], basePermissions: str, resourceCategory: str, assignedTo: map{membersCount: int, teamsCount: int}, _presetBundleVersion: int, _presetStatements: [map]}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/roles/{customRoleKey}
@required {customRoleKey: str(string), patch: [map{op!: str, path!: str, value: any}]}
@optional {comment: str}
@returns(200) {_id: str, _links: map, _access: map{denied: [map], allowed: [map]}, description: str, key: str, name: str, policy: [map], basePermissions: str, resourceCategory: str, assignedTo: map{membersCount: int, teamsCount: int}, _presetBundleVersion: int, _presetStatements: [map]}
@errors {400, 401, 404, 409, 429}

@endpoint DELETE /api/v2/roles/{customRoleKey}
@required {customRoleKey: str(string)}
@returns(204)
@errors {401, 404, 429}

@endpoint GET /api/v2/segments/{projectKey}/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@optional {limit: int(int64), offset: int(int64), sort: str(string), filter: str(string)}
@returns(200) {items: [map], _links: map, totalCount: int}
@errors {401, 404}

@endpoint POST /api/v2/segments/{projectKey}/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), name: str, key: str}
@optional {description: str, tags: [str], unbounded: bool, unboundedContextKind: str}
@returns(201) {name: str, description: str, tags: [str], creationDate: int(int64), lastModifiedDate: int(int64), key: str, included: [str], excluded: [str], includedContexts: [map], excludedContexts: [map], _links: map, rules: [map], version: int, deleted: bool, _access: map{denied: [map], allowed: [map]}, _flags: [map], unbounded: bool, unboundedContextKind: str, generation: int, _unboundedMetadata: map{envId: str, segmentId: str, version: int, includedCount: int, excludedCount: int, lastModified: int(int64), deleted: bool}, _external: str, _externalLink: str, _importInProgress: bool}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string)}
@returns(200) {name: str, description: str, tags: [str], creationDate: int(int64), lastModifiedDate: int(int64), key: str, included: [str], excluded: [str], includedContexts: [map], excludedContexts: [map], _links: map, rules: [map], version: int, deleted: bool, _access: map{denied: [map], allowed: [map]}, _flags: [map], unbounded: bool, unboundedContextKind: str, generation: int, _unboundedMetadata: map{envId: str, segmentId: str, version: int, includedCount: int, excludedCount: int, lastModified: int(int64), deleted: bool}, _external: str, _externalLink: str, _importInProgress: bool}
@errors {401, 404, 429}

@endpoint PATCH /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string), patch: [map{op!: str, path!: str, value: any}]}
@optional {dryRun: bool, comment: str}
@returns(200) {name: str, description: str, tags: [str], creationDate: int(int64), lastModifiedDate: int(int64), key: str, included: [str], excluded: [str], includedContexts: [map], excludedContexts: [map], _links: map, rules: [map], version: int, deleted: bool, _access: map{denied: [map], allowed: [map]}, _flags: [map], unbounded: bool, unboundedContextKind: str, generation: int, _unboundedMetadata: map{envId: str, segmentId: str, version: int, includedCount: int, excludedCount: int, lastModified: int(int64), deleted: bool}, _external: str, _externalLink: str, _importInProgress: bool}
@errors {400, 401, 403, 404, 409, 429}

@endpoint DELETE /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string)}
@returns(204)
@errors {401, 403, 404, 409, 429}

@endpoint POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string)}
@optional {included: map{add: [str], remove: [str]}, excluded: map{add: [str], remove: [str]}}
@returns(204)
@errors {400, 401, 404, 429}

@endpoint GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts/{contextKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string), contextKey: str(string)}
@returns(200) {userKey: str, included: bool, excluded: bool}
@errors {400, 401, 404, 429}

@endpoint POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string)}
@returns(200)
@errors {400, 401, 404, 429}

@endpoint GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string), exportID: str(string)}
@returns(200) {id: str, segmentKey: str, creationTime: int(int64), status: str, sizeBytes: int(int64), size: str, initiator: map{name: str, email: str}, _links: map}
@errors {400, 404, 429}

@endpoint POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string)}
@returns(204)
@errors {400, 401, 404, 409, 429}

@endpoint GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string), importID: str(string)}
@returns(200) {id: str, segmentKey: str, creationTime: int(int64), mode: str, status: str, files: [map], _links: map}
@errors {400, 404, 429}

@endpoint POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string)}
@optional {included: map{add: [str], remove: [str]}, excluded: map{add: [str], remove: [str]}}
@returns(204)
@errors {400, 401, 404, 429}

@endpoint GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string), userKey: str(string)}
@returns(200) {userKey: str, included: bool, excluded: bool}
@errors {400, 401, 404, 429}

@endpoint GET /api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 404, 429}

@endpoint PATCH /api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string), instructions: [map{kind!: str, contextKey!: str, contextKind!: str, targetType!: str, value: int(int64), version: int}]}
@optional {comment: str}
@returns(200) {items: [map], _links: map, totalInstructions: int, successfulInstructions: int, failedInstructions: int, errors: [map]}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 404, 429}

@endpoint PATCH /api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string), segmentKey: str(string), instructions: [map{kind!: str, userKey!: str, targetType!: str, value: int, version: int}]}
@optional {comment: str}
@returns(200) {items: [map], _links: map, totalInstructions: int, successfulInstructions: int, failedInstructions: int, errors: [map]}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/teams
@optional {limit: int(int64), offset: int(int64), filter: str(string), expand: str(string)}
@returns(200) {items: [map], _links: map, totalCount: int}
@errors {401, 405, 429}

@endpoint POST /api/v2/teams
@required {key: str, name: str}
@optional {expand: str(string), customRoleKeys: [str], description: str, memberIDs: [str], permissionGrants: [map{actionSet: str, actions: [str], memberIDs: [str]}], roleAttributes: map}
@returns(201) {description: str, key: str, name: str, _access: map{denied: [map], allowed: [map]}, _creationDate: int(int64), _links: map, _lastModified: int(int64), _version: int, _idpSynced: bool, roleAttributes: map, roles: map{totalCount: int, items: [map], _links: map}, members: map{totalCount: int}, projects: map{totalCount: int, items: [map]}, maintainers: map{totalCount: int, items: [map], _links: map}}
@errors {400, 401, 405, 429}

@endpoint PATCH /api/v2/teams
@required {instructions: [map]}
@optional {comment: str}
@returns(200) {memberIDs: [str], teamKeys: [str], errors: [map]}
@errors {400, 401, 403, 409, 429}

@endpoint GET /api/v2/teams/{teamKey}
@required {teamKey: str(string)}
@optional {expand: str(string)}
@returns(200) {description: str, key: str, name: str, _access: map{denied: [map], allowed: [map]}, _creationDate: int(int64), _links: map, _lastModified: int(int64), _version: int, _idpSynced: bool, roleAttributes: map, roles: map{totalCount: int, items: [map], _links: map}, members: map{totalCount: int}, projects: map{totalCount: int, items: [map]}, maintainers: map{totalCount: int, items: [map], _links: map}}
@errors {400, 401, 403, 404, 405, 429}

@endpoint PATCH /api/v2/teams/{teamKey}
@required {teamKey: str(string), instructions: [map]}
@optional {expand: str(string), comment: str}
@returns(200) {description: str, key: str, name: str, _access: map{denied: [map], allowed: [map]}, _creationDate: int(int64), _links: map, _lastModified: int(int64), _version: int, _idpSynced: bool, roleAttributes: map, roles: map{totalCount: int, items: [map], _links: map}, members: map{totalCount: int}, projects: map{totalCount: int, items: [map]}, maintainers: map{totalCount: int, items: [map], _links: map}}
@errors {400, 401, 404, 405, 409, 429}

@endpoint DELETE /api/v2/teams/{teamKey}
@required {teamKey: str(string)}
@returns(204)
@errors {401, 404, 429}

@endpoint GET /api/v2/teams/{teamKey}/maintainers
@required {teamKey: str(string)}
@optional {limit: int(int64), offset: int(int64)}
@returns(200) {totalCount: int, items: [map], _links: map}
@errors {400, 401, 403, 404, 405, 429}

@endpoint POST /api/v2/teams/{teamKey}/members
@required {teamKey: str(string)}
@returns(201) {items: [map]}
@returns(207) {items: [map]}
@errors {400, 401, 405, 429}

@endpoint GET /api/v2/teams/{teamKey}/roles
@required {teamKey: str(string)}
@optional {limit: int(int64), offset: int(int64)}
@returns(200) {totalCount: int, items: [map], _links: map}
@errors {400, 401, 403, 404, 405, 429}

@endpoint GET /api/v2/templates
@optional {summary: bool, search: str(string)}
@returns(200) {items: [map]}
@errors {401, 404, 429}

@endpoint POST /api/v2/templates
@required {key: str}
@optional {name: str, description: str, workflowId: str, stages: [map{name: str, executeConditionsInSequence: bool, conditions: [map], action: map}], projectKey: str, environmentKey: str, flagKey: str}
@returns(201) {_id: str, _key: str, name: str, _creationDate: int(int64), _ownerId: str, _maintainerId: str, _links: map, description: str, stages: [map]}
@errors {400, 401, 403, 429}

@endpoint DELETE /api/v2/templates/{templateKey}
@required {templateKey: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/tokens
@optional {showAll: bool, limit: int(int64), offset: int(int64)}
@returns(200) {items: [map], _links: map, totalCount: int}
@errors {401, 403, 429}

@endpoint POST /api/v2/tokens
@optional {name: str, description: str, role: str(reader/writer/admin), customRoleIds: [str], inlineRole: [map{resources: [str], notResources: [str], actions: [str], notActions: [str], effect!: str}], serviceToken: bool, defaultApiVersion: int}
@returns(201) {_id: str, ownerId: str, memberId: str, _member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, name: str, description: str, creationDate: int(int64), lastModified: int(int64), customRoleIds: [str], inlineRole: [map], role: str, token: str, serviceToken: bool, _links: map, defaultApiVersion: int, lastUsed: int(int64)}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/tokens/{id}
@required {id: str(string)}
@returns(200) {_id: str, ownerId: str, memberId: str, _member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, name: str, description: str, creationDate: int(int64), lastModified: int(int64), customRoleIds: [str], inlineRole: [map], role: str, token: str, serviceToken: bool, _links: map, defaultApiVersion: int, lastUsed: int(int64)}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/tokens/{id}
@required {id: str(string)}
@returns(200) {_id: str, ownerId: str, memberId: str, _member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, name: str, description: str, creationDate: int(int64), lastModified: int(int64), customRoleIds: [str], inlineRole: [map], role: str, token: str, serviceToken: bool, _links: map, defaultApiVersion: int, lastUsed: int(int64)}
@errors {400, 401, 403, 404, 409, 422, 429}

@endpoint DELETE /api/v2/tokens/{id}
@required {id: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint POST /api/v2/tokens/{id}/reset
@required {id: str(string)}
@optional {expiry: int(int64)}
@returns(200) {_id: str, ownerId: str, memberId: str, _member: map{_links: map, _id: str, firstName: str, lastName: str, role: str, email: str}, name: str, description: str, creationDate: int(int64), lastModified: int(int64), customRoleIds: [str], inlineRole: [map], role: str, token: str, serviceToken: bool, _links: map, defaultApiVersion: int, lastUsed: int(int64)}
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/usage/clientside-contexts
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), contextKind: str(string), sdkName: str(string), anonymous: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/clientside-mau
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), sdkName: str(string), anonymous: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/data-export-events
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), eventKind: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}
@required {projectKey: str(string), environmentKey: str(string), featureFlagKey: str(string)}
@optional {from: str(string), to: str(string), tz: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/events/{type}
@required {type: str(string)}
@optional {from: str(string), to: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/experimentation-events
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), eventKey: str(string), eventKind: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/experimentation-keys
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), experimentId: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/mau
@optional {from: str(string), to: str(string), project: str(string), environment: str(string), sdktype: str(string), sdk: str(string), anonymous: str(string), groupby: str(string), aggregationType: str(string), contextKind: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/usage/mau/bycategory
@optional {from: str(string), to: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/mau/sdks
@optional {from: str(string), to: str(string), sdktype: str(string)}
@returns(200) {_links: map, sdks: [str]}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/usage/observability/errors
@optional {from: str(string), to: str(string), projectKey: str(string), granularity: str(string), aggregationType: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/observability/logs
@optional {from: str(string), to: str(string), projectKey: str(string), granularity: str(string), aggregationType: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/observability/metrics
@optional {from: str(string), to: str(string), projectKey: str(string), granularity: str(string), aggregationType: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/observability/sessions
@optional {from: str(string), to: str(string), projectKey: str(string), granularity: str(string), aggregationType: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/observability/traces
@optional {from: str(string), to: str(string), projectKey: str(string), granularity: str(string), aggregationType: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/sdk-versions/details
@returns(200)
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/serverside-contexts
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), contextKind: str(string), sdkName: str(string), anonymous: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/service-connections
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), connectionType: str(string), relayVersion: str(string), sdkName: str(string), sdkVersion: str(string), sdkType: str(string), sdkAppId: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/streams/{source}
@required {source: str(string)}
@optional {from: str(string), to: str(string), tz: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/streams/{source}/bysdkversion
@required {source: str(string)}
@optional {from: str(string), to: str(string), tz: str(string), sdk: str(string), version: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/usage/streams/{source}/sdkversions
@required {source: str(string)}
@returns(200) {_links: map, sdkVersions: [map]}
@errors {401, 403, 429}

@endpoint GET /api/v2/usage/total-contexts
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), contextKind: str(string), sdkName: str(string), sdkType: str(string), anonymous: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/total-mau
@optional {from: str(string), to: str(string), projectKey: str(string), environmentKey: str(string), sdkName: str(string), sdkType: str(string), anonymous: str(string), groupBy: str(string), aggregationType: str(string), granularity: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 429, 503}

@endpoint GET /api/v2/usage/vega-ai
@optional {from: str(string), to: str(string), projectKey: str(string), granularity: str(string), aggregationType: str(string)}
@returns(200) {_links: map, metadata: [map], series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/user-attributes/{projectKey}/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@returns(200) {private: [str], custom: [str], standard: [str]}
@errors {400, 401, 403, 404}

@endpoint GET /api/v2/user-search/{projectKey}/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@optional {q: str(string), limit: int(int64), offset: int(int64), after: int(int64), sort: str(string), searchAfter: str(string), filter: str(string)}
@returns(200) {_links: map, totalCount: int, items: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/users/{projectKey}/{environmentKey}
@required {projectKey: str(string), environmentKey: str(string)}
@optional {limit: int(int64), searchAfter: str(string)}
@returns(200) {_links: map, totalCount: int, items: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/users/{projectKey}/{environmentKey}/{userKey}
@required {projectKey: str(string), environmentKey: str(string), userKey: str(string)}
@returns(200) {lastPing: str(date-time), environmentId: str, ownerId: str, user: map{key: str, secondary: str, ip: str, country: str, email: str, firstName: str, lastName: str, avatar: str, name: str, anonymous: bool, custom: map, privateAttrs: [str]}, sortValue: any, _links: map, _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 404, 429}

@endpoint DELETE /api/v2/users/{projectKey}/{environmentKey}/{userKey}
@required {projectKey: str(string), environmentKey: str(string), userKey: str(string)}
@returns(204)
@errors {401, 403, 404, 409, 429}

@endpoint GET /api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags
@required {projectKey: str(string), environmentKey: str(string), userKey: str(string)}
@returns(200) {items: map, _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}
@required {projectKey: str(string), environmentKey: str(string), userKey: str(string), featureFlagKey: str(string)}
@returns(200) {_links: map, _value: any, setting: any, reason: map{kind: str, ruleIndex: int, ruleID: str, prerequisiteKey: str, inExperiment: bool, errorKind: str}}
@errors {400, 401, 403, 404, 429}

@endpoint PUT /api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}
@required {projectKey: str(string), environmentKey: str(string), userKey: str(string), featureFlagKey: str(string)}
@optional {setting: any, comment: str}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}
@required {projectKey: str(string), userKey: str(string), environmentKey: str(string)}
@returns(200) {items: [map], _links: map}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}
@required {projectKey: str(string), userKey: str(string), environmentKey: str(string), instructions: [map{kind!: str, flagKey!: str, variationId!: str, value: int, version: int}]}
@optional {comment: str}
@returns(200) {items: [map], _links: map, totalInstructions: int, successfulInstructions: int, failedInstructions: int, errors: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/versions
@returns(200) {validVersions: [int], latestVersion: int, currentVersion: int, beta: bool}
@errors {401, 403, 429}

@endpoint GET /api/v2/webhooks
@returns(200) {_links: map, items: [map]}
@errors {401, 403, 429}

@endpoint POST /api/v2/webhooks
@required {url: str, sign: bool, on: bool}
@optional {name: str, secret: str, statements: [map{resources: [str], notResources: [str], actions: [str], notActions: [str], effect!: str}], tags: [str]}
@returns(200) {_links: map, _id: str, name: str, url: str, secret: str, statements: [map], on: bool, tags: [str], _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/webhooks/{id}
@required {id: str(string)}
@returns(200) {_links: map, _id: str, name: str, url: str, secret: str, statements: [map], on: bool, tags: [str], _access: map{denied: [map], allowed: [map]}}
@errors {401, 403, 404, 429}

@endpoint PATCH /api/v2/webhooks/{id}
@required {id: str(string)}
@returns(200) {_links: map, _id: str, name: str, url: str, secret: str, statements: [map], on: bool, tags: [str], _access: map{denied: [map], allowed: [map]}}
@errors {400, 401, 403, 404, 429}

@endpoint DELETE /api/v2/webhooks/{id}
@required {id: str(string)}
@returns(204)
@errors {401, 403, 404, 429}

@endpoint GET /api/v2/tags
@optional {kind: [str], pre: str, archived: bool, limit: int, offset: int, asOf: str}
@returns(200) {items: [str], _links: map, totalCount: int}
@errors {400, 401, 403, 429, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting
@required {projectKey: str, configKey: str}
@returns(200) {createdAt: int(int64), defaults: any, environments: map, experiments: map{baselineIdx: int, items: [map]}, key: str, name: str, tags: [str], variations: [map], _version: int}
@errors {403, 404, 500}

@endpoint PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting
@required {projectKey: str, configKey: str, environmentKey: str, instructions: [map]}
@optional {comment: str}
@returns(200) {createdAt: int(int64), defaults: any, environments: map, experiments: map{baselineIdx: int, items: [map]}, key: str, name: str, tags: [str], variations: [map], _version: int}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs
@required {projectKey: str}
@optional {sort: str, limit: int, offset: int, filter: str}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {400, 403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/ai-configs
@required {projectKey: str, key: str, name: str}
@optional {description: str=, maintainerId: str, maintainerTeamKey: str, mode: str(agent/completion/judge)=completion, tags: [str], defaultVariation: map{comment: str, description: str, instructions: str, key!: str, messages: [map], model: map, name!: str, modelConfigKey: str, tools: [map], toolKeys: [str], judgeConfiguration: map}, evaluationMetricKey: str, isInverted: bool}
@returns(201) {_access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, description: str, key: str, _maintainer: any, mode: str, name: str, tags: [str], version: int, variations: [map], createdAt: int(int64), updatedAt: int(int64), evaluationMetricKey: str, evaluationMetricKeys: [str], isInverted: bool, dependencies: [map]}
@errors {400, 403, 429, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/ai-configs/{configKey}
@required {projectKey: str, configKey: str}
@returns(204)
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/{configKey}
@required {projectKey: str, configKey: str}
@returns(200) {_access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, description: str, key: str, _maintainer: any, mode: str, name: str, tags: [str], version: int, variations: [map], createdAt: int(int64), updatedAt: int(int64), evaluationMetricKey: str, evaluationMetricKeys: [str], isInverted: bool, dependencies: [map]}
@errors {400, 403, 404, 500}

@endpoint PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey}
@required {projectKey: str, configKey: str}
@optional {description: str, maintainerId: str, maintainerTeamKey: str, name: str, tags: [str], evaluationMetricKey: str, isInverted: bool}
@returns(200) {_access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, description: str, key: str, _maintainer: any, mode: str, name: str, tags: [str], version: int, variations: [map], createdAt: int(int64), updatedAt: int(int64), evaluationMetricKey: str, evaluationMetricKeys: [str], isInverted: bool, dependencies: [map]}
@errors {400, 403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations
@required {projectKey: str, configKey: str, key: str, name: str}
@optional {comment: str, description: str, instructions: str, messages: [map{content!: str, role!: str}], model: map, modelConfigKey: str, tools: [map{key!: str, version!: int}], toolKeys: [str], judgeConfiguration: map{judges: [map]}}
@returns(201) {_links: map{parent: map{href: str, type: str}}, color: str, comment: str, description: str, instructions: str, key: str, _id: str, messages: [map], model: map, modelConfigKey: str, name: str, createdAt: int(int64), version: int, state: str, _archivedAt: int(int64), _publishedAt: int(int64), tools: [map], judgeConfiguration: map{judges: [map]}, judgingConfigKeys: [str]}
@errors {400, 403, 429, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}
@required {projectKey: str, configKey: str, variationKey: str}
@returns(204)
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}
@required {projectKey: str, configKey: str, variationKey: str}
@returns(200) {items: [map], totalCount: int}
@errors {400, 403, 404, 500}

@endpoint PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}
@required {projectKey: str, configKey: str, variationKey: str}
@optional {comment: str, description: str, instructions: str, messages: [map{content!: str, role!: str}], model: map, modelConfigKey: str, name: str, published: bool, state: str, tools: [map{key!: str, version!: int}], toolKeys: [str], judgeConfiguration: map{judges: [map]}}
@returns(200) {_links: map{parent: map{href: str, type: str}}, color: str, comment: str, description: str, instructions: str, key: str, _id: str, messages: [map], model: map, modelConfigKey: str, name: str, createdAt: int(int64), version: int, state: str, _archivedAt: int(int64), _publishedAt: int(int64), tools: [map], judgeConfiguration: map{judges: [map]}, judgingConfigKeys: [str]}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/quick-stats
@required {projectKey: str, env: str}
@returns(200) {activeConfigs: int, activeExperiments: int, averageSatisfaction7D: num(float)?, spendMonthToDate: num(double)?}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics
@required {projectKey: str, configKey: str, from: int, to: int, env: str}
@returns(200) {inputTokens: int, outputTokens: int, totalTokens: int, generationCount: int, generationSuccessCount: int, generationErrorCount: int, thumbsUp: int, thumbsDown: int, durationMs: int, timeToFirstTokenMs: int, satisfactionRating: num(float), inputCost: num(double), outputCost: num(double), judgeAccuracy: num(float), judgeRelevance: num(float), judgeToxicity: num(float)}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics-by-variation
@required {projectKey: str, configKey: str, from: int, to: int, env: str}
@returns(200)
@errors {400, 403, 404, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/ai-configs/model-configs/restricted
@required {projectKey: str, keys: [str]}
@returns(204)
@errors {400, 403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/ai-configs/model-configs/restricted
@required {projectKey: str, keys: [str]}
@returns(200) {successes: [str], errors: [map]}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/model-configs
@required {projectKey: str}
@optional {restricted: bool}
@returns(200)
@errors {400, 403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/ai-configs/model-configs
@required {projectKey: str, name: str, key: str, id: str}
@optional {icon: str, provider: str, params: map, customParams: map, tags: [str], costPerInputToken: num(double), costPerOutputToken: num(double)}
@returns(200) {_access: map{denied: [map], allowed: [map]}, name: str, key: str, id: str, icon: str, provider: str, global: bool, params: map, customParams: map, tags: [str], version: int, costPerInputToken: num(double), costPerOutputToken: num(double), isRestricted: bool}
@errors {400, 403, 404, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}
@required {projectKey: str, modelConfigKey: str}
@returns(204)
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}
@required {projectKey: str, modelConfigKey: str}
@returns(200) {_access: map{denied: [map], allowed: [map]}, name: str, key: str, id: str, icon: str, provider: str, global: bool, params: map, customParams: map, tags: [str], version: int, costPerInputToken: num(double), costPerOutputToken: num(double), isRestricted: bool}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-tools
@required {projectKey: str}
@optional {sort: str, limit: int, offset: int, filter: str}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {400, 403, 500}

@endpoint POST /api/v2/projects/{projectKey}/ai-tools
@required {projectKey: str, key: str, schema: map}
@optional {maintainerId: str, maintainerTeamKey: str, description: str, customParameters: map}
@returns(201) {key: str, _access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, _maintainer: any, description: str, schema: map, customParameters: map, version: int, createdAt: int(int64)}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-tools/{toolKey}/versions
@required {projectKey: str, toolKey: str}
@optional {sort: str, limit: int, offset: int}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {400, 403, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/ai-tools/{toolKey}
@required {projectKey: str, toolKey: str}
@returns(204)
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-tools/{toolKey}
@required {projectKey: str, toolKey: str}
@returns(200) {key: str, _access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, _maintainer: any, description: str, schema: map, customParameters: map, version: int, createdAt: int(int64)}
@errors {400, 403, 404, 500}

@endpoint PATCH /api/v2/projects/{projectKey}/ai-tools/{toolKey}
@required {projectKey: str, toolKey: str}
@optional {maintainerId: str, maintainerTeamKey: str, description: str, schema: map, customParameters: map}
@returns(200) {key: str, _access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, _maintainer: any, description: str, schema: map, customParameters: map, version: int, createdAt: int(int64)}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/prompt-snippets
@required {projectKey: str}
@optional {limit: int, offset: int}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/ai-configs/prompt-snippets
@required {projectKey: str, key: str, name: str, text: str}
@optional {description: str}
@returns(201) {key: str, _access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, name: str, description: str, text: str, version: int, createdAt: int(int64)}
@errors {400, 403, 404, 409, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/ai-configs/prompt-snippets/{snippetKey}
@required {projectKey: str, snippetKey: str}
@returns(204)
@errors {403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/prompt-snippets/{snippetKey}
@required {projectKey: str, snippetKey: str}
@returns(200) {key: str, _access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, name: str, description: str, text: str, version: int, createdAt: int(int64)}
@errors {403, 404, 500}

@endpoint PATCH /api/v2/projects/{projectKey}/ai-configs/prompt-snippets/{snippetKey}
@required {projectKey: str, snippetKey: str}
@optional {name: str, description: str, text: str}
@returns(200) {key: str, _access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, name: str, description: str, text: str, version: int, createdAt: int(int64)}
@errors {400, 403, 404, 409, 500}

@endpoint GET /api/v2/projects/{projectKey}/ai-configs/prompt-snippets/{snippetKey}/references
@required {projectKey: str, snippetKey: str}
@optional {limit: int, offset: int}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, resourceKey: str, resourceType: str, items: [map], totalCount: int}
@errors {403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/agent-graphs
@required {LD-API-Version: str, projectKey: str}
@optional {limit: int, offset: int}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {400, 403, 500}

@endpoint POST /api/v2/projects/{projectKey}/agent-graphs
@required {LD-API-Version: str, projectKey: str, key: str, name: str}
@optional {description: str, maintainerId: str, maintainerTeamKey: str, rootConfigKey: str, edges: [map{key!: str, sourceConfig!: str, targetConfig!: str, handoff: map}]}
@returns(201) {_access: map{denied: [map], allowed: [map]}, key: str, name: str, description: str, _maintainer: map{kind: str}, rootConfigKey: str, edges: [map], createdAt: int(int64), updatedAt: int(int64)}
@errors {400, 403, 413, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/agent-graphs/{graphKey}
@required {LD-API-Version: str, projectKey: str, graphKey: str}
@returns(204)
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/agent-graphs/{graphKey}
@required {LD-API-Version: str, projectKey: str, graphKey: str}
@returns(200) {_access: map{denied: [map], allowed: [map]}, key: str, name: str, description: str, _maintainer: map{kind: str}, rootConfigKey: str, edges: [map], createdAt: int(int64), updatedAt: int(int64)}
@errors {400, 403, 404, 500}

@endpoint PATCH /api/v2/projects/{projectKey}/agent-graphs/{graphKey}
@required {LD-API-Version: str, projectKey: str, graphKey: str}
@optional {name: str, description: str, maintainerId: str, maintainerTeamKey: str, rootConfigKey: str, edges: [map{key!: str, sourceConfig!: str, targetConfig!: str, handoff: map}]}
@returns(200) {_access: map{denied: [map], allowed: [map]}, key: str, name: str, description: str, _maintainer: map{kind: str}, rootConfigKey: str, edges: [map], createdAt: int(int64), updatedAt: int(int64)}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/agent-optimizations
@required {projectKey: str}
@optional {limit: int, offset: int}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/agent-optimizations
@required {projectKey: str, key: str, aiConfigKey: str, maxAttempts: int, judgeModel: str}
@optional {modelChoices: [str], variableChoices: [map], acceptanceStatements: [map{statement!: str, threshold!: num(double)}], judges: [map{key!: str, threshold!: num(double)}], userInputOptions: [str], groundTruthResponses: [str], metricKey: str}
@returns(201) {_access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, id: str, key: str, aiConfigKey: str, maxAttempts: int, modelChoices: [str], judgeModel: str, variableChoices: [map], acceptanceStatements: [map], judges: [map], userInputOptions: [str], groundTruthResponses: [str], metricKey: str, version: int, createdAt: int(int64)}
@errors {400, 403, 409, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}
@required {projectKey: str, optimizationKey: str}
@returns(204)
@errors {403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}
@required {projectKey: str, optimizationKey: str}
@returns(200) {_access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, id: str, key: str, aiConfigKey: str, maxAttempts: int, modelChoices: [str], judgeModel: str, variableChoices: [map], acceptanceStatements: [map], judges: [map], userInputOptions: [str], groundTruthResponses: [str], metricKey: str, version: int, createdAt: int(int64)}
@errors {403, 404, 500}

@endpoint PATCH /api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}
@required {projectKey: str, optimizationKey: str}
@optional {maxAttempts: int, modelChoices: [str], judgeModel: str, variableChoices: [map], acceptanceStatements: [map{statement!: str, threshold!: num(double)}], judges: [map{key!: str, threshold!: num(double)}], userInputOptions: [str], groundTruthResponses: [str], metricKey: str}
@returns(200) {_access: map{denied: [map], allowed: [map]}, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, id: str, key: str, aiConfigKey: str, maxAttempts: int, modelChoices: [str], judgeModel: str, variableChoices: [map], acceptanceStatements: [map], judges: [map], userInputOptions: [str], groundTruthResponses: [str], metricKey: str, version: int, createdAt: int(int64)}
@errors {400, 403, 404, 409, 500}

@endpoint GET /api/v2/announcements
@optional {status: str(active/inactive/scheduled), limit: int, offset: int}
@returns(200) {items: [map], _links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}}
@errors {400, 403, 404, 429, 500}

@endpoint POST /api/v2/announcements
@required {isDismissible: bool, title: str, message: str, startTime: int(int64), severity: str(info/warning/critical)}
@optional {endTime: int(int64)}
@returns(201) {_id: str, isDismissible: bool, title: str, message: str, startTime: int(int64), endTime: int(int64), severity: str, _status: str, _access: any, _links: map{parent: map{href: str, type: str}}}
@errors {400, 403, 404, 409, 500}

@endpoint DELETE /api/v2/announcements/{announcementId}
@required {announcementId: str}
@returns(204)
@errors {404, 500}

@endpoint PATCH /api/v2/announcements/{announcementId}
@required {announcementId: str}
@returns(200) {_id: str, isDismissible: bool, title: str, message: str, startTime: int(int64), endTime: int(int64), severity: str, _status: str, _access: any, _links: map{parent: map{href: str, type: str}}}
@errors {400, 403, 404, 409, 500}

@endpoint GET /api/v2/approval-requests/projects/{projectKey}/settings
@required {LD-API-Version: str, projectKey: str}
@optional {environmentKey: str, resourceKind: str, expand: str}
@returns(200)
@errors {400, 403, 404, 500}

@endpoint PATCH /api/v2/approval-requests/projects/{projectKey}/settings
@required {LD-API-Version: str, projectKey: str, environmentKey: str, resourceKind: str}
@optional {autoApplyApprovedChanges: bool, bypassApprovalsForPendingChanges: bool, canApplyDeclinedChanges: bool, canReviewOwnRequest: bool, minNumApprovals: int(int), required: bool, requiredApprovalTags: [str], serviceConfig: map, serviceKind: str, serviceKindConfigurationId: str}
@returns(200)
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/views
@required {LD-API-Version: str, projectKey: str}
@optional {sort: str(key/name/updatedAt), limit: int, offset: int, filter: str, expand: [str]}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {400, 403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/views
@required {LD-API-Version: str, projectKey: str, key: str, name: str}
@optional {description: str=, generateSdkKeys: bool=false, maintainerId: str, maintainerTeamKey: str, tags: [str]}
@returns(200) {_access: any, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, id: str(string), accountId: str, projectId: str, projectKey: str, key: str, name: str, description: str, generateSdkKeys: bool, version: int, tags: [str], createdAt: int(int64), updatedAt: int(int64), archived: bool, archivedAt: int(int64), deletedAt: int(int64), deleted: bool, maintainer: map{id: str, kind: str, maintainerMember: map{id: str, email: str, role: str, firstName: str, lastName: str}, maintainerTeam: map{id: str, key: str, name: str}}, flagsSummary: map{count: int, linkedFlags: map{items: [map], totalCount: int}}, segmentsSummary: map{count: int, linkedSegments: map{items: [map], totalCount: int}}, metricsSummary: map{count: int}, aiConfigsSummary: map{count: int}, resourceSummary: map{flagCount: int, segmentCount: int, totalCount: int}, flagsExpanded: map{items: [map], totalCount: int}, segmentsExpanded: map{items: [map], totalCount: int}, metricsExpanded: map{items: [map], totalCount: int}, aiConfigsExpanded: map{items: [map], totalCount: int}, resourcesExpanded: map{items: map{flags: map{items: [map], totalCount: int}, segments: map{items: [map], totalCount: int}}, totalCount: int}}
@errors {400, 403, 404, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/views/{viewKey}
@required {LD-API-Version: str, projectKey: str, viewKey: str}
@returns(204)
@errors {403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/views/{viewKey}
@required {LD-API-Version: str, projectKey: str, viewKey: str}
@optional {sort: str(key/name/updatedAt), limit: int, offset: int, filter: str, expand: [str]}
@returns(200) {_access: any, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, id: str(string), accountId: str, projectId: str, projectKey: str, key: str, name: str, description: str, generateSdkKeys: bool, version: int, tags: [str], createdAt: int(int64), updatedAt: int(int64), archived: bool, archivedAt: int(int64), deletedAt: int(int64), deleted: bool, maintainer: map{id: str, kind: str, maintainerMember: map{id: str, email: str, role: str, firstName: str, lastName: str}, maintainerTeam: map{id: str, key: str, name: str}}, flagsSummary: map{count: int, linkedFlags: map{items: [map], totalCount: int}}, segmentsSummary: map{count: int, linkedSegments: map{items: [map], totalCount: int}}, metricsSummary: map{count: int}, aiConfigsSummary: map{count: int}, resourceSummary: map{flagCount: int, segmentCount: int, totalCount: int}, flagsExpanded: map{items: [map], totalCount: int}, segmentsExpanded: map{items: [map], totalCount: int}, metricsExpanded: map{items: [map], totalCount: int}, aiConfigsExpanded: map{items: [map], totalCount: int}, resourcesExpanded: map{items: map{flags: map{items: [map], totalCount: int}, segments: map{items: [map], totalCount: int}}, totalCount: int}}
@errors {400, 403, 404, 500}

@endpoint PATCH /api/v2/projects/{projectKey}/views/{viewKey}
@required {LD-API-Version: str, projectKey: str, viewKey: str}
@optional {name: str, description: str, generateSdkKeys: bool, maintainerId: str, maintainerTeamKey: str, tags: [str], archived: bool}
@returns(200) {_access: any, _links: map{self: map{href: str, type: str}, parent: map{href: str, type: str}}, id: str(string), accountId: str, projectId: str, projectKey: str, key: str, name: str, description: str, generateSdkKeys: bool, version: int, tags: [str], createdAt: int(int64), updatedAt: int(int64), archived: bool, archivedAt: int(int64), deletedAt: int(int64), deleted: bool, maintainer: map{id: str, kind: str, maintainerMember: map{id: str, email: str, role: str, firstName: str, lastName: str}, maintainerTeam: map{id: str, key: str, name: str}}, flagsSummary: map{count: int, linkedFlags: map{items: [map], totalCount: int}}, segmentsSummary: map{count: int, linkedSegments: map{items: [map], totalCount: int}}, metricsSummary: map{count: int}, aiConfigsSummary: map{count: int}, resourceSummary: map{flagCount: int, segmentCount: int, totalCount: int}, flagsExpanded: map{items: [map], totalCount: int}, segmentsExpanded: map{items: [map], totalCount: int}, metricsExpanded: map{items: [map], totalCount: int}, aiConfigsExpanded: map{items: [map], totalCount: int}, resourcesExpanded: map{items: map{flags: map{items: [map], totalCount: int}, segments: map{items: [map], totalCount: int}}, totalCount: int}}
@errors {400, 403, 404, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType}
@required {LD-API-Version: str, projectKey: str, viewKey: str, resourceType: str(flags/segments)}
@returns(200) {successCount: int, failureCount: int, failedResources: [map]}
@errors {400, 403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType}
@required {LD-API-Version: str, projectKey: str, viewKey: str, resourceType: str(flags/segments)}
@returns(200) {successCount: int, failureCount: int, linkedResources: map{_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}, failedResources: [map]}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/views/{viewKey}/linked/{resourceType}
@required {LD-API-Version: str, projectKey: str, viewKey: str, resourceType: str(flags/segments)}
@optional {limit: int, offset: int, sort: str(linkedAt/name)=linkedAt, query: str, filter: str, expand: [str]}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey}
@required {LD-API-Version: str, projectKey: str, resourceType: str(flags/segments), resourceKey: str}
@optional {environmentId: str, limit: int, offset: int}
@returns(200) {_links: map{first: map{href: str, type: str}, last: map{href: str, type: str}, next: map{href: str, type: str}, prev: map{href: str, type: str}, self: map{href: str, type: str}}, items: [map], totalCount: int}
@errors {400, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/release-policies
@required {LD-API-Version: str, projectKey: str}
@optional {excludeDefault: bool=false}
@returns(200) {items: [map], totalCount: int}
@errors {400, 401, 403, 404, 500}

@endpoint POST /api/v2/projects/{projectKey}/release-policies
@required {LD-API-Version: str, projectKey: str, releaseMethod: str(guarded-release/progressive-release), name: str, key: str}
@optional {scope: map{environmentKeys: [str], flagTagKeys: [str]}, guardedReleaseConfig: map{rolloutContextKindKey: str, minSampleSize: int, rollbackOnRegression: bool, metricKeys: [str], metricGroupKeys: [str], stages: [map]}, progressiveReleaseConfig: map{rolloutContextKindKey: str, stages: [map]}}
@returns(201) {_access: any, _id: str, scope: map{environmentKeys: [str], flagTagKeys: [str]}, rank: int, releaseMethod: str, guardedReleaseConfig: map{rolloutContextKindKey: str, minSampleSize: int, rollbackOnRegression: bool, metricKeys: [str], metricGroupKeys: [str], stages: [map]}, progressiveReleaseConfig: map{rolloutContextKindKey: str, stages: [map]}, name: str, key: str}
@errors {400, 401, 403, 404, 409, 500}

@endpoint POST /api/v2/projects/{projectKey}/release-policies/order
@required {LD-API-Version: str, projectKey: str}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint DELETE /api/v2/projects/{projectKey}/release-policies/{policyKey}
@required {LD-API-Version: str, projectKey: str, policyKey: str}
@returns(204)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api/v2/projects/{projectKey}/release-policies/{policyKey}
@required {LD-API-Version: str, projectKey: str, policyKey: str}
@returns(200) {_access: any, _id: str, scope: map{environmentKeys: [str], flagTagKeys: [str]}, rank: int, releaseMethod: str, guardedReleaseConfig: map{rolloutContextKindKey: str, minSampleSize: int, rollbackOnRegression: bool, metricKeys: [str], metricGroupKeys: [str], stages: [map]}, progressiveReleaseConfig: map{rolloutContextKindKey: str, stages: [map]}, name: str, key: str}
@errors {400, 401, 403, 404, 500}

@endpoint PUT /api/v2/projects/{projectKey}/release-policies/{policyKey}
@required {LD-API-Version: str, projectKey: str, policyKey: str, releaseMethod: str(guarded-release/progressive-release), name: str}
@optional {scope: map{environmentKeys: [str], flagTagKeys: [str]}, guardedReleaseConfig: map{rolloutContextKindKey: str, minSampleSize: int, rollbackOnRegression: bool, metricKeys: [str], metricGroupKeys: [str], stages: [map]}, progressiveReleaseConfig: map{rolloutContextKindKey: str, stages: [map]}}
@returns(200) {_access: any, _id: str, scope: map{environmentKeys: [str], flagTagKeys: [str]}, rank: int, releaseMethod: str, guardedReleaseConfig: map{rolloutContextKindKey: str, minSampleSize: int, rollbackOnRegression: bool, metricKeys: [str], metricGroupKeys: [str], stages: [map]}, progressiveReleaseConfig: map{rolloutContextKindKey: str, stages: [map]}, name: str, key: str}
@errors {400, 401, 403, 404, 500}

@endpoint GET /api/v2/engineering-insights/charts/deployments/frequency
@optional {projectKey: str(string), environmentKey: str(string), applicationKey: str(string), from: str(date-time), to: str(date-time), bucketType: str(string), bucketMs: int(int64), groupBy: str(string), expand: str(string)}
@returns(200) {metadata: map{summary: map, name: str, metrics: map, xAxis: map{unit: str}, yAxis: map{unit: str}}, series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/charts/flags/stale
@required {projectKey: str(string), environmentKey: str(string)}
@optional {applicationKey: str(string), groupBy: str(string), maintainerId: str(string), maintainerTeamKey: str(string), expand: str(string)}
@returns(200) {metadata: map{summary: map, name: str, metrics: map, xAxis: map{unit: str}, yAxis: map{unit: str}}, series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/charts/flags/status
@required {projectKey: str(string), environmentKey: str(string)}
@optional {applicationKey: str(string)}
@returns(200) {metadata: map{summary: map, name: str, metrics: map, xAxis: map{unit: str}, yAxis: map{unit: str}}, series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/charts/lead-time
@required {projectKey: str(string)}
@optional {environmentKey: str(string), applicationKey: str(string), from: int(int64), to: int(int64), bucketType: str(string), bucketMs: int(int64), groupBy: str(string), expand: str(string)}
@returns(200) {metadata: map{summary: map, name: str, metrics: map, xAxis: map{unit: str}, yAxis: map{unit: str}}, series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/charts/releases/frequency
@required {projectKey: str(string), environmentKey: str(string)}
@optional {applicationKey: str(string), hasExperiments: bool, global: str(string), groupBy: str(string), from: str(date-time), to: str(date-time), bucketType: str(string), bucketMs: int(int64), expand: str(string)}
@returns(200) {metadata: map{summary: map, name: str, metrics: map, xAxis: map{unit: str}, yAxis: map{unit: str}}, series: [map]}
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/engineering-insights/deployment-events
@required {projectKey: str, environmentKey: str, applicationKey: str, version: str, eventType: str(started/failed/finished/custom)}
@optional {applicationName: str, applicationKind: str(server/browser/mobile), versionName: str, eventTime: int(int64), eventMetadata: map, deploymentMetadata: map}
@returns(201)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/deployments
@required {projectKey: str(string), environmentKey: str(string)}
@optional {applicationKey: str(string), limit: int(int64), expand: str(string), from: int(int64), to: int(int64), after: str(string), before: str(string), kind: str(string), status: str(string)}
@returns(200) {totalCount: int, items: [map], _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/deployments/{deploymentID}
@required {deploymentID: str(string)}
@optional {expand: str(string)}
@returns(200) {id: str(uuid), applicationKey: str, applicationVersion: str, startedAt: int(int64), endedAt: int(int64), durationMs: int(int64), status: str, kind: str, active: bool, metadata: map, archived: bool, environmentKey: str, numberOfContributors: int, numberOfPullRequests: int, linesAdded: int(int64), linesDeleted: int(int64), leadTime: int(int64), pullRequests: map{totalCount: int, items: [map], _links: map}, flagReferences: map{totalCount: int, items: [map]}, leadTimeStages: map{codingDurationMs: int(int64), reviewDurationMs: int(int64), waitDurationMs: int(int64), deployDurationMs: int(int64), totalLeadTimeMs: int(int64)}}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/engineering-insights/deployments/{deploymentID}
@required {deploymentID: str(string)}
@returns(200) {id: str(uuid), applicationKey: str, applicationVersion: str, startedAt: int(int64), endedAt: int(int64), durationMs: int(int64), status: str, kind: str, active: bool, metadata: map, archived: bool, environmentKey: str, numberOfContributors: int, numberOfPullRequests: int, linesAdded: int(int64), linesDeleted: int(int64), leadTime: int(int64), pullRequests: map{totalCount: int, items: [map], _links: map}, flagReferences: map{totalCount: int, items: [map]}, leadTimeStages: map{codingDurationMs: int(int64), reviewDurationMs: int(int64), waitDurationMs: int(int64), deployDurationMs: int(int64), totalLeadTimeMs: int(int64)}}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/flag-events
@required {projectKey: str(string), environmentKey: str(string)}
@optional {applicationKey: str(string), query: str(string), impactSize: str(string), hasExperiments: bool, global: str(string), expand: str(string), limit: int(int64), from: int(int64), to: int(int64), after: str(string), before: str(string)}
@returns(200) {totalCount: int, items: [map], _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint POST /api/v2/engineering-insights/insights/group
@required {name: str, key: str, projectKey: str, environmentKey: str}
@optional {applicationKeys: [str]}
@returns(201) {environment: map{_links: map, _id: str, key: str, name: str, apiKey: str, mobileKey: str, color: str, defaultTtl: int, secureMode: bool, _access: map{denied: [map], allowed: [map]}, defaultTrackEvents: bool, requireComments: bool, confirmChanges: bool, tags: [str], approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, resourceApprovalSettings: map, critical: bool}, scores: map{overall: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, deploymentFrequency: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, deploymentFailureRate: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, leadTime: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, impactSize: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, experimentationCoverage: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, flagHealth: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, velocity: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, risk: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, efficiency: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, creationRatio: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}}, scoreMetadata: map{period: map{startTime: int(int64), endTime: int(int64)}, lastPeriod: map{startTime: int(int64), endTime: int(int64)}}, key: str, name: str, projectKey: str, environmentKey: str, applicationKeys: [str], createdAt: int(int64)}
@errors {400, 401, 403, 404, 409, 429}

@endpoint GET /api/v2/engineering-insights/insights/groups
@optional {limit: int(int64), offset: int(int64), sort: str(string), query: str(string), expand: str(string)}
@returns(200) {totalCount: int, items: [map], _links: map, metadata: map{countByIndicator: map{excellent: int, good: int, fair: int, needsAttention: int, notCalculated: int, unknown: int, total: int}}, scoreMetadata: map{period: map{startTime: int(int64), endTime: int(int64)}, lastPeriod: map{startTime: int(int64), endTime: int(int64)}}}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/engineering-insights/insights/groups/{insightGroupKey}
@required {insightGroupKey: str(string)}
@optional {expand: str(string)}
@returns(200) {environment: map{_links: map, _id: str, key: str, name: str, apiKey: str, mobileKey: str, color: str, defaultTtl: int, secureMode: bool, _access: map{denied: [map], allowed: [map]}, defaultTrackEvents: bool, requireComments: bool, confirmChanges: bool, tags: [str], approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, resourceApprovalSettings: map, critical: bool}, scores: map{overall: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, deploymentFrequency: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, deploymentFailureRate: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, leadTime: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, impactSize: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, experimentationCoverage: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, flagHealth: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, velocity: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, risk: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, efficiency: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, creationRatio: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}}, scoreMetadata: map{period: map{startTime: int(int64), endTime: int(int64)}, lastPeriod: map{startTime: int(int64), endTime: int(int64)}}, key: str, name: str, projectKey: str, environmentKey: str, applicationKeys: [str], createdAt: int(int64)}
@errors {400, 401, 403, 404, 429}

@endpoint PATCH /api/v2/engineering-insights/insights/groups/{insightGroupKey}
@required {insightGroupKey: str(string)}
@returns(200) {environment: map{_links: map, _id: str, key: str, name: str, apiKey: str, mobileKey: str, color: str, defaultTtl: int, secureMode: bool, _access: map{denied: [map], allowed: [map]}, defaultTrackEvents: bool, requireComments: bool, confirmChanges: bool, tags: [str], approvalSettings: map{required: bool, bypassApprovalsForPendingChanges: bool, minNumApprovals: int, canReviewOwnRequest: bool, canApplyDeclinedChanges: bool, autoApplyApprovedChanges: bool, serviceKind: str, serviceConfig: map, requiredApprovalTags: [str], serviceKindConfigurationId: str}, resourceApprovalSettings: map, critical: bool}, scores: map{overall: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, deploymentFrequency: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, deploymentFailureRate: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, leadTime: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, impactSize: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, experimentationCoverage: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, flagHealth: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, velocity: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, risk: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, efficiency: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, creationRatio: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}}, scoreMetadata: map{period: map{startTime: int(int64), endTime: int(int64)}, lastPeriod: map{startTime: int(int64), endTime: int(int64)}}, key: str, name: str, projectKey: str, environmentKey: str, applicationKeys: [str], createdAt: int(int64)}
@errors {400, 401, 403, 404, 422, 429}

@endpoint DELETE /api/v2/engineering-insights/insights/groups/{insightGroupKey}
@required {insightGroupKey: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/insights/scores
@required {projectKey: str(string), environmentKey: str(string)}
@optional {applicationKey: str(string)}
@returns(200) {period: map{startTime: int(int64), endTime: int(int64)}, lastPeriod: map{startTime: int(int64), endTime: int(int64)}, scores: map{overall: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, deploymentFrequency: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, deploymentFailureRate: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, leadTime: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, impactSize: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, experimentationCoverage: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, flagHealth: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, velocity: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, risk: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, efficiency: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}, creationRatio: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map{min: int, max: int}, lastPeriod: map{score: int, aggregateOf: [str], diffVsLastPeriod: int, indicator: str, indicatorRange: map, lastPeriod: map}}}, _links: map}
@errors {400, 401, 403, 429}

@endpoint GET /api/v2/engineering-insights/pull-requests
@required {projectKey: str(string)}
@optional {environmentKey: str(string), applicationKey: str(string), status: str(string), query: str(string), limit: int(int64), expand: str(string), sort: str(string), from: str(date-time), to: str(date-time), after: str(string), before: str(string)}
@returns(200) {totalCount: int, items: [map], _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint GET /api/v2/engineering-insights/repositories
@optional {expand: str(string)}
@returns(200) {totalCount: int, items: [map], _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint PUT /api/v2/engineering-insights/repositories/projects
@required {mappings: [map{repositoryKey!: str, projectKey!: str}]}
@returns(200) {totalCount: int, items: [map], _links: map}
@errors {400, 401, 403, 404, 429}

@endpoint DELETE /api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}
@required {repositoryKey: str(string), projectKey: str(string)}
@returns(204)
@errors {400, 401, 403, 404, 429}

@end
