Jobs
At the top-level of a job are a number of parameters that indicate things like the name and priority of the job.
Name | Type | Description |
---|---|---|
name | string | A name for the job. This will be displayed in the Job window. It does not have to be unique, but it helps to find jobs when they are given searchable names. |
payload | object | The job payload contains all of the structural information about the job. The payload consists of an elements array and a connections array. The elements array defines the various job tasks and the connections array defines how these elements are connected. |
schema | string | Optional. Hybrik will be supporting some third-party job schemas, which can be specified in this string. The default is "hybrik". |
priority | integer | Optional. The priority of a job (1 = lowest, 254 = highest) default: 100 range: 1 <= value <= 254 |
user_tag | string | Optional. The purpose of the user_tag is to provide a machine-trackable, user-specified, identifier. For a human readable identifier, please use the name field of a job. Hybrik will not verify the uniqueness of this identifier. length: 0..192 |
expiration | integer | Optional. Expiration (in minutes) of the job. A completed job will expire and be deleted after [expiration] minutes. Default is 30 days. default: 43200 range: value <= 259200 |
task_retry | object | Optional. Object defining the default task retry behavior of all tasks in this job. Task retry determines the maximum number of times to retry a task as well as the delay between each attempt. |
task_tags | array | Optional. This array contains the task_tags that all the tasks of this job will have. When a task goes to be executed, it will only be executed on machine nodes that have a matching task_tag. For example, if a task is tagged with the tag "high_performance" then it will only run on machines that are also tagged "high_performance" |
definitions | object | Optional. Global string replacements can be defined in this section. Anything in the Job JSON that is enclosed with double parentheses such as {{to_be_replaced}} will be replaced. |
Job Example
{
"name": "Hybrik API Example #1",
"priority": 100,
"payload": {
"elements": [
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "s3",
"url": "s3://hybrik-examples/public/sources/sample1.mp4"
}
}
},
{
"uid": "transcode_task",
"kind": "transcode",
"payload": {
"location": {
"storage_provider": "s3",
"path": "s3://hybrik-examples/public/output/transcode/example1"
},
"targets": [
{
"file_pattern": "{source_basename}.mp4",
"existing_files": "replace",
"container": {
"kind": "mp4"
},
"video": {
"codec": "h264",
"width": 640,
"height": 360,
"frame_rate": 23.976,
"bitrate_kb": 600
},
"audio": [
{
"codec": "heaac_v2",
"channels": 2,
"sample_rate": 44100,
"bitrate_kb": 128
}
]
}
]
}
}
],
"connections": [
{
"from": [
{
"element": "source_file"
}
],
"to": {
"success": [
{
"element": "transcode_task"
}
]
}
}
]
}
}