AnsweredAssumed Answered

AM API limitresults

Question asked by Tatsiana Chatyrbok on Oct 2, 2017
Latest reply on Oct 2, 2017 by Jeff Leggett

Hello!

I need to get all host names with tag = Cloud Agent.

The limit of the results of API is 100 by default, so I was trying to change it, but the biggest number is 1000.

 

$url = https://qualysapi.qualys.com/qps/rest/2.0/search/am/asset?fields=name"
$data = '<ServiceRequest><preferences><limitResults>1001</limitResults></preferences><filters><Criteria field="tagName" operator="EQUALS">Cloud Agent</Criteria></filters></ServiceRequest>'  
Invoke-RestMethod -Headers $headers -contentType "text/xml" -Uri $url -Method Post -Body $data -OutFile $filename 

 

Does anybody know how to get all values (~50 000) ?

 

Thanks,

Tatiana

Outcomes