openapi: 3.1.0 info: title: Sentry Alerts Test Results 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: Test Results description: Retrieve test result metrics and test suites paths: /organizations/{organization_id_or_slug}/prevent/test-results/: get: operationId: listTestResults summary: Sentry Retrieve paginated list of test results for repository, owner, and organization description: Returns paginated test results for the organization. tags: - Test Results parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: repositoryId in: query description: Filter by repository ID. schema: type: string - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of test results. content: application/json: schema: type: array items: $ref: '#/components/schemas/TestResult' '401': description: Unauthorized. /organizations/{organization_id_or_slug}/prevent/test-results/metrics/: get: operationId: retrieveTestResultMetrics summary: Sentry Retrieve aggregated test result metrics for repository, owner, and organization description: Returns aggregated test result metrics. tags: - Test Results parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: repositoryId in: query description: Filter by repository ID. schema: type: string responses: '200': description: Aggregated test result metrics. content: application/json: schema: type: object properties: totalTests: type: integer passedTests: type: integer failedTests: type: integer skippedTests: type: integer avgDuration: type: number passRate: type: number '401': description: Unauthorized. /organizations/{organization_id_or_slug}/prevent/test-results/suites/: get: operationId: listTestSuites summary: Sentry Retrieve test suites belonging to a repository's test results description: Returns test suites for a repository's test results. tags: - Test Results parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: repositoryId in: query description: Filter by repository ID. schema: type: string - name: cursor in: query description: Pagination cursor. schema: type: string responses: '200': description: A list of test suites. content: application/json: schema: type: array items: type: object properties: name: type: string totalTests: type: integer passedTests: type: integer failedTests: type: integer duration: type: number '401': description: Unauthorized. components: parameters: OrganizationIdOrSlug: name: organization_id_or_slug in: path required: true description: The ID or slug of the organization. schema: type: string schemas: TestResult: type: object properties: id: type: string name: type: string status: type: string enum: - passed - failed - skipped - error duration: type: number description: Duration in seconds. suite: type: string dateCreated: type: string format: date-time required: - id - name - status securitySchemes: BearerAuth: type: http scheme: bearer description: Authentication token for the Sentry API.