World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
---
paths:
/metalakes/{metalake}/jobs/templates:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
get:
tags:
- job
summary: List job templates (names)
operationId: listJobTemplates
description: Returns the list of job templates in the specified metalake
parameters:
- $ref: "#/components/parameters/details"
responses:
"200":
description: Returns the list of job template objects if {details} is true, otherwise returns the list of job template names
content:
application/vnd.gravitino.v1+json:
schema:
oneOf:
- $ref: "./openapi.yaml#/components/schemas/NameListResponse"
- $ref: "#/components/responses/JobTemplateListResponse"
examples:
NameListResponse:
$ref: "#/components/examples/NameListResponse"
JobTemplateListResponse:
$ref: "#/components/examples/JobTemplateListResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"404":
description: Not Found - The specified metalake does not exist
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
post:
tags:
- job
summary: Register a job template
operationId: registerJobTemplate
description: Registers a job template in the specified metalake
requestBody:
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "#/components/requests/JobTemplateRegisterRequest"
examples:
JobTemplateRegisterRequest:
$ref: "#/components/examples/JobTemplateRegisterRequest"
responses:
"200":
$ref: "./openapi.yaml#/components/responses/BaseResponse"
"409":
description: Conflict - The target job template already exists in the specified metalake
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
JobTemplateAlreadyExistsException:
$ref: "#/components/examples/JobTemplateAlreadyExistsException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/jobs/templates/{jobTemplate}:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
- $ref: "#/components/parameters/jobTemplate"
get:
tags:
- job
summary: Get job template
operationId: getJobTemplate
description: Returns the specified job template information in the specified metalake
responses:
"200":
description: Returns the job template object
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "#/components/responses/JobTemplateResponse"
examples:
JobTemplateResponse:
$ref: "#/components/examples/JobTemplateResponse"
"404":
description: Not Found - The specified job template does not exist in the specified metalake
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchJobTemplateException:
$ref: "#/components/examples/NoSuchJobTemplateException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
delete:
tags:
- job
summary: Delete job template
operationId: deleteJobTemplate
responses:
"200":
$ref: "./openapi.yaml#/components/responses/DropResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
put:
tags:
- job
summary: Update job template
operationId: updateJobTemplate
description: Updates a job template in the specified metalake
requestBody:
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "#/components/requests/JobTemplateUpdatesRequest"
examples:
JobTemplateRegisterRequest:
$ref: "#/components/examples/JobTemplateUpdatesRequest"
responses:
"200":
description: Returns the updated job template object
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "#/components/responses/JobTemplateResponse"
examples:
JobTemplateResponse:
$ref: "#/components/examples/JobTemplateResponse"
"404":
description: Not Found - The specified job template does not exist in the specified metalake
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchJobTemplateException:
$ref: "#/components/examples/NoSuchJobTemplateException"
"400":
description: Bad Request - The changes in the request cannot be applied to the job template
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
IllegalArgumentException:
$ref: "#/components/examples/IllegalArgumentException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/jobs/runs:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
get:
tags:
- job
summary: List jobs
operationId: listJobs
parameters:
- $ref: "#/components/parameters/jobTemplateName"
- $ref: "#/components/parameters/queuedAfter"
- $ref: "#/components/parameters/startedAfter"
- $ref: "#/components/parameters/finishedAfter"
- $ref: "#/components/parameters/sortBy"
- $ref: "#/components/parameters/sortOrder"
responses:
"200":
description: Returns the list of job objects
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "#/components/responses/JobListResponse"
examples:
JobListResponse:
$ref: "#/components/examples/JobListResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequestErrorResponse"
"404":
description: Not Found - The specified metalake does not exist
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
post:
tags:
- job
summary: run a job
operationId: runJob
description: Runs a job based on the specified job template in the specified metalake
requestBody:
content:
application/json:
schema:
$ref: "#/components/requests/JobRunRequest"
examples:
JobRunRequest:
$ref: "#/components/examples/JobRunRequest"
responses:
"200":
description: Returns the empty response with status code 0
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "#/components/responses/JobResponse"
"404":
description: Not Found - The specified job template does not exist in the specified metalake
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
JobTemplateAlreadyExistsException:
$ref: "#/components/examples/NoSuchJobTemplateException"
"400":
description: Bad Request - The job cannot be launched by the job executor, for example, a required job executor configuration is missing
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
JobRunIllegalArgumentException:
$ref: "#/components/examples/JobRunIllegalArgumentException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
/metalakes/{metalake}/jobs/runs/{jobId}:
parameters:
- $ref: "./openapi.yaml#/components/parameters/metalake"
- $ref: "#/components/parameters/jobId"
get:
tags:
- job
summary: Get job
operationId: getJob
description: Returns the specified job information in the specified metalake
parameters:
- $ref: "#/components/parameters/includeOutput"
- $ref: "#/components/parameters/outputMaxLines"
- $ref: "#/components/parameters/outputMaxBytes"
responses:
"200":
description: Returns the job object
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "#/components/responses/JobResponse"
examples:
JobResponse:
$ref: "#/components/examples/JobResponse"
"400":
description: Bad Request - A query parameter is malformed or invalid
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
JobQueryIllegalArgumentException:
$ref: "#/components/examples/JobQueryIllegalArgumentException"
"404":
description: Not Found - The specified job does not exist in the specified metalake
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchJobException:
$ref: "#/components/examples/NoSuchJobException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
post:
tags:
- job
summary: Cancel job
operationId: cancelJob
description: Cancels the specified job in the specified metalake
responses:
"200":
description: Returns the job object
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "#/components/responses/JobResponse"
examples:
JobResponse:
$ref: "#/components/examples/JobResponse"
"404":
description: Not Found - The specified job does not exist in the specified metalake
content:
application/vnd.gravitino.v1+json:
schema:
$ref: "./openapi.yaml#/components/schemas/ErrorModel"
examples:
NoSuchMetalakeException:
$ref: "./metalakes.yaml#/components/examples/NoSuchMetalakeException"
NoSuchJobException:
$ref: "#/components/examples/NoSuchJobException"
"5xx":
$ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
components:
parameters:
details:
name: details
in: query
description: Include detailed information about the job template
required: false
schema:
type: boolean
default: false
jobTemplate:
name: jobTemplate
in: path
description: The name of the job template
required: true
schema:
type: string
jobTemplateName:
name: jobTemplateName
in: query
description: list the jobs by the job template name
required: false
schema:
type: string
default: ""
includeOutput:
name: includeOutput
in: query
description: >
Whether to also fetch and include the job's captured stdout/stderr output. Output is
fetched live from the job executor on every request, so this should only be set to true
when the caller actually needs it - it is never included when this parameter is omitted.
With the local job executor and multiple Gravitino servers, gravitino.job.stagingDir must
be shared by all servers for any server to return the output; otherwise a server that
didn't run the job returns empty output.
required: false
schema:
type: boolean
default: false
outputMaxLines:
name: outputMaxLines
in: query
description: >
The maximum number of (most recent) output lines to return, when includeOutput is true.
Ignored otherwise. Can only narrow the globally configured gravitino.job.outputMaxLines
cap, never widen it - a value larger than the global cap is clamped down to it. Omit to
use the global default.
required: false
schema:
type: integer
minimum: 1
outputMaxBytes:
name: outputMaxBytes
in: query
description: >
The maximum number of (most recent) output bytes to return, when includeOutput is true.
Ignored otherwise. Can only narrow the globally configured gravitino.job.outputMaxBytes
cap, never widen it - a value larger than the global cap is clamped down to it. Omit to
use the global default.
required: false
schema:
type: integer
minimum: 1
jobId:
name: jobId
in: path
description: The unique identifier of the job
required: true
schema:
type: string
queuedAfter:
name: queuedAfter
in: query
description: >-
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
required: false
schema:
type: string
format: date-time
startedAfter:
name: startedAfter
in: query
description: >-
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
required: false
schema:
type: string
format: date-time
finishedAfter:
name: finishedAfter
in: query
description: >-
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
required: false
schema:
type: string
format: date-time
sortBy:
name: sortBy
in: query
description: >-
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
required: false
schema:
type: string
enum:
- queuedAt
- startedAt
- finishedAt
default: queuedAt
sortOrder:
name: sortOrder
in: query
description: >-
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
required: false
schema:
type: string
enum:
- asc
- desc
default: desc
schemas:
JobTemplate:
oneOf:
- $ref: "#/components/schemas/ShellJobTemplate"
- $ref: "#/components/schemas/SparkJobTemplate"
discriminator:
propertyName: jobType
mapping:
shell: "#/components/schemas/ShellJobTemplate"
spark: "#/components/schemas/SparkJobTemplate"
ShellJobTemplate:
type: object
description: A job template object for shell jobs
required:
- name
- jobType
- executable
properties:
name:
type: string
description: The name of the job template
jobType:
type: string
description: The type of the job template
enum:
- "shell"
comment:
type: string
description: A comment about the job template
nullable: true
executable:
type: string
description: The executable command of the job template
arguments:
type: array
description: The arguments of the job template
items:
type: string
nullable: true
environments:
type: object
description: Configured string to string map of environment variables for the job template
default: { }
additionalProperties:
type: string
customFields:
type: object
description: Configured string to string map of custom fields for the job template
default: { }
additionalProperties:
type: string
scripts:
type: array
description: The scripts of the job template
items:
type: string
nullable: true
audit:
$ref: "./openapi.yaml#/components/schemas/Audit"
SparkJobTemplate:
type: object
description: A job template object for Spark jobs
required:
- name
- jobType
- executable
properties:
name:
type: string
description: The name of the job template
jobType:
type: string
description: The type of the job template
enum:
- "spark"
comment:
type: string
description: A comment about the job template
nullable: true
executable:
type: string
description: The executable command of the job template
arguments:
type: array
description: The arguments of the job template
items:
type: string
nullable: true
environments:
type: object
description: Configured string to string map of environment variables for the job template
default: { }
additionalProperties:
type: string
customFields:
type: object
description: Configured string to string map of custom fields for the job template
default: { }
additionalProperties:
type: string
className:
type: string
description: The main class of the Spark job template. Required for Java/Scala Spark applications, optional for PySpark applications
nullable: true
jars:
type: array
description: The JAR files of the Spark job template
items:
type: string
nullable: true
files:
type: array
description: The files of the Spark job template
items:
type: string
nullable: true
archives:
type: array
description: The archives of the Spark job template
items:
type: string
nullable: true
configs:
type: object
description: Configured string to string map of Spark configurations for the job template
default: { }
additionalProperties:
type: string
audit:
$ref: "./openapi.yaml#/components/schemas/Audit"
Job:
type: object
description: A job object
required:
- jobId
- jobTemplateName
- status
- audit
- queuedAt
properties:
jobId:
type: string
description: The unique identifier of the job
jobTemplateName:
type: string
description: The name of the job template used to create the job
status:
type: string
description: The status of the job
enum:
- "queued"
- "started"
- "failed"
- "succeeded"
- "cancelling"
- "cancelled"
audit:
$ref: "./openapi.yaml#/components/schemas/Audit"
queuedAt:
type: string
format: date-time
description: The time when the job was queued for execution, same as the job's creation time
startedAt:
type: string
format: date-time
nullable: true
description: The time when the job started execution, or null if the job has not started execution yet. A finished job may also have no started time, if the job executor doesn't report when the job started and Gravitino didn't observe the job running
finishedAt:
type: string
format: date-time
nullable: true
description: The time when the job finished execution, or null if the job has not finished execution yet
runtimeJobTemplate:
description: The resolved job template that was actually submitted for execution, with placeholders replaced. Its executable, scripts, jars, files and archives are the URIs from the template, the job executor fetches them where it needs them. Null for jobs run before this field was introduced, or if the stored value could not be read back
type: object
nullable: true
allOf:
- $ref: "#/components/schemas/JobTemplate"
stdout:
type: array
nullable: true
items:
type: string
description: >
The captured standard output of the job, as a list of lines. Only populated when the
job was fetched with includeOutput=true; null otherwise.
stderr:
type: array
nullable: true
items:
type: string
description: >
The captured standard error output of the job, as a list of lines. Only populated when
the job was fetched with includeOutput=true; null otherwise.
TemplateUpdate:
oneOf:
- $ref: "#/components/schemas/ShellTemplateUpdate"
- $ref: "#/components/schemas/SparkTemplateUpdate"
discriminator:
propertyName: "@type"
mapping:
shell: "#/components/schemas/ShellTemplateUpdate"
spark: "#/components/schemas/SparkTemplateUpdate"
ShellTemplateUpdate:
type: object
description: A job template update object for shell jobs
required:
- "@type"
properties:
"@type":
type: string
description: The type of the job template
enum:
- "shell"
newExecutable:
type: string
description: The new executable command of the job template
nullable: true
newArguments:
type: array
description: The new arguments of the job template
items:
type: string
nullable: true
newEnvironments:
type: object
description: The new configured string to string map of environment variables for the job template
additionalProperties:
type: string
nullable: true
newCustomFields:
type: object
description: The new configured string to string map of custom fields for the job template
additionalProperties:
type: string
nullable: true
newScripts:
type: array
description: The new scripts of the job template
items:
type: string
nullable: true
SparkTemplateUpdate:
type: object
description: A job template update object for Spark jobs
required:
- "@type"
properties:
"@type":
type: string
description: The type of the job template
enum:
- "spark"
newExecutable:
type: string
description: The new executable command of the job template
nullable: true
newArguments:
type: array
description: The new arguments of the job template
items:
type: string
nullable: true
newEnvironments:
type: object
description: The new configured string to string map of environment variables for the job template
additionalProperties:
type: string
nullable: true
newCustomFields:
type: object
description: The new configured string to string map of custom fields for the job template
additionalProperties:
type: string
nullable: true
newClassName:
type: string
description: The new class name of the Spark job template. Required for Java/Scala Spark applications, optional for PySpark applications
nullable: true
newJars:
type: array
description: The new JAR files of the Spark job template
items:
type: string
nullable: true
newFiles:
type: array
description: The new files of the Spark job template
items:
type: string
nullable: true
newArchives:
type: array
description: The new archives of the Spark job template
items:
type: string
nullable: true
newConfigs:
type: object
description: The new configured string to string map of Spark configurations for the job template
additionalProperties:
type: string
nullable: true
requests:
JobTemplateRegisterRequest:
type: object
required:
- jobTemplate
properties:
jobTemplate:
$ref: "#/components/schemas/JobTemplate"
JobTemplateUpdatesRequest:
type: object
required:
- updates
properties:
updates:
type: array
items:
$ref: "#/components/requests/JobTemplateUpdateRequest"
JobTemplateUpdateRequest:
oneOf:
- $ref: "#/components/requests/RenameJobTemplateRequest"
- $ref: "#/components/requests/UpdateJobTemplateCommentRequest"
- $ref: "#/components/requests/UpdateJobTemplateContentRequest"
discriminator:
propertyName: "@type"
mapping:
rename: "#/components/requests/RenameJobTemplateRequest"
updateComment: "#/components/requests/UpdateJobTemplateCommentRequest"
updateTemplate: "#/components/requests/UpdateJobTemplateContentRequest"
RenameJobTemplateRequest:
type: object
required:
- "@type"
- newName
properties:
"@type":
type: string
enum:
- "rename"
newName:
type: string
description: The new name of the job template
UpdateJobTemplateCommentRequest:
type: object
required:
- "@type"
- newComment
properties:
"@type":
type: string
enum:
- "updateComment"
newComment:
type: string
description: The new comment of the job template
UpdateJobTemplateContentRequest:
type: object
required:
- "@type"
- newTemplate
properties:
"@type":
type: string
enum:
- "updateTemplate"
newTemplate:
$ref: "#/components/schemas/TemplateUpdate"
JobRunRequest:
type: object
required:
- jobTemplateName
properties:
jobTemplateName:
type: string
description: The name of the job template to run
jobConf:
type: object
description: The job configuration for the job run
default: { }
additionalProperties:
type: string
responses:
JobTemplateListResponse:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
jobTemplates:
type: array
description: A list of job template objects
items:
$ref: "#/components/schemas/JobTemplate"
JobTemplateResponse:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
jobTemplate:
$ref: "#/components/schemas/JobTemplate"
JobListResponse:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
jobs:
type: array
description: A list of job objects
items:
$ref: "#/components/schemas/Job"
statusCounts:
type: object
description: >-
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.
additionalProperties:
type: integer
format: int64
JobResponse:
type: object
properties:
code:
type: integer
format: int32
description: Status code of the response
enum:
- 0
job:
$ref: "#/components/schemas/Job"
examples:
NameListResponse:
value: {
"code": 0,
"names": ["my_template1", "my_template2"]
}
JobTemplateListResponse:
value: {
"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": "https://repo.example.com/jobs/test-job.sh",
"jobType": "shell",
"name": "test_run_get",
"scripts": [
"https://repo.example.com/jobs/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": "https://repo.example.com/jobs/spark-demo.jar",
"jobType": "spark",
"name": "test_run_get_spark",
"className": "org.apache.spark.examples.SparkPi",
"jars": [
"https://repo.example.com/jobs/spark-job.jar"
]
}
]
}
JobTemplateRegisterRequest:
value: {
"jobTemplate": {
"name": "test_run_get",
"jobType": "shell",
"comment": "Test shell job template",
"executable": "https://repo.example.com/jobs/test-job.sh",
"arguments": ["{{arg1}}", "{{arg2}}"],
"environments": {
"ENV_VAR": "{{env_var}}"
},
"customFields": { },
"scripts": [
"https://repo.example.com/jobs/common.sh"
]
}
}
JobTemplateUpdatesRequest:
value: {
"updates": [
{
"@type": "rename",
"newName": "new_test_run_get"
},
{
"@type": "updateComment",
"newComment": "Updated comment for the job template"
},
{
"@type": "updateTemplate",
"newTemplate": {
"@type": "shell",
"newExecutable": "https://repo.example.com/jobs/updated-test-job.sh",
"newArguments": ["{{new_arg1}}", "{{new_arg2}}"],
"newEnvironments": {
"NEW_ENV_VAR": "{{new_env_var}}"
},
"newCustomFields": {
"field1": "value1"
},
"newScripts": [
"https://repo.example.com/jobs/updated-common.sh"
]
}
}
]
}
JobRunRequest:
value: {
"jobTemplateName": "test_run_get",
"jobConf": {
"arg1": "value1",
"arg2": "value2"
}
}
JobTemplateResponse:
value: {
"code": 0,
"jobTemplate": {
"name": "test_run_get",
"jobType": "shell",
"comment": "Test shell job template",
"executable": "https://repo.example.com/jobs/test-job.sh",
"arguments": ["{{arg1}}", "{{arg2}}"],
"environments": {
"ENV_VAR": "{{env_var}}"
},
"customFields": { },
"scripts": [
"https://repo.example.com/jobs/common.sh"
],
"audit": {
"createTime": "2025-08-12T02:14:28.205023Z",
"creator": "anonymous"
}
}
}
JobListResponse:
value: {
"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": "https://repo.example.com/jobs/test-job.sh",
"arguments": ["value1", "value2"],
"environments": { },
"customFields": { },
"scripts": [
"https://repo.example.com/jobs/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
}
}
JobResponse:
value: {
"code": 0,
"job": {
"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": "https://repo.example.com/jobs/test-job.sh",
"arguments": ["value1", "value2"],
"environments": { },
"customFields": { },
"scripts": [
"https://repo.example.com/jobs/common.sh"
],
"audit": {
"createTime": "2025-08-12T02:00:00.000000Z",
"creator": "anonymous"
}
}
}
}
JobTemplateAlreadyExistsException:
value: {
"code": 1004,
"type": "JobTemplateAlreadyExistsException",
"message": "Failed to operate job template(s) [my_job] operation [REGISTER], reason [JobTemplateAlreadyExistsException]",
"stack": [
"org.apache.gravitino.exceptions.JobTemplateAlreadyExistsException: job template xxx already exists",
"..."
]
}
NoSuchJobTemplateException:
value: {
"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",
"..."
]
}
NoSuchJobException:
value: {
"code": 1003,
"type": "NoSuchJobException",
"message": "Failed to operate job(s) [my_job] operation [GET] under metalake [my_test_metalake], reason [NoSuchJobException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchJobException: Job xxx does not exist",
"..."
]
}
IllegalArgumentException:
value: {
"code": 1001,
"type": "IllegalArgumentException",
"message": "Failed to operate job template(s) [my_job] operation [UPDATE], reason [IllegalArgumentException]",
"stack": [
"java.lang.IllegalArgumentException: Invalid argument xxx",
"..."
]
}
JobQueryIllegalArgumentException:
value: {
"code": 1001,
"type": "IllegalArgumentException",
"message": "Invalid value for QueryParam parameter 'outputMaxLines': For input string: \"abc\""
}
JobRunIllegalArgumentException:
value: {
"code": 1001,
"type": "IllegalArgumentException",
"message": "Failed to operate job(s) operation [RUN] under object [my_test_metalake], reason [gravitino.jobExecutor.local.sparkHome or SPARK_HOME environment variable must be set for Spark jobs]",
"stack": [
"java.lang.IllegalArgumentException: gravitino.jobExecutor.local.sparkHome or SPARK_HOME environment variable must be set for Spark jobs",
"..."
]
}