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

# Get Test

> Lists all tests for a given project that the requesting user has at minimum read access to.



## OpenAPI

````yaml https://demo.us.mindgard.ai/api/openapi.json get /v1/beta/projects/{project_id}/tests/{test_id}
openapi: 3.1.0
info:
  title: Mindgard Public API
  description: This is the public API for Mindgard.
  version: 1.0.0
  contact:
    name: Mindgard Support
    email: support@mindgard.ai
servers:
  - url: https://demo.us.mindgard.ai/api
security:
  - BearerAuth: []
tags:
  - name: Projects
    x-displayName: Projects
  - name: Tests
    x-displayName: Tests
  - name: Findings
    x-displayName: Findings
  - name: Datasets
    x-displayName: Datasets
  - name: Multi-Turn Tests
    x-displayName: Multi-Turn Tests
  - name: Reconnaissance
    x-displayName: Reconnaissance
paths:
  /v1/beta/projects/{project_id}/tests/{test_id}:
    get:
      tags:
        - Tests
      summary: Get Test
      description: >-
        Lists all tests for a given project that the requesting user has at
        minimum read access to.
      operationId: get_test_public_projects__project_id__tests__test_id__get
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
        - name: test_id
          in: path
          required: true
          schema:
            type: string
            title: Test Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTestResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GetTestResponse:
      properties:
        data:
          $ref: '#/components/schemas/GetTestData'
      type: object
      required:
        - data
      title: GetTestResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GetTestData:
      properties:
        attacks:
          items:
            $ref: '#/components/schemas/TestResultResponse'
          type: array
          title: Attacks
        test:
          $ref: '#/components/schemas/TestResponse'
      type: object
      required:
        - attacks
        - test
      title: GetTestData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TestResultResponse:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          title: Type
        attributes:
          $ref: '#/components/schemas/TestResult'
      type: object
      required:
        - id
        - type
        - attributes
      title: TestResultResponse
    TestResponse:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          title: Type
        attributes:
          anyOf:
            - $ref: '#/components/schemas/Test'
            - $ref: '#/components/schemas/TestWithDetails'
          title: Attributes
      type: object
      required:
        - id
        - type
        - attributes
      title: TestResponse
    TestResult:
      properties:
        id:
          type: string
          title: Id
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        dataset:
          type: string
          title: Dataset
        attack:
          type: string
          title: Attack
        runtime_seconds:
          type: number
          title: Runtime Seconds
        total_events:
          type: integer
          title: Total Events
          default: 0
        flagged_events:
          type: integer
          title: Flagged Events
          default: 0
      type: object
      required:
        - id
        - started_at
        - dataset
        - attack
        - runtime_seconds
      title: TestResult
    Test:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        has_finished:
          type: boolean
          title: Has Finished
        total_events:
          type: integer
          title: Total Events
          default: 0
        flagged_events:
          type: integer
          title: Flagged Events
          default: 0
      type: object
      required:
        - id
        - created_at
        - has_finished
      title: Test
    TestWithDetails:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        has_finished:
          type: boolean
          title: Has Finished
        total_events:
          type: integer
          title: Total Events
          default: 0
        flagged_events:
          type: integer
          title: Flagged Events
          default: 0
        applied_policy_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Applied Policy Id
        selected_policy_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Selected Policy Id
      type: object
      required:
        - id
        - created_at
        - has_finished
      title: TestWithDetails
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````