I am trying to pull my backup data from Azure Backup into Power BI report, to send out to clients. I have managed to get a table that lists the vault, however I am using the following query and getting an error when trying to get the backup data.
I have replaced the actual subscription ID and resource group in the error and query for privacy, but in my query these are as they should be with the correct values!
Any help would be appreciated!
Error:
DataSource.Error: Web.Contents failed to get contents from 'https://management.azure.com/subscriptions/<subscription-ID./resourceGroups/<RG>/providers/Microsoft.RecoveryServices/vaults/WHFS-Vault/backupItems?api-version=2021-02-01' (404): Not Found
Details:
DataSourceKind=Web
DataSourcePath=https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<RG>/providers/Microsoft.RecoveryServices/vaults/<Vault>/backupItems
Url=https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<RG>/providers/Microsoft.RecoveryServices/vaults/<Vault>/backupItems?api-version=2021-02-01
Query:
let
Token = GetAzureAccessToken(){0}[Column1],
Source = Web.Contents("https://management.azure.com", [
RelativePath = "/subscriptions/<subscription-id>/resourceGroups/<RG>/providers/Microsoft.RecoveryServices/vaults/" & [value.name] & "/backupItems?api-version=2021-02-01",
Headers=[Accept="application/json"]
]),
#"Converted to Table" = Json.Document(Source),
#"Expanded Value" = Table.ExpandTableColumn(#"Converted to Table", "value", {"name", "properties"}, {"name", "properties"}),
#"Expanded Properties" = Table.ExpandRecordColumn(#"Expanded Value", "properties", {"backupManagementType", "workloadType", "policyId", "lastBackupStatus", "backupType", "backupStatus", "healthStatus", "retentionPeriodInDays", "lastBackupTime"}, {"backupManagementType", "workloadType", "policyId", "lastBackupStatus", "backupType", "backupStatus", "healthStatus", "retentionPeriodInDays", "lastBackupTime"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded Properties", each ([lastBackupStatus] <> null))
in
#"Filtered Rows"