Query most recent jobs only using REST API

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

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.

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.