GET /collections/{collection-id}/stats¶
Use the GET /collections/{collection-id}/stats endpoint to return statistics for a profile collection, including the total number of profiles it contains.
Note
This endpoint is part of the Real-time API, an unstable API that may change without advance notice of breaking changes.
Note
In the Amperity user interface a profile collection is shown on the Profiles page. The value for {collection-id} identifies that profile collection.
Prerequisites¶
A profile collection must be configured for your tenant. Before creating a profile collection, you must contact your Amperity representative to enable real-time product features.
Note
The access token must be granted the profile-collections:read permission.
Request URL¶
Direct all requests to the GET /collections/{collection-id}/stats endpoint to the request URL. The request URL uses the base URL with the endpoint path appended.
Amazon AWS
https://app.amperity.com/prof/collections/{collection-id}/stats
Microsoft Azure
https://{tenant-id}.amperity.com/prof/collections/{collection-id}/stats
You can find the tenant ID from the Amperity user interface. From the Settings page and select the Security tab. Under API keys, in the row for an API key, open the menu and select Copy tenant ID.
Rate limit¶
A rate limit is the number of requests that may be made to the Amperity API in a given time period.
Requests¶
A request to the GET /collections/{collection-id}/stats endpoint is similar to:
curl --request GET \
'https://app.amperity.com/prof/collections/{collection-id}/stats' \
--header 'amperity-tenant: {tenant-id}' \
--header 'Authorization: Bearer {token}'
This example is formatted for readability in a narrow page layout.
Request parameters¶
The following table describes the parameters that may be used with the GET /collections/{collection-id}/stats endpoint.
Parameter |
Description |
|---|---|
collection-id |
String. Required. The ID of the profile collection. |
Responses¶
A response from the GET /collections/{collection-id}/stats endpoint will match an HTTP status code. A 200 response returns statistics for the profile collection.
200 OK¶
The 200 response returns statistics for the profile collection.
1{
2 "total-profiles": 0,
3 "link-cardinality": {
4 "email": 0,
5 "phone": 0
6 }
7}
Response parameters¶
A 200 OK response contains the following parameters.
Parameter |
Description |
|---|---|
total-profiles |
The total number of profiles in the profile collection. |
link-cardinality |
A map of keychain link type to the number of indexed link values for that type. |