---
title: "List Jobs"
method: GET
path: "/api/v1/jobs/"
tags: ["jobs"]
---

# List Jobs

`GET /api/v1/jobs/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/jobs/`
- Auth: none declared

List jobs for the current user's company with efficient pagination.

This endpoint has been optimized for performance as part of TECH-100.
It now uses efficient count queries instead of loading all jobs into memory.

Args:
    ctx: Application context with user and session
    job_adapter: Job adapter dependency
    asset_provider: Asset provider dependency
    pagination: Pagination parameters (limit, offset)
    status: Optional status filter
    workflow_name: Optional workflow name filter
    sort_by: Field to sort by
    sort_order: Sort order (ASC or DESC)

Returns:
    StandardResponse: List of jobs with pagination metadata

## Query parameters

- `status` string, nullable: Filter by job status
- `workflow_name` string, nullable: Filter by workflow name
- `asset_id` string, uuid, nullable: Filter by asset UUID
- `sort_by` string
- `sort_order` string
- `limit` integer: Items per page
- `offset` integer: Items to skip

## Headers

- `Authorization` string

## Response `200`

Successful Response

- JobListEnvelope: Typed ``StandardResponse`` envelope for the job list endpoint.
  - `success` boolean, required
  - `data` JobListPageData: Data payload for the paginated job list endpoint. Mirrors the exact shape returned by ``list_jobs``: the page of jobs plus offset-based pagination metadata. Declaring it as a ``response_model`` lands ``JobStatusResponse`` in the OpenAPI spec so the frontend can alias the generated schema (TECH-1003 / TECH-998).
    - `jobs` JobStatusResponse[]: Page of jobs
      - `job_id` string, required: Unique job identifier
      - `workflow_name` string, required: Name of the workflow
      - `status` string, required: Current job status (normalized for display)
      - `priority` string: Job priority level
      - `job_type` string, nullable: Type of job (refresh, intelligence, asset_discovery)
      - `progress_percent` integer: Job progress percentage
      - `progress_message` string, nullable: Current progress message
      - `current_phase` integer, nullable: Current workflow phase
      - `total_phases` integer, nullable: Total workflow phases
      - `created_at` string, required: Job creation timestamp (timezone-aware)
      - `started_at` string, nullable: Job start timestamp (timezone-aware)
      - `completed_at` string, nullable: Job completion timestamp
      - `estimated_duration` integer: Estimated duration in seconds
      - `error_message` string, nullable: Error message if job failed
      - `asset_name` string, nullable: Name of the asset this job is processing
      - `asset_type` string, nullable: Type of the asset this job is processing
      - `asset_uuid` string, nullable: UUID of the asset this job is processing
      - `context` object, nullable: Job context containing configuration parameters
      - `filters` object, nullable: Job filters and options
      - `result` object, nullable: Job result data
    - `pagination` OffsetPaginationMeta, required: Offset-based pagination metadata.
      - `offset` integer, required
      - `limit` integer, required
      - `total` integer, required
      - `has_next` boolean, required
      - `has_prev` boolean, required
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api.md) · [All operations](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/revisions/51c755fb5d0b?raw)
