Forum Discussion

James_Thomson's avatar
Jan 18, 2016

ASM iControl REST md5hash

I'm trying to find the easiest way to create, delete and manage objects. Based on the iControl REST 11.6 document, I see when you create an object like a policy, it assigns, what they call and gives it the attribute "id". To delete that object, it looks like I need to reference the ID as opposed to the name. If you've done ASM iControl REST, let me know if 1.You've found a way to delete or modify an object based on the name instead of the id. 2.Is there a way to create the ID by yourself so you know what it is and don't need to query the object afterwards to find out what the id is.

 

Doing a DELETE to mgmt/tm/asm/policies?$filter=name eq mypolicy doesn't work. You get, method not supported.

 

I tried doing a POST with some JSON like this, but it doesn't take the "id" I used.

 

Code

{
"name": "mypolicy2",
"id": "66749c9f11a9877add66f3a706e5c2cd",
    "description": "Rapid Deployment security policy via REST",
"policyBuilderEnabled": false,
"partition": "Common",
"templateReference": {"link": "https://localhost/mgmt/tm/asm/policy-templates/jmHjN-Fpm-SGwYQsrZp57A"},
"protocolIndependent": false,
"applicationLanguage": "utf-8",
"enforcementMode": "transparent"
    }