REST API: PUT rule conditions

A method to edit conditions for a rule. It is called by sending an HTTP POST request to the following URL:$id/conditions/$id?access_token=xxxx

The $id is the ID of the rule and the $type is the type of condition you want to edit.

Available parameters

The message body can hold the following properties for a condition:

  • type: type of condition

Based on the condition type, specific properties are set. For an overview of the supported conditions and the properties that they support, check the specific articles:

PHP example

The following example demonstrates how to use this method. This condition is a field condition, satisfied by anyone with the first name Bob.

// dependencies

// change this into your access token
$api = new CopernicaRestApi("your-access-token");

// parameters to pass to the call
$data = array(
    'type' = 'field'
    'field' = 'firstname'
    'value' = 'Bob'

// do the call, and print result
$api->post("rule/id/conditions/id", array(), $data);

// return id of created request if successful

More information