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

# Get Video Detections

> Retrieve all video detection runs associated with a specific **file**. Each detection run corresponds to one processing job executed against that file (for example, a video redaction pass that looked for faces or license plates). This endpoint returns the raw detection run records exactly as stored, including the per-run `detections` array (which may be empty `[]` until a worker populates results) and the creation timestamp. Use this endpoint to: (1) list historical detection/redaction attempts for a file; (2) render overlays from the saved `detections` array; (3) debug or audit processing for a single file.

**Notes:**
- This route returns **all** runs for the file (no server-side pagination in the current implementation).
- Field names mirror the database table: `id`, `tenant_id`, `file_id`, `case_id`, `doc_id`, `detections`, `created_at`.
- `case_id` can be `null` when a detection run is not linked to a case.
- `detections` is a JSON array (serialized), typically an array of objects describing entities per time/frame. Its shape is application-defined and may evolve without breaking this contract.



## OpenAPI

````yaml GET /video-detections/file/{id}
openapi: 3.0.1
info:
  title: Indora Labs API
  description: >-
    Comprehensive API for search, ingestion, file ops, redaction, detections,
    audit trail, and case management. All endpoints return strongly-typed JSON
    with explicit field descriptions and examples.
  version: 1.0.0
  license:
    name: Proprietary
servers:
  - url: https://api.indoralabs.com
security:
  - apiKeyAuth: []
tags:
  - name: Search
  - name: Uploads
  - name: Files
  - name: Redactions
  - name: Detections
  - name: Cases
  - name: Audit
  - name: Auth
  - name: Embeddings
  - name: Policy
paths:
  /video-detections/file/{id}:
    get:
      tags:
        - Detections
      summary: GET /video-detections/file/{id}
      description: >-
        Retrieve all video detection runs associated with a specific **file**.
        Each detection run corresponds to one processing job executed against
        that file (for example, a video redaction pass that looked for faces or
        license plates). This endpoint returns the raw detection run records
        exactly as stored, including the per-run `detections` array (which may
        be empty `[]` until a worker populates results) and the creation
        timestamp. Use this endpoint to: (1) list historical detection/redaction
        attempts for a file; (2) render overlays from the saved `detections`
        array; (3) debug or audit processing for a single file.


        **Notes:**

        - This route returns **all** runs for the file (no server-side
        pagination in the current implementation).

        - Field names mirror the database table: `id`, `tenant_id`, `file_id`,
        `case_id`, `doc_id`, `detections`, `created_at`.

        - `case_id` can be `null` when a detection run is not linked to a case.

        - `detections` is a JSON array (serialized), typically an array of
        objects describing entities per time/frame. Its shape is
        application-defined and may evolve without breaking this contract.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique **File ID** whose detection runs you want to list.
      responses:
        '200':
          description: >-
            Successfully retrieved all detection runs tied to the specified
            file. The response includes the raw detection run records as stored
            in the system.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detections:
                    type: array
                    description: Array of detection run records for the provided file.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Unique ID of this detection run.
                        tenant_id:
                          type: string
                          format: uuid
                          description: >-
                            Tenant/organization ID that owns the file and
                            detection run.
                        file_id:
                          type: string
                          format: uuid
                          description: The File ID this detection run was executed against.
                        case_id:
                          type: string
                          format: uuid
                          nullable: true
                          description: >-
                            Optional Case ID linked to this detection run.
                            `null` if not associated.
                        doc_id:
                          type: string
                          description: >-
                            Document/session identifier provided by the client
                            or upstream workflow that initiated the run.
                        detections:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                          description: >-
                            Per-run detections array. The structure of each item
                            is application-defined (e.g., { frame, ts, label,
                            bbox, confidence }). May be empty `[]` until
                            populated by workers.
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            Timestamp when this detection run was created (ISO
                            8601).
                      required:
                        - id
                        - tenant_id
                        - file_id
                        - doc_id
                        - detections
                        - created_at
                required:
                  - detections
              examples:
                example:
                  summary: Example response with two detection runs
                  value:
                    detections:
                      - id: c85a3d71-fec9-44b7-9f25-930da5f04c27
                        tenant_id: 743db90f-7e76-49f7-8d4e-5f42a16efc06
                        file_id: de13d372-a870-4eea-b975-9060d442f38c
                        case_id: null
                        doc_id: session-xyz
                        detections: []
                        created_at: '2025-09-07T13:48:43.927-05:00'
                      - id: 37c1c024-2ecf-4926-b1b3-1e4ed445f3b2
                        tenant_id: 743db90f-7e76-49f7-8d4e-5f42a16efc06
                        file_id: de13d372-a870-4eea-b975-9060d442f38c
                        case_id: null
                        doc_id: session-xyz
                        detections:
                          - frame: 123
                            ts: 4.1
                            label: Face
                            confidence: 0.94
                            bbox:
                              x: 512
                              'y': 208
                              w: 128
                              h: 128
                        created_at: '2025-10-13T03:12:00.000-05:00'
        '400':
          description: Bad request. The provided `id` is missing or not a valid UUID.
        '401':
          description: Unauthorized. Authentication failed or token is missing/expired.
        '404':
          description: >-
            No detection runs exist for the specified file, or the file does not
            exist.
        '500':
          description: Internal server error while retrieving detections.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````