KaceSMA
KaceSMA copied to clipboard
Get-SmaArchiveAsset does not properly return archived assets
I can successfully retrieve the archival status of an asset with Get-SmaAsset, using -QueryParameters "?filtering=asset.archive eq completed,asset.id eq 1234"
, however, running Get-SmaArchiveAsset
against the same AssetID returns a 500 error.
Working Endpoint:
"/api/asset/assets?filtering=asset.archive eq completed,asset.id eq 1234"
Not Working Endpoint:
"/api/asset/archived_devices/<AssetID>"
Steps to reproduce:
Error:
Get-SmaArchiveAsset -Server 'https://kace.example.com' -Credential (Get-Credential) -AssetID 1234
- Invoke-RestMethod : The remote server returned an error: (500) Internal Server Error.
Workaround using Get-SmaAsset with filter:
Get-SmaAsset -Server 'https://kace.example.com' -Credential (Get-Credential) -QueryParameters "?filtering=asset.archive eq completed,asset.id eq 1234"
+ Returns successfully
I am removing this from the declared available cmdlets until it can be resolved upstream