diff --git a/PSAtera/PSAtera.psm1 b/PSAtera/PSAtera.psm1 index 8e6e432..14f2236 100644 --- a/PSAtera/PSAtera.psm1 +++ b/PSAtera/PSAtera.psm1 @@ -34,7 +34,7 @@ function New-AteraGetRequest { } $ItemsInPage = 50 $QueryString = Format-QueryString -Query $Query - $Uri = "https://app.atera.com/api/v3$($endpoint)?itemsInPage=$ItemsInPage&$QueryString" + $Uri = "https://api.atera.com/api/v3$($endpoint)?itemsInPage=$ItemsInPage&$QueryString" $items = @() $index = 0 @@ -76,7 +76,7 @@ function New-AteraPostRequest { "content-type" = "application/json" "X-API-KEY" = Get-AteraAPIKey } - $Uri = "https://app.atera.com/api/v3$($endpoint)" + $Uri = "https://api.atera.com/api/v3$($endpoint)" $JsonBody = ConvertTo-Json -InputObject $Body -Depth 10 Write-Debug "[PSAtera] Request for $Uri with data $JsonBody" $data = Invoke-RestMethod -Uri $Uri -Method "POST" -Headers $Headers -Body ([System.Text.Encoding]::UTF8.GetBytes($JsonBody)) @@ -111,7 +111,7 @@ function New-AteraPutRequest { "content-type" = "application/json" "X-API-KEY" = Get-AteraAPIKey } - $Uri = "https://app.atera.com/api/v3$($endpoint)" + $Uri = "https://api.atera.com/api/v3$($endpoint)" Write-Debug "[PSAtera] Request for $Uri" $JsonBody = ConvertTo-Json -InputObject $Body -Depth 10 $data = Invoke-RestMethod -Uri $Uri -Method "Put" -Headers $Headers -Body ([System.Text.Encoding]::UTF8.GetBytes($JsonBody)) @@ -125,7 +125,7 @@ $AteraAPIKey = $env:ATERAAPIKEY Set the Atera API Key used by the module. If none set, the ATERAAPIKEY environment variable will be used instead. .Parameter APIKey - Atera API Key which can be found at https://app.atera.com/Admin#/admin/api + Atera API Key which can be found at https://api.atera.com/Admin#/admin/api #> function Set-AteraAPIKey { param( @@ -223,4 +223,4 @@ function Format-QueryString($Query) { Get-ChildItem -Path $PSScriptRoot/endpoints | ForEach-Object { . $_.PSPath } -Export-ModuleMember -Function Install-AteraAgent,Get-Atera*,Set-Atera*,New-Atera* \ No newline at end of file +Export-ModuleMember -Function Install-AteraAgent,Get-Atera*,Set-Atera*,New-Atera* diff --git a/PSAtera/docs.txt b/PSAtera/docs.txt index 03cce7d..ef97f2b 100644 --- a/PSAtera/docs.txt +++ b/PSAtera/docs.txt @@ -1587,7 +1587,7 @@ DESCRIPTION PARAMETERS -APIKey - Atera API Key which can be found at https://app.atera.com/Admin#/admin/api + Atera API Key which can be found at https://api.atera.com/Admin#/admin/api This cmdlet supports the common parameters: Verbose, Debug, diff --git a/README.md b/README.md index 51543f0..82b12d4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Start interacting with Atera from PowerShell with the PSAtera module. ## Configuration The PSAtera module relies on the `ATERAAPIKEY` environment variable for the API key for your Atera account which can be found here: -https://app.atera.com/new/admin/api +https://api.atera.com/new/admin/api ## Install