Forum Discussion

emilorol_373618's avatar
emilorol_373618
Icon for Nimbostratus rankNimbostratus
Oct 03, 2018

Payload content to apply a rule

What is the payload content to apply a rule from the REST interface?

 

I am currently using PHP to interface with the REST API and I can connect and list all the rules, but now I need to apply one of the rules and later on I need to remove it, but not delete it.

 

Connecting to REST interface: https://devcentral.f5.com/codeshare/using-php-to-connect-to-icontrol-rest-interface-1172

 

Thank you,

 

Emil

 

1 Reply

  • You can also use my PHP class in Codeshare:

    https://devcentral.f5.com/codeshare/php-and-icontrol-rest

    include("iCR_class.php");
    $r = new iCR ("172.24.9.129");
     Retrieve the iRule
    $rule = $r->get("/ltm/rule/iRuleTest");
    print_r($rule);
     Modify the iRule
    $description = array('description' => 'This is a modified iRule');
    print_r($r->modify("/ltm/rule/iRuleTest",$description));
    

    Feel free to PM me with details if you want any help with this.