Get all Cohorts
GET https://amplitude.com/api/3/cohorts?includeSyncInfo=false
Get all discoverable cohorts for an app. The id
returned for each cohort is used to get a single cohort.
Each COHORT_OBJECT has this schema:
{
"lastComputed": timestamp,
"owners": string[],
"description": string,
"definition": { COHORT_DEFINITION },
"published": boolean,
"archived": boolean,
"name": string,
"appId": string,
"lastMod": timestamp,
"type": string,
"id": string,
"size": integer
}
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
includeSyncInfo | boolean |
RESPONSES
status: OK
{"cohorts":[{"appId":360829,"archived":false,"definition":{"version":3,"countGroup":"User","cohortType":"UNIQUES","andClauses":[{"negated":false,"orClauses":[{"type":"event","time_type":"rolling","time_value":30,"offset":0,"interval":1,"type_value":"API Doc View","operator":"\u003e=","operator_value":1,"group_by":[],"metric":null}]}],"referenceFrameTimeParams":{}},"description":null,"finished":true,"id":"26umsb5","name":"Cohort 1","owners":["dataadmin@amplitude.com"],"published":true,"size":2,"type":"redshift","lastMod":1644006291,"createdAt":1644006291,"lastComputed":1644006292,"hidden":false,"metadata":null,"view_count":null,"popularity":null,"last_viewed":null,"chart_id":null,"edit_id":null,"is_predictive":false,"is_official_content":false,"location_id":null,"shortcut_ids":[]},{"appId":360829,"archived":false,"definition":{"version":3,"countGroup":"User","cohortType":"UNIQUES","andClauses":[{"negated":false,"orClauses":[{"type":"event","time_type":"rolling","time_value":90,"offset":0,"interval":1,"type_value":"Initialize Game","operator":"\u003e=","operator_value":1,"group_by":[],"metric":null}]}],"referenceFrameTimeParams":{}},"description":null,"finished":true,"id":"s7xeonk","name":"Cohort 2","owners":["dataadmin@amplitude.com"],"published":true,"size":1,"type":"redshift","lastMod":1644006330,"createdAt":1644006330,"lastComputed":1644006332,"hidden":false,"metadata":null,"view_count":null,"popularity":null,"last_viewed":null,"chart_id":null,"edit_id":null,"is_predictive":false,"is_official_content":false,"location_id":null,"shortcut_ids":[]}]}