Closed sebastiaan-levix closed 4 years ago
Got a little further, it's the tagged item servers that is giving the error. Commenting the tagged field wil upload the data to IT Glue.
How do I send a tagged item?
found it
$apiorg_id = '1694461951918297' $api__Server_id = (Get-ITGlueConfigurations -filter_organization_id $apiorg_id -filter_name WIN-AQL6UQ6JPKO).data.id
traits = @{ "share-name" = 'test' "share-description" = 'description' "servers" = $api__Server_id "share-path" = 'test' "disk-path" = 'C:\testpath\TEST\test' "share-permissions" = 'test' }
And also good to know is that Capital letters are not aloud in traits.
Hope this treat wil help others.
Hi,
I've got the AD automation working and also the File Share is working for me. Now I'd like to create some customizing based on the script but it all seems to be very exact in the coding. ITGlue returns 401 Unauthorized resource access pointer":"id"
I've created a basic test script
`function formatAPIData {
}
try { Import-Module ITGlueAPI } catch { Write-Error "ERROR: The IT Glue API PowerShell module cannot be imported." Write-Error "Please download it from https://github.com/itglue/powershellwrapper, configure it, and try again." }
$api__body = formatAPIData # format data for API call
Write-Host "Creating a new flexible asset."
Running this script returns
When I compare $apibody.attributes and $apibody.attributes.traits to the file share script they are exactly the same. What does this 401 error pointer":"id" mean and how to fix it?
thanks in advance, Sebastiaan