Forum Discussion
WAF Policy upload using AS3
I am using per-app declaration to upload multiple WAF policies in an app. when I post the declaration using POST command, i only get 202 accepted, and in the backend, the F5 uploads the ASM policies. How can I get to know iff all the policies are uploaded successfully or if any have failed? Is there any command or rest api?
POST : https:/<f5ip>/mgmt/shared/appsvcs/declare/Demo/applications
{
"id": "per-app-declaration",
"schemaVersion": "3.54.2",
"controls": {
"class": "Controls",
"logLevel": "debug",
"trace": true
},
"WMS_ASM": {
"class": "Application",
"template": "generic",
"wms_Dispatcher_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_Dispatcher_asm_file.xml"
},
"wms_MessageStoreAPI_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_MessageStoreAPI_asm_file.xml"
},
"wms_abdg_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_abdg_asm_file.xml"
},
"wms_auth_asm_v173": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_auth_asm_file.xml"
},
"wms_carrier-info_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_carrier-info_asm_file.xml"
},
"wms_cas_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_cas_asm_file.xml"
},
"wms_csdui_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_csdui_asm_file.xml"
},
"wms_csrkodiak_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_csrkodiak_asm_file.xml"
},
"wms_getContactAddlInfo_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_getContactAddlInfo_asm_file.xml"
},
"wms_keymanagement_asm_v174": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_keymanagement_asm_file.xml"
},
"wms_kodiakidsprov_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_kodiakidsprov_asm_file.xml"
},
"wms_lcms_asm_v173": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_lcms_asm_file.xml"
},
"wms_mcsxcap_asm_v173": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_mcsxcap_asm_file.xml"
},
"wms_mobileapi_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_mobileapi_asm_file.xml"
},
"wms_ngcat_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_ngcat_asm_file.xml"
},
"wms_oidcxcap_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_oidcxcap_asm_file.xml"
},
"wms_tpams_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_tpams_asm_file.xml"
},
"wms_wcsr_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_wcsr_asm_file.xml"
},
"wms_webdispatcher_asm_v172": {
"class": "WAF_Policy",
"file": "/var/tmp/v17/wms_webdispatcher_asm_file.xml"
}
}
}
1 Reply
Have you run a GET request against the same API URL Endpoint "/mgmt/shared/appsvcs/declare/Demo/applications"? Usually that is how it works.
Also using using a repo like github and F5 AWAF/ASM webhook will make life easier https://community.f5.com/kb/technicalarticles/manage-f5-big-ip-advanced-waf-configuration-drift-with-webhooks-and-gitops/300988
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com