Sentry Release Files API

Manage files associated with releases

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

sentry-system-release-files-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sentry Alerts Release Files 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: Release Files
  description: Manage files associated with releases
paths:
  /organizations/{organization_id_or_slug}/releases/{version}/files/:
    get:
      operationId: listOrganizationReleaseFiles
      summary: Sentry List an organization's release files
      description: Returns a list of files associated with an organization release.
      tags:
      - Release Files
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/Version'
      - name: cursor
        in: query
        description: Pagination cursor.
        schema:
          type: string
      responses:
        '200':
          description: A list of release files.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReleaseFile'
        '401':
          description: Unauthorized.
        '404':
          description: Release not found.
    post:
      operationId: uploadOrganizationReleaseFile
      summary: Sentry Upload a new organization release file
      description: Uploads a new file for the given release.
      tags:
      - Release Files
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/Version'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The file to upload.
                name:
                  type: string
                  description: The name (full path) of the file.
                header:
                  type: string
                  description: The content-type header for the file.
      responses:
        '201':
          description: Release file uploaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseFile'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '404':
          description: Release not found.
  /organizations/{organization_id_or_slug}/releases/{version}/files/{file_id}/:
    get:
      operationId: retrieveOrganizationReleaseFile
      summary: Sentry Retrieve an organization release's file
      description: Returns a file associated with an organization release.
      tags:
      - Release Files
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/Version'
      - $ref: '#/components/parameters/FileId'
      responses:
        '200':
          description: Release file details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseFile'
        '401':
          description: Unauthorized.
        '404':
          description: File not found.
    put:
      operationId: updateOrganizationReleaseFile
      summary: Sentry Update an organization release file
      description: Updates an organization release file.
      tags:
      - Release Files
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/Version'
      - $ref: '#/components/parameters/FileId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The new name for the file.
      responses:
        '200':
          description: Release file updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseFile'
        '401':
          description: Unauthorized.
        '404':
          description: File not found.
    delete:
      operationId: deleteOrganizationReleaseFile
      summary: Sentry Delete an organization release's file
      description: Deletes a release file from an organization release.
      tags:
      - Release Files
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/Version'
      - $ref: '#/components/parameters/FileId'
      responses:
        '204':
          description: Release file deleted.
        '401':
          description: Unauthorized.
        '404':
          description: File not found.
components:
  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
    FileId:
      name: file_id
      in: path
      required: true
      description: The ID of the file.
      schema:
        type: string
  schemas:
    ReleaseFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        sha1:
          type: string
        dist:
          type: string
          nullable: true
        size:
          type: integer
        dateCreated:
          type: string
          format: date-time
        headers:
          type: object
      required:
      - id
      - name
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authentication token for the Sentry API.