I have looked at both the VBR API and the VEM API... the Veeam Enterprise Manager API seems to have most of the data that I need... but I am struggling with a couple of things...
1. Linking a 'job' to a 'backup'
How do I link a job to a backup? There is info I need from the job object, as well as the backup object, but then I struggle to link these together... the backup name isn't always the same as the job name and I don't see any links between the two.
2. Objects in a 'job' or 'backup'
How to easily get a list of VMs in a VM Backup job? We target jobs to VM folders and/or resource pools. I need the list of VM's backed up by the job, not the name of the folder targeted. I know I can dig into the task sessions but this seems overly cumbersome to answer such a seemingly simple and I expect common question.
3. Licensed VM list
Once I have a list of VM's for each job/backup I need to identify which VM's are licensed - how many licenses do I charge customer with job "backup job 1" for example.
When getting the size of backup files on disk for a 'backup' I also expose the name of each backup file on disk. Currently I am doing a regex on the backup file name to pull the VM name and the Date, then using that info to build the list of unique VM names per backup and which VM's have restore points <31d old (needs a license). This seems unreliable to say the least and I am sure there is a much better way to get the information I need!
What I'd really like is a way to map backup jobs to companies in the Veeam Service Provider Console, then have it spit out the license/size info I need... but that's a feature request for another forum
