REST API v3 conditions: Miniview

Conditions are smaller parts of rules. Only one condition has to be satisfied to satisfy a rule. Every condition has a few specific properties.

This article is about the miniview condition. If you're looking for any other condition you can find them in the More information section.

Individual properties

The miniview condition has the following parameters:

  • mini-view: Miniview associated with condition
  • min-subprofiles: Minimum number of subprofiles in the miniview
  • max-subprofiles: Maximum number of subprofiles in the miniview

JSON example

The following JSON demonstrates how to use the API method:

    "type": "MiniView",
    "max-subprofiles": "14"

PHP example

It's possible to combine multiple miniviews if there are too many. Too check if the miniview is small enough to combine you can use the max-subprofiles property of the miniview condition, like this:

// required code

// make a new api object with your access token
$api = new CopernicaRestAPI("your-access-token", 3);

$data = array(
    // select miniview condition
    'type' => 'MiniView',

    // set maximum
    'max-subprofiles' => '14'

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

// print the result

The example above requires the CopernicaRestApi class.

More information