People and Device Inventory

유료
분류별 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 ?

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입