Connect-AtriaApi
SYNOPSIS
Establishes a connection to the Atria API using an authentication token.
SYNTAX
Connect-AtriaApi [-AuthToken] <String> [[-apiBase] <String>] [<CommonParameters>]
DESCRIPTION
Sets global variables necessary to interact with the Atria API, including authorization headers and API base URL. The function also validates the authentication token before saving it for future API calls.
PARAMETERS
-
AuthToken
<String>
(Required)
The authentication token required to access the Atria API. This parameter is mandatory. -
apiBase
<String>
(Optional)
The base URL of the Atria API. If omitted, the function uses the default URL provided by theGet-AtriaApiUrlBase
function appended with/api
. -
<CommonParameters>
Supports common parameters:
Verbose
,Debug
,ErrorAction
,ErrorVariable
,WarningAction
,WarningVariable
,OutBuffer
,PipelineVariable
, andOutVariable
.More info: about_CommonParameters.
NOTES
Make sure to replace the token validation placeholder with actual logic to ensure token validity.
EXAMPLES
Example 1
PS> Connect-AtriaApi -AuthToken 'your_auth_token'
Connects to the Atria API with the provided authentication token, using the default API URL.
Example 2
PS> Connect-AtriaApi -AuthToken 'your_auth_token' -apiBase 'https://custom.api.url/api'
Connects to the Atria API using a custom API URL.