\n\n
TMSH: show security policy restApiDemo
\n
[root@C2629643-bigip1:Active:Standalone] config # curl -sk -u admin:admin -H \"Content-Type: application/json\" -X GET https://localhost/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules | python -m json.tool\n{\n\"items\": [\n{\n\"action\": \"reject\",\n\"destination\": {},\n\"fullPath\": \"myRule1\",\n\"generation\": 1360,\n\"ipProtocol\": \"any\",\n\"iruleSampleRate\": 1,\n\"kind\": \"tm:security:firewall:policy:rules:rulesstate\",\n\"log\": \"no\",\n\"name\": \"myRule1\",\n\"selfLink\": \"https://localhost/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules/myRule1?ver=13.1.0.2\",\n\"source\": {\n\"identity\": {}\n},\n\"status\": \"enabled\"\n}\n],\n\"kind\": \"tm:security:firewall:policy:rules:rulescollectionstate\",\n\"selfLink\": \"https://localhost/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules?ver=13.1.0.2\"\n}
\n\n
TMSH: security firewall policy restApiDemo rules modify { myRule1 { action accept } }
\n
[root@C2629643-bigip1:Active:Standalone] config # curl -sk -u admin:admin -H \"Content-Type: application/json\" -X PATCH -d '{\"action\":\"accept\"}' https://localhost/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules/myRule1 | python -m json.tool\n{\n\"action\": \"accept\",\n\"destination\": {},\n\"fullPath\": \"myRule1\",\n\"generation\": 1364,\n\"ipProtocol\": \"any\",\n\"iruleSampleRate\": 1,\n\"kind\": \"tm:security:firewall:policy:rules:rulesstate\",\n\"log\": \"no\",\n\"name\": \"myRule1\",\n\"selfLink\": \"https://localhost/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules/myRule1?ver=13.1.0.2\",\n\"source\": {\n\"identity\": {}\n},\n\"status\": \"enabled\"\n}
\n\n
TMSH: modify security firewall policy restApiDemo rules delete { myRule1 }
\n
[root@C2629643-bigip1:Active:Standalone] config # curl -sk -u admin:admin -H \"Content-Type: application/json\" -X DELETE https://localhost/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules/myRule1 | python -m json.tool\nNo JSON object could be decoded\n\n