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
  • 145 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

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.

5 replies

Forum|alt.badge.img+2
  • 719 replies
  • October 14, 2020

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+47
  • Celebrity
  • 2000 replies
  • October 14, 2020

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
  • 26 replies
  • October 15, 2020

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
  • 26 replies
  • October 15, 2020

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
  • 26 replies
  • October 15, 2020