List job templates (names)
GET/metalakes/:metalake/jobs/templates
Returns the list of job templates in the specified metalake
Request
Path Parameters
The name of the metalake
Query Parameters
Include detailed information about the job template
Responses
- 200
- 400
- 404
- 5xx
Returns the list of job template objects if {details} is true, otherwise returns the list of job template names
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NameListResponse
- JobTemplateListResponse
Schema
- NameListResponse
- JobTemplateListResponse
Array [
- ShellJobTemplate
- SparkJobTemplate
]
oneOf
Possible values: [0
]
Status code of the response
Possible values: [0
]
Status code of the response
jobTemplates
object[]
A list of job template objects
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
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
{}
{
"code": 0,
"names": [
"my_template1",
"my_template2"
]
}
{
"code": 0,
"jobTemplates": [
{
"arguments": [
"{{arg1}}",
"{{arg2}}"
],
"audit": {
"createTime": "2025-08-12T02:14:28.205023Z",
"creator": "anonymous"
},
"comment": "Test shell job template",
"customFields": {},
"environments": {
"ENV_VAR": "{{env_var}}"
},
"executable": "/var/folders/90/v1d9hxsd6pj8m0jnn6f22tkr0000gn/T/tmpy65fiugc/test-job.sh",
"jobType": "shell",
"name": "test_run_get",
"scripts": [
"/var/folders/90/v1d9hxsd6pj8m0jnn6f22tkr0000gn/T/tmpy65fiugc/common.sh"
]
},
{
"arguments": [
"--arg1",
"{{arg2}}"
],
"audit": {
"createTime": "2025-08-12T02:14:28.205023Z",
"creator": "anonymous"
},
"comment": "Test spark job template",
"customFields": {},
"environments": {
"ENV_VAR": "{{env_var}}"
},
"executable": "/var/folders/90/v1d9hxsd6pj8m0jnn6f22tkr0000gn/T/tmpy65fiugc/spark-demo.jar",
"jobType": "spark",
"name": "test_run_get_spark",
"mainClass": "org.apache.spark.examples.SparkPi",
"jars": [
"/var/folders/90/v1d9hxsd6pj8m0jnn6f22tkr0000gn/T/tmpy65fiugc/spark-job.jar"
]
}
]
}
Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware.
- 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
{
"code": 1002,
"type": "string",
"message": "string",
"stack": [
"string"
]
}
{
"code": 1003,
"type": "BadRequestException",
"message": "Malformed request"
}
Not Found - The specified 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
{
"code": 1002,
"type": "string",
"message": "string",
"stack": [
"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",
"..."
]
}
A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes.
- 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
{
"code": 1002,
"type": "string",
"message": "string",
"stack": [
"string"
]
}
{
"code": 1002,
"type": "RuntimeException",
"message": "Internal Server Error",
"stack": [
"java.lang.RuntimeException: Internal Server Error"
]
}