You are not logged in.
Hi,
How can I get from the API the urgency, priority or impact of a ticket in long form, not the ids?
I have tried with the parameter expand_dropdowns=true but it keeps returning the ids and not the names.
/glpi/apirest.php/Ticket/XXX?expand_dropdowns=true
"urgency": 2,
"impact": 3,
"priority": 2,
...
I would like the result to be:
"urgency": Low,
"impact": Medium,
"priority": Low,
...
regards.
Last edited by alexmicontini (2023-01-02 15:53:59)
Offline
These fields are not dropdowns in this sense. "expand_dropdowns" only affects fields that are configured in Setup > Dropdowns.
For non-configurable dropdown fields like these, it doesn't know how to translate the value stored in the database to the localized name.
We are currently working on a new API that would be more user-friendly, if not as powerful, that would exist alongside the current one. It should be more possible to have fields like this show the value and name at the same time in this new API. You can follow its development here:
https://github.com/glpi-project/glpi/pull/12221
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hi @cconard96,
OK, i will follow the development of the new API.
Thank you very much for answering.
Great job.
Offline