Create job
POST {{base_url}}/org/:org_id/runner/job/create
Job variables
Jobs does not have to be hardcoded. Jobs can accept variables.
Definition of variable can be set in body.options. Each variable has to be json with the folllowing structure
| Key | Type | Required? | Description |
|---|---|---|---|
| name | string | yes | name of the variable |
| required | boolean | yes | whether you want to enforce if the variable should be present when calling the job |
| value | string | yes if required field above is set to true | Default value of the variable if you dont pass the variable at the time of job run |
Request Body
{"name"=>"Append transactions - all together2", "description"=>"Append transactions to the respective budget sheet", "type"=>"maker", "group"=>"Maker/Cashflow report", "executionEnabled"=>true, "scheduleEnabled"=>true, "options"=>[{"name"=>"ENCRYPTION_PASSWORD", "secure"=>true, "storagePath"=>"keys/ENCRYPTION_PASSWORD", "valueExposed"=>true}, {"name"=>"type1", "required"=>true, "value"=>"R&D"}, {"name"=>"sheet_id", "required"=>true, "value"=>"1amSMeyYWtQL_QQwjoXiKqTtQDwRSkw04KGkYipNPF8E"}, {"name"=>"type2", "required"=>true, "value"=>"BMS"}], "schedule"=>{"month"=>"*", "hour"=>"*", "minute"=>"0/25", "seconds"=>"0", "day_of_week"=>"*", "year"=>"*"}, "sequence"=>{"commands"=>[{"script"=>"node run_something.js"}]}}
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
api-key | string | ||
api-secret | string | ||
Content-Type | string | To specify that body of the request contains config in yaml format. |
RESPONSES
status: OK
{"createdAt":"2023-01-15T13:50:12.746Z","updatedAt":"2023-01-15T13:50:12.746Z","id":23,"rd_id":"9bcdc8da-8fb0-4850-ab3f-87865f583e17","is_execution_enabled":true,"is_schedule_enabled":true,"name":"Append transactions - all together2","description":"Append transactions to the respective budget sheet","group":"Maker/Cashflow report","project":"ExponentEnergy","type":"maker","command":"node run_something.js","schedule":{"month":"*","hour":"*","minute":"0/25","seconds":"0","day_of_week":"*","year":"*"},"time_zone":"GMT+5:30","rd_job_definition":"- defaultTab: nodes\n description: Append transactions to the respective budget sheet\n executionEnabled: true\n group: Maker/Cashflow report\n loglevel: INFO\n name: Append transactions - all together2\n nodeFilterEditable: false\n nodefilters:\n dispatch:\n excludePrecedence: true\n keepgoing: false\n rankOrder: ascending\n successOnEmptyNodeFilter: false\n threadcount: '1'\n filter: aws.*\n nodesSelectedByDefault: 'true'\n options:\n - name: ENCRYPTION_PASSWORD\n secure: true\n storagePath: keys/ENCRYPTION_PASSWORD\n valueExposed: true\n - name: type1\n required: true\n value: R\u0026D\n - name: sheet_id\n required: true\n value: 1amSMeyYWtQL_QQwjoXiKqTtQDwRSkw04KGkYipNPF8E\n - name: type2\n required: true\n value: BMS\n plugins:\n ExecutionLifecycle: null\n rd_id: 9bcdc8da-8fb0-4850-ab3f-87865f583e17\n schedule:\n month: '*'\n time:\n hour: '*'\n minute: 0/25\n seconds: '0'\n weekday:\n day: '*'\n year: '*'\n scheduleEnabled: true\n sequence:\n commands:\n - script: node run_something.js\n type: maker\n","org":25}