I am using the code below to attempt to turn specific page rules on and off, however, although the API request returns success, the status of the page rule never changes. I have tried updating (PUT) and editing (PATCH), however, both return the same outcome. I have also tried only including status in the data for the cURL request.
My PHP code:
$data1 = [ 'targets' => [ 'target' => 'url', 'constraint' => [ 'operator' => 'matches', 'value' => 'domain.com/*' ] ], 'actions' => [ 'id' => 'forwarding_url', 'value' => [ 'url' => 'http://www.subdomain.domain2.com/$1', 'status_code' => '302' ] ], "priority" => 2, "status" => "active" ];``` How can I fix this, or what am I doing wrong? Thanks!