Skip to main content
Question

Use FME Server REST API to query failed jobs in last n days/hours/minutes

  • October 14, 2020
  • 5 replies
  • 119 views

john_gis4
Contributor
Forum|alt.badge.img+13

Hi

I'm looking at ways to monitor FME Server using the REST API and would like to perhaps query for all failed jobs in the last n days/hours/minutes.

 

I can see it's possible with the V3 API to query for failed jobs - e.g.

 

https://myfmeserver/fmerest/v3/transformations/jobs/completed?completedState=failed

 

However, this will return all failed jobs. If we are monitoring for recent failures, we would want to query using dates or a timeframe. Is this currently possible?

 

Thanks

 

John

5 replies

Forum|alt.badge.img+2

Hi @john_gis4bus​ ,

 

It is not currently possible to query this endpoint by date. This is a great suggestion, our team is currently working on Rest API V4 so I have passed this request on to our product owner. I'd also recommend you create an idea to request this support.

 

For now, you'd need to perform a filter on the result using the timeFinished attribute.

 


virtualcitymatt
Celebrity
Forum|alt.badge.img+35

We've set up a daily schedule to migrate job history into a postgres table, a bit of duplication, however, when updating to a new version of FME Server it lets us keep all the history - Makes it easy to query the data with SQL. The FME Server database should also have this available to query directly.

If you wanted to do this web based via REST you could just create a workspace which queries the database and returns what you want between two given dates. Its a little more than a simple rest call, but it could be a way...


john_gis4
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • October 15, 2020
virtualcitymatt wrote:

We've set up a daily schedule to migrate job history into a postgres table, a bit of duplication, however, when updating to a new version of FME Server it lets us keep all the history - Makes it easy to query the data with SQL. The FME Server database should also have this available to query directly.

If you wanted to do this web based via REST you could just create a workspace which queries the database and returns what you want between two given dates. Its a little more than a simple rest call, but it could be a way...

Thanks @virtualcitymatt​ for those workarounds. Quering the FME Server DB directly could be the way forward I think.


john_gis4
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • October 15, 2020
hollyatsafe wrote:

Hi @john_gis4bus​ ,

 

It is not currently possible to query this endpoint by date. This is a great suggestion, our team is currently working on Rest API V4 so I have passed this request on to our product owner. I'd also recommend you create an idea to request this support.

 

For now, you'd need to perform a filter on the result using the timeFinished attribute.

 

Thanks for confirming @hollyatsafe​ - I will certainly create an idea for this support.


john_gis4
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • October 15, 2020

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings