REST API v4: GET database count

You can retrieve the number of profiles in a database using an HTTP GET request:

https://api.copernica.com/v4/database/$id/count

The $id must be replaced with the numerical identifier or the name of the database for which you want to retrieve the count.

Returned fields

The method returns a JSON object with the following field:

Variable Description
count The number of profiles in the database.

JSON example

The JSON response looks like this:

{
   "count": 283495
}

PHP example

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

// required scripts
require_once('CopernicaRestAPI.php');

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

// execute the method and print the result
print_r($api->get("database/{$databaseID}/count"));

This example requires the REST API class.

More information