You are not logged in.
Pages: 1
Hi,
I am just getting started with the glpi API and run into this issue while querying for "all items" from a collection.
The docs say the url is
URL: apirest.php/:computer/ would return me the entire list of machines. However, I am only getting like 32 machines when its suppose to return 500~
furthermore, when i use "Get an item" to get a single item, and use a script to iterate through 500 ids, I am able to get the information of all 500~ machines
URL: apirest.php/:computer/:id
Any thoughts?
Thanks!
Offline
did you set range ?
$url="/Computer/?is_deleted=0&range=0-500&get_hateoas=0";
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
did you set range ?
$url="/Computer/?is_deleted=0&range=0-500&get_hateoas=0";
Ah, Ic yup that just fixed it.
Thanks for the quick responds!
Offline
follow up question, when query /computers the json it returns includes the "links" entry which has DeviceGraphicCard linked to /Computer/256/DeviceGraphicCard/.
But when i go on that url, it gives back a whole list of graphics cards instead of the one linked to that specific machine.
How would i query the graphics card specific to that machine?
Offline
Pages: 1