openapi: 3.1.0 info: title: Sentry Alerts Repositories 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: Repositories description: Manage organization repositories paths: /organizations/{organization_id_or_slug}/repos/: get: operationId: listOrganizationRepositories summary: Sentry List organization repositories description: Returns a list of version control repositories for a given organization. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of repositories. content: application/json: schema: type: array items: $ref: '#/components/schemas/Repository' '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/repos/{repo_id}/commits/: get: operationId: listRepositoryCommits summary: Sentry List repository commits description: Returns a list of commits for a given repository. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: repo_id in: path required: true description: The ID of the repository. schema: type: string - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of commits. content: application/json: schema: type: array items: $ref: '#/components/schemas/Commit' '401': description: Unauthorized. '404': description: Repository not found. /organizations/{organization_id_or_slug}/prevent/repositories/: get: operationId: listRepositories summary: Sentry Retrieve list of repositories for a given owner description: Returns a list of repositories for the organization. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of repositories. content: application/json: schema: type: array items: $ref: '#/components/schemas/PreventRepository' '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/prevent/repositories/{repo_id}/: get: operationId: retrieveRepository summary: Sentry Retrieve a single repository for a given owner description: Returns details for a specific repository. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/RepoId' responses: '200': description: Repository details. content: application/json: schema: $ref: '#/components/schemas/PreventRepository' '401': description: Unauthorized. '404': description: Repository not found. /organizations/{organization_id_or_slug}/prevent/repositories/{repo_id}/branches/: get: operationId: listRepositoryBranches summary: Sentry Retrieve list of branches for a given owner and repository description: Returns a list of branches for a specific repository. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/RepoId' - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of branches. content: application/json: schema: type: array items: type: object properties: name: type: string sha: type: string '401': description: Unauthorized. '404': description: Repository not found. /organizations/{organization_id_or_slug}/prevent/sync/: post: operationId: syncRepositories summary: Sentry Sync repositories from an integrated org with GitHub description: Triggers a sync of repositories from the integrated organization's GitHub. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' responses: '202': description: Sync initiated. '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/prevent/sync-status/: get: operationId: getSyncStatus summary: Sentry Get syncing status for repositories for an integrated org description: Returns the current sync status for repositories. tags: - Repositories parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' responses: '200': description: Sync status. content: application/json: schema: type: object properties: status: type: string lastSync: type: string format: date-time nullable: true '401': description: Unauthorized. '403': description: Forbidden. components: schemas: PreventRepository: type: object properties: id: type: string name: type: string provider: type: string url: type: string nullable: true dateCreated: type: string format: date-time required: - id - name Commit: type: object properties: id: type: string message: type: string dateCreated: type: string format: date-time author: type: object properties: name: type: string email: type: string format: email repository: type: object properties: id: type: string name: type: string required: - id Repository: type: object properties: id: type: string name: type: string url: type: string nullable: true provider: type: object properties: id: type: string name: type: string status: type: string dateCreated: type: string format: date-time externalSlug: type: string required: - id - name parameters: OrganizationIdOrSlug: name: organization_id_or_slug in: path required: true description: The ID or slug of the organization. schema: type: string RepoId: name: repo_id in: path required: true description: The ID of the repository. schema: type: string securitySchemes: BearerAuth: type: http scheme: bearer description: Authentication token for the Sentry API.