You are not logged in.
Pages: 1
Hello.
Yesterday I got help on another thread and now I can search for tickets that had followups in between two dates using this endpoint:
/apirest.php/search/Ticket
With these parameters:
{
forcedisplay: [2, 36, 93],
criteria: [
{ field: 36, searchtype: 'morethan', value: '2020-06-01 00:00:00' },
{ link: 'AND', field: 36, searchtype: 'lessthan', value: '2020-06-30 23:59:59' },
],
}
And this is the returned data:
[
{1: "Ticket title...", 2: 111111, 36: ["2020-06-01 01:01:01", "2020-06-02 02:02:02", "2020-06-03 03:03:03"], 93: [11, 22]},
{1: "Ticket title...", 2: 222222, 36: ["2020-06-01 04:04:04", "2020-06-05 05:05:05"], 93: 11},
]
However the followup dates and users are listed separately and I can't correlate them because unique users are listed only once.
How can I get the followups with their date and corresponding user?
Thank you in advance.
Offline
I use php, and this is what i would do in this case
foreach($obj[data] as $ticket){
$ticket_id=$ticket[2];
$url=".../apirest.php/Ticket/"$ticket_id.."/ITILFollowup/";
/**** then display ticket id and followups or build an array or....***/
}
Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9
Offline
Thank you.
I was hoping I could get those in a single request but I'll fetch them in a loop like you're suggesting.
Offline
I don't think there was another way to do that. ( it doesn't mean there is no way to achive this in one step)
Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9
Offline
Pages: 1