From 9a680008026e1cce6c8537712c64ba867e16edee Mon Sep 17 00:00:00 2001 From: Dimitris Date: Thu, 5 Sep 2019 13:46:16 +0300 Subject: [PATCH] Change contract for statistics reports --- statistics.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/statistics.md b/statistics.md index b2dbf59f..e0cbb36a 100644 --- a/statistics.md +++ b/statistics.md @@ -1,4 +1,4 @@ -# Collecting user interactions +# Collecting/Reporting user interactions [Back to the list of all defined endpoints](endpoints.md) ## View events endpoint @@ -26,7 +26,30 @@ The sections below describe the parameters for a page view event. All other info "targetType": "item" } ``` +## Report View Events endpoint +**GET /api/statistics/viewevents** +To get a report for the usage statistics of a page view, make an HTTP GET request to this endpoint. + +The sections below describe the parameters for a page view event report. + +### Required Parameters + +### Status codes: + +- `200` Succes: if the operation succeeded +- `400` Bad request: if any of the parameters are missing or invalid. +- `422` Unprocessable Entity: if the parameters don't refer to a valid object. + +### Example item page view: + + +```json +{ + +} + +``` ## Search events Endpoint **POST /api/statistics/searchevents**