API Endpoint for Job "status", running or not.

Use this forum to request features. Maybe you'll get lucky!
Post Reply
gdpodesta
Posts: 48
Joined: Tue Mar 26, 2019 6:11 pm

API Endpoint for Job "status", running or not.

Post by gdpodesta »

If I have a valid Job ID, I would like to be able to see the current state that it is in, regardless of whether it's queued, running, or finished.

As it is now (and to the best of my knowledge), I need to check if its Running or not, then if it's Queued or not, and finally if there's History for it.
A simple endpoint that returned a general snapshot of where it is in the grand scheme of things and any other general information would be very helpful.
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: API Endpoint for Job "status", running or not.

Post by admin »

Thanks for the request! :-)

It has much potential for evolving into a more sophisticated API. The version 2 you're using now is actually a middle stop. With next version 3 and the help from @emcodem (which is better at writing API stuff than I am), we will hopefully have something that's more complete. But it takes a while to get there so in the mean time we will look into a simple method in version 2 for getting current state in one call.

-steinar
gdpodesta
Posts: 48
Joined: Tue Mar 26, 2019 6:11 pm

Re: API Endpoint for Job "status", running or not.

Post by gdpodesta »

I understand completely, that's the story of my life with API development.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: API Endpoint for Job "status", running or not.

Post by emcodem »

Hey,
nice feature request and totally agreed.
But to be honest i would not count on this feature to be available for the public very soon :-(
emcodem, wrapping since 2009 you got the rhyme?
gdpodesta
Posts: 48
Joined: Tue Mar 26, 2019 6:11 pm

Re: API Endpoint for Job "status", running or not.

Post by gdpodesta »

I understand completely. If I were designing it, I'd include pretty much what is in the General and Nodes section of the Job Details link from the Web interface, with the addition of Node Type, Finish Time, and Outcome. If the Job Created, Job Started, and Job Finish times were all there, one could know where in the flow things are, based on whether they were set with a time or not
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: API Endpoint for Job "status", running or not.

Post by emcodem »

Good thinking, that is in fact what i already did... but currently only jobs that were already started will be considered.
The reason is the ffastrans "database" file structure, you should be able to learn more about it in the new wiki http://ffastrans.com/wiki/doku.php?id=system:processes
In fact the work on the Api V3 already started and it is shipped as part of the webinterface. When it is done, it will be splitted off into a separate windows service.
You can check out the current state of the new API on a PC running the webinterface, using http://127.0.0.1:3003/docs but be aware that all the stuff could change frequently as it is not yet released for public use. When i change it, i also change the corresponding parts of the webinterface and do not look into backward compatibility - until it is released and part of the shipment of ffastrans base files...
By the way, before i focus on finishing the replacement for the old api, there are 2 things of higher priority:
-) web interface is not yet as i wish it to be
-) the new feature "custom processors" needs to be tested, used and 100% reliable (do you like to help here? ...even if the documentation is not yet finished, but check out http://ffastrans.com/wiki/doku.php?id=c ... processors )

Looking forward for more interesting stuff from you!
emcodem, wrapping since 2009 you got the rhyme?
gdpodesta
Posts: 48
Joined: Tue Mar 26, 2019 6:11 pm

Re: API Endpoint for Job "status", running or not.

Post by gdpodesta »

Would very much like to help on the custom processors - not sure what I'd like to do with such a thing, (access Amazon S3, response do a 3rd party API call?) I have a couple of suggestions for the web interface as well (or perhaps clarification) ;
I'm not sure what dictates a row in the "Completed" table. I get a "Parent" row that expands to 2 others. All 3 have the same information (aside from time). I can't tell if the Parent IS a parent, and the two below are nodes/processes, or if each is a node/process, and the first one happens to be collapsible. My only suggestion/request IS to have a Parent, showing summary info, and expandable to show each node/process that is in the works or has completed. Knowing when the entire workflow has finished is vital to my application.
Post Reply