Analytics
Fetch events
API that allows fetching raw events from the database. Please note that each request must be authenticated.
Compression
When requesting large amount of data, make sure to include an Accept-Encoding: gzip header to enable compression.s
post/api/analytics/v1/events/
Request
- Base URLhttps://example.piwik.pro
- AuthOAuth 2Client credentialsToken URL/auth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"website_id": "70236925-724f-404e-b634-7b5633bc0bcc",
"columns": [
{
"column_id": "resolution"
},
{
"column_id": "device_type"
}
],
"date_from": "2020-02-10",
"date_to": "2020-02-10",
"filters": {
"operator": "and",
"conditions": [
{
"column_id": "browser_name",
"condition": {
"operator": "eq",
"value": "FF"
}
}
]
},
"offset": 0,
"limit": 100,
"format": "json"
}Response
OK
Example response
{
"data": [
[
"2132601",
"8131637",
"2ecf33167d400648",
"2018-12-03T00:21:03",
"375x667",
[
1,
"Smartphone"
]
]
],
"meta": {
"columns": [
"session_id",
"event_id",
"visitor_id",
"timestamp",
"resolution",
"device_type"
],
"scope": "event",
"blended_datasets": [],
"count": 1
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.