Query most recent jobs only using REST API

69 views
Skip to first unread message

Martin Krämer

unread,
Jan 3, 2023, 6:43:29 AM1/3/23
to Orthanc Users
Hi everyone,

is there the possibility to query only the most recent jobs using the /jobs/ REST API endpoint? According to https://api.orthanc-server.com/#tag/Jobs/paths/~1jobs/get there is only the "expand" option available. 

If this is not yet possible then I would like to suggest this as a feature request. Another option "limit" to set the number of returned jobs and also an option to retrieve the most recently changed jobs first would be really helpful in order to build a web-interface that visualizes the jobs interface.

best wishes
Martin 

Alain Mazy

unread,
Jan 6, 2023, 6:30:07 AM1/6/23
to Martin Krämer, Orthanc Users
Hi Martin,

No, this is currently not possible but I do agree that it sounds useful !

I've added your feature suggestion in the Orthanc TODO.

Best regards,

Alain.


--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/820087be-8ba6-4203-a28c-566ede006f51n%40googlegroups.com.

Martin Krämer

unread,
Jan 7, 2023, 5:04:53 PM1/7/23
to Orthanc Users
Thank you!

One concrete use case for this would be to get a list of the queued and ongoing transfer jobs. Without options for filtering or at least limiting the number of jobs and ordering by most recent changes, I fear that on a server with high activity, hundreds of jobs would always be returned for each REST API Query, which might affect performance (of either Orthanc or a web-interface that queries this, or both) if there are too many jobs. 
Reply all
Reply to author
Forward
0 new messages