Atlassian Environments API

The Environments API from Atlassian — 5 operation(s) for environments.

Documentation

📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-addon/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-webhooks/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-snippets/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-users/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-analytics/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-audit/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/connect-modules/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v2/intro/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-body/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-inline-tasks
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-long-running-task/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-relation/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-settings/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-user/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-announcement-banner/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-values--apps-/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-app-openapi
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-application-roles/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/
📖
Documentation
https://developer.atlassian.com/server/framework/atlassian-sdk/audit/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-avatars/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-classification-levels/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-components/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jira-settings/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/connect-api-migration/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-service-registry/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-dashboards/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/data-security-policy-developer-guide/
📖
Documentation
https://developer.atlassian.com/platform/forge/events-reference/jira/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jira-expressions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-field-configurations/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filters/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/forge/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-group-and-user-picker/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-links/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-security-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-types/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-type-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-type-screen-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-labels/
📖
Documentation
https://developer.atlassian.com/platform/marketplace/license-api-for-cloud-apps/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-license-metrics/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permissions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-myself/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-notification-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-permission-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-priorities/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-categories/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-key-and-name-validation/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-resolutions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-roles/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screens/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-security-level/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-server-info/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-statuses/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-status-categories/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-ui-modifications--apps-/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-avatars/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/
📖
Documentation
https://developer.atlassian.com/server/jira/platform/webhooks/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-worklogs/
📖
Documentation
https://developer.atlassian.com/cloud/admin/organization/rest/
📖
Documentation
https://developer.atlassian.com/cloud/admin/user-management/rest/
📖
Documentation
https://developer.atlassian.com/cloud/admin/user-provisioning/rest/

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-hook-events-paginated_hook_events-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-pull-requests-a_pullrequest_comment_task-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-repositories-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-snippets-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-teams-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-user-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-workspaces-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-audit-audit-record-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-content-async-content-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-content-body-async-content-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-content-states-async-id-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-group-group-array-with-links-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-inline-tasks-task-page-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-longtask-long-task-status-with-links-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-relation-relation-data-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-search-search-page-response-search-result-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-settings-look-and-feel-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-space-content-state-settings-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-template-blueprint-template-array-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-user-account-id-email-record-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-admin-domain-page-schema.json

Other Resources

🔗
GraphQL
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/graphql/atlassian-graphql.md
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-hook-events-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-pull-requests-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-repositories-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-snippets-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-teams-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-user-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-workspaces-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-audit-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-body-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-states-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-group-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-inline-tasks-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-longtask-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-relation-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-search-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-settings-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-space-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-template-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-user-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-admin-context.jsonld

OpenAPI Specification

atlassian-environments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Atlassian Admin Account Environments API
  description: The Atlassian Admin API provides programmatic access to manage Atlassian organizations, users, domains, policies, and events. It enables administrators to automate organization management tasks, integrate with identity providers, and ensure appropriate access to Atlassian products.
  version: 1.0.0
  contact:
    name: Atlassian Developer
    url: https://developer.atlassian.com/cloud/admin/
  license:
    name: Atlassian Developer Terms
    url: https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
  x-logo:
    url: https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/favicon.png
servers:
- url: https://api.atlassian.com
  description: Atlassian Cloud API
security:
- bearerAuth: []
- oauth2: []
tags:
- name: Environments
paths:
  /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables:
    get:
      tags:
      - Environments
      description: This GET operation retrieves all deployment variables configured for a specific environment within a Bitbucket repository's deployment configuration. By providing the workspace identifier, repository slug, and environment UUID in the path parameters, the API returns a list of variables that have been defined for that particular deployment environment, including both their names and values. These variables are typically used to store environment-specific configuration settings, credentials, or other data needed during the deployment process to that environment.
      summary: Atlassian List Variables for an Environment
      operationId: listVariablesForAnEnvironment
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      - name: environment_uuid
        description: The environment.
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: The retrieved deployment variables.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_deployment_variable'
              examples:
                paginated-deployment-variables:
                  $ref: '#/components/examples/paginated-deployment-variables'
      security:
      - oauth2:
        - pipeline
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
        GenerateExampleFromOperationResponseSchema: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      tags:
      - Environments
      description: Creates a new deployment variable for a specific environment within a Bitbucket repository's deployment configuration. This operation requires specifying the workspace, repository slug, and environment UUID in the path, allowing teams to define environment-specific variables such as API keys, connection strings, or configuration values that will be available during the deployment process. The variable details including the key name, value, and optionally whether it should be secured or hidden are provided in the request body. This enables teams to manage configuration across different deployment environments like development, staging, and production while maintaining security and flexibility in their CI/CD pipelines.
      summary: Atlassian Create Variable for an Environment
      operationId: createVariableForAnEnvironment
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      - name: environment_uuid
        description: The environment.
        required: true
        in: path
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deployment_variable'
            examples:
              deployment-variable:
                $ref: '#/components/examples/deployment-variable'
        description: The variable to create
        required: true
      responses:
        '201':
          description: The variable was created.
          headers:
            Location:
              description: The URL of the newly created variable.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deployment_variable'
              examples:
                deployment-variable_2:
                  $ref: '#/components/examples/deployment-variable_2'
        '404':
          description: The account, repository, environment or variable with the given UUID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '409':
          description: A variable with the provided key already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - pipeline:variable
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
        GenerateExampleFromOperationRequestSchema: true
        GenerateExampleFromOperationResponseSchema: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}:
    put:
      tags:
      - Environments
      description: Updates an existing deployment environment variable for a specific environment in a Bitbucket repository. This operation requires specifying the workspace, repository slug, environment UUID, and variable UUID in the request path. The PUT method allows you to modify the variable's configuration such as its key, value, secured status, and other properties. This is useful for managing environment-specific configuration values like API keys, database connection strings, or feature flags that are used during the deployment pipeline. The request must include authentication credentials with appropriate permissions to modify deployment variables in the specified repository and environment.
      summary: Atlassian Update Variable for an Environment
      operationId: updateVariableForAnEnvironment
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      - name: environment_uuid
        description: The environment.
        required: true
        in: path
        schema:
          type: string
      - name: variable_uuid
        description: The UUID of the variable to update.
        required: true
        in: path
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deployment_variable'
            examples:
              deployment-variable_2:
                $ref: '#/components/examples/deployment-variable_2'
        description: The updated deployment variable.
        required: true
      responses:
        '200':
          description: The deployment variable was updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deployment_variable'
              examples:
                deployment-variable_2:
                  $ref: '#/components/examples/deployment-variable_2'
        '404':
          description: The account, repository, environment or variable with the given UUID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - pipeline:variable
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
        GenerateExampleFromOperationRequestSchema: true
        GenerateExampleFromOperationResponseSchema: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      tags:
      - Environments
      description: This API operation allows you to delete a specific deployment variable associated with an environment in a Bitbucket repository. By providing the workspace identifier, repository slug, environment UUID, and variable UUID in the request path, you can permanently remove a variable that was previously configured for deployment purposes. This is useful when cleaning up unused configuration variables or removing sensitive information that is no longer needed for your deployment pipeline. The deletion is performed via an HTTP DELETE request and requires appropriate authentication and permissions to modify deployment environment settings within the specified Bitbucket repository.
      summary: Atlassian Delete Variable for an Environment
      operationId: deleteVariableForAnEnvironment
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      - name: environment_uuid
        description: The environment.
        required: true
        in: path
        schema:
          type: string
      - name: variable_uuid
        description: The UUID of the variable to delete.
        required: true
        in: path
        schema:
          type: string
      responses:
        '204':
          description: The variable was deleted.
        '404':
          description: The account, repository, environment or variable with given UUID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - pipeline:variable
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repositories/{workspace}/{repo_slug}/environments:
    get:
      tags:
      - Environments
      description: This API operation retrieves a paginated list of deployment environments configured for a specific Bitbucket repository within a given workspace. By making a GET request to the endpoint with the workspace identifier and repository slug as path parameters, users can view all environments (such as production, staging, or development) that have been set up for the repository, enabling them to manage and track deployments across different stages of their software delivery pipeline. The response includes environment details such as names, types, and associated configurations, which are essential for implementing proper deployment strategies and maintaining environment-specific settings within the Bitbucket ecosystem.
      summary: Atlassian List Environments
      operationId: listEnvironments
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: The matching environments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_environments'
              examples:
                paginated-deployment-environments:
                  $ref: '#/components/examples/paginated-deployment-environments'
      security:
      - oauth2:
        - pipeline
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
        GenerateExampleFromOperationResponseSchema: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      tags:
      - Environments
      description: The Create an Environment operation in the Atlassian Bitbucket Repositories API allows users to create a new deployment environment within a specific repository by sending a POST request to the /repositories/{workspace}/{repo_slug}/environments endpoint. This operation requires specifying both the workspace identifier and repository slug in the URL path, and enables teams to define distinct deployment targets such as development, staging, or production environments for their code. The created environment can then be referenced in deployment pipelines and used to manage environment-specific variables, restrictions, and deployment history, providing better control over the software delivery process within Bitbucket's CI/CD workflow.
      summary: Atlassian Create an Environment
      operationId: createAnEnvironment
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deployment_environment'
            examples:
              deployment-environment:
                $ref: '#/components/examples/deployment-environment'
        description: The environment to create.
        required: true
      responses:
        '201':
          description: The environment was created.
          headers:
            Location:
              description: The URL of the newly created environment.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deployment_environment'
              examples:
                deployment-environment_2:
                  $ref: '#/components/examples/deployment-environment_2'
        '404':
          description: The account or repository does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '409':
          description: An environment host with the provided name already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - pipeline
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
        GenerateExampleFromOperationRequestSchema: true
        GenerateExampleFromOperationResponseSchema: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}:
    get:
      tags:
      - Environments
      summary: Atlassian Get an Environment
      description: Retrieves detailed information about a specific deployment environment within a Bitbucket repository. This endpoint requires the workspace identifier, repository slug, and the unique UUID of the environment you want to retrieve. The operation returns comprehensive details about the environment including its name, type, environment variables, deployment restrictions, and any associated configuration. This is useful for auditing environment settings, verifying deployment configurations, or integrating environment data into external tools and workflows. Access to this endpoint typically requires appropriate repository permissions and authentication credentials.
      operationId: getAnEnvironment
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      - name: environment_uuid
        description: The environment UUID.
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: The environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deployment_environment'
              examples:
                deployment-environment_2:
                  $ref: '#/components/examples/deployment-environment_2'
        '404':
          description: No account, repository or environment with the UUID provided exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - pipeline
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
        GenerateExampleFromOperationResponseSchema: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      tags:
      - Environments
      description: This API operation allows you to permanently remove a specific deployment environment from a Bitbucket repository by sending a DELETE request to the endpoint with the workspace identifier, repository slug, and environment UUID as path parameters. When executed, it deletes the environment configuration and all associated settings, which may include environment variables, deployment restrictions, and deployment history tied to that particular environment. This is typically used when an environment is no longer needed, such as when decommissioning a staging or testing environment, and requires appropriate permissions to execute successfully.
      summary: Atlassian Delete an Environment
      operationId: deleteAnEnvironment
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      - name: environment_uuid
        description: The environment UUID.
        required: true
        in: path
        schema:
          type: string
      responses:
        '204':
          description: The environment was deleted.
        '404':
          description: No account or repository with the UUID provided exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - pipeline
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes:
    post:
      tags:
      - Environments
      description: 'This POST operation updates a specific environment within a Bitbucket repository by modifying its configuration settings. The endpoint requires three path parameters: the workspace identifier, repository slug, and the unique UUID of the environment to be updated. It allows teams to modify environment properties such as name, environment type, deployment restrictions, and other configuration details that govern how code is deployed to that particular environment. This is particularly useful for maintaining and adjusting deployment pipelines, updating access controls, or changing environment-specific settings as project requirements evolve. The operation requires appropriate authentication and permissions to modify deployment environments within the specified repository.'
      summary: Atlassian Update an Environment
      operationId: updateAnEnvironment
      parameters:
      - name: workspace
        description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
        required: true
        in: path
        schema:
          type: string
      - name: repo_slug
        description: The repository.
        required: true
        in: path
        schema:
          type: string
      - name: environment_uuid
        description: The environment UUID.
        required: true
        in: path
        schema:
          type: string
      responses:
        '202':
          description: The environment update request was accepted.
        '404':
          description: No account, repository or environment with the UUID provided exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - pipeline
      - basic: []
      - api_key: []
      x-api-evangelist-processing:
        WriteDescription: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    deployment_variable:
      allOf:
      - $ref: '#/components/schemas/object'
      - additionalProperties: true
        type: object
        title: Deployment Variable
        description: A Pipelines deployment variable.
        properties:
          uuid:
            type: string
            description: The UUID identifying the variable.
          key:
            type: string
            description: The unique name of the variable.
          value:
            type: string
            description: The value of the variable. If the variable is secured, this will be empty.
          secured:
            type: boolean
            description: If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
    deployment_environment:
      allOf:
      - $ref: '#/components/schemas/object'
      - additionalProperties: true
        type: object
        title: Deployment Environment
        description: A Bitbucket Deployment Environment.
        properties:
          uuid:
            type: string
            description: The UUID identifying the environment.
          name:
            type: string
            description: The name of the environment.
      x-bb-default-fields:
      - uuid
      x-bb-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}
      x-bb-batch-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch
      x-bb-batch-max-size: 100
    error:
      type: object
      title: Error
      description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.
      properties:
        type:
          type: string
          example: example_value
        error:
          type: object
          properties:
            message:
              type: string
            detail:
              type: string
            data:
              type: object
              description: Optional structured data that is endpoint-specific.
              properties: {}
              additionalProperties: true
          required:
          - message
          additionalProperties: false
          example: example_value
      required:
      - type
      additionalProperties: true
    object:
      type: object
      description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.
      properties:
        type:
          type: string
          example: example_value
      required:
      - type
      additionalProperties: true
      discriminator:
        propertyName: type
    paginated_deployment_variable:
      type: object
      title: Paginated Deployment Variables
      description: A paged list of deployment variables.
      properties:
        page:
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          example: 10
        values:
          type: array
          minItems: 0
          items:
            $ref: '#/components/schemas/deployment_variable'
          description: The values of the current page.
          example: []
        size:
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          example: 10
        pagelen:
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          example: 10
        next:
          type: string
          format: uri
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
          example: https://www.example.com
        previous:
          type: string
          format: uri
          description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.
          example: https://www.example.com
    paginated_environments:
      type: object
      title: Paginated Deployment Environments
      description: A paged list of environments
      properties:
        page:
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          example: 10
        values:
          type: array
          minItems: 0
          items:
            $ref: '#/components/schemas/deployment_environment'
          description: The values of the current page.
          example: []
        size:
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          example: 10
        pagelen:
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          example: 10
        next:
          type: string
          format: uri
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
          example: https://www.example.com
        previous:
          type: string
          format: uri
          description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.
          example: https://www.example.com
  examples:
    deployment-environment:
      uuid: 123e4567-e89b-12d3-a456-426614174000
      name: production
    paginated-deployment-variables:
      page: 1
      values:
        uuid: 123e4567-e89b-12d3-a456-426614174000
        key: DATABASE_URL
        value: postgresql://localhost:5432/mydb
        secured: false
      size: 42
      pagelen: 10
      next: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/deployments/variables?page=2
      previous: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/deployments/variables?page=0
    deployment-variable:
      uuid: 123e4567-e89b-12d3-a456-426614174000
      key: DATABASE_URL
      value: postgresql://localhost:5432/mydb
      secured: false
    deployment-environment_2:
      uuid: 123e4567-e89b-12d3-a456-426614174000
      name: production
    deployment-variable_2:
      uuid: 123e4567-e89b-12d3-a456-426614174000
      key: DATABASE_URL
      value: postgresql://localhost:5432/mydb
      secured: false
    paginated-deployment-environments:
      page: 1
      values:
        uuid: 3c7d1b5a-4f2e-4a9c-8d6f-1e2a3b4c5d6e
        name: production
      size: 42
      pagelen: 10
      next: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/environments?page=2
      previous: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/environments?page=0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use an Atlassian API key as a Bearer token. Create API keys at https://admin.atlassian.com.
    oauth2:
      type: oauth2
      description: OAuth 2.0 authorization for Atlassian Cloud APIs.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.atlassian.com/authorize
          tokenUrl: https://auth.atlassian.com/oauth/token
          scopes:
            read:org:admin: Read organization information.
            write:org:admin: Modify organization settings.
            read:user:admin: Read user information.
            write:user:admin: Modify user accounts.
            read:policy:admin: Read organization policies.
            write:policy:admin: Modify organization policies.
            read:event:admin: Read organization events.
externalDocs:
  description: Atlassian Admin REST API Documentation
  url: https://developer.atlassian.com/cloud/admin/organization/rest/intro/