cancel
Showing results for 
Search instead for 
Did you mean: 
a_person
New Contributor

Central API System Inventory Limit?

Hey

 

Currently working with API without any real issues using python, however;

 

when posting a new inventory report and passing a list of 349 hosts , the result returns only 50.

adjusted by various amount but always 50 unless , the length of the list is under 50 host id's

 

Is this a limit of the API?

 

Thanks

 

 

 

8 REPLIES 8
a_person
New Contributor

Re: Central API System Inventory Limit?

 In short, is there a limit to the amount of HostID's that can be submitted in a post  to a System inventory Report.

 

AshC
LogMeIn Contributor

Re: Central API System Inventory Limit?

Hi, sorry for any confusion there.

It is true that 50 is the current maximum return value, and a continuation token is also returned.  We should have this part updated in the API documents very soon.

 

a_person
New Contributor

Re: Central API System Inventory Limit?

Thanks for the response

 

what is the purpose of the continuation token?

AshC
LogMeIn Contributor

Re: Central API System Inventory Limit?

It’s to assure we don’t potentially dump back several thousand lines in the result that could exceed timeouts on the response or flood the receiving code.

jackbarry
New Contributor

Re: Central API System Inventory Limit?

I'm hitting this issue as well, but I'm not seeing a "continuation token" in the response. The only data in the response I get back is the a report object with token and expires (same token as was used to fetch the report), and the hosts object with an array of 50 hosts. I don't see anything in the headers either

a_Person1
New Contributor

Re: Central API System Inventory Limit?

Hey 

 

I just revisited this myself in the last week,

 

The token is returned in the response, but it the same token as the one generated creating the report, I've not a great programmer but I just put the API call in a loop and check that token was not returned "null" and it works

Hope that helps

a_Person1
New Contributor

Re: Central API System Inventory Limit?

forgot to say, in a loop that check for null token with sleep of 60s between requests.....1000 machines took about 24 mins....eurgh

jackbarry
New Contributor

Re: Central API System Inventory Limit?

Thanks for the pointer, didn't realize that "token" in the response was the indicator that there's more data if you do another GET request with the same token.

 

Yeah I hear ya, we have several thousand machines in the field, so the request rate limit is really tough to work around. What I'm trying to do is cache the data for a single report on all machines to avoid hitting the report generation endpoint too often, but ideally would just be able to create smaller reports more frequently based on host IDs. I guess maybe what we'll have to do is set up a queue instead and have it wait 60s between generating each report, hopefully people are alright with waiting a long time for  their reports...