# Jobs

job related operations

## GET /v1/k8s/clusters/{uuid}/jobs

> List all Jobs in the cluster. Deprecated - please use api/v1/workloads instead

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Jobs","description":"job related operations"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"DisplayedJobs":{"type":"array","items":{"$ref":"#/components/schemas/DisplayedJob"}},"DisplayedJob":{"type":"object","properties":{"JobId":{"type":"string","format":"uuid","description":"Unique identifier of the job."},"podGroupId":{"type":"string","format":"uuid","description":"Unique identifier of the pod group."},"jobName":{"type":"string","description":"The name of the job."},"jobType":{"type":"string"},"clusterId":{"type":"string","description":"Unique identifier of the cluster."},"status":{"type":"string"},"imageName":{"type":"string","description":"The name of the image executed by the pod."},"user":{"type":"string","description":"The owner of the job."},"project":{"type":"string","description":"The project that the pod group belongs to."},"nodeId":{"type":"string","description":"Unique identifier of the node."},"creationTime":{"type":"string","description":"Creation time of the job."},"completionTime":{"type":"string","description":"Completion time of the job."},"totalRuntime":{"type":"string"},"totalWaitTime":{"type":"string"},"pending":{"type":"number"},"running":{"type":"number"},"parallelism":{"type":"number"},"completions":{"type":"number"},"failed":{"type":"number"},"succeeded":{"type":"number"},"currentAllocatedGPUs":{"type":"number"},"currentAllocatedGPUsMemory":{"type":"number"},"currentRequestedGPUs":{"type":"number"},"totalRequestedGPUs":{"type":"number"},"requestedGPUsPerPodGroup":{"type":"number"},"requestedGPUsMemoryPerPodGroup":{"type":"number"},"parentWorkloadName":{"type":"string"},"totalRequestedMemory":{"type":"number"},"totalRequestedCPU":{"type":"number"},"totalLimitCPU":{"type":"number"},"totalLimitMemory":{"type":"number"},"workloadKind":{"type":"number","description":"Specifies the kind of k8s resource that owns the pod group."},"latestPod":{"$ref":"#/components/schemas/Pod"},"cliCommand":{"type":"string"},"requestedMigDevices":{"type":"string","deprecated":true},"dynamicData":{"type":"object"},"existsInCluster":{"type":"boolean"},"isJupyter":{"type":"boolean","default":false,"description":"If true, it indicates that the pod group runs jupyter notebook."},"jobUrl":{"type":"string"},"nodePool":{"type":"string","description":"The node pool of the job."}}},"Pod":{"required":["podId","podName","jobId","clusterUuid","imageName","phase","created","completed","lastUpdated"],"properties":{"podId":{"type":"string","description":"Identifier of the pod running the job."},"jobId":{"type":"string","format":"uuid","description":"Unique identifier of the job."},"podGroupId":{"type":"string","description":"This had been used as jobId. Remained here for backward compatibility"},"clusterUuid":{"type":"string","format":"uuid","description":"Unique identifier of the cluster."},"podName":{"type":"string","description":"The name of the pod running the job."},"imageName":{"type":"string","description":"The name of the image executed by the pod."},"nodeId":{"type":"string","description":"Unique identifier of the node."},"phase":{"type":"string"},"status":{"type":"string"},"created":{"type":"integer","format":"int64","description":"Creation time of the pod."},"completed":{"type":"integer","format":"int64","description":"Completion time of the pod."},"started":{"type":"integer","format":"int64","description":"The time when the pod started executing."},"lastUpdated":{"type":"integer","format":"int64","description":"Last time the pod details were updated."},"dynamicData":{"type":"object"},"existsInCluster":{"type":"boolean"},"resourceRequest":{"type":"object","additionalProperties":{"type":"number"}},"resourceAllocation":{"type":"object","additionalProperties":{"type":"number"}},"nodePool":{"type":"string","description":"The node pool of the pod."},"namespace":{"type":"string","description":"The namespace of the pod."}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}},"Error1":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"serviceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"}}}}}},"paths":{"/v1/k8s/clusters/{uuid}/jobs":{"get":{"deprecated":true,"summary":"List all Jobs in the cluster. Deprecated - please use api/v1/workloads instead","parameters":[{"name":"nodeId","in":"query","required":false,"schema":{"type":"string"},"description":"Unique identifier of the node."},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"},"description":"Order of the results."},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["ASC","DESC"]}},{"name":"from","in":"query","required":false,"schema":{"type":"number"},"description":"Start the response from a given number of result. Used along with 'limit' to retrieve the results paginated."},{"name":"limit","in":"query","required":false,"schema":{"type":"number"},"description":"Limit the response to a given number of results."},{"name":"includeDeleted","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"True to include deleted jobs in the result."}],"operationId":"listJobs","tags":["Jobs"],"responses":{"200":{"description":"An array of Jobs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayedJobs"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## GET /v1/k8s/clusters/{uuid}/jobs/count

> Return the number all Jobs in the cluster. Deprecated - please use api/v1/workloads/count instead

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Jobs","description":"job related operations"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"}}}},"serviceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}},"Error1":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}},"paths":{"/v1/k8s/clusters/{uuid}/jobs/count":{"get":{"deprecated":true,"summary":"Return the number all Jobs in the cluster. Deprecated - please use api/v1/workloads/count instead","operationId":"getClusterJobsCount","tags":["Jobs"],"responses":{"200":{"description":"The job count","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## GET /v1/k8s/clusters/{uuid}/jobs/{jobId}/pods

> Get all pods that are associated for a specific job. Deprecated - please use api/v1/workloads/{workloadId}/pods instead

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Jobs","description":"job related operations"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Pods":{"type":"array","items":{"$ref":"#/components/schemas/Pod"}},"Pod":{"required":["podId","podName","jobId","clusterUuid","imageName","phase","created","completed","lastUpdated"],"properties":{"podId":{"type":"string","description":"Identifier of the pod running the job."},"jobId":{"type":"string","format":"uuid","description":"Unique identifier of the job."},"podGroupId":{"type":"string","description":"This had been used as jobId. Remained here for backward compatibility"},"clusterUuid":{"type":"string","format":"uuid","description":"Unique identifier of the cluster."},"podName":{"type":"string","description":"The name of the pod running the job."},"imageName":{"type":"string","description":"The name of the image executed by the pod."},"nodeId":{"type":"string","description":"Unique identifier of the node."},"phase":{"type":"string"},"status":{"type":"string"},"created":{"type":"integer","format":"int64","description":"Creation time of the pod."},"completed":{"type":"integer","format":"int64","description":"Completion time of the pod."},"started":{"type":"integer","format":"int64","description":"The time when the pod started executing."},"lastUpdated":{"type":"integer","format":"int64","description":"Last time the pod details were updated."},"dynamicData":{"type":"object"},"existsInCluster":{"type":"boolean"},"resourceRequest":{"type":"object","additionalProperties":{"type":"number"}},"resourceAllocation":{"type":"object","additionalProperties":{"type":"number"}},"nodePool":{"type":"string","description":"The node pool of the pod."},"namespace":{"type":"string","description":"The namespace of the pod."}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/clusters/{uuid}/jobs/{jobId}/pods":{"get":{"deprecated":true,"summary":"Get all pods that are associated for a specific job. Deprecated - please use api/v1/workloads/{workloadId}/pods instead","operationId":"getPodsByJobId","tags":["Jobs"],"responses":{"200":{"description":"Expected response to a valid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pods"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://run-ai-docs.nvidia.com/api/2.19/workloads/jobs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
