You are not logged in.
Pages: 1
Hi, the is any option to add new Solution to ticket by API ?? I see that's possible to add new followup but i can't find any information about solutions
Offline
Build a PUT request toward the ticket_ID (url + "/Ticket/ID/") and specify those options :
- solutiontypes_id = "ID of the solution"
- solution = "Text of the solution"
If you opted for "Show GLPI ID", you should be able to see the IDs of your different Solutions.
If you don't know what i'm talking about write this in your browser (or build a GET request with "/SolutionType/ at the end of target url) :
yourGLPI_URL/apirest.php + "/SolutionType/" + "?Content-Type=application/json&app_token=aaaaaaaaaaaaaaaaaaaaaaaaaaaaa&session_token=sssssssssssssssssssssssssss"
If nothing returns, you have no Solution built yet.
Build one through a existing ticket, or go to : Home > Setup > Dropdowns > Solution Types.
You can even build solution templates !
Last edited by BoSaGa (2018-11-26 17:48:29)
Offline
with glpi9.3 you should not update ticket but post a itilsolution
$url="...glpi/apirest.php/itilsolution/";
$ticketid="xxxx";
$json='{"input":
{"itemtype":"Ticket",
"items_id":"' . $ticketid .'",
"solutiontypes_id":2,
"solutiontype_name":null,
"content":"MySolutionDescription",
"status":3
}}';
status values are :
// STATUS
const NONE = 1; // none
const WAITING = 2; // waiting
const ACCEPTED = 3; // accepted
const REFUSED = 4; // rejected
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
Great ! It works Thank you very much for your help
Offline
Pages: 1