hi
i am developing a php script using the api to show the status of backups of all servers and in the documentation i see an object for the progress called Progress Object, but i don´t see an example of how to use it or reference it, could you give me a hint how to use it? i would like to show the progress and total accounts being backed up
Jetbackup api
-
- Staff Member
- Posts: 54
- Joined: March 2nd, 2019, 2:40 am
Re: Jetbackup api
Hi ludolugo,
The Progress Object is referenced/nested in the BackupJob/CloneJob Object. In your particular case, you may fetch the Backup Job Object through the getBackupJob API call if you specify a particular Backup Job ID(https://docs.jetbackup.com/manual/whm-a ... upJob.html) or through the listBackupJobs API call to get a complete list of all backup jobs(https://docs.jetbackup.com/manual/whm-a ... pJobs.html)
Here's a snipped example for your reference:
```
[root@anton ~]# jetapi backup -F getBackupJob -D "_id={BACKUP_ID}"
...
...
filters:
rating:
rating: 4
issues:
0: Avoid backing up junk by setting directories and files in the exclude list
1: Backup Job Monitor is not enabled - Notify me if there where no backups
2: Backup Job Monitor is not enabled - Notify me if job process runs endlessly
pid: 27892
progress:
percent: 4
total_accounts: 27
current_account: 1
account_avg_time: 5.32
...
```
This should be a good starting point to achieve the particular functionality you are looking for and please let us know how your php script goes as we are definitely interested
Best Regards,
Anton, JetApps Team.
The Progress Object is referenced/nested in the BackupJob/CloneJob Object. In your particular case, you may fetch the Backup Job Object through the getBackupJob API call if you specify a particular Backup Job ID(https://docs.jetbackup.com/manual/whm-a ... upJob.html) or through the listBackupJobs API call to get a complete list of all backup jobs(https://docs.jetbackup.com/manual/whm-a ... pJobs.html)
Here's a snipped example for your reference:
```
[root@anton ~]# jetapi backup -F getBackupJob -D "_id={BACKUP_ID}"
...
...
filters:
rating:
rating: 4
issues:
0: Avoid backing up junk by setting directories and files in the exclude list
1: Backup Job Monitor is not enabled - Notify me if there where no backups
2: Backup Job Monitor is not enabled - Notify me if job process runs endlessly
pid: 27892
progress:
percent: 4
total_accounts: 27
current_account: 1
account_avg_time: 5.32
...
```
This should be a good starting point to achieve the particular functionality you are looking for and please let us know how your php script goes as we are definitely interested

Best Regards,
Anton, JetApps Team.
Anton, JetApps Team