---
title: "List Batch Jobs"
method: GET
path: "/v1/accounts/{account_id}/batchJobs"
tags: ["gateway.openapi_Gateway"]
---

# List Batch Jobs

`GET /v1/accounts/{account_id}/batchJobs`

## Path parameters

- `account_id` string, required

## Query parameters

- `pageSize` integer
- `pageToken` string
- `filter` string
- `orderBy` string
- `readMask` string

## Response `200`

A successful response.

- GatewayListBatchJobsResponse
  - `batchJobs` GatewayBatchJob[]
    - `name` string
    - `displayName` string — Human-readable display name of the batch job. e.g. "My Batch Job" Must be fewer than 64 characters long.
    - `createTime` string, date-time — The creation time of the batch job.
    - `startTime` string, date-time — The time when the batch job started running.
    - `endTime` string, date-time — The time when the batch job completed, failed, or was cancelled.
    - `createdBy` string — The email address of the user who created this batch job.
    - `nodePoolId` string, required
    - `environmentId` string — The ID of the environment that this batch job should use. e.g. my-env If specified, image_ref must not be specified.
    - `snapshotId` string — The ID of the snapshot used by this batch job. If specified, environment_id must be specified and image_ref must not be specified.
    - `numRanks` integer — For GPU node pools: one GPU per rank w/ host packing, for CPU node pools: one host per rank.
    - `envVars` object — Environment variables to be passed during this job's execution.
    - `role` string — The ARN of the AWS IAM role that the batch job should assume. If not specified, the connection will fall back to the node pool's node_role.
    - `pythonExecutor` GatewayPythonExecutor — Execute a Python process.
      - `targetType` 'TARGET_TYPE_UNSPECIFIED' | 'MODULE' | 'FILENAME', required — - MODULE: Runs a python module, i.e. passed as -m argument. - FILENAME: Runs a python file.
      - `target` string, required — A Python module or filename depending on TargetType.
      - `args` string[] — Command line arguments to pass to the Python process.
    - `notebookExecutor` GatewayNotebookExecutor — Execute a notebook file.
      - `notebookFilename` string, required — Path to a notebook file to be executed.
    - `shellExecutor` GatewayShellExecutor — Execute a shell script.
      - `command` string, required
    - `imageRef` string — The container image used by this job. If specified, environment_id and snapshot_id must not be specified.
    - `annotations` object — Arbitrary, user-specified metadata. Keys and values must adhere to Kubernetes constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set Additionally, the "fireworks.ai/" prefix is reserved.
    - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'QUEUED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLING' | 'CANCELLED' | 'DELETING' — - CREATING: The batch job is being created. - QUEUED: The batch job is in the queue and waiting to be scheduled. Currently unused. - PENDING: The batch job scheduled and is waiting for resource allocation. - RUNNING: The batch job is running. - COMPLETED: The batch job has finished successfully. - FAILED: The batch job has failed. - CANCELLING: The batch job is being cancelled. - CANCELLED: The batch job was cancelled. - DELETING: The batch job is being deleted.
    - `status` string — Detailed information about the current status of the batch job.
    - `shared` boolean — Whether the batch job is shared with all users in the account. This allows all users to update, delete, clone, and create environments using the batch job.
    - `updateTime` string, date-time — The update time for the batch job.
  - `nextPageToken` string — A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
  - `totalSize` integer — The total number of batch jobs.

---

[API](https://skmtc.net/fw-ai-external/apis/gateway-rest-api.md) · [All operations](https://skmtc.net/fw-ai-external/apis/gateway-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fw-ai-external/gateway-rest-api/versions/29a1e4db152c/schema)
