diff --git a/DattoAPI/DattoAPI.psd1 b/DattoAPI/DattoAPI.psd1 index 0855c3d..51f879b 100644 Binary files a/DattoAPI/DattoAPI.psd1 and b/DattoAPI/DattoAPI.psd1 differ diff --git a/DattoAPI/Private/apiCalls/ConvertTo-DattoQueryString.ps1 b/DattoAPI/Private/apiCalls/ConvertTo-DattoQueryString.ps1 index 1823b10..531bbb2 100644 --- a/DattoAPI/Private/apiCalls/ConvertTo-DattoQueryString.ps1 +++ b/DattoAPI/Private/apiCalls/ConvertTo-DattoQueryString.ps1 @@ -64,7 +64,7 @@ param( 'allPages', 'page', 'perPage', 'endpoint_Agents', 'endpoint_Devices', 'endpoint_byDevice', 'endpoint_byDeviceAgent', 'endpoint_byDeviceAlert', 'endpoint_byDeviceAsset', 'endpoint_byDeviceShare', 'endpoint_byDeviceVolume', - 'endpoint_Domains', 'endpoint_CustomerSeats', 'endpoint_CustomerApps', + 'endpoint_Domains', 'endpoint_CustomerSeats', 'endpoint_CustomerApps', 'endpoint_CustomerDetailedBackupStats', 'saasCustomerId','externalSubscriptionId','seatType','remoteId','actionType' $query_Parameters = [System.Web.HttpUtility]::ParseQueryString([String]::Empty) diff --git a/DattoAPI/Public/SaaS/Get-DattoSaaS.ps1 b/DattoAPI/Public/SaaS/Get-DattoSaaS.ps1 index 574dc7f..8d256de 100644 --- a/DattoAPI/Public/SaaS/Get-DattoSaaS.ps1 +++ b/DattoAPI/Public/SaaS/Get-DattoSaaS.ps1 @@ -18,12 +18,17 @@ function Get-DattoSaaS { .PARAMETER endpoint_CustomerSeats Returns SaaS protection seats for a given customer - Endpoint = /SaaS/domains/{sassCustomerId}/seats + Endpoint = /SaaS/{sassCustomerId}/seats .PARAMETER endpoint_CustomerApps Returns SaaS protection backup data for a given customer - Endpoint = /SaaS/domains/{sassCustomerId}/applications + Endpoint = /SaaS/{sassCustomerId}/applications + + .PARAMETER endpoint_CustomerDetailedBackupStats + Returns SaaS protection detailed backup stats for a given customer + + Endpoint = /SaaS/{sassCustomerId}/detailedBackupStats .PARAMETER saasCustomerId Defines the ID of the customer to get SaaS information from @@ -68,6 +73,11 @@ function Get-DattoSaaS { Returns SaaS protection backup data for a given customer + .EXAMPLE + Get-DattoSaaS -endpoint_CustomerDetailedBackupStats -saasCustomerId 123456 + + Returns SaaS protection detailed backup stats for a given customer + .NOTES N\A @@ -86,8 +96,12 @@ function Get-DattoSaaS { [Parameter(Mandatory = $true, ParameterSetName = 'index_byCustomerApps')] [switch]$endpoint_CustomerApps, + [Parameter(Mandatory = $true, ParameterSetName = 'index_byCustomerDetailedBackupStats')] + [switch]$endpoint_CustomerDetailedBackupStats, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ParameterSetName = 'index_byCustomerSeats' )] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ParameterSetName = 'index_byCustomerApps' )] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ParameterSetName = 'index_byCustomerDetailedBackupStats' )] [ValidateNotNullOrEmpty()] [int]$saasCustomerId, @@ -106,6 +120,7 @@ function Get-DattoSaaS { 'index_Domains' { $resource_uri = "/saas/domains" } 'index_byCustomerSeats' { $resource_uri = "/saas/$saasCustomerId/seats" } 'index_byCustomerApps' { $resource_uri = "/saas/$saasCustomerId/applications" } + 'index_byCustomerDetailedBackupStats' { $resource_uri = "/saas/$saasCustomerId/detailedBackupStats" } } } diff --git a/DattoAPI/Public/SaaS/Get-DattoSaaSDetailedBackupStats.ps1 b/DattoAPI/Public/SaaS/Get-DattoSaaSDetailedBackupStats.ps1 new file mode 100644 index 0000000..d231dd9 --- /dev/null +++ b/DattoAPI/Public/SaaS/Get-DattoSaaSDetailedBackupStats.ps1 @@ -0,0 +1,49 @@ +function Get-DattoSaaSDetailedBackupStats { +<# + .SYNOPSIS + Get Datto SaaS protection detailed backup stats for a given customer + + .DESCRIPTION + The Get-DattoSeat cmdlet gets Datto SaaS protection detailed backup stats + for a given customer + + .PARAMETER saasCustomerId + Defines the id of the Datto SaaS organization + + .EXAMPLE + Get-DattoSaaSDetailedBackupStats -saasCustomerId "123456" + + Gets the Datto SaaS protection detailed backup stats from the define customer id + + .NOTES + N\A + + .LINK + https://celerium.github.io/Datto-PowerShellWrapper/site/SaaS/Get-DattoSaaSDetailedBackupStats.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ParameterSetName = 'index')] + [ValidateNotNullOrEmpty()] + [int]$saasCustomerId + ) + + begin { + + $resource_uri = "/saas/$saasCustomerId/detailedBackupStats" + + } + + process { + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'Datto_SaaSBackupStatsParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-DattoRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters + + } + + end {} +} diff --git a/docs/DattoAPI.md b/docs/DattoAPI.md index 370e66c..48d8fff 100644 --- a/docs/DattoAPI.md +++ b/docs/DattoAPI.md @@ -63,6 +63,9 @@ Gets the saved Datto configuration settings ### [Get-DattoSaaS](site/SaaS/Get-DattoSaaS.md) Gets Datto SaaS protection data +### [Get-DattoSaaSDetailedBackupStats](site/_Unique/Get-DattoSaaSDetailedBackupStats.md) +Get Datto SaaS protection detailed backup stats for a given customer + ### [Get-DattoSeat](site/SaaS/Get-DattoSeat.md) Get Datto SaaS protection seats for a given customer diff --git a/docs/cab/DattoAPI_d536355d-2a81-444f-9e08-9eeeda6db819_en-US_HelpContent.cab b/docs/cab/DattoAPI_d536355d-2a81-444f-9e08-9eeeda6db819_en-US_HelpContent.cab index 06472bf..f89f619 100644 Binary files a/docs/cab/DattoAPI_d536355d-2a81-444f-9e08-9eeeda6db819_en-US_HelpContent.cab and b/docs/cab/DattoAPI_d536355d-2a81-444f-9e08-9eeeda6db819_en-US_HelpContent.cab differ diff --git a/docs/cab/DattoAPI_d536355d-2a81-444f-9e08-9eeeda6db819_en-US_HelpContent.zip b/docs/cab/DattoAPI_d536355d-2a81-444f-9e08-9eeeda6db819_en-US_HelpContent.zip index 443a5f7..7f926de 100644 Binary files a/docs/cab/DattoAPI_d536355d-2a81-444f-9e08-9eeeda6db819_en-US_HelpContent.zip and b/docs/cab/DattoAPI_d536355d-2a81-444f-9e08-9eeeda6db819_en-US_HelpContent.zip differ diff --git a/docs/en-US/DattoAPI-help.xml b/docs/en-US/DattoAPI-help.xml index 3d2e8d9..6c1f67f 100644 --- a/docs/en-US/DattoAPI-help.xml +++ b/docs/en-US/DattoAPI-help.xml @@ -1,5 +1,75 @@  + + + Get-DattoSaaSDetailedBackupStats + Get + DattoSaaSDetailedBackupStats + + Get Datto SaaS protection detailed backup stats for a given customer + + + + The Get-DattoSeat cmdlet gets Datto SaaS protection detailed backup stats for a given customer + + + + Get-DattoSaaSDetailedBackupStats + + saasCustomerId + + Defines the id of the Datto SaaS organization + + Int32 + + Int32 + + + 0 + + + + + + saasCustomerId + + Defines the id of the Datto SaaS organization + + Int32 + + Int32 + + + 0 + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-DattoSaaSDetailedBackupStats -saasCustomerId "123456" + + Gets the Datto SaaS protection detailed backup stats from the define customer id + + + + + + Online Version: + https://celerium.github.io/Datto-PowerShellWrapper/site/_Unique/Get-DattoSaaSDetailedBackupStats.html + + + https://celerium.github.io/Datto-PowerShellWrapper/site/SaaS/Get-DattoSaaSDetailedBackupStats.html + https://celerium.github.io/Datto-PowerShellWrapper/site/SaaS/Get-DattoSaaSDetailedBackupStats.html + + + Set-DattoAPIKey @@ -3782,7 +3852,7 @@ endpoint_CustomerSeats Returns SaaS protection seats for a given customer - Endpoint = /SaaS/domains/{sassCustomerId}/seats + Endpoint = /SaaS/{sassCustomerId}/seats SwitchParameter @@ -3809,7 +3879,7 @@ endpoint_CustomerApps Returns SaaS protection backup data for a given customer - Endpoint = /SaaS/domains/{sassCustomerId}/applications + Endpoint = /SaaS/{sassCustomerId}/applications SwitchParameter @@ -3860,6 +3930,33 @@ 0 + + Get-DattoSaaS + + endpoint_CustomerDetailedBackupStats + + Returns SaaS protection detailed backup stats for a given customer + Endpoint = /SaaS/{sassCustomerId}/detailedBackupStats + + + SwitchParameter + + + False + + + saasCustomerId + + Defines the ID of the customer to get SaaS information from + + Int32 + + Int32 + + + 0 + + @@ -3879,7 +3976,7 @@ endpoint_CustomerSeats Returns SaaS protection seats for a given customer - Endpoint = /SaaS/domains/{sassCustomerId}/seats + Endpoint = /SaaS/{sassCustomerId}/seats SwitchParameter @@ -3892,7 +3989,20 @@ endpoint_CustomerApps Returns SaaS protection backup data for a given customer - Endpoint = /SaaS/domains/{sassCustomerId}/applications + Endpoint = /SaaS/{sassCustomerId}/applications + + SwitchParameter + + SwitchParameter + + + False + + + endpoint_CustomerDetailedBackupStats + + Returns SaaS protection detailed backup stats for a given customer + Endpoint = /SaaS/{sassCustomerId}/detailedBackupStats SwitchParameter @@ -3974,6 +4084,13 @@ Returns SaaS protection backup data for a given customer + + -------------------------- EXAMPLE 4 -------------------------- + Get-DattoSaaS -endpoint_CustomerDetailedBackupStats -saasCustomerId 123456 + + Returns SaaS protection detailed backup stats for a given customer + + diff --git a/docs/site/SaaS/Get-DattoSaaS.md b/docs/site/SaaS/Get-DattoSaaS.md index ee5c1de..60d1e2d 100644 --- a/docs/site/SaaS/Get-DattoSaaS.md +++ b/docs/site/SaaS/Get-DattoSaaS.md @@ -31,6 +31,11 @@ Get-DattoSaaS [-endpoint_CustomerApps] -saasCustomerId [-daysUntil ] ``` +### index_byCustomerDetailedBackupStats +```powershell +Get-DattoSaaS [-endpoint_CustomerDetailedBackupStats] -saasCustomerId [] +``` + ## DESCRIPTION The Get-DattoSaaS cmdlet gets Datto SaaS protection data by combing all endpoints into a single command. @@ -64,6 +69,13 @@ Get-DattoSaaS -endpoint_CustomerApps -saasCustomerId 123456 Returns SaaS protection backup data for a given customer +### EXAMPLE 4 +```powershell +Get-DattoSaaS -endpoint_CustomerDetailedBackupStats -saasCustomerId 123456 +``` + +Returns SaaS protection detailed backup stats for a given customer + ## PARAMETERS ### -endpoint_Domains @@ -86,7 +98,7 @@ Accept wildcard characters: False ### -endpoint_CustomerSeats Returns SaaS protection seats for a given customer -Endpoint = /SaaS/domains/{sassCustomerId}/seats +Endpoint = /SaaS/{sassCustomerId}/seats ```yaml Type: SwitchParameter @@ -103,7 +115,7 @@ Accept wildcard characters: False ### -endpoint_CustomerApps Returns SaaS protection backup data for a given customer -Endpoint = /SaaS/domains/{sassCustomerId}/applications +Endpoint = /SaaS/{sassCustomerId}/applications ```yaml Type: SwitchParameter @@ -117,12 +129,29 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -endpoint_CustomerDetailedBackupStats +Returns SaaS protection detailed backup stats for a given customer + +Endpoint = /SaaS/{sassCustomerId}/detailedBackupStats + +```yaml +Type: SwitchParameter +Parameter Sets: index_byCustomerDetailedBackupStats +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -saasCustomerId Defines the ID of the customer to get SaaS information from ```yaml Type: Int32 -Parameter Sets: index_byCustomerSeats, index_byCustomerApps +Parameter Sets: index_byCustomerSeats, index_byCustomerApps, index_byCustomerDetailedBackupStats Aliases: Required: True diff --git a/docs/site/SaaS/Get-DattoSaaSDetailedBackupStats.md b/docs/site/SaaS/Get-DattoSaaSDetailedBackupStats.md new file mode 100644 index 0000000..bdb61c7 --- /dev/null +++ b/docs/site/SaaS/Get-DattoSaaSDetailedBackupStats.md @@ -0,0 +1,65 @@ +--- +external help file: DattoAPI-help.xml +grand_parent: _Unique +Module Name: DattoAPI +online version: https://celerium.github.io/Datto-PowerShellWrapper/site/_Unique/Get-DattoSaaSDetailedBackupStats.html +parent: Special +schema: 2.0.0 +title: Get-DattoSaaSDetailedBackupStats +--- + +# Get-DattoSaaSDetailedBackupStats + +## SYNOPSIS +Get Datto SaaS protection detailed backup stats for a given customer + +## SYNTAX + +```powershell +Get-DattoSaaSDetailedBackupStats -saasCustomerId [] +``` + +## DESCRIPTION +The Get-DattoSeat cmdlet gets Datto SaaS protection detailed backup stats +for a given customer + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-DattoSaaSDetailedBackupStats -saasCustomerId "123456" +``` + +Gets the Datto SaaS protection detailed backup stats from the define customer id + +## PARAMETERS + +### -saasCustomerId +Defines the id of the Datto SaaS organization + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/Datto-PowerShellWrapper/site/SaaS/Get-DattoSaaSDetailedBackupStats.html](https://celerium.github.io/Datto-PowerShellWrapper/site/SaaS/Get-DattoSaaSDetailedBackupStats.html) +