Forum Discussion
Assign iRule to Virtual Server with iControl REST
Hi all,
I've been trying to assign an iRule to a Virtual Server using the iControl REST but failed. I get the following error: Status code:403, "Operation is not supported on configuration item /ltm/virtual." .
Below is the JSON information I'm trying to PUT (tried with PUSH as well).
{ "name":"iControl_virtual", "rules":"[ {'name':'/Common/_sys_https_redirect'} ]" }
Is this a known issue? I'm testing on 11.4 version.
Thanks, Radu
If you're on 11.4, it is a known issue, fixed in 11.5:
https://support.f5.com/kb/en-us/solutions/public/14000/600/sol14673.html
- John_Alam_45640Historic F5 Account
This works for me on 11.6
curl -sk -u admin:admin -H "Content-Type: application/json" https://localhost/mgmt/tm/ltm/virtual/fasthttp_tst -X PUT -d '{"rules":["/Common/_sys_https_redirect"]}'
Note how the iRule is specified:
"rules":["/Common/_sys_https_redirect"]
This will display the virtual configuration so you can test and see how parameters are specified.
curl -sk -u admin:admin -H "Content-Type: application/json" https://localhost/mgmt/tm/ltm/virtual/fasthttp_tst | sed 's/,/\'$'\n/g'
- Christopher_Wo2Altocumulus
If you're on 11.4, it is a known issue, fixed in 11.5:
https://support.f5.com/kb/en-us/solutions/public/14000/600/sol14673.html
- Radu_Faragau_18Nimbostratus
Thanks guys. Really appreciate your help.
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