Hey folks,
I am trying to get the Backup and Data sizes for for a Veeam jobs in enterprise manager. I can query enterprise manager and get the VIBs/VBKs back using /api/backupFiles or the job names individually, but is there a way to query by job name and return the backup/data size values? Below is what I have so far:
$credentials = Get-Credential
$response = Invoke-WebRequest "https://$($VBEMServerName):9398/api/sessionMngr/?v=latest" -Method Post -Credential $credentials -SkipCertificateCheck
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("X-RestSvcSessionId", $response.Headers["X-RestSvcSessionId"])
$response = Invoke-RestMethod "https://$($VBEMServerName):9398/api/backupFiles" -Method Get -Headers $headers -SkipCertificateCheck
$response = Invoke-RestMethod "https://$($VBEMServerName):9398/api/jobs/" -Method Get -Headers $headers -SkipCertificateCheck
-
- Service Provider
- Posts: 11
- Liked: never
- Joined: Mar 18, 2021 5:02 pm
- Full Name: Chris Montague
- Contact:
-
- VeeaMVP
- Posts: 695
- Liked: 374 times
- Joined: Jun 24, 2019 1:39 pm
- Full Name: Chris Arceneaux
- Location: Georgia, USA
- Contact:
Re: Querying Backup/Data Size by Job Name
Hi Chris,
Here's the method for linking Backup Jobs to their Backups:
GET /api/backupFiles/{ID}?format=Entity <-- Make sure to include ?format=Entity
Here's the method for linking Backup Jobs to their Backups:
- Retrieve Backup Jobs
- GET /api/jobs
- Response in this API call has Backup Job name and well as the UID (unique ID).
- If you already know the Backup Job name, you can use the Query service to search for the Job specifically instead of retrieving all Backups Jobs.
- Retrieve all Backups for the Backup Job UID specified:
GET /api/backupFiles/{ID}?format=Entity <-- Make sure to include ?format=Entity
Who is online
Users browsing this forum: No registered users and 2 guests