AnsweredAssumed Answered

Curl command to read from file ?? More efficent

Question asked by Kevin Ryan on Sep 24, 2019
Latest reply on Sep 26, 2019 by Busby

Good Day, 

 

I am by no means a developer but through trial and error along with reading many of the posts manuals have gotten comfortable tackling api calls using the simple old curl command.    I am now at a point where I want to create 1000 asset groups via api and my approach doesn't seem really efficient. Basically I was going to create a batch file going line by line (1000 times) with the below command 

curl -u "username:password" -H "X-Requested-With:curl" -d "title=AG:ATL1Zone&ips=10.10.200.0/24" "https://qualysapi.qg3.apps.qualys.com/api/2.0/fo/asset/group/?action=add"

 

Any recommendations ?  Hoping not to have to learn a whole language at this point just the ability to read information from a file and curl it ! 

 

Thanks 

 

Kevin 

Outcomes