REST API: GET collection

Warning: You are viewing the documentation for the old REST API. We recommend using version 2 of the REST API.

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?access_token=xxxx

The $id here should be replaced with the numerical identifier of the collection.

Returned fields

  • 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.

PHP example

The following PHP scripts is an example of how to call this API method:

// dependencies

// change this to your access token
$api = new CopernicaRestApi("your-access-token");

// execute the call and print the result.

The example above requires the CopernicaRestApi class.

More information