REST API: GET database

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 metadata from a database. This method does not support parameters. By sending a GET request to the following URL, you can fetch the database metadata:$id?access_token=xxxx

where $id should be replaced by the identifier of the database you want to get the metadata of.

Returned fields

  • ID: unique numerical identifier
  • name: name of the database
  • description: description of the database
  • archived: whether or not the database is archived
  • created: when the database was created
  • fields: array of fields in the database
  • interests: array with interests in the database
  • collections: array with the collections in the database

Fields, interests and collections are returned as arrays of objects. If you want to know how these arrays are built, you can check out the pages of these API methods, which return similar data:

PHP example

The following example demonstrates how to use this method:

// dependencies

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

// do the call, and print result

The example above requires the CopernicaRestApi class.

More information