You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-04-27 14:32:08

carniz
Member
Registered: 2023-04-27
Posts: 1

How to search by tags added by the tag plugin

Hi all,

I installed the tag plugin (pluginsGLPI/tag) and added tags to a couple of computers (from the GUI), hoping that I would be able to use the Rest API to find those computers.

However, when I call listSearchOptions/Computer I don't see anything indicating that the tag plugin exposes a possibility to search by tags.

Should I see something in the output from the below request, or is the tag plugin simply not integrated with the API?

curl -s -X GET -H 'Content-Type: application/json' -H "Session-Token: ${GLPI_SESSION_TOKEN}" -H "App-Token: ${GLPI_APP_TOKEN}" "${GLPI_API_ENDPOINT}/listSearchOptions/Computer" | jq .

Offline

#2 2023-10-24 05:21:24

evobe
Member
Registered: 2023-10-22
Posts: 4

Re: How to search by tags added by the tag plugin

For your question - it's the listSearchOptions you want to find the numerical ID of Tags. Then you can forcedisplay it in your query.
Check out the API documentation.
I'd love to know how to list the dropdown from tags.

Last edited by evobe (2023-10-24 05:23:20)

Offline

Board footer

Powered by FluxBB