Kaseya Community

REST API Limit

This question is answered

I am trying to create a straightforward dashboard for our ServiceDesk. 

After figuring out the REST API i run in to issues with the limit of results the API gives me. The limit is set to 100 but if for example i want to report the number of machines online i get over that number. What options do i have.

Reference:

page 11: http://help.kaseya.com/webhelp/EN/RESTAPI/9040000/EN_restapiguide_R94.pdf#zoom=70&navpanes=0

"Note: The maximum number of records that can be returned by a GET request is 100, even if no paging expression is used." 

Preview:

Verified Answer
  • There are Start and Count arguments for these calls. The first call also returns the total number of available records. I usually take that and subtract the 100 records I just got. If the result is >=1, I increment the Start value by 100 and make another query. Subtract 100 from the total and repeat. You can either process them in blocks of 100, or just keep stuffing the results into an array that you expand by 100 each time.

    I always provide the Start/Count values, with initial values of 0/100.

    I'm on the road this week but would be happy to have a quick GTM session to illustrate how we do this sometime next week. PM me if interested. We have written a library for nearly all of the APIs and use them extensively in our software.

    Glenn

All Replies
  • There are Start and Count arguments for these calls. The first call also returns the total number of available records. I usually take that and subtract the 100 records I just got. If the result is >=1, I increment the Start value by 100 and make another query. Subtract 100 from the total and repeat. You can either process them in blocks of 100, or just keep stuffing the results into an array that you expand by 100 each time.

    I always provide the Start/Count values, with initial values of 0/100.

    I'm on the road this week but would be happy to have a quick GTM session to illustrate how we do this sometime next week. PM me if interested. We have written a library for nearly all of the APIs and use them extensively in our software.

    Glenn

  • HI Glenn,

    Thanks for the quick response! I will first have another go with your advice. For now i don't need more the the tot record count. What we really are missing in kaseya at the moment is a live view of the stats and if one or multiple machines are down which those are. I am not in a rush at all so will report back on my findings and if it would benefit to session. Again thanks!

  • Hi Glenn,

    That was easy! Found it. Again Thanks!

    --------

    {TotalRecords: 285, Result: Array(100), ResponseCode: 0, Status: "OK", Error: "None"}

    Error: "None"

    ResponseCode: 0

    Result: (100) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]

    Status: "OK"

    TotalRecords: 285

    __proto__: Object

  • Thanks - this really helps me too.

    Matthew Gierc
    Head of Marketing at 3AG Systems
    Check out our latest blog: What is ad-hoc analysis?