Retention analysis
GET https://amplitude.com/api/2/retention
This is the basic request format with all parameters.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
se | null | Required. Full event for the start action. Supports two "event_type" values: "_new" for new users, and "_active" for all users. | |
re | null | Required. Full event for the returning action. Supports one "event_type" value: "_all" for all events and “_active” for all active events. | |
rm | null | Optional. The retention type: bracket, rolling, or n-day. Note that rolling implies unbounded retention. (Default: n-day, no need to call it explicitly). | |
rb | null | Optional, but required if rm is set to bracket. The days within each bracket, formatted [0,4] (e.g. if your bracket was Day 0 - Day 4, the parameter value would be [0,5]). | |
start | null | Required. First date included in data series, formatted YYYYMMDD (e.g. "20141001"). | |
end | null | Required. Last date included in data series, formatted YYYYMMDD (e.g. "20141004"). | |
i | null | Optional. Either 1, 7, or 30 for daily, weekly, and monthly counts, respectively (default: 1). | |
s | null | Optional. Segment definitions (default: none). Full description. | |
g | null | Optional. The property to group by (default: none) |
RESPONSES
status: OK
{"data":{"series":[{"values":{"Sep 2021":[{"count":13,"outof":13,"incomplete":false},{"count":1,"outof":13,"incomplete":false},{"count":0,"outof":13,"incomplete":false},{"count":0,"outof":13,"incomplete":false},{"count":0,"outof":13,"incomplete":false},{"count":0,"outof":13,"incomplete":true},{"count":0,"outof":13,"incomplete":true}],"Aug 2021":[{"count":11,"outof":11,"incomplete":false},{"count":5,"outof":11,"incomplete":false},{"count":1,"outof":11,"incomplete":false},{"count":1,"outof":11,"incomplete":false},{"count":0,"outof":11,"incomplete":false},{"count":0,"outof":11,"incomplete":false},{"count":0,"outof":11,"incomplete":true},{"count":0,"outof":11,"incomplete":true}],"Jul 2021":[{"count":4,"outof":4,"incomplete":false},{"count":0,"outof":4,"incomplete":false},{"count":1,"outof":4,"incomplete":false},{"count":1,"outof":4,"incomplete":false},{"count":1,"outof":4,"incomplete":false},{"count":0,"outof":4,"incomplete":false},{"count":0,"outof":4,"incomplete":false},{"count":0,"outof":4,"incomplete":true},{"count":0,"outof":4,"incomplete":true}]},"dates":["Sep 2021","Aug 2021","Jul 2021"],"datetimes":["2021-09-01","2021-08-01","2021-07-01"],"combined":[{"count":25,"outof":25,"incomplete":false,"retainedSetId":null,"dropoffSetId":null},{"count":5,"outof":25,"incomplete":false,"retainedSetId":null,"dropoffSetId":null},{"count":1,"outof":25,"incomplete":false,"retainedSetId":null,"dropoffSetId":null},{"count":2,"outof":25,"incomplete":false,"retainedSetId":null,"dropoffSetId":null},{"count":1,"outof":25,"incomplete":false,"retainedSetId":null,"dropoffSetId":null},{"count":0,"outof":14,"incomplete":false,"retainedSetId":null,"dropoffSetId":null},{"count":0,"outof":6,"incomplete":false,"retainedSetId":null,"dropoffSetId":null},{"count":0,"outof":4,"incomplete":true,"retainedSetId":null,"dropoffSetId":null},{"count":0,"outof":4,"incomplete":true,"retainedSetId":null,"dropoffSetId":null}]}],"seriesLabels":[""],"seriesMeta":[{"segmentIndex":0,"eventIndex":0}]},"timeComputed":1643746579038,"wasCached":false,"cacheFreshness":"FRESH","novaRuntime":232,"novaRequestDuration":239,"novaCost":48,"throttleTime":2,"minSampleRate":1,"transformationIds":[],"backend":"novaV2","realtimeDataMissing":false,"timedOutRealtimeData":false,"partialMergedAndNewUserInformation":false,"prunedResult":false,"hitChunkGroupByLimit":false,"subcluster":6,"millisSinceComputed":4,"queryIds":["zY6GgWF6PU"]}