Assign iRule to Virtual Server via iControl REST
Hi guys,
I am trying to create a Virtual Server using iControl REST API but I have problems specifying the iRule to be assigned to the server.
Here is the JSON content I am POST-ing:
{"name": "iControl_virtual", "rules": ["/Common/_sys_https_redirect"], "mask": "255.255.255.255", "nat64": "disabled", "destination": "192.168.1.30:80", "enabled": null, "sourceAddressTranslation": {"type": "automap"}, "source": "0.0.0.0/0", "profiles": [ {"kind": "ltm:virtual:profile", "name": "tcp"}, {"kind": "ltm:virtual:profile", "name": "http"} ], "mobileAppTunnel": "disabled", "mirror": "disabled", "ipProtocol": "tcp", "pool": "icontrol_pool", "description": "A Python REST client test virtual server"}
And the error returned by F5:
{"errorStack": ["java.net.ProtocolException: Status code:400, uri: body: {\"errorResponse\":\"{\\"error\\":{\\"code\\":400,\\"message\\":\\"\\\\"replace-all-with\\\\" unexpected argument\\"}}\",\"errorStack\":[]}"
I have the feeling I'm missing something here. Would appreciate any help.
F5 firmware: BIG-IP 11.4.1 Build 608.0 Final
Thanks, Radu