KaceSMA icon indicating copy to clipboard operation
KaceSMA copied to clipboard

Get-SmaArchiveAsset does not properly return archived assets

Open ArtisanByteCrafter opened this issue 5 years ago • 1 comments

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
 

ArtisanByteCrafter avatar Apr 18 '19 14:04 ArtisanByteCrafter

I am removing this from the declared available cmdlets until it can be resolved upstream

ArtisanByteCrafter avatar Oct 31 '19 15:10 ArtisanByteCrafter