List jobs
GET/metalakes/:metalake/jobs/runs
Returns the jobs in the metalake that the caller is allowed to see, with a count of the returned jobs by status. Query parameters narrow the jobs by template and by queue, start or finish time, and set the sort order.
Sign in with a bearer token or a local user's password; see Authentication.
Request
Path Parameters
The name of the metalake
Query Parameters
The name of a job template. Only jobs run from this template are returned.
Only return jobs queued at or after this ISO-8601 instant (e.g. 2026-08-18T00:00:00Z). A job must satisfy all supplied time filters (AND semantics), so this combines with one or more of startedAfter and finishedAfter
Only return jobs started at or after this ISO-8601 instant (e.g. 2026-08-18T00:00:00Z). Jobs that have not started yet are excluded. A job must satisfy all supplied time filters (AND semantics), so this combines with one or more of queuedAfter and finishedAfter
Only return jobs finished at or after this ISO-8601 instant (e.g. 2026-08-18T00:00:00Z). Jobs that have not finished yet are excluded. A job must satisfy all supplied time filters (AND semantics), so this combines with one or more of queuedAfter and startedAfter
Possible values: [queuedAt, startedAt, finishedAt]
Default value: queuedAt
The field to sort the returned jobs by. Jobs with no value for the selected field (e.g. jobs that have not started or finished yet) always sort last, for both the "asc" and "desc" sort orders
Possible values: [asc, desc]
Default value: desc
The sort order for the returned jobs. It only orders the jobs that have a value for the selected sortBy field; jobs missing that value always sort last in both "asc" and "desc" order
Responses
- 200
- 400
- 404
- 5xx
The jobs in the metalake that the caller can see, with a count of the returned jobs by status.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- JobListResponse
Schema
Array [
- ShellJobTemplate
- SparkJobTemplate
]
Possible values: [0]
Status code of the response
jobs
object[]
A list of job objects
The unique identifier of the job
The name of the job template used to create the job
Possible values: [queued, started, failed, succeeded, cancelling, cancelled]
The status of the job
audit
object
required
Audit information for a Gravitino resource.
The user who created the resource
The time the resource was created
The user who last modified the resource
The time the resource was last modified
The time when the job was queued for execution, same as the job's creation time
The time when the job started execution, or null if the job has not started execution yet
The time when the job finished execution, or null if the job has not finished execution yet
runtimeJobTemplate
object
nullable
oneOf
A job template object for shell jobs
The name of the job template
Possible values: [shell]
The type of the job template
A comment about the job template
The executable command of the job template
The arguments of the job template
environments
object
Configured string to string map of environment variables for the job template
customFields
object
Configured string to string map of custom fields for the job template
The scripts of the job template
audit
object
Audit information for a Gravitino resource.
The user who created the resource
The time the resource was created
The user who last modified the resource
The time the resource was last modified
A job template object for Spark jobs
The name of the job template
Possible values: [spark]
The type of the job template
A comment about the job template
The executable command of the job template
The arguments of the job template
environments
object
Configured string to string map of environment variables for the job template
customFields
object
Configured string to string map of custom fields for the job template
The main class of the Spark job template. Required for Java/Scala Spark applications, optional for PySpark applications
The JAR files of the Spark job template
The files of the Spark job template
The archives of the Spark job template
configs
object
Configured string to string map of Spark configurations for the job template
audit
object
Audit information for a Gravitino resource.
The user who created the resource
The time the resource was created
The user who last modified the resource
The time the resource was last modified
statusCounts
object
The number of jobs in "jobs", keyed by lower-case status name. Every status is present, even at zero. Counted after queuedAfter/startedAfter/finishedAfter filtering, so a time filter can make some statuses structurally zero - e.g. startedAfter always yields queued: 0, since a queued job has no startedAt yet.
{
"code": 0,
"jobs": [
{
"jobId": "string",
"jobTemplateName": "string",
"status": "queued",
"audit": {
"creator": "string",
"createTime": "2024-07-29T15:51:28.071Z",
"lastModifier": "string",
"lastModifiedTime": "2024-07-29T15:51:28.071Z"
},
"queuedAt": "2024-07-29T15:51:28.071Z",
"startedAt": "2024-07-29T15:51:28.071Z",
"finishedAt": "2024-07-29T15:51:28.071Z",
"runtimeJobTemplate": {
"name": "string",
"jobType": "shell",
"comment": "string",
"executable": "string",
"arguments": [
"string"
],
"environments": {},
"customFields": {},
"scripts": [
"string"
],
"audit": {
"creator": "string",
"createTime": "2024-07-29T15:51:28.071Z",
"lastModifier": "string",
"lastModifiedTime": "2024-07-29T15:51:28.071Z"
}
}
}
],
"statusCounts": {}
}
{
"code": 0,
"jobs": [
{
"jobId": "job-12345",
"jobTemplateName": "test_run_get",
"status": "succeeded",
"audit": {
"createTime": "2025-08-12T02:14:28.205023Z",
"creator": "anonymous"
},
"queuedAt": "2025-08-12T02:14:28.205023Z",
"startedAt": "2025-08-12T02:14:31.098231Z",
"finishedAt": "2025-08-12T02:15:03.512847Z",
"runtimeJobTemplate": {
"name": "test_run_get",
"jobType": "shell",
"comment": "Test shell job template",
"executable": "/tmp/gravitino-job-staging/job-12345/test-job.sh",
"arguments": [
"value1",
"value2"
],
"environments": {},
"customFields": {},
"scripts": [
"/tmp/gravitino-job-staging/job-12345/common.sh"
],
"audit": {
"createTime": "2025-08-12T02:00:00.000000Z",
"creator": "anonymous"
}
}
},
{
"jobId": "job-67890",
"jobTemplateName": "test_run_get_spark",
"status": "failed",
"audit": {
"createTime": "2025-08-12T02:14:28.205023Z",
"creator": "anonymous"
},
"queuedAt": "2025-08-12T02:14:28.205023Z",
"startedAt": "2025-08-12T02:14:35.442190Z",
"finishedAt": "2025-08-12T02:15:47.891023Z"
}
],
"statusCounts": {
"queued": 0,
"started": 0,
"failed": 1,
"succeeded": 1,
"cancelling": 0,
"cancelled": 0
}
}
The request is malformed or fails validation, for example because of invalid JSON, a missing required field or an invalid parameter value. The body is normally an error model, although the server's middleware can return plain text instead.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "BadRequestException",
"message": "Malformed request"
}
The metalake does not exist.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NoSuchMetalakeException
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "NoSuchMetalakeException",
"message": "Failed to operate metalake(s) [test] operation [LOAD], reason [NoSuchMetalakeException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchMetalakeException: Metalake test does not exist",
"..."
]
}
The server hit an internal error that the client usually cannot fix by changing the request.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1002,
"type": "RuntimeException",
"message": "Internal Server Error",
"stack": [
"java.lang.RuntimeException: Internal Server Error"
]
}