Basic Help with API
Posted: Wed Oct 17, 2018 11:36 am
I would like to try and submit a job to FFAStrans via the API, which is involving an extremely fast JSON learning curve
I'm initially trying to have a play with the 'Postman' chrome app to get an understanding with how things work.
I am executing a POST to the URL "http://<machine name>:65445/api/json/v1/jobs/"
With the body set to 'raw' JSON (application/json)
I discovered the wf_id by running:
http://<machine name>:65445/api/json/v1/workflows
I tried to include the start_proc variable by adding the id found using:
http://<machine name>:65445/api/json/v1/workflows/details/20181017110349
Which returned:
But as this was 'optional' I omitted it to reduce my error points.
I do get a 202 Accepted Status with the following response:
But the job doesn't execute. Am I doing something basic wrong?
Thanks
I'm initially trying to have a play with the 'Postman' chrome app to get an understanding with how things work.
I am executing a POST to the URL "http://<machine name>:65445/api/json/v1/jobs/"
With the body set to 'raw' JSON (application/json)
Code: Select all
{
"wf_id": "20181017110349",
"inputfile": "\\path\to\video.mov",
}
http://<machine name>:65445/api/json/v1/workflows
I tried to include the start_proc variable by adding the id found using:
http://<machine name>:65445/api/json/v1/workflows/details/20181017110349
Which returned:
Code: Select all
{
wf_id: 20181017110349,
general: {
checksum: "B53D35C2E7042346062C15F9736C",
description: "",
folder: "",
wf_name: "VNTG01",
wf_id: 20181017110349
},
variable: {
start_procs: [
"enc_av_customff 20181017-110518-816-4252d857c755"
],
wf_size: 279.302087449219
},
maintainance: { },
special: { },
enc_av_customff 20181017-110518-816-4252d857c755: {
properties: {
custom_node_name: "BOBBY-B",
enabled: true,
execute_on: 3800889,
outbounds: [
"dest_folder 20181017-110753-786-cb9dde5647e8"
],
proc_x: 50,
proc_y: 50,
template: "BoB Proxy"
}
},
dest_folder 20181017-110753-786-cb9dde5647e8: {
properties: {
case: "None",
drop_ext: false,
drop_name: false,
enabled: true,
execute_on: 3800889,
folder: "\\Path\To\out",
outbounds: [ ],
overwrite: false,
prefix: "",
proc_x: 468,
proc_y: 50,
suffix: "",
unique: false
}
}
}
I do get a 202 Accepted Status with the following response:
Code: Select all
{
"uri": "http://<machine name>:65445/api/json/v1/jobs/20181017-123448-564-397656EA23CA",
"job_id": "20181017-123448-564-397656EA23CA"
}
Thanks