REST API knowledge exchange
Post Reply
cpm30
Service Provider
Posts: 11
Liked: never
Joined: Mar 18, 2021 5:02 pm
Full Name: Chris Montague
Contact:

Querying Backup/Data Size by Job Name

Post by cpm30 »

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
chris.arceneaux
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

Post by chris.arceneaux » 1 person likes this post

Hi Chris,

Here's the method for linking Backup Jobs to their Backups:
Once you have the Backups, each one will have a link to its backup files (see screenshot). It's there that you'll find the backup/data sizes.

GET /api/backupFiles/{ID}?format=Entity <-- Make sure to include ?format=Entity

Image
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests