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 2020-07-15 14:37:56

RickSanchez
Member
Registered: 2020-07-15
Posts: 4

Rest API "Processing ticket"

hello (sorry for my english)
How work with "Processing ticket" by API.
I can create new Ticket and change his status but can't add "Followup", "Task", "Document" and "Solution".
and work with timer

Offline

#2 2020-07-15 15:19:56

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,168

Re: Rest API "Processing ticket"


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#3 2020-07-15 17:56:57

mecmav
Member
From: Brasil
Registered: 2019-03-22
Posts: 326

Re: Rest API "Processing ticket"

to insert a Followup: apirest.php/Ticket/ticket_id/ITILFollowup (POST)

a solution: apirest.php/ITILSolution/items_id (POST)

Offline

#4 2020-07-16 08:39:39

RickSanchez
Member
Registered: 2020-07-15
Posts: 4

Re: Rest API "Processing ticket"

Thanks!

Followup work

but how work with "Task"?

Offline

#5 2020-07-16 09:32:50

RickSanchez
Member
Registered: 2020-07-15
Posts: 4

Re: Rest API "Processing ticket"

ok i got it

Offline

#6 2020-07-16 09:40:42

RickSanchez
Member
Registered: 2020-07-15
Posts: 4

Re: Rest API "Processing ticket"

how work with timer?
glpip.png

Offline

#7 2020-12-02 13:03:47

Jean-Christophe
Moderator
Registered: 2007-08-22
Posts: 734

Re: Rest API "Processing ticket"

RickSanchez wrote:

ok i got it

How did you manage to get the task creation working.
I still have a "you don't have persmission" message...

Thanks smile

Offline

#8 2020-12-02 13:15:09

Jean-Christophe
Moderator
Registered: 2007-08-22
Posts: 734

Re: Rest API "Processing ticket"

Never mind, I also got it.

Using the Powershell module here is the code bloc

$TicketID = 13998

$NewTask = @{
    tickets_id = $TicketID
    content = "Tâche créée via script"
    users_id_tech = "633"
    state = "1"
    groups_id_tech = "0"
    }
Add-GlpiItem -Creds $GlpiCreds -ItemType TicketTask -Details $NewTask

Offline

Board footer

Powered by FluxBB