openapi: 3.1.0 info: title: Sentry Environments API description: >- The Environments API provides endpoints for managing environments in Sentry, including listing project and organization environments, retrieving individual project environment details, and updating project environment settings. version: 0.0.1 contact: name: Sentry Support url: https://sentry.io/support/ email: support@sentry.io servers: - url: https://sentry.io/api/0 description: Sentry Production API security: - BearerAuth: [] tags: - name: Environments description: Manage project and organization environments paths: /organizations/{organization_id_or_slug}/environments/: get: operationId: listOrganizationEnvironments summary: Sentry List an organization's environments description: Returns a list of environments for the given organization. tags: - Environments parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' responses: '200': description: A list of environments. content: application/json: schema: type: array items: $ref: '#/components/schemas/Environment' '401': description: Unauthorized. '403': description: Forbidden. /projects/{organization_id_or_slug}/{project_id_or_slug}/environments/: get: operationId: listProjectEnvironments summary: Sentry List a project's environments description: Returns a list of environments for the given project. tags: - Environments parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/ProjectIdOrSlug' responses: '200': description: A list of environments. content: application/json: schema: type: array items: $ref: '#/components/schemas/Environment' '401': description: Unauthorized. '403': description: Forbidden. '404': description: Project not found. /projects/{organization_id_or_slug}/{project_id_or_slug}/environments/{environment}/: get: operationId: retrieveProjectEnvironment summary: Sentry Retrieve a project environment description: Returns details for a specific project environment. tags: - Environments parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/ProjectIdOrSlug' - $ref: '#/components/parameters/EnvironmentName' responses: '200': description: Environment details. content: application/json: schema: $ref: '#/components/schemas/Environment' '401': description: Unauthorized. '404': description: Environment not found. put: operationId: updateProjectEnvironment summary: Sentry Update a project environment description: Updates settings for a project environment. tags: - Environments parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/ProjectIdOrSlug' - $ref: '#/components/parameters/EnvironmentName' requestBody: required: true content: application/json: schema: type: object properties: isHidden: type: boolean description: Whether the environment is hidden. responses: '200': description: Environment updated. content: application/json: schema: $ref: '#/components/schemas/Environment' '400': description: Bad request. '401': description: Unauthorized. '404': description: Environment not found. components: securitySchemes: BearerAuth: type: http scheme: bearer description: Authentication token for the Sentry API. parameters: OrganizationIdOrSlug: name: organization_id_or_slug in: path required: true description: The ID or slug of the organization. schema: type: string ProjectIdOrSlug: name: project_id_or_slug in: path required: true description: The ID or slug of the project. schema: type: string EnvironmentName: name: environment in: path required: true description: The name of the environment. schema: type: string schemas: Environment: type: object properties: id: type: string name: type: string isHidden: type: boolean dateCreated: type: string format: date-time required: - id - name