derekv

API Call Not Adhering To Limit Results Default Paramater

Discussion created by derekv on Aug 26, 2019

I am downloading data from my account about hosts using: the following api url: \'https://qualysapi.qualys.com/qps/rest/2.0/search/am/hostasset/?fields=id,name,created,modified,lastVulnScan,dnsHostName,netbiosName,address\' 

 

I have a script that dynamically builds my xml I am posting... It starts with the "StartFromOffset" parameter at 1. I then add 100 each on each iteration... so 1, then 101, then 201, then 301, etc... This happens until the "hasMoreRecords" field in the return xml is "false. What I ams seeing it that one each pass, instead of giving me the next 100, it is giving me 1-x where x is the next set...

So "StartFromOffset" = 100 returns 1-200, =200 returns 1-300, so on and so on...

 

So it apparently is ignoring the whole default limit of "100" per the pagination documentation on page 11 in  https://www.qualys.com/docs/qualys-asset-management-tagging-api-v2-user-guide.pdf

 

You have to specify the default that you want... Which seems odd to me. 

 

Outcomes