User View History
Get view history for users or documents.
GET
/user_view_history/user/{userid}
Fetch view history for a given user.
Route Parameters
-
userid —
Required —
integer
-
Identifier for the user.
Query Parameters
-
start_date —
Optional —
integer
-
A filter to limit results to views that occurred on or after the start_date.
-
end_date —
Optional —
integer
-
A filter to limit results to views that occurred on or before the end_date.
Response
[
{
"userid": 48,
"username": "johndoe",
"doc_type": "GUIDE",
"docid": "409",
"date": 1639087983
},
{
"userid": 48,
"username": "johndoe",
"doc_type": "WIKI",
"docid": "9",
"date": 1639088181
}
]
GET
/user_view_history/{doc_type}/{docid}
Fetch view history for a given document.
Route Parameters
-
doctype —
Required —
enum
-
Type of document being view. Either "guide" or "wiki"
-
docid —
Required —
integer
-
Identifier for the document.
Query Parameters
-
start_date —
Optional —
integer
-
A filter to limit results to views that occurred on or after the start_date.
-
end_date —
Optional —
integer
-
A filter to limit results to views that occurred on or before the end_date.
Response
[
{
"userid": 48,
"username": "johndoe",
"doc_type": "WIKI",
"docid": "9",
"date": 1639087983
},
{
"userid": 63,
"username": "janedoe",
"doc_type": "WIKI",
"docid": "9",
"date": 1639088181
}
]