Closed IanPennebaker closed 5 years ago
Hey @IanPennebaker,
The New-ITGlueFlexibleAssets
function already takes care of the JSON conversion for you, so you shouldn't need to use the ConvertTo-Json
function. Can you try without it and let me know what response you get? You should just be able to run:
$output = New-ITGlueFlexibleAssets -data $data
Hey @CalebAlbers
I removed the ConvertTo-JSON and am now getting the following error: `New-ITGlueFlexibleAssets : {"errors":[{"status":401,"title":"Unauthorized","detail":"Unauthorized resource access","source":{"pointer":"id"}}]} At line:12 char:11
Base URI and API Key are correct as I was able to create a new location.
SOLVED
My "location" field had to take the location ID rather than name.
I am completely lost. Here is my very simple code. ` $data = @{
}
$output = New-ITGlueFlexibleAssets -data (ConvertTo-Json $data) `
And here is the error I get: ` New-ITGlueFlexibleAssets : The remote server returned an error: (500) Internal Server Error. At line:1 char:11
Does anyone have any idea? Thanks in advanced.