Api Jetbackup 5

cPanel, Industry leading hosting platform with world-class support.
Post Reply
ludolugo
Posts: 27
Joined: April 17th, 2020, 10:40 am

Api Jetbackup 5

Post by ludolugo »

Hi
we had an app for monitoring the backups in all our servers using the api n jetbackup 4, in this api it has a percentage value so we can take the percentage from the json.
In jetbackup 5 i cant find this value in the json, but i see in the jetbackup 5 gui the progress bar when the backup job is running, how could i call this progress bar or this percentage value through the api?

Thanks
JetAppsRichard
Staff Member
Staff Member
Posts: 97
Joined: January 1st, 2021, 12:51 am

Re: Api Jetbackup 5

Post by JetAppsRichard »

Hello ludolugo,

Thank you for your interest in using the JETAPI for your monitoring services. In JetBackup 5, we are no longer calculating the "percentage done" on the Backup Job Object itself, which is what I believe you are using to get the percentage in JetBackup 4. Instead, you can find the total number of accounts and number of items completed in the Queue Object in JetBackup 5. When a Backup Job is running you can use the following JETAPI command to list the Queue Group Objects for the Backup Jobs:

Code: Select all

jetbackup5api -F listQueueGroups -D 'type=1&sort=-1&limit=1'
This will list out the most recent Backup Job Queue Object that appears on the JetBackup 5 -> Queue Page. While the Backup Job is running, it should appear from the above JETAPI call. Please note that you can adjust the limit if multiple Backup Job Items are queued around the same time. You can see all of the fields for Queue Group Objects in our Documentation for Queues. The fields we now use to generate the progress bar/percentage are the following:

Code: Select all

items
items_completed
With these two fields, you should be able to calculate the percentage complete by dividing `items_completed/items`of the current Backup Job run. Please let us know if you have any further questions.
Best Regards,
Richard, JetApps Team
Post Reply