Sentry Releases API

Manage software releases

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

sentry-system-releases-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sentry Alerts Releases API
  description: The Alerts API provides endpoints for managing alert rules in Sentry, including creating, retrieving, updating, and deleting metric alert rules and issue alert rules, as well as managing spike protection notification actions.
  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: Releases
  description: Manage software releases
paths:
  /organizations/{organization_id_or_slug}/releases/:
    get:
      operationId: listOrganizationReleases
      summary: Sentry List an organization's releases
      description: Returns a list of releases for the given organization.
      tags:
      - Releases
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - name: query
        in: query
        description: A search query to filter releases.
        schema:
          type: string
      - name: cursor
        in: query
        description: Pagination cursor.
        schema:
          type: string
      responses:
        '200':
          description: A list of releases.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Release'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
    post:
      operationId: createOrganizationRelease
      summary: Sentry Create a new release for an organization
      description: Creates a new release for the given organization.
      tags:
      - Releases
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - version
              - projects
              properties:
                version:
                  type: string
                  description: A version identifier for this release, unique within the organization.
                ref:
                  type: string
                  description: An optional commit reference.
                url:
                  type: string
                  description: A URL that points to the release, often a CI build URL.
                projects:
                  type: array
                  items:
                    type: string
                  description: A list of project slugs this release is for.
                dateReleased:
                  type: string
                  format: date-time
                  description: An optional date indicating when the release went live.
                commits:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      repository:
                        type: string
                  description: An optional list of commit data to associate with the release.
      responses:
        '201':
          description: Release created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Release_2'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
  /organizations/{organization_id_or_slug}/releases/{version}/:
    get:
      operationId: retrieveOrganizationRelease
      summary: Sentry Retrieve an organization's release
      description: Returns a release for a given organization.
      tags:
      - Releases
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/Version'
      responses:
        '200':
          description: Release details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Release_2'
        '401':
          description: Unauthorized.
        '404':
          description: Release not found.
    put:
      operationId: updateOrganizationRelease
      summary: Sentry Update an organization's release
      description: Updates a release for a given organization.
      tags:
      - Releases
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/Version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ref:
                  type: string
                url:
                  type: string
                dateReleased:
                  type: string
                  format: date-time
                commits:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      repository:
                        type: string
      responses:
        '200':
          description: Release updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Release_2'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '404':
          description: Release not found.
    delete:
      operationId: deleteOrganizationRelease
      summary: Sentry Delete an organization's release
      description: Deletes a release for a given organization.
      tags:
      - Releases
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/Version'
      responses:
        '204':
          description: Release deleted.
        '401':
          description: Unauthorized.
        '404':
          description: Release not found.
  /organizations/{organization_id_or_slug}/release-thresholds/:
    get:
      operationId: listReleaseThresholdStatuses
      summary: Sentry Retrieve statuses of release thresholds (Alpha)
      description: Returns the current status of release thresholds for the organization. This endpoint is in alpha and may change.
      tags:
      - Releases
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      responses:
        '200':
          description: Release threshold statuses.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    thresholdType:
                      type: string
                    triggerType:
                      type: string
                    value:
                      type: number
                    status:
                      type: string
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
components:
  schemas:
    Release:
      type: object
      properties:
        id:
          type: integer
          description: The internal unique identifier.
        version:
          type: string
          description: The version identifier of the release.
        shortVersion:
          type: string
          description: Shortened version for display.
        dateCreated:
          type: string
          format: date-time
        dateReleased:
          type: string
          format: date-time
          nullable: true
        firstEvent:
          type: string
          format: date-time
          nullable: true
        lastEvent:
          type: string
          format: date-time
          nullable: true
        newGroups:
          type: integer
        projects:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              slug:
                type: string
              name:
                type: string
      required:
      - version
      - dateCreated
    Release_2:
      type: object
      properties:
        id:
          type: integer
        version:
          type: string
        shortVersion:
          type: string
        ref:
          type: string
          nullable: true
        url:
          type: string
          nullable: true
        dateCreated:
          type: string
          format: date-time
        dateReleased:
          type: string
          format: date-time
          nullable: true
        firstEvent:
          type: string
          format: date-time
          nullable: true
        lastEvent:
          type: string
          format: date-time
          nullable: true
        newGroups:
          type: integer
        projects:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              slug:
                type: string
              name:
                type: string
        authors:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              email:
                type: string
        commitCount:
          type: integer
        lastDeploy:
          $ref: '#/components/schemas/Deploy'
      required:
      - version
      - dateCreated
    Deploy:
      type: object
      properties:
        id:
          type: string
        environment:
          type: string
        name:
          type: string
          nullable: true
        url:
          type: string
          nullable: true
        dateStarted:
          type: string
          format: date-time
          nullable: true
        dateFinished:
          type: string
          format: date-time
          nullable: true
      required:
      - id
      - environment
  parameters:
    OrganizationIdOrSlug:
      name: organization_id_or_slug
      in: path
      required: true
      description: The ID or slug of the organization.
      schema:
        type: string
    Version:
      name: version
      in: path
      required: true
      description: The version identifier of the release.
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authentication token for the Sentry API.