Create Job
Create Job
Create a new job.
HTTP Request
POST /jobs
Required Parameters
Name | Type | Description |
---|---|---|
name | string | The visible name of a jobs |
payload | string | Depending on the schema, this must be a JSON object (schema = 'hybrik') or a serialized XML document (schema = 'rhozet') Length: 0..128000 |
schema | string | Select the api schema compatibility of the job payload. Defaults to "hybrik" if not specified. one of: "hybrik" or "rhozet" or "api_test" |
Optional Parameters
Name | Type | Description |
---|---|---|
expiration | integer | 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 |
priority | integer | priority (1: lowest, 254: highest) of a job default: 100 Range: 1 <= value <= 254 |
task_retry:count | integer | The number of times to attempt to retry the task if there is a failure. default: 0 |
task_retry:delay_sec | integer | The number of seconds to wait before a retry attempt. default: 45 |
task_tags | array | The tags all the tasks of this job will have. Note that a render node needs to provide these tags for a task to be executed on that node. |
user_tag | nullable string | An optional, free-form, persistent identifier for this job. Intent is to provide a container for a machine trackable, user specified, identifier. For human readable identifiers, please use the name field of a job. Hybrik will not verify this identifier for uniqueness. Length: 0..192 |
Create Job Example
- curl
- JavaScript
- Response
$ curl -u OAPI_KEY:OAPI_SECRET -X POST https://api-demo.hybrik.com/v1/jobs \
-d '{
"name": "Fifth Element, Web Streaming",
"user_tag": "myjob_012345",
"schema": "hybrik",
"payload": "<job JSON goes here>",
"priority": 100,
"task_tags": [
"high_performance",
"us-west-1"
]
}' \
-H "Content-Type: application/json" \
-H "X-Hybrik-Sapiauth: api_auth_token" \
-H "X-Hybrik-Compliance: 20220423"
//Submit a job
hybrik_api.call_api('POST', '/jobs', null, {
name: "My job",
priority: 100,
task_tags: ["high_performance", "us-west-1"],
payload: {
// this is the job JSON
}
})
{
"id": "12345"
}