Api/TorizonPlatformAPIDevicesApi.ps1
# # Torizon OTA # This API is rate limited and will return the following headers for each API call. - X-RateLimit-Limit - The total number of requests allowed within a time period - X-RateLimit-Remaining - The total number of requests still allowed until the end of the rate limiting period - X-RateLimit-Reset - The number of seconds until the limit is fully reset In addition, if an API client is rate limited, it will receive a HTTP 420 response with the following header: - Retry-After - The number of seconds to wait until this request is allowed # Version: 2.0-Beta # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS Delete a single device .DESCRIPTION No description available. .PARAMETER DeviceUuid 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 None #> function Invoke-TorizonPlatformAPIDeleteDevicesDeviceuuid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Invoke-TorizonPlatformAPIDeleteDevicesDeviceuuid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/{deviceUuid}' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling deleteDevicesDeviceuuid." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'DELETE' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Query device information .DESCRIPTION No description available. .PARAMETER Offset No description available. .PARAMETER Limit No description available. .PARAMETER DeviceUuid No description available. .PARAMETER NameContains No description available. .PARAMETER SortBy No description available. .PARAMETER SortDirection 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 PaginationResultDeviceInfoBasic #> function Get-TorizonPlatformAPIDevices { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Offset}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Limit}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String[]] ${DeviceUuid}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${NameContains}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${SortBy}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${SortDirection}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevices' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices' if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($DeviceUuid) { $LocalVarQueryParameters['deviceUuid'] = $DeviceUuid } if ($NameContains) { $LocalVarQueryParameters['nameContains'] = $NameContains } if ($SortBy) { $LocalVarQueryParameters['sortBy'] = $SortBy } if ($SortDirection) { $LocalVarQueryParameters['sortDirection'] = $SortDirection } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "PaginationResultDeviceInfoBasic" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get detailed information about a single device .DESCRIPTION No description available. .PARAMETER DeviceUuid 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 DeviceInfoExtended #> function Get-TorizonPlatformAPIDevicesDeviceuuid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesDeviceuuid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/{deviceUuid}' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling getDevicesDeviceuuid." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "DeviceInfoExtended" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get the display name of a single device .DESCRIPTION No description available. .PARAMETER DeviceUuid 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 String #> function Get-TorizonPlatformAPIDevicesNameDeviceuuid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesNameDeviceuuid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/name/{deviceUuid}' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling getDevicesNameDeviceuuid." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "String" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get network information for many devices .DESCRIPTION No description available. .PARAMETER Offset No description available. .PARAMETER Limit No description available. .PARAMETER DeviceUuid 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 PaginationResultNetworkInfo #> function Get-TorizonPlatformAPIDevicesNetwork { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Offset}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Limit}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String[]] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesNetwork' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/network' if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($DeviceUuid) { $LocalVarQueryParameters['deviceUuid'] = $DeviceUuid } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "PaginationResultNetworkInfo" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get network information for a single device .DESCRIPTION No description available. .PARAMETER DeviceUuid 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 NetworkInfo #> function Get-TorizonPlatformAPIDevicesNetworkDeviceuuid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesNetworkDeviceuuid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/network/{deviceUuid}' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling getDevicesNetworkDeviceuuid." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "NetworkInfo" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get the device notes for a specific device .DESCRIPTION No description available. .PARAMETER DeviceUuid 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 String #> function Get-TorizonPlatformAPIDevicesNotesDeviceuuid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesNotesDeviceuuid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/notes/{deviceUuid}' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling getDevicesNotesDeviceuuid." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "String" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get information about the installed packages for many devices .DESCRIPTION No description available. .PARAMETER Offset No description available. .PARAMETER Limit No description available. .PARAMETER DeviceUuid No description available. .PARAMETER NameContains 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 PaginationResultDevicePackages #> function Get-TorizonPlatformAPIDevicesPackages { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Offset}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Limit}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String[]] ${DeviceUuid}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${NameContains}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesPackages' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/packages' if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($DeviceUuid) { $LocalVarQueryParameters['deviceUuid'] = $DeviceUuid } if ($NameContains) { $LocalVarQueryParameters['nameContains'] = $NameContains } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "PaginationResultDevicePackages" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get information about the installed packages for a single device .DESCRIPTION No description available. .PARAMETER DeviceUuid 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 DevicePackages #> function Get-TorizonPlatformAPIDevicesPackagesDeviceuuid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesPackagesDeviceuuid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/packages/{deviceUuid}' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling getDevicesPackagesDeviceuuid." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "DevicePackages" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Retrieve device provisioning token .DESCRIPTION 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 ProvisionInfo #> function Get-TorizonPlatformAPIDevicesToken { [CmdletBinding()] Param ( [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesToken' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/token' if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "ProvisionInfo" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Show detailed information about the currently-assigned update for a single device .DESCRIPTION No description available. .PARAMETER DeviceUuid 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 QueueResponse[] #> function Get-TorizonPlatformAPIDevicesUptaneDeviceuuidAssignment { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesUptaneDeviceuuidAssignment' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/uptane/{deviceUuid}/assignment' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling getDevicesUptaneDeviceuuidAssignment." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "QueueResponse[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get a list of the software components reported by a single device .DESCRIPTION No description available. .PARAMETER DeviceUuid 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 EcuInfoResponse[] #> function Get-TorizonPlatformAPIDevicesUptaneDeviceuuidComponents { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIDevicesUptaneDeviceuuidComponents' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/devices/uptane/{deviceUuid}/components' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling getDevicesUptaneDeviceuuidComponents." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "EcuInfoResponse[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Manually create a new device .DESCRIPTION No description available. .PARAMETER DeviceCreateReq No description available. .PARAMETER ReturnType Select the return type (optional): application/json, application/octet-stream .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS System.IO.FileInfo #> function Submit-TorizonPlatformAPIDevices { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${DeviceCreateReq}, [String] [ValidateSet("application/json", "application/octet-stream")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Submit-TorizonPlatformAPIDevices' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json', 'application/octet-stream') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/devices' if (!$DeviceCreateReq) { throw "Error! The required parameter `DeviceCreateReq` missing when calling postDevices." } if ($LocalVarContentTypes[0] -eq 'application/octet-stream') { $LocalVarBodyParameter = [System.IO.File]::ReadAllBytes($DeviceCreateReq.FullName) } else { $LocalVarBodyParameter = $DeviceCreateReq | ConvertTo-Json -Depth 100 } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "System.IO.FileInfo" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Set the display name of a single device .DESCRIPTION No description available. .PARAMETER DeviceUuid No description available. .PARAMETER Body 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 None #> function Send-TorizonPlatformAPIDevicesNameDeviceuuid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Body}, [Switch] $WithHttpInfo ) Process { 'Calling method: Send-TorizonPlatformAPIDevicesNameDeviceuuid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/devices/name/{deviceUuid}' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling putDevicesNameDeviceuuid." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if (!$Body) { throw "Error! The required parameter `Body` missing when calling putDevicesNameDeviceuuid." } if ($LocalVarContentTypes[0] -eq 'application/octet-stream') { $LocalVarBodyParameter = [System.IO.File]::ReadAllBytes($Body.FullName) } else { $LocalVarBodyParameter = $Body | ConvertTo-Json -Depth 100 } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'PUT' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Set the device notes for a specific device .DESCRIPTION No description available. .PARAMETER DeviceUuid No description available. .PARAMETER Body No description available. .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS None #> function Send-TorizonPlatformAPIDevicesNotesDeviceuuid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${DeviceUuid}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Body}, [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Send-TorizonPlatformAPIDevicesNotesDeviceuuid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/devices/notes/{deviceUuid}' if (!$DeviceUuid) { throw "Error! The required parameter `DeviceUuid` missing when calling putDevicesNotesDeviceuuid." } $LocalVarUri = $LocalVarUri.replace('{deviceUuid}', [System.Web.HTTPUtility]::UrlEncode($DeviceUuid)) if (!$Body) { throw "Error! The required parameter `Body` missing when calling putDevicesNotesDeviceuuid." } if ($LocalVarContentTypes[0] -eq 'application/octet-stream') { $LocalVarBodyParameter = [System.IO.File]::ReadAllBytes($Body.FullName) } else { $LocalVarBodyParameter = $Body | ConvertTo-Json -Depth 100 } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'PUT' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |