Hello,
I like to get details of a backup using Veeam Apis.
Which specific apis would give me following details.
- timestamp of last backup activity
- name and/or some form of detail about the backup activity
- statistics such as size of file, transmitted amount, number of files backed up
- status of backup - Ok, a problem message or indicator
Thanks,
Gagan
-
- Novice
- Posts: 3
- Liked: never
- Joined: Feb 18, 2019 8:51 am
- Full Name: Gagan Bhatnagar
- Contact:
-
- Veeam Software
- Posts: 149
- Liked: 47 times
- Joined: May 25, 2016 3:29 am
- Full Name: Ben Young
- Contact:
Re: How to get backup details of a backup using Rest Api
Hi Gagan
There are a few different endpoints you need to hit
http://<Enterprise-Manager>:9399/api/backupTaskSessions/{ID}?format=Entity
https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
This will return you the backup task sessions, basically the log for the backup job(s) and will return you the start/end time total size, result and state (complete, running etc) as well as a reason for failure/warning if there is one
http://<Enterprise-Manager>:9399/api/vmRestorePoints
https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
http://<Enterprise-Manager>:9399/api/vmRestorePoints/{Id}
https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
The above two will get you specific restore points per object, useful for seeing what restore points are available on a VM for instance, from here you can also mount/restore on each of them i.e direct download out of the file or inject back into the operating system (see the ?action=restore part of the documentation on /vmrestorepoints/{Id})
http://<Enterprise-Manager>:9399/api/querySvc
https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
Query service is worth checking out as it lets you query the different objects within Veeam, such as filtering backupTaskSessions, restore points etc by various attributes - if you hit that endpoint you will see the different types of objects you can query
Here is some info how the query syntax works https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
Hope that helps get you started - the documentation has it all listed so easy enough to browse through it as well as open up Postman or a similar Restful api browser to click your way through to see what it returns and align it with what you are seeing in the gui. Most of the endpoints you hit can have the ?format=entity appended to return a full entity view with more information as well as this it also links to related api enpoints to the specific resource you are looking at
There are a few different endpoints you need to hit
http://<Enterprise-Manager>:9399/api/backupTaskSessions/{ID}?format=Entity
https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
This will return you the backup task sessions, basically the log for the backup job(s) and will return you the start/end time total size, result and state (complete, running etc) as well as a reason for failure/warning if there is one
http://<Enterprise-Manager>:9399/api/vmRestorePoints
https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
http://<Enterprise-Manager>:9399/api/vmRestorePoints/{Id}
https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
The above two will get you specific restore points per object, useful for seeing what restore points are available on a VM for instance, from here you can also mount/restore on each of them i.e direct download out of the file or inject back into the operating system (see the ?action=restore part of the documentation on /vmrestorepoints/{Id})
http://<Enterprise-Manager>:9399/api/querySvc
https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
Query service is worth checking out as it lets you query the different objects within Veeam, such as filtering backupTaskSessions, restore points etc by various attributes - if you hit that endpoint you will see the different types of objects you can query
Here is some info how the query syntax works https://helpcenter.veeam.com/docs/backu ... l?ver=95u4
Hope that helps get you started - the documentation has it all listed so easy enough to browse through it as well as open up Postman or a similar Restful api browser to click your way through to see what it returns and align it with what you are seeing in the gui. Most of the endpoints you hit can have the ?format=entity appended to return a full entity view with more information as well as this it also links to related api enpoints to the specific resource you are looking at
Who is online
Users browsing this forum: No registered users and 1 guest