---
title: "Returns the executions of a job."
method: GET
path: "/api/v1/orchestrator/jobs/{id}/executions"
tags: ["Orchestrator"]
---

# Returns the executions of a job.

`GET /api/v1/orchestrator/jobs/{id}/executions`

Returns the executions of a job.

## Path parameters

- `id` string, required

## Query parameters

- `namespace` string
- `limit` integer
- `next_token` string
- `reverse` boolean
- `order_by` string, required

## Response `200`

OK

- ApimodelsListJobExecutionsResponse
  - `Items` ModelsExecution[]
    - `AllocatedResources` ModelsAllocatedResources
      - `Tasks` object
    - `ComputeState` ModelsStateModelsExecutionStateType
      - `Details` object — Details is a map of additional details about the state.
      - `Message` string — Message is a human readable message describing the state.
      - `StateType` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11
    - `CreateTime` integer — CreateTime is the time the execution has finished scheduling and been verified by the plan applier.
    - `DesiredState` ModelsStateModelsExecutionDesiredStateType
      - `Details` object — Details is a map of additional details about the state.
      - `Message` string — Message is a human readable message describing the state.
      - `StateType` 0 | 1 | 2
    - `EvalID` string — ID of the evaluation that generated this execution
    - `FollowupEvalID` string — FollowupEvalID captures a follow up evaluation created to handle a failed execution that can be rescheduled in the future
    - `ID` string — ID of the execution (UUID)
    - `Job` ModelsJob
      - `Constraints` ModelsLabelSelectorRequirement[] — Constraints is a selector which must be true for the compute node to run this job.
        - `Key` string — key is the label key that the selector applies to.
        - `Operator` '!' | '=' | '==' | 'in' | '!=' | 'notin' | 'exists' | 'gt' | 'lt'
        - `Values` string[] — values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or KeyNotInImap, the values array must be empty. This array is replaced during a strategic
      - `Count` integer — Count is the number of replicas that should be scheduled. For batch and service jobs: - If not present in JSON, defaults to 1 - If explicitly set to 0, means stop all executions - If > 0, specifies exact number of replicas For daemon and ops jobs: - Values of 0 or 1 are ignored (job runs on all matching nodes) - Values > 1 are invalid and will cause validation to fail
      - `CreateTime` integer
      - `ID` string — ID is a unique identifier assigned to this job. It helps to distinguish jobs with the same name after they have been deleted and re-created. The ID is generated by the server and should not be set directly by the client.
      - `Labels` object — Labels is used to associate arbitrary labels with this job, which can be used for filtering. key=value
      - `Meta` object — Meta is used to associate arbitrary metadata with this job.
      - `ModifyTime` integer
      - `Name` string — Name is the logical name of the job used to refer to it. Submitting a job with the same name as an existing job will result in an update to the existing job.
      - `Namespace` string — Namespace is the namespace this job is running in.
      - `Priority` integer — Priority defines the scheduling priority of this job.
      - `Revision` integer — Revision is a per-job monotonically increasing revision number that is incremented on each update to the job's state or specification
      - `State` ModelsStateModelsJobStateType
        - `Details` object — Details is a map of additional details about the state.
        - `Message` string — Message is a human readable message describing the state.
        - `StateType` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `Tasks` ModelsTask[]
        - `Engine` ModelsSpecConfig
          - `Params` object — Params is a map of the config params
          - `Type` string — Type of the config
        - `Env` object — Map of environment variables to be used by the driver. Values can be: - Direct value: "debug-mode" - Host env var: "env:HOST_VAR"
        - `InputSources` ModelsInputSource[] — InputSources is a list of remote artifacts to be downloaded before running the task and mounted into the task.
          - `Alias` string — Alias is an optional reference to this input source that can be used for dynamic linking to this input. (e.g. dynamic import in wasm by alias)
          - `Source` ModelsSpecConfig
            - `Params` object — Params is a map of the config params
            - `Type` string — Type of the config
          - `Target` string — Target is the path where the artifact should be mounted on
        - `Meta` object — Meta is used to associate arbitrary metadata with this task.
        - `Name` string — Name of the task
        - `Network` ModelsNetworkConfig
          - `Domains` string[]
          - `Ports` ModelsPort[]
            - `HostNetwork` string — HostNetwork specifies which network interface to bind to. If empty, defaults to "0.0.0.0" (all interfaces). Can be set to "127.0.0.1" to only allow local connections.
            - `Name` string — Name is a required identifier for this port mapping. It will be used to create environment variables to inform the task about its allocated ports.
            - `Static` integer — Static is the host port to use. If not specified, a port will be auto-allocated from the compute node's port range
            - `Target` integer — Target is the port inside the task/container that should be exposed. Only valid for Bridge network mode. If not specified in Bridge mode, it will default to the same value as the host port.
          - `Type` 0 | 1 | 2 | 3 | 4 | 5
        - `Publisher` ModelsSpecConfig
          - `Params` object — Params is a map of the config params
          - `Type` string — Type of the config
        - `Resources` ModelsResourcesConfig
          - `CPU` string — CPU https://github.com/BTBurke/k8sresource string
          - `Disk` string — Memory github.com/dustin/go-humanize string
          - `GPU` string
          - `Memory` string — Memory github.com/dustin/go-humanize string
        - `ResultPaths` ModelsResultPath[] — ResultPaths is a list of task volumes to be included in the task's published result
          - `Name` string — Name
          - `Path` string — The path to the file/dir
        - `Timeouts` ModelsTimeoutConfig
          - `ExecutionTimeout` integer — ExecutionTimeout is the maximum amount of time a task is allowed to run in seconds. Zero means no timeout, such as for a daemon task.
          - `QueueTimeout` integer — QueueTimeout is the maximum amount of time a task is allowed to wait in the orchestrator queue in seconds before being scheduled. Zero means no timeout.
          - `TotalTimeout` integer — TotalTimeout is the maximum amount of time a task is allowed to complete in seconds. This includes the time spent in the queue, the time spent executing and the time spent retrying. Zero means no timeout.
      - `Type` string — Type is the type of job this is, e.g. "daemon" or "batch".
      - `Version` integer — Version is a per-job monotonically increasing version number that is incremented on each job specification update.
    - `JobID` string — Job is the parent job of the task being allocated. This is copied at execution time to avoid issues if the job definition is updated.
    - `JobVersion` integer — JobVersion version of the job that this execution was created in
    - `ModifyTime` integer — ModifyTime is the time the execution was last updated.
    - `Name` string — Name is a logical name of the execution.
    - `Namespace` string — Namespace is the namespace the execution is created in
    - `NextExecution` string — NextExecution is the execution that this execution is being replaced by
    - `NodeID` string — NodeID is the node this is being placed on
    - `PartitionIndex` integer — PartitionIndex is the index of this execution in the job's total partitions (0-based) Only relevant when Job.Count > 1
    - `PreviousExecution` string — PreviousExecution is the execution that this execution is replacing
    - `PublishedResult` ModelsSpecConfig
      - `Params` object — Params is a map of the config params
      - `Type` string — Type of the config
    - `Revision` integer — Revision is increment each time the execution is updated.
    - `RunOutput` ModelsRunCommandResult
      - `ErrorMsg` string — Runner error
      - `ExitCode` integer — exit code of the run.
      - `StderrTruncated` boolean — bool describing if stderr was truncated
      - `Stdout` string — stdout of the run. Yaml provided for `describe` output
      - `StdoutTruncated` boolean — bool describing if stdout was truncated
      - `stderr` string — stderr of the run.
  - `NextToken` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.dev/bacalhau-project/apis/bacalhau-api.md) · [All operations](https://skmtc.dev/bacalhau-project/apis/bacalhau-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bacalhau-project/apis/bacalhau-api/revisions/9470ca2a198b?raw)
