Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions PSAtera/PSAtera.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand All @@ -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(
Expand Down Expand Up @@ -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*
Export-ModuleMember -Function Install-AteraAgent,Get-Atera*,Set-Atera*,New-Atera*
2 changes: 1 addition & 1 deletion PSAtera/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ DESCRIPTION

PARAMETERS
-APIKey <String>
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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not the right URL for getting an API key, old one is still valid:
https://app.atera.com/new/admin/api

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. I will check why there's this inconsistency.


## Install

Expand Down