You are not logged in.
Bonjour,
Je n'arrive pas récupérer via l'API REST les informations relatives au système d'exploitation, il n'y a pas de message d'erreurs dans php-errors.log et les informations sont bien présentes dans l'IHM.
Le problème est aussi présent lors de l'utilisation du plugin "WEBService".
Si quelqu'un a une idée ?
GLPI : 9.3.3
PHP : 7.0.28
Requete CURL : curl -X GET -H 'Content-Type: application/json' -H "Session-Token: ${session}" -H "App-Token: ${App}" 'http://<hst>/glpi/apirest.php/Computer/2220?expand_drodpowns=true'|jq
{
"id": 2220,
"entities_id": 9,
"name": "<hostname>",
"serial": "<xxxxxx>",
"otherserial": null,
"contact": "",
"contact_num": "XXXXX",
"users_id_tech": 0,
"groups_id_tech": 0,
"comment": "",
"date_mod": "2018-09-28 05:45:06",
"autoupdatesystems_id": 0,
"locations_id": 93,
"domains_id": 162,
"networks_id": 0,
"computermodels_id": 224,
"computertypes_id": 52,
"is_template": 0,
"template_name": null,
"manufacturers_id": 2,
"is_deleted": 0,
"is_dynamic": 1,
"users_id": 0,
"groups_id": 58,
"states_id": 10,
"ticket_tco": 0,
"uuid": null,
"date_creation": null,
"is_recursive": 0,
"links": [
{
"rel": "Entity",
"href": "http://<hst>/glpi/apirest.php/Entity/9"
},
{
"rel": "Location",
"href": "http://<hst>/glpi/apirest.php/Location/93"
},
{
"rel": "Domain",
"href": "http://<hst>/glpi/apirest.php/Domain/162"
},
{
"rel": "ComputerModel",
"href": "http://<hst>/glpi/apirest.php/ComputerModel/224"
},
{
"rel": "ComputerType",
"href": "http://<hst>/glpi/apirest.php/ComputerType/52"
},
{
"rel": "Manufacturer",
"href": "http://<hst>/glpi/apirest.php/Manufacturer/2"
},
{
"rel": "Group",
"href": "http://<hst>/glpi/apirest.php/Group/58"
},
{
"rel": "State",
"href": "http://<hst>/glpi/apirest.php/State/10"
},
{
"rel": "ReservationItem",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/ReservationItem/"
},
{
"rel": "Document_Item",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Document_Item/"
},
{
"rel": "Contract_Item",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Contract_Item/"
},
{
"rel": "Infocom",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Infocom/"
},
{
"rel": "Item_Ticket",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_Ticket/"
},
{
"rel": "Item_Project",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_Project/"
},
{
"rel": "NetworkPort",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/NetworkPort/"
},
{
"rel": "Item_DeviceMotherboard",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceMotherboard/"
},
{
"rel": "Item_DeviceFirmware",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceFirmware/"
},
{
"rel": "Item_DeviceProcessor",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceProcessor/"
},
{
"rel": "Item_DeviceMemory",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceMemory/"
},
{
"rel": "Item_DeviceHardDrive",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceHardDrive/"
},
{
"rel": "Item_DeviceNetworkCard",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceNetworkCard/"
},
{
"rel": "Item_DeviceDrive",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceDrive/"
},
{
"rel": "Item_DeviceBattery",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceBattery/"
},
{
"rel": "Item_DeviceGraphicCard",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceGraphicCard/"
},
{
"rel": "Item_DeviceSoundCard",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceSoundCard/"
},
{
"rel": "Item_DeviceControl",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceControl/"
},
{
"rel": "Item_DevicePci",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DevicePci/"
},
{
"rel": "Item_DeviceCase",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceCase/"
},
{
"rel": "Item_DevicePowerSupply",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DevicePowerSupply/"
},
{
"rel": "Item_DeviceGeneric",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceGeneric/"
},
{
"rel": "Item_DeviceSimcard",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceSimcard/"
},
{
"rel": "Item_DeviceSensor",
"href": "http://<hst>/glpi/apirest.php/Computer/2220/Item_DeviceSensor/"
}
]
}
Offline
en forçant l'affichage du champ 45 on récupère l'operating system
$url="/search/Computer/?criteria[0][field]=2&criteria[0][searchtype]=contains&criteria[0][value]=".$ComputerID."&forcedisplay[0]=45";
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
Bonjour,
Merci pour la réponse, par contre je ne comprends pas pourquoi ces champs qui étaient retournés dans les versions 9.1 et 9.2, ne le sont plus dans la version 9.3 ?
Ce serait bien, je pense, de retourner ces informations soit de manière directe (9.1/9.2) ou sous forme de lien.
Offline