At our team, we're looking to automate some reports, and one of the many pieces we need to achieve this is to find the size of a cohort (by its ID) at the time of analysis.
Having said that, we've been exploring the Behavioral Cohorts API for any leads, and so far the best matching endpoints are the following:
1: GET /api/3/cohorts
2: GET /api/3/cohorts/:id
1. returns all the discoverable cohorts' metadata, whereas 2. returns the requested cohort's metadata and members. The latter would be the best match, but given that all members are returned, it takes upwards of 10s to get a result out of this endpoint.
For some context, this is roughly the response of endpoint 1.:
{
"cohorts": [ { COHORT_OBJECT }, ...]
}
Whereas the response of endpoint 2. is:
{
"cohort: { COHORT_OBJECT },
"amplitude_ids": [ id1, id2, ...]
}
Are there any variants (either endpoints or query params), that would return something like:
{
"cohort: { COHORT_OBJECT }
}
that is, without the list of amplitude ids?
Best answer by Jacenda Davis
View original