How to Use Our Stats Service API
Our stats service API allows our volunteers, project owners and project contributors to view their efforts and contributions to project/s.
Our Stats API uses HTTP GET requests with JSON arguments and JSON responses. You can view here (https://github.com/zooniverse/eras/wiki/API-Callout-Examples) for full documentation and more callout examples.
In this site, we provide common examples project owners or user group admins might use in order to query specific volunteer classification/comment counts.
Differences Between eras.zooniverse.org vs Defunct stats.zooniverse.org
If you are familiar with our older stats service (https://github.com/zooniverse/zoo-event-stats; https://stats.zooniverse.org/), there are some key differences between the new service https://eras.zooniverse.org and the old service https://stats.zooniverse.org/.
- Differences in the Requests
- URL changes
- No need to include
/counts
in URL for eras.zooniverse.org - Period is now a parameter (
?period
) vs a fixed part of URL - Period is not a required parameter in eras.zooniverse.org
- Eras.zooniverse.org uses pluralized version of
classifications
andcomments
- No need to include
- Valid
period
s are now only:- Day
- Week
- Month
- Year
- Some requests in eras.zooniverse.org will require an Authorization Header
- URL changes
- Differences in Responses
- Responses of https://eras.zooniverse.org will only return the total counts unless you specify a
period
you want to bucket your data by. - Response keys are different
- https://eras.zooniverse.org Response Example:
{ "total_count": 4123, "data": [ { "period": "2023-05-27T00:00:00Z", "count": 4000, }, { "period": "2023-05-28T00:00:00Z", "count": 123 } ] }
- https://stats.zooniverse.org Response Example:
{ "events_over_time": { "buckets": [ { "key_as_string": "2016-06-13T00:00:00.000Z", "key":1465776000000, "doc_count":25 } ] } }
- Responses of https://eras.zooniverse.org will only return the total counts unless you specify a