-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use this wrapper to find subitems? #50
Comments
I just wrote some code without the this wrapper to fetch them. I must say the API is easy to query using Invoke-WebRequest. $BaseURL = "https://webservices19.autotask.net/ATServicesRest/V1.0"
$ApiIntegrationCode = 'XXX'
$UserName = 'XXX'
$Secret = 'XXX'
$Headers = @{
'ApiIntegrationCode' = $ApiIntegrationCode
'UserName' = $UserName
'Secret' = $Secret
}
$Uri = "$BaseURL/Tickets/entityInformation/fields"
$Picklists = ((Invoke-WebRequest -Uri $Uri -Method "GET" -ContentType 'application/json' -Headers $Headers -UseBasicParsing).Content | ConvertFrom-Json).Fields
#Monitoring Alert ID opzoeken
$IssueId = (($Picklists | Where-Object {$_.Name -Eq "issueType"}).picklistValues | Where-Object {$_.Label -Eq "Monitoring Alert"}).value
#SUBS van Monitoring Alert opzoeken
$SubIssueIds = ($Picklists | Where-Object {$_.Name -Eq "subIssueType"}).picklistValues | Where-Object {$_.parentValue -Eq $IssueId}
|
Hi @me1299 The
This cmdlet is dual purpose in that it also builds an object you can use to create or update existing resources. Unfortunately there seems to be a bug when querying picklist values in the EDIT: The bug I found has already been opened: #49 (comment) |
I'm trying to query EntityInformation fields. I know the API call should be:
/ATServicesRest/V1.0/Tickets/entityInformation/fields
But using
Get-AutotaskAPIResource
I have to use a resource. There is no resourceEntityInformationFields
or anything like that. How do I query this? I cannot find any supporting documentation in the readme.Edit: they are called picklist values.
The text was updated successfully, but these errors were encountered: