Sets API key, server URL, and error handling for AxcientAPI module functions.
Initialize-AxcientAPI [-ApiKey] <String> [-MockServer] [-ReturnErrors] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Initialize-AxcientAPI sets the API key and server URL for AxcientAPI module functions. The API key is required for both production and mock environments.By default the production server URL is utilized.
Use the -MockServer switch to specify the mock environment.
Initialize-AxcientAPI -ApiKey "imalumberjackandimokay" -MockServer -ReturnErrors
API key to authenticate the connection.
Type: String
Required: True
Position: 1
Default value: None
Specifies whether to use the mock server for testing purposes.
Type: SwitchParameter
Required: False
Position: Named
Default value: False
When set, module functions will return the error object if an API call fails. By default nothing is returned on failure.
Type: SwitchParameter
Required: False
Position: Named
Default value: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
As of module version 0.3.0 and the July 2024 API release the error schema is not well-defined. The module attempts to return a consistent object of its own design.