en-US/about_DattoBackupApi.help.txt
|
TOPIC about_DattoBackupApi SHORT DESCRIPTION Connects PowerShell to the Datto REST API for BCDR, Reporting, SaaS Protection, and Direct-to-Cloud data and operations. LONG DESCRIPTION DattoBackupApi is an independent, contract-mapped PowerShell module for the Datto REST API v1 at https://api.datto.com. It implements every operation in the OpenAPI contract bundled with the module. This scope does not include the separate Datto RMM, Autotask PSA, IT Glue, or KaseyaOne APIs. The module preserves Datto's response objects and property names. Get commands emit records for normal pipeline use. Add -RawResponse when you need the original response body or pagination envelope. AUTHENTICATION Datto uses HTTP Basic authentication with the public API key as the username and the secret API key as the password. Create an in-memory connection with a PSCredential or SecureString: $secret = Read-Host 'Datto secret key' -AsSecureString Connect-DattoApi -PublicKey 'PUBLIC_KEY' -SecretKey $secret Test-DattoApiConnection -Surface BCDR Credentials are not written to disk by this module. Retrieve unattended credentials from an approved secret store and pass a PSCredential to Connect-DattoApi. COMMON WORKFLOWS BCDR devices: Get-DattoBcdrDevice -All | Select-Object serialNumber, name, organizationName, lastSeenDate SaaS Protection seats: Get-DattoSaasDomain | ForEach-Object { Get-DattoSaasSeat -SaasCustomerId $_.saasCustomerId } Direct-to-Cloud assets: Get-DattoDtcAsset -All Activity log: Get-DattoActivityLog -Since 24 -SinceUnits hours -All Rate-limit state: Get-DattoApiRateLimit PAGINATION Commands that expose -All request pages sequentially and emit all records from the selected starting page through pagination.totalPages. Use -RawResponse to retain an envelope. Automatic pagination is bounded by the generic request engine's MaxPages safety limit. WRITE OPERATIONS Set-DattoSaasSeatAssignment and Set-DattoDtcAgentBandwidth support -WhatIf and -Confirm. Their PUT requests are not automatically retried because a repeated state-changing request may be unsafe. SCREENSHOTS Save-DattoBcdrAssetScreenshot and Save-DattoDtcAssetScreenshot verify the declared media type and image signature, then write through a temporary file before moving or replacing the destination. OFFLINE API REFERENCE The full supplied OpenAPI document is included with the module: Get-DattoApiSpecification Get-DattoApiOperation Get-DattoApiSchema Get-DattoApiOperation -Detailed returns parameters, request bodies, responses, and schema references. Get-DattoApiSchema -Detailed returns the complete definition of any of the bundled component schemas. SECURITY HTTPS is mandatory for production connections. Redirects are disabled. The generic request command accepts only relative /v1/ paths. Connection output is redacted, and the module exports no credential-bearing state. TROUBLESHOOTING Use these commands first: Get-DattoApiConnection Test-DattoApiConnection -Surface BCDR Get-DattoApiRateLimit Get-Help <CommandName> -Full A valid key may still be restricted to an organization or API surface. HTTP 401 indicates invalid authentication. HTTP 403 generally indicates insufficient access. HTTP 404 can also mean that the key cannot see the requested object. SEE ALSO Connect-DattoApi Invoke-DattoApiRequest Get-DattoApiOperation Get-DattoApiSchema Get-DattoBcdrDevice Get-DattoSaasDomain Get-DattoDtcAsset |