Skip to main content
Released

FME Server REST Api call to retrieve jobs by workbench

Related products:FME Flow
  • October 12, 2016
  • 3 replies
  • 106 views

nrich_defra
Contributor
Forum|alt.badge.img+6

Hi,

I quite often want to know how well my workbenches are running and check the status of the last few jobs. The sort of summary stats i pull out are, avg runtime, max runtime, avg feature count, max feature count, it'd be also nice to plot specific jobs on a graph for these types of stats.

Historically i have always accessed this data through a database connection to the repository fme_job_history table (and it's predecessor), however i'd like to move to using REST if possible.

To do that efficiently though i need a new end point which is something like:

GET transformations<repository><workbench>jobs

This would return a list of all jobs running, queued, and finished etc, relating to that workbench.

ideally i'd also like to be able to pass a query parameter to filter the response, maybe start_date=<ISOdatetime> and end_date=<ISOdatetime>

Surely i can't be the only person doing this?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

laurawatsafe
Safer
Forum|alt.badge.img+13

Thanks for posting this idea! I agree, I think it would be a very useful enhancement for the FME Server REST API.

I had a similar requirement recently where I needed to find a list of all jobs run on FME Server that finished within a particular timeframe, so adding support to query parameters to search based on the time finished, time started, workspace name, repository, and so on would definitely be a big help.

In case it helps, I was able to build a workspace that uses the REST API to get a list of jobs and filter those based on the workspace name. It could be a bit on the slow side if you have a lot of jobs in your job history as it uses the REST API to read every single job in the history and filters them out based on the workspace name. Here's that workspace:

 

getjobsbyworkspacename.fmw

david_r
Celebrity
  • October 13, 2016
Agree, I think this is idea makes a lot of sense

 


rylanatsafe
Safer
Forum|alt.badge.img+14
  • Safer
  • November 8, 2019

This is now possible using the query string parameters repository=<RESPOSITORY_NAME> and workspace=<WORKSPACE_NAME.FMW>. Users can also apply these as Filters for Jobs > Completed and Queued pages in the Web Interface.

This was implemented in FME Server 2019.0! I'm sorry for the tardy update to this idea.

Please see the examples below:

Completed Jobs

http://<HOSTNAME>/fmerest/v3/transformations/jobs/completed?limit=-1&offset=-1&repository=<REPOSITORY_NAME>&workspace=<WORKSPACE_NAME.FMW>

 

Running Jobs

http://<HOSTNAME>/fmerest/v3/transformations/jobs/running?limit=-1&offset=-1&repository=<REPOSITORY_NAME>&workspace=<WORKSPACE_NAME.FMW>

 

Queued Jobs

http://<HOSTNAME>/fmerest/v3/transformations/jobs/queued?limit=-1&offset=-1&repository=<REPOSITORY_NAME>&workspace=<WORKSPACE_NAME.FMW>

Note: We have not yet implemented sorting or filtering by date range with the FME Server REST API. If you would like to see that feature implemented, please create a new idea.