You are not logged in.
Pages: 1
I would like to know if it is possible to approve a ticket via apirest. If so, could you give me a hint on how to configure it?
I thank everyone.
Offline
Use PUT method to update /Ticket/$ticket_id/ITILSolution
$payload='{"input":{"status":"3","id":$solution_id}}';
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
I followed above solution but no luck. Where can I find the solution ID? . Currently i taken it from table " glpi_ticketvalidations"
and this output always shows "int(0) string(0) "" int(0) NULL"
$ch = curl_init();
$url =$api_url . "/Ticket/".$ticket_id."/ITILSolution/";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$input='{"input":{"status":"3","id":"19"}}';
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, $input);
$errno = curl_errno($ch);
$errmsg = curl_error($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$json = curl_exec($ch);
curl_close ($ch);
$obj1 = json_decode($json,true);
I appreciate your help in advance..
Offline
Pages: 1