Get job template
GET/metalakes/:metalake/jobs/templates/:jobTemplate
Returns the specified job template information in the specified metalake
Request
Path Parameters
The name of the metalake
The name of the job template
Responses
- 200
- 404
- 5xx
Returns the job template object
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- JobTemplateResponse
Schema
- ShellJobTemplate
- SparkJobTemplate
Possible values: [0
]
Status code of the response
jobTemplate
object
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,
"jobTemplate": {}
}
{
"code": 0,
"jobTemplate": {
"name": "test_run_get",
"jobType": "shell",
"comment": "Test shell job template",
"executable": "/var/folders/90/v1d9hxsd6pj8m0jnn6f22tkr0000gn/T/tmpy65fiugc/test-job.sh",
"arguments": [
"{{arg1}}",
"{{arg2}}"
],
"environments": {
"ENV_VAR": "{{env_var}}"
},
"customFields": {},
"scripts": [
"/var/folders/90/v1d9hxsd6pj8m0jnn6f22tkr0000gn/T/tmpy65fiugc/common.sh"
],
"audit": {
"createTime": "2025-08-12T02:14:28.205023Z",
"creator": "anonymous"
}
}
}
Not Found - The specified job template does not exist in the specified metalake
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NoSuchMetalakeException
- NoSuchJobTemplateException
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",
"..."
]
}
{
"code": 1003,
"type": "NoSuchJobTemplateException",
"message": "Failed to operate job template(s) [my_job] operation [GET] under metalake [my_test_metalake], reason [NoSuchJobTemplateException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchJobTemplateException: Job template xxx 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"
]
}