You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-02-04 13:59:37

imad.brahimi
Member
Registered: 2021-02-03
Posts: 1

Rest API and PowerShell: list all computers

Hello,

I want to list all the computers in GLPI. Because the number of computers increases, so the "range = 0-1000" function does not meet my needs.

Here is the query I am currently using:

$ SearchResult = Invoke-RestMethod "$ AppURL / computer /? & Is_deleted = 0 & range = 0-1000 & expand_dropdowns = 1" -Headers @ {"session-token" = $ SessionToken.session_token; "App-Token" = "$ AppToken"}

Also how can I get the "last inventory" parameter from Fusion Inventory?

Thank you

Offline

#2 2021-02-07 12:31:17

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: Rest API and PowerShell: list all computers

to get last inventory  add forcedisplay[x]=5150


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

Board footer

Powered by FluxBB