Api/GenericApi.ps1
# # Storvix APIs # List of all APIs accessible with the AiRE filer # Version: 3.0.0 # Contact: support@storvix.eu # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS To authenticate .DESCRIPTION No description available. .PARAMETER UNKNOWNBASETYPE No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS InlineResponse200 #> function Invoke-DoLogin { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${UNKNOWNBASETYPE}, [Switch] $WithHttpInfo ) Process { 'Calling method: Invoke-DoLogin' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/login' if (!$UNKNOWNBASETYPE) { throw "Error! The required parameter `UNKNOWNBASETYPE` missing when calling doLogin." } $LocalVarBodyParameter = $UNKNOWNBASETYPE | ConvertTo-Json -Depth 100 if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "InlineResponse200" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |