Backup job list with most recent status
-
I am trying to use the API to produce a list of backup jobs and their most recent status (success/fail/warn/etc).
====================
So far, I am going to this API node
https://xo.fqdn/rest/v0/backup/jobs/vmThen following all those references to find the name of each job
https://xo.fqdn/rest/v0/backup/jobs/vm/510be304-3777-4765-825d-5f1d78e98bb0Then getting the backup job logs
https://xo.fqdn/rest/v0/backups/logsThen following all those references to find the logs where the id matches the list of jobs I know about
https://xo.fqdn/rest/v0/backup/logs/1717495512575And from that output pulling the status value and compiling it all together
====================
What I really need is something like the output of this query
https://xo.fqdn/rest/v0/backup/logs?fields=id,status,jobName&limit=11But the problem with this query is that I have to limit the result to the number of jobs and it only works if each job runs once a day etc etc. Right now, I have 11 jobs and they all only run once a day, so I believe that the query will work for me (assuming the most recent log entries are at the start of the list)... but as soon as I add or remove a job, or a job runs more than once a day, it breaks.
@julien-f Is there a more elegant method to retrieve ALL backup jobs and their last 'status' value? I'd like to do this in a single, fast, efficient query if it's possible
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login