JSC
Apr 27, 2017Nimbostratus
Importing ASM profile with iControl REST to a custom BigIP partition
Using iControl REST for ASM module (F5 BigIP v12.1.2), I cannot figure out how to import an ASM profile to a custom partition, only
/common
seems possible...
Is there a specific parameter or HTTP header to provide?
payload={}
payload['file']=open('/home/user/sample_asm.xml,"rb").read()
payload['name']='ASM_POLICY'
bigip.post('https://%s/mgmt/tm/asm/tasks/import-policy?ver=12.1.2' % (BIGIP_ADDRESS), data=json.dumps(payload))
- https://devcentral.f5.com/d/icontrol-rest-api-user-guide-version-1210
- https://devcentral.f5.com/questions/applying-an-asm-policy-using-icontrol-rest
thanks,
JSC