REST API v4: PUT condition

A method to update a condition. It is called by sending an HTTP PUT request to the following URL:

https://api.copernica.com/v4/condition/$type/$id

The $type and $id need to be replaced by the type and the numerical identifier of the condition respectively.

Available parameters

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:

JSON example

The following JSON demonstrates how to use the API method:

{
    "after-time": "01-01-2000"
}

PHP example

The following example demonstrates how to use this method:

// dependencies
require_once('CopernicaRestAPI.php');

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

// parameters to pass to the call
$data = array(
    'after-time'    => '01-01-2000'
);

// do the call, and print result
$api->put("condition/{$conditionType}/{$conditionID}", array(), $data);

The example above requires the CopernicaRestApi class.

More information