Event Segmentation Chart
GET https://amplitude.com/api/2/segmentation?e =&start=&end=
This is the basic request format for the Event Segmentation API, including all available parameters.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
e | null | Required. A full event. Currently, the Dashboard REST API supports segmentation by up to two events. If you wish to query on a second event, the parameter would be "e2". | |
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. Set to -300000, -3600000, 1, 7, or 30 for real-time, hourly, daily, weekly, and monthly counts, respectively (default: 1). Real-time segmentation is capped at 2 days, hourly segmentation is capped at 7 days, and daily at 365 days. | |
m | null | Optional. For non-property metrics: "uniques", "totals", "pct_dau", or "average" (default: "uniques"). For property metrics: "histogram", "sums", or "value_avg" (Note: a valid "group_by" value is required in parameter e). |
For custom formulas: "formula" (Note: This metric only supports up to two events currently and the second event will need to have the parameter "e2"). |
| n
| null | | Optional. User type, either any
or active
. |
| s
| null | | Optional. Segment definitions (default: none). |
| g
| null | | Optional. The property to group by (default: none). |
| limit
| null | | Optional. The number of Group By values returned (default: 100). The maximum limit is 1000. |
| formula
| null | | Optional. If you are using the custom formula metric, you will need to pass in the formula here (e.g. "UNIQUES(A)/UNIQUES(B)"). |
| rollingWindow
| null | | Optional. If you would like to include a rolling window, then you will need to pass in the number of days/weeks/months with which to compute a rolling window over. You can read more about this feature here. |
| rollingAverage
| null | | Optional. If you would like to include a rolling average, then you will need to pass in the number of days/weeks/months with which to compute a rolling average over. You can read more about this feature here. |
RESPONSES
status: OK
{"data":{"series":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.14285714285714285,0.14285714285714285,0.14285714285714285,0.2857142857142857,0.2857142857142857,0.2857142857142857,0.2857142857142857,0.14285714285714285,0.14285714285714285,0.14285714285714285,0,0,0,0.14285714285714285,0.42857142857142855,0.42857142857142855,0.42857142857142855,0.42857142857142855,0.42857142857142855,0.42857142857142855,0.2857142857142857,0,0,0,0,0,0,0.14285714285714285,0.14285714285714285,0.14285714285714285,0.14285714285714285,0.14285714285714285,0.14285714285714285,0.14285714285714285,0,0,0,0,0,0,0.14285714285714285,0.14285714285714285,0.14285714285714285,0.14285714285714285,0.14285714285714285,0.14285714285714285]],"seriesCollapsed":[[{"setId":"","value":5}]],"seriesLabels":[0],"xValues":["2021-08-01","2021-08-02","2021-08-03","2021-08-04","2021-08-05","2021-08-06","2021-08-07","2021-08-08","2021-08-09","2021-08-10","2021-08-11","2021-08-12","2021-08-13","2021-08-14","2021-08-15","2021-08-16","2021-08-17","2021-08-18","2021-08-19","2021-08-20","2021-08-21","2021-08-22","2021-08-23","2021-08-24","2021-08-25","2021-08-26","2021-08-27","2021-08-28","2021-08-29","2021-08-30","2021-08-31","2021-09-01","2021-09-02","2021-09-03","2021-09-04","2021-09-05","2021-09-06","2021-09-07","2021-09-08","2021-09-09","2021-09-10","2021-09-11","2021-09-12","2021-09-13","2021-09-14","2021-09-15","2021-09-16","2021-09-17","2021-09-18","2021-09-19","2021-09-20","2021-09-21","2021-09-22","2021-09-23","2021-09-24","2021-09-25","2021-09-26","2021-09-27","2021-09-28","2021-09-29","2021-09-30"]},"timeComputed":1643740342625,"wasCached":false,"cacheFreshness":"FRESH","novaRuntime":169,"novaRequestDuration":177,"novaCost":3,"throttleTime":1,"minSampleRate":1,"transformationIds":[],"backend":"novaV2","realtimeDataMissing":false,"timedOutRealtimeData":false,"partialMergedAndNewUserInformation":false,"prunedResult":false,"hitChunkGroupByLimit":false,"subcluster":6,"millisSinceComputed":3,"queryIds":["4mZ1r74wRj"]}