Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

saidshow_251381's avatar
saidshow_251381
Icon for Cirrostratus rankCirrostratus
9 years ago

iControlREST and Curl to save and download ASM policies

Hi,

I want to be able to save/export asm policies on the F5 and then download. I want to do this using iControlREST and curl.

I am able to save UCS files with the post shown below:

curl -v -sk -u admin:admin https://myF5/mgmt/tm/sys/ucs -H 'Content-Type: application/json' -X POST -d '{"command":"save","name":"blah.ucs"}' | jq

 

However if I try to do something similar for asm I get errors. Below is what I was trying with asm.

curl -v -sk -u admin:admin https://myF5/mgmt/tm/asm/policies/fn9GoMrandomGvoN2dD  -H 'Content-Type: application/json' -X POST -d '{"command":"save","name":"as_test.xml"}' | jq

 

The error I get is: { "code": 400, "message": "Could not parse/validate the Policy 'Security Policy /Common/as_test'. Unknown field 'command'", "originalRequestBody": "{\"command\":\"save\",\"name\":\"as_test.xml\"", "referer": "x.x.x.x", "restOperationId": 59083, "kind": ":resterrorresponse" }

Thank you

5 Replies

No RepliesBe the first to reply