You are not logged in.
Pages: 1
Hi,
I have a C# application that works on tickets in GLPI (create, update and close). It worked fine so far but after an update to 9.3.2 tickets couldn't be closed anymore.
This is my code:
object par = new { input = new Object[] { new Dictionary<String, Object> { { "id", ticketId }, { "status", 6 } }} };
string resp = glpiConnection.jsonResponse("Ticket", par, "PUT");
which is similar to:
$url=$api_url . "/Ticket/";
method PUT
$input='{ "input": {"tickets_id": '.$ticket_id.' ,"status": "6"}}';
Any ideas?
Best regards, Tom
Offline
i think you should also set ticket_id in url :
$url=$api_url . "/Ticket/".$ticket_Id ."/";
edit : add missing ending /
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 think you should also set ticket_id in url :
$url=$api_url . "/Ticket/".$ticket_Id ;
Same result
Offline
did you check if you have some setting preventing ticket to be closed ?
( mandatory solution, time, lifecycle )
or is your profile allowed to close tickets in this entity ?
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
did you check if you have some setting preventing ticket to be closed ?
( mandatory solution, time, lifecycle )
or is your profile allowed to close tickets in this entity ?
My solution used to work and closing the tickets manually also works. So everything should be right ...
Offline
i checked my 9.3.3 GLPI with :
$input='{ "input": {"tickets_id": '.$ticket_id.' ,"status": "6"}}';
$url="/Ticket/".$ticket_id."/";
it works ( my ticket status was "solved" then changed to "closed" with api)
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 dont see any issue about this in glpi 9.3.3 changelog
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 was wrong with my fisrt url : i forgot ending /
$url="/Ticket/".$ticket_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
Thanks for your help! I found out that it is an issue wirh IIS. I create a new topic for this.
Offline
Hi,
I'm trying to build a new C# application to work with GLPI to open tickets but i can't find a documentation for C# can you please share it with me on mohamed.osama770@gmail.com
Offline
I've used GLPI.NET which you can find here: https://github.com/finalbeta/GLPI.NET.
Let me know if you need further help.
Offline
I could found it but do you have any example of application i can use to start?
Offline
Pages: 1