You are not logged in.
Hey guys.
I got some fat-twins in my racks, so I added them as enclosures and put servers into. How do I fetch items from enclosure using api?
Request:
curl -L -X GET 'http://myglpi1z1/apirest.php/enclosure/2?expand_dropdowns=true&get_hateoas=false' \
-H 'Content-Type: application/json' \
-H 'App-Token: 7Ja9hnKdzABCL7qAi1CNSwyDCDarb2gFGqgZfLVL' \
-H 'Session-Token: 97c8bbf287ded6d991a4bc1e55e1675c' \
-d ''
Response:
{
"id": 2,
"name": "Chasis #0001",
"entities_id": "Root entity",
"is_recursive": 0,
"locations_id": "Z3",
"serial": "217286078",
"otherserial": "",
"enclosuremodels_id": "Inspur SA5248M4",
"users_id_tech": 0,
"groups_id_tech": 0,
"is_template": 0,
"template_name": null,
"is_deleted": 0,
"orientation": null,
"power_supplies": 2,
"states_id": "Rack-On",
"comment": "",
"manufacturers_id": "Inspur",
"date_mod": "2023-11-07 09:57:30",
"date_creation": "2023-06-16 14:21:07"
}
Offline
/apirest.php/Enclosure/2/Item_Enclosure
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
Thanks, man. You just saved my ass))
Offline