Wackitron_36350
Feb 01, 2019Altocumulus
Automate the IP whitelist creation in bulk for the ASM Polciy via iControl REST
Hi F5 Fraternity,
I am trying to create/update the IP whitelist for a ASM Policy. I am using below POST icontrol REST API call via Postman using Basic Auth:
**POST:** https://{{bigip-dev_mgmt}}/mgmt/tm/{{module}}/policies/{{asm_policy_hash}}/whitelist-ips
**Body:**
{
"ignoreIpReputation": true,
"blockRequests": "policy-default",
"ignoreAnomalies": false,
"neverLogRequests": false,
"ipAddress": "1.1.1.1",
"description": "Tango",
"kind": "tm:asm:policies:whitelist-ips:whitelist-ipstate",
"neverLearnRequests": false,
"ipMask": "255.255.255.255",
"trustedByPolicyBuilder": false
}
**Headers:**
Content-type: application/json
This one does the Job but it adds just one IP. I have like some 40-50 IPs that I need to add to the ASM IP address exception. Is there any way of adding the entire list of IPs as a body doing just one API call?
I appreciate the help in advance.