You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
When I request computers list from GLPI, something like this (in Powershell):
$Params = @{
uri = "$GlpiInstance/apirest.php/PluginFieldsComputercmdb?expand_dropdowns=true&range=0-2000"
headers = @{ "Accept" = "application/json"; "App-Token" = $GlpiAppToken; "Session-Token" = $($GlpiAuth.session_token) }
}
$CMDBServers = Invoke-RestMethod @params -UseBasicParsing -SkipCertificateCheck
option expand_dropdowns=true should display names instead of ids and that is perfectly works with, say, simple dropdown. But with multiple dropdown I get emtpy value:
Without this option API returns list of ID, but I prefer names. How can I fix it?
The text was updated successfully, but these errors were encountered:
Hi @Growlert,
What's your GLPI version? These fields were completely empty till now,I opened a request, and Teclib did a fix with 10.0.16 so that it shows the list of IDs also with expand_dropdowns = true, that's much better than before, prevents errors and saves a REST call. I'm happy with this for now and with an additional request for each ID I easily get the names. For GLPI 11 a new REST api is planned, let's wait a bit and see.
Hi, Mirkk.
Thanks for the reply.
I have 10.0.12 installed. Now I will consider to upgrade, hope it will not break something as I have multiple extensions installed also.
Hello.$GlpiAppToken; "Session-Token" = $ ($GlpiAuth.session_token) }
When I request computers list from GLPI, something like this (in Powershell):
$Params = @{
uri = "$GlpiInstance/apirest.php/PluginFieldsComputercmdb?expand_dropdowns=true&range=0-2000"
headers = @{ "Accept" = "application/json"; "App-Token" =
}
$CMDBServers = Invoke-RestMethod @params -UseBasicParsing -SkipCertificateCheck
option expand_dropdowns=true should display names instead of ids and that is perfectly works with, say, simple dropdown. But with multiple dropdown I get emtpy value:
Without this option API returns list of ID, but I prefer names. How can I fix it?
The text was updated successfully, but these errors were encountered: