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

# Get batch

> Retrieves batch metadata including project assignment and status.



## OpenAPI

````yaml /api-spec.json get /data/batches/{id}
openapi: 3.0.0
info:
  contact:
    name: Acusight API Support
  description: >-
    Acusight platform API - custom endpoints + Portainer proxy routes for edge
    AI deployments
  title: Acusight API
  version: 1.0.0
servers:
  - url: https://acusight.io/api
    description: AcuSight Cloud (hosted)
security: []
tags:
  - name: Devices & provisioning
    description: Register, provision, and manage edge devices and their agents.
  - name: Virtual devices
    description: Create and drive simulated devices for testing and demos.
  - name: Alerts & telemetry
    description: Model alerts, alert rules, and product telemetry.
  - name: Organization
    description: Organization-level settings.
  - name: Datasets & data
    description: Projects, batches, datasets, images, annotations, and drift.
  - name: Models & training
    description: Model registry, training jobs, exports, and inference.
  - name: Pipeline data
    description: Detection time-series and aggregated pipeline analytics.
paths:
  /data/batches/{id}:
    get:
      tags:
        - Datasets & data
      summary: Get batch
      description: Retrieves batch metadata including project assignment and status.
      parameters:
        - description: Batch ID
          in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Batch details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/types.APIResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/models.Batch'
                    type: object
        '400':
          description: Invalid batch ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.APIResponse'
        '404':
          description: Batch not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.APIResponse'
        '500':
          description: Failed to fetch batch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.APIResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    types.APIResponse:
      properties:
        data: {}
        error:
          $ref: '#/components/schemas/types.APIError'
        meta:
          $ref: '#/components/schemas/types.APIMeta'
        success:
          type: boolean
      type: object
    models.Batch:
      properties:
        created_at:
          type: string
        device_id:
          description: Docker daemon ID from edge device
          type: string
        id:
          type: integer
        images:
          items:
            $ref: '#/components/schemas/models.Image'
          type: array
        last_image_received_at:
          type: string
        name:
          type: string
        organization_id:
          type: string
        project:
          allOf:
            - $ref: '#/components/schemas/models.Project'
          description: Relationships
        project_id:
          description: NULL = raw pool, assigned = in project
          type: integer
        source:
          description: '"edge", "upload"'
          type: string
        stage:
          description: '"unassigned", "annotating", "dataset"'
          type: string
        status:
          description: Batch completion tracking
          type: string
        tags:
          items:
            type: string
          type: array
        updated_at:
          type: string
      type: object
    types.APIError:
      properties:
        code:
          type: string
        details:
          type: string
        message:
          type: string
      type: object
    types.APIMeta:
      properties:
        count:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
      type: object
    models.Image:
      properties:
        annotation_status:
          description: '"pending", "completed"'
          type: string
        annotations:
          items:
            $ref: '#/components/schemas/models.Annotation'
          type: array
        batch:
          allOf:
            - $ref: '#/components/schemas/models.Batch'
          description: Relationships
        batch_id:
          type: integer
        created_at:
          type: string
        device_id:
          description: Source device (inherited from batch)
          type: string
        filename:
          type: string
        height:
          type: integer
        id:
          type: integer
        split:
          description: >-
            Working dataset split assignment (nullable until assigned): "train",
            "val", "test"
          type: string
        split_locked:
          type: boolean
        storage_key:
          description: MinIO path
          type: string
        updated_at:
          type: string
        width:
          type: integer
      type: object
    models.Project:
      properties:
        batches:
          description: Relationships
          items:
            $ref: '#/components/schemas/models.Batch'
          type: array
        classes:
          items:
            $ref: '#/components/schemas/models.Class'
          type: array
        created_at:
          type: string
        description:
          type: string
        id:
          type: integer
        name:
          type: string
        organization_id:
          type: string
        project_type:
          description: '"object_detection", "instance_segmentation"'
          type: string
        updated_at:
          type: string
        versions:
          items:
            $ref: '#/components/schemas/models.DatasetVersion'
          type: array
      type: object
    models.Annotation:
      properties:
        class_value:
          description: Store class value (no project binding)
          type: string
        confidence:
          description: Optional confidence score (0.0-1.0)
          type: number
        created_at:
          type: string
        geometry:
          description: For polygon/point
          items:
            type: integer
          type: array
        height:
          type: number
        id:
          type: integer
        image_id:
          type: integer
        model_id:
          description: Model provenance tracking (for edge/auto annotations)
          type: string
        model_name:
          description: Name of model (e.g., "yolov8n-v2")
          type: string
        model_version:
          description: Version of model (e.g., "2.1.0")
          type: string
        source:
          description: Source and verification tracking
          type: string
        type:
          description: Always "bbox" (unified type)
          type: string
        updated_at:
          type: string
        width:
          type: number
        x_center:
          description: YOLO format coordinates (all stored as normalized values 0.0-1.0)
          type: number
        y_center:
          type: number
        z_order:
          description: >-
            ZOrder controls rendering order (0 = back, higher = front). Nullable
            for legacy rows.
          type: integer
      type: object
    models.Class:
      properties:
        color:
          type: string
        created_at:
          type: string
        id:
          type: integer
        name:
          description: Human-readable name from data.yaml or defaults to raw_value
          type: string
        project:
          allOf:
            - $ref: '#/components/schemas/models.Project'
          description: Relationships
        project_id:
          type: integer
        raw_value:
          description: Original YOLO index ("0", "1", "2")
          type: string
        updated_at:
          type: string
      type: object
    models.DatasetVersion:
      properties:
        created_at:
          type: string
        id:
          type: integer
        name:
          type: string
        pipeline_config:
          description: >-
            PipelineConfig captures the preprocessing/augmentation pipeline that
            produced this version.
          items:
            type: integer
          type: array
        project:
          allOf:
            - $ref: '#/components/schemas/models.Project'
          description: Relationships
        project_id:
          type: integer
        updated_at:
          type: string
        version:
          type: integer
        version_annotations:
          items:
            $ref: '#/components/schemas/models.VersionAnnotation'
          type: array
        version_batches:
          items:
            $ref: '#/components/schemas/models.VersionBatch'
          type: array
        version_classes:
          items:
            $ref: '#/components/schemas/models.VersionClass'
          type: array
        version_images:
          items:
            $ref: '#/components/schemas/models.VersionImage'
          type: array
      type: object
    models.VersionAnnotation:
      properties:
        geometry:
          items:
            type: integer
          type: array
        height:
          type: number
        id:
          type: integer
        original_annotation:
          $ref: '#/components/schemas/models.Annotation'
        original_annotation_id:
          type: integer
        type:
          type: string
        version:
          $ref: '#/components/schemas/models.DatasetVersion'
        version_class_value:
          type: string
        version_id:
          type: integer
        version_image:
          $ref: '#/components/schemas/models.VersionImage'
        version_image_id:
          type: integer
        width:
          type: number
        x_center:
          type: number
        y_center:
          type: number
      type: object
    models.VersionBatch:
      properties:
        id:
          type: integer
        images:
          items:
            $ref: '#/components/schemas/models.VersionImage'
          type: array
        name:
          type: string
        original_batch:
          $ref: '#/components/schemas/models.Batch'
        original_batch_id:
          description: Nullable for provenance only
          type: integer
        project_id:
          type: integer
        version:
          $ref: '#/components/schemas/models.DatasetVersion'
        version_id:
          type: integer
      type: object
    models.VersionClass:
      properties:
        color:
          type: string
        id:
          type: integer
        name:
          description: Effective name (possibly renamed)
          type: string
        original_class:
          $ref: '#/components/schemas/models.Class'
        original_class_id:
          type: integer
        raw_value:
          description: Preserved YOLO index
          type: string
        version:
          $ref: '#/components/schemas/models.DatasetVersion'
        version_id:
          type: integer
      type: object
    models.VersionImage:
      properties:
        annotations:
          items:
            $ref: '#/components/schemas/models.VersionAnnotation'
          type: array
        filename:
          type: string
        height:
          type: integer
        id:
          type: integer
        original_image:
          $ref: '#/components/schemas/models.Image'
        original_image_id:
          description: Nullable for provenance only
          type: integer
        split:
          type: string
        storage_key:
          type: string
        version:
          $ref: '#/components/schemas/models.DatasetVersion'
        version_batch:
          $ref: '#/components/schemas/models.VersionBatch'
        version_batch_id:
          type: integer
        version_id:
          type: integer
        width:
          type: integer
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token. Paste the token only; the Bearer prefix is added
        automatically.

````