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-03-14 00:11:37

herye11
Member
Registered: 2020-05-29
Posts: 4

expand_dropdowns not working on Search REST API

I'm looking to search for tickets under a specific field Id and I do get the results but rather than seeing the IDs, I would like to see the field names instead. I tried adding the expand_dropdowns = true but it still shows ID. Is there anything I'm missing on this URL?

/apirest.php/search/Ticket/?is_deleted=0&criteria[0][link]=AND&criteria[0][field]=7&criteria[0][searchtype]=equals&criteria[0][value]=8&criteria[0][itemtype]=Ticket&sort=2&order=DESC&range=0-50&forcedisplay[0]=1&forcedisplay[1]=2&forcedisplay[2]=12&forcedisplay[3]=10&forcedisplay[3]=15&forcedisplay[4]=16&forcedisplay[5]=18&forcedisplay[6]=17&forcedisplay[7]=19&forcedisplay[8]=7&forcedisplay[9]=45&forcedisplay[10]=5&expand_dropdowns=true



Result:

{
    "totalcount": 1206,
    "count": 51,
    "sort": [
        2
    ],
    "order": [
        "DESC"
    ],
    "data": [
        {
            "2": 4304,
            "1": "Issue",
            "12": 2,
            "15": "2023-03-14 00:22:09",
            "16": null,
            "18": null,
            "17": null,
            "19": "2023-03-14 02:07:17",
            "7": "IT",
            "45": 0,
            "5": "11"
        }
],
    "content-range": "0-50/1206"
}

Offline

#2 2023-03-14 00:16:37

herye11
Member
Registered: 2020-05-29
Posts: 4

Re: expand_dropdowns not working on Search REST API

Update: for now, I used uid_cols=true and that may work if the expand_dropdowns can't.

Offline

Board footer

Powered by FluxBB