REST API: GET minirule conditions
Warning: You are viewing the documentation for the old REST API. We recommend using version 2 of the REST API.
A method to request all conditions from a minirule. This method does not support parameters. It is called by sending an HTTP GET request to the following URL:
In this, $id needs to be replaced by the numerical identifier or the name of the rule you wish to request the conditions for.
There are no available parameters for this method.
This method returns a JSON rule object with the following properties:
- id: numeric ID of the condition
- type: type of condition
- rule: numeric ID of the rule the condition belongs to
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:
- Change conditions
- Date conditions
- DoubleField conditions
- Email conditions
- Fax conditions
- Field conditions
- Interest conditions
- LastContact conditions
- Miniview conditions
- SMS conditions
- Todo conditions
- Survey conditions
- Part conditions
- ReferView conditions
The following example demonstrates how to use this method:
// dependencies require_once('copernica_rest_api.php'); // change this into your access token $api = new CopernicaRestApi("your-access-token"); // do the call, and print result print_r($api->get("minirule/1234/conditions"));
The example above requires the CopernicaRestApi class.