Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

REST API: PUT collection

Method to change the properties of a collection. This method can be used by sending an HTTP PUT request to the following URL:

https://api.copernica.com/v3/collection/$id?access_token=xxxx

The $id should be replaced with the ID of the collection that you want to edit.

Available data

The following properties can be adjusted by placing their new values in the message body of the HTTP PUT command:

  • name: the new name of the collection

PHP example

The following PHP scripts demonstrates how to call the API method:

// dependencies
require_once('copernica-rest-api.php');

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

// data to be sent to the api
$data = array(
    'name'  =>  'new-collection-name'
);
    
// do the call
$api->put("collection/{$collectionID}", $data);

The example above requires the CopernicaRestApi class.

More information