You are not logged in.
I am using APIs for creating tickets in GLPI.
Below mentioned are demo Fields fetched from GET request:
"id": 13,
"entities_id": 1,
"name": "Testing_ticket creation",
"status": 2,
"users_id_recipient": 12,
"requesttypes_id": 4,
"content": "Dummy data",
"priority": 4,
"itilcategories_id": 2,
"type": 2,
"global_validation": 4,
Can anyone please help with the mappings for these fields like - status (1-New, 2-Processing, 3-Pending, 4-Solved, 5-Closed) for the remaining fields.
Is there any documentation present under api documentation.
Offline
entities_id, users_id,"requesttypes_id", "itilcategories_id", => see associated tables or administration>entities, administration>users , setup>dropdowns
priority( see .../glpi/src/CommonITILobject.php
// STATUS
switch ($value) {
case 6:
return _x('priority', 'Major');case 5:
return _x('priority', 'Very high');case 4:
return _x('priority', 'High');case 3:
return _x('priority', 'Medium');case 2:
return _x('priority', 'Low');case 1:
return _x('priority', 'Very low');
Validation ( see .../glpi/src/CommonITILValidation.php
// STATUS
const NONE = 1; // none
const WAITING = 2; // waiting
const ACCEPTED = 3; // accepted
const REFUSED = 4; // rejected
Type( see .../glpi/src/Ticket.php
// Request type
const INCIDENT_TYPE = 1;
// Demand type
const DEMAND_TYPE = 2;
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
Can anyone please help with the mappings for these fields like - status (1-New, 2-Processing, 3-Pending, 4-Solved, 5-Closed) for the remaining fields.
Is there any documentation present under api documentation.
No. For hard-coded enums like those we do not have them all listed in documentation somewhere.
Although, if you have other fields you aren't sure what the possible values are/mean, I expect you could get fairly quick answers in the forum. I usually check the forums daily.
We are however working on a new high-level API to supplement the current low-level one.
This new API will bring improved documentation (among many other improvements to make is more user friendly) via OpenAPI/Swagger with each endpoint and field have documentation associated with them.
This new API will be included with 10.1.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline