You are not logged in.
Pages: 1
What would be the idea to assign a document to a ticket?
curl -X GET \
-H 'Content-Type: application/json' \
-H "Session-Token: xxxxxx" \
-H "App-Token: xxxxxx" \
-d {"input": { "documents_id":"9101","itemtype":"Ticket","items_id":'2019059732'}} \
'http://xxxxxxx/apirest.php/Document/9102/Document_Item/'
Even that way I can not get anything ..
Offline
try this
URL: yourglpi/apirest.php/Document/1/Document_Item/
//doesn't matter the number after "Document/", works with any number, but I don't know why
App-Token: your app-token
Session-Token: sess_token
Content-Type: application/json
{
"input":{
"documents_id": "", //here the id of the document already in glpi
"items_id": "311", //here the number of the ticket
"itemtype": "Ticket",
"entities_id": "0",
"users_id": "2" //id of the user who assigning the document to a ticket
}
}
I can see in your input, the field items_id not a valid ticket number, or you use plugin behavior that changes the format of ticket numbering?
Offline
Pages: 1