Skip to content

Conversation

@cksapp
Copy link
Contributor

@cksapp cksapp commented Dec 11, 2024

Pull Request

Description

Seems that there are un-documented endpoints in the Datto REST API for SaaS Protection.

This appears to be coupled with the out-of-date docs, and I will attempt to see if this can be added to the official source docs, for now API endpoint /v1/saas/{saasCustomerId}/detailedBackupStats appears to return data

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have reviewed the Contributing guide
  • I am pulling to the main branch
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

How Has This Been Tested?

Call new switch param Get-DattoSaaS -endpoint_CustomerDetailedBackupStats -saasCustomerId 123456
or use new function Get-DattoSaaSDetailedBackupStats -saasCustomerId 123456

This is a LARGE response, and on average in testing seems to take ~15 - 20 seconds to resolve

Example:

backupStatusLastSevenDays      : @{totalForCalendar=SUCCESS; totalForContact=SUCCESS; totalForDrive=SUCCESS; totalForMail=SUCCESS; totalForSharePoint=SUCCESS; totalForSites=SUCCESS;
                                 totalForTeams=SUCCESS}
backupStatusLastSevenDaysTotal : SUCCESS
lastBackups                    : @{calendar=System.Object[]; contact=System.Object[]; domainBackups=System.Object[]; drive=System.Object[]; mail=System.Object[]; sharePoint=System.Object[];
                                 sites=System.Object[]; teams=System.Object[]}
numberOfStandardLicensesTotal  : 60
numberOfUsers                  : 20
region                         : SYD
storageInformation             : @{protectedBytes=2597140922368; usedBytes=21989605495}
tenantId                       : 12854fbc-5e14-4ddf-93f6-ff5a0144e949
tenantName                     : datto-testing
users                          : {@{backupStatusLastSevenDays=; email=rmcclain@datto-testing.onmicrosoft.com; id=47eb498d-ad0b-4598-b33a-acfe669ddb83; lastBackupStatus=;
                                 lastBackupStatusSevenDaysTotal=SUCCESS; lastBackupStatusTotal=SUCCESS; lastBackupTimestamp=; lastBackupTimestampTotal=1733875610833;
                                 lastBackupsStatusTotal=System.Object[]; storageInformation=}, @{backupStatusLastSevenDays=; email=mhorn@datto-testing.onmicrosoft.com;
                                 id=e5d75e46-88a5-4259-9cc0-1f6b6e08de67; lastBackupStatus=; lastBackupStatusSevenDaysTotal=SUCCESS; lastBackupStatusTotal=SUCCESS; lastBackupTimestamp=;
                                 lastBackupTimestampTotal=1733871115320; lastBackupsStatusTotal=System.Object[]; storageInformation=}, @{backupStatusLastSevenDays=;
                                 email=emckinney@datto-testing.onmicrosoft.com; id=cc963474-1e10-4e25-b579-953e9c015900; lastBackupStatus=; lastBackupStatusSevenDaysTotal=SUCCESS;
                                 lastBackupStatusTotal=SUCCESS; lastBackupTimestamp=; lastBackupTimestampTotal=1733875317837; lastBackupsStatusTotal=System.Object[]; storageInformation=},
                                 @{backupStatusLastSevenDays=; email=rherring@datto-testing.onmicrosoft.com; id=4df86eed-926f-462b-aed0-a25667ad1c00; lastBackupStatus=;
                                 lastBackupStatusSevenDaysTotal=SUCCESS; lastBackupStatusTotal=SUCCESS; lastBackupTimestamp=; lastBackupTimestampTotal=1733869307956;
                                 lastBackupsStatusTotal=System.Object[]; storageInformation=}…}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant