REST API: GET collection
A collection is somewhat like a second layer within a database. These collections have a numerical ID which can be used to fetch information with an HTTP GET request to the following URL:
$id here should be replaced with the numerical identifier of the collection.
- ID: unique numerical identifier
- name: name of the collection
- database: ID of the database this collection belongs to.
- fields:array with the fields in the collection
These fields are returned as arrays of objects. If you would like to know more about what these arrays look like the following link might help you.
The following PHP scripts is an example of how to call this API method:
// dependencies require_once('copernica_rest_api.php'); // change this to your access token $api = new CopernicaRestApi("your-access-token"); // execute the call and print the result. print_r($api->get("collection/1234"));
The example above requires the CopernicaRestApi class.