> ## Documentation Index
> Fetch the complete documentation index at: https://docs.perfai.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get reports

> Lists the security reports generated for the app, newest first. Each item carries a downloadUrl for fetching the PDF. Security reports are a paid feature — a free-tier (trial) organization receives 402.




## OpenAPI

````yaml /api-reference/openapi.yaml get /apps/{appId}/reports
openapi: 3.1.1
info:
  title: Perfai Security API
  version: 1.1.0
  description: >
    Partner-facing REST API for automating Perfai security testing: register
    apps, trigger security tests and vision (browser-automation) runs, poll run
    status, and retrieve vulnerability findings. All endpoints are
    JWT-authenticated and scoped to the caller's organization; cross-tenant
    access returns 404 (never 403) to prevent enumeration. Errors follow RFC
    9457 Problem Details.
servers:
  - url: https://api.perfai.ai/v1
    description: Perfai cloud
  - url: https://api.{customerDomain}/v1
    description: On-premise deployment
    variables:
      customerDomain:
        default: example.com
security:
  - bearerAuth: []
tags:
  - name: Apps
    description: App catalog — list, register, and poll registration.
  - name: Security Agent
    description: Trigger security tests and poll their lifecycle.
  - name: Vision Agent
    description: >-
      Trigger vision (browser-automation) runs and poll their lifecycle. Always
      browserless.
  - name: Vulnerabilities
    description: Retrieve security findings.
  - name: Reports
    description: List an app's security reports and download them as PDF.
  - name: Tasks
    description: Poll any asynchronous operation started by this API.
paths:
  /apps/{appId}/reports:
    get:
      tags:
        - Reports
      summary: Get reports
      description: >
        Lists the security reports generated for the app, newest first. Each
        item carries a downloadUrl for fetching the PDF. Security reports are a
        paid feature — a free-tier (trial) organization receives 402.
      operationId: listReports
      parameters:
        - $ref: '#/components/parameters/AppId'
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: pageSize
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
      responses:
        '200':
          description: The app's security reports (data may be empty).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityReportsListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/UpgradeRequired'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    AppId:
      name: appId
      in: path
      required: true
      schema:
        type: string
      description: MongoDB ObjectId of the app (from GET /apps or POST /apps).
  schemas:
    SecurityReportsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SecurityReport'
        total:
          type: integer
        page:
          type: integer
        pageSize:
          type: integer
    SecurityReport:
      type: object
      description: One security report for an app.
      properties:
        reportId:
          type: string
          description: >-
            Report id — pass to GET /reports/{reportId} (or use downloadUrl) to
            download the PDF.
        appId:
          type: string
          description: The app this report belongs to.
        reportType:
          type: string
          enum:
            - security
          description: Always "security" on this API.
        format:
          type: string
          enum:
            - pdf
          description: Report file format.
        issuesCount:
          type:
            - integer
            - 'null'
          description: Number of issues the report covers.
        apiName:
          type: string
          description: App name at the time the report was generated.
        runNumber:
          type:
            - integer
            - 'null'
          description: Security test number the report was generated from.
        createdAt:
          type:
            - string
            - 'null'
          description: When the report was generated.
        createdByEmail:
          type: string
          description: Who generated the report.
        downloadUrl:
          type: string
          description: >-
            Absolute URL to download the PDF (a GET returns application/pdf);
            relative when PUBLIC_API_BASE_URL is unset.
    Problem:
      type: object
      description: RFC 9457 Problem Details.
      properties:
        type:
          type: string
          description: Error type URI, e.g. https://perfai.ai/errors/app-already-registered
        title:
          type: string
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or expired JWT.
    UpgradeRequired:
      description: >-
        The requested feature (e.g. reports) is paid — the organization is on
        the free tier and must upgrade.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: Resource not found or belongs to a different tenant.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT login token tied to your Perfai user (not a separate API key).
        Obtain it via POST /api/v1/auth/token with your username and password
        (use the returned id_token) — the same login the web console performs.
        Carries org, user, and role; short-lived.

````