People and Device Inventory

שולם
Neurons
על ידי Ivanti | מְעוּדכָּן 7달 전 | Discover
חזרה לכל הדיונים

number of devices returned

Rapid account: Andrede Meijer
AndredeMeijer
일 년 전

Hi When I use the Get Devices, I only get 10 devices althoug my tenant has 888 devices, how can I retrieve all devices ?

Rapid account: Benoitpourville
benoitpourville commented 15일 전

Hello,

We want to extract all the Devices in our Tenant with this URL : people-and-device-inventory.ivanti.rapidapi.com

Our script is fully functionnal but we have 57K endpoints to extract. It took more than 1 hour to extract with the API Request Limitation (150/minute).

Is it possible to extend the token to 2 hour ?

Thank you.

Rapid account: Stevencarman
stevencarman commented 일 년 전

Did you ever get this working? Have you ran into issues with the bearer token expiring?

Rapid account: Andrede Meijer
AndredeMeijer commented 일 년 전

I believe I found the solution:

Neurons devices

Get API token

headers=@headers=@{} headers.Add(“X-TenantId”, “XXXX”)
headers.Add("XClientSecret","XXXX")headers.Add("X-ClientSecret", "XXXX") headers.Add(“X-ClientId”, “XXXXX”)
headers.Add("XRapidAPIKey","XXXXXX)headers.Add("X-RapidAPI-Key", "XXXXXX) headers.Add(“X-RapidAPI-Host”, “people-and-device-inventory.ivanti.rapidapi.com”)

$key = Invoke-RestMethod -Uri ‘https://people-and-device-inventory.p.rapidapi.com/api/apigatewaydataservices/v1/Token’ -Method GET -Headers $headers

Connection details to rapidApi

headers=@headers=@{} headers.Add(“Authorization”, "Bearer key")key") headers.Add(“X-RapidAPI-Key”, “XXXXXXX”)
headers.Add("XRapidAPIHost","peopleanddeviceinventory.ivanti.rapidapi.com")headers.Add("X-RapidAPI-Host", "people-and-device-inventory.ivanti.rapidapi.com") response = Invoke-RestMethod -Uri ‘https://people-and-device-inventory.p.rapidapi.com/api/apigatewaydataservices/v1/devices’ -Method GET -Headers $headers

get all result pages

all=@()all = @() all+=$response.value

while($response.’@odata.nextLink’ -ne $null) {
$response = Invoke-RestMethod $response.’@odata.nextLink’ -Method Get -Headers $Headers
$all += $response.value
}

$all | ConvertTo-Json -Depth 100 | Out-File “c:\temp\devices.json”

Does this sound right ?

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות