viakite
Dashboard

API/Exports/Export a report as CSV

Export a report as CSV

POST/v1/projects/{project}/exports

Runs the query into a CSV of up to 10,000 rows (the limit defaults to 10,000) and answers when it is done or failed.

Secret keyNeeds analytics.exportus.api.vk.viabio.me

Path parameters

projectstringrequired
The project's id (prj_…).

Body

queryobjectrequired
A report request.
Show 10 fields
measuresstring[]requiredat least 1 item
Measure names from the schema: visitors, visits, pageviews, bounce_rate, …
breakdownstring[]up to 2 items
filtersFilter[]
A dimension matching any of up to 20 values, or or, a list of such filters (not nested). Filters in a list are ANDed; up to 20 in all. goal matches the names of the project's saved goals an event reaches (is_not: none of them); page_group matches the name of the first of the project's saved page groups whose pattern the event's path matches (empty when none does); new_returning is New or Returning.
Show 4 fields
dimensionstring
A dimension's name; keyed ones take a key: props.plan.
operatorstring
isis_notcontainsnot_containsstarts_withregex
valuesstring[]1–20 items
orFilter[]
date_rangeobjectrequired
A preset, or from and to as dates (2026-11-01, whole days in the project's time zone, to included) or RFC 3339 times (to excluded). Empty means the last 30 days. A range starting before the first day the plan keeps (retention_days of F47: the last N days, today included, in the project's time zone) starts on that day instead: the answer's date_range shows where it starts, and F1, F2 and the public queries add a range_clamped warning. A range wholly before it is empty.
Show 3 fields
presetstring
todayyesterday7d30d90dthis_monthlast_monththis_yearall
fromstring
tostring
granularitystring
A time step; auto picks it from the range's length.
hourdayweekmonthauto
compareobject
previous_period, previous_year, or from and to.
Show 3 fields
presetstring
previous_periodprevious_year
fromstring
tostring
compare_filtersFilter[]up to 20 items
A second segment beside the first: the comparison (compare rows) runs these filters instead of filters, over the same range, or over compare's range when both are given. An empty list is every visitor.
Show 4 fields
dimensionstring
A dimension's name; keyed ones take a key: props.plan.
operatorstring
isis_notcontainsnot_containsstarts_withregex
valuesstring[]1–20 items
orFilter[]
goalobject
What counts as a conversion, a page or an event with optional property conditions; any custom event when left out. With a goal, revenue and average_order_value count only the goal's events.
Show 3 fields
typestringrequired
pageevent
valuestringrequiredup to 255 chars
A path (with * for any part) or an event name.
conditionsPropertyCondition[]up to 20 items
With type event, property tests the event must pass, all of them (plan is pro).
Show 3 fields
propertystringrequiredup to 255 chars
operatorstringrequired
isis_notcontainsstarts_with
valuestringrequiredup to 255 chars
attributionstring
Which visit's source, channel and campaign a visitor's events count for. last_touch (the default): the visit each event happened in. first_touch: the visitor's first visit in the range. A visitor id lasts one day, so attribution stays within the day.
last_touchfirst_touch
limitinteger1–10000
100 rows by default, 10,000 with a time step.

Responses

The export.

idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
project_idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
statusstringrequired
runningdonefailed
queryobjectrequired
A report request.
Show 10 fields
measuresstring[]requiredat least 1 item
Measure names from the schema: visitors, visits, pageviews, bounce_rate, …
breakdownstring[]up to 2 items
filtersFilter[]
A dimension matching any of up to 20 values, or or, a list of such filters (not nested). Filters in a list are ANDed; up to 20 in all. goal matches the names of the project's saved goals an event reaches (is_not: none of them); page_group matches the name of the first of the project's saved page groups whose pattern the event's path matches (empty when none does); new_returning is New or Returning.
Show 4 fields
dimensionstring
A dimension's name; keyed ones take a key: props.plan.
operatorstring
isis_notcontainsnot_containsstarts_withregex
valuesstring[]1–20 items
orFilter[]
date_rangeobjectrequired
A preset, or from and to as dates (2026-11-01, whole days in the project's time zone, to included) or RFC 3339 times (to excluded). Empty means the last 30 days. A range starting before the first day the plan keeps (retention_days of F47: the last N days, today included, in the project's time zone) starts on that day instead: the answer's date_range shows where it starts, and F1, F2 and the public queries add a range_clamped warning. A range wholly before it is empty.
Show 3 fields
presetstring
todayyesterday7d30d90dthis_monthlast_monththis_yearall
fromstring
tostring
granularitystring
A time step; auto picks it from the range's length.
hourdayweekmonthauto
compareobject
previous_period, previous_year, or from and to.
Show 3 fields
presetstring
previous_periodprevious_year
fromstring
tostring
compare_filtersFilter[]up to 20 items
A second segment beside the first: the comparison (compare rows) runs these filters instead of filters, over the same range, or over compare's range when both are given. An empty list is every visitor.
Show 4 fields
dimensionstring
A dimension's name; keyed ones take a key: props.plan.
operatorstring
isis_notcontainsnot_containsstarts_withregex
valuesstring[]1–20 items
orFilter[]
goalobject
What counts as a conversion, a page or an event with optional property conditions; any custom event when left out. With a goal, revenue and average_order_value count only the goal's events.
Show 3 fields
typestringrequired
pageevent
valuestringrequiredup to 255 chars
A path (with * for any part) or an event name.
conditionsPropertyCondition[]up to 20 items
With type event, property tests the event must pass, all of them (plan is pro).
Show 3 fields
propertystringrequiredup to 255 chars
operatorstringrequired
isis_notcontainsstarts_with
valuestringrequiredup to 255 chars
attributionstring
Which visit's source, channel and campaign a visitor's events count for. last_touch (the default): the visit each event happened in. first_touch: the visitor's first visit in the range. A visitor id lasts one day, so attribution stays within the day.
last_touchfirst_touch
limitinteger1–10000
100 rows by default, 10,000 with a time step.
row_countintegerrequired
errorstring
download_urlstring
The download's path on the data plane, when done.
created_atstring · date-timerequired
A time in UTC, ISO 8601.
completed_atstring · date-time
A time in UTC, ISO 8601.
Example response
1{
2 "id": "exp_01JD8Q2M4W9XK3T7B5",
3 "project_id": "prj_01JD8Q2M4W9XK3T7B5",
4 "status": "running",
5 "query": {
6 "measures": [
7 "visitors"
8 ],
9 "breakdown": [
10 "country"
11 ],
12 "filters": [
13 {
14 "dimension": "country",
15 "operator": "is",
16 "values": [
17 "string"
18 ],
19 "or": []
20 }
21 ],
22 "date_range": {
23 "preset": "today",
24 "from": "2026-11-01",
25 "to": "2026-11-21"
26 },
27 "granularity": "hour",
28 "compare": {
29 "preset": "previous_period",
30 "from": "2026-11-01",
31 "to": "2026-11-21"
32 },
33 "compare_filters": [
34 {
35 "dimension": "country",
36 "operator": "is",
37 "values": [
38 "string"
39 ],
40 "or": []
41 }
42 ],
43 "goal": {
44 "type": "page",
45 "value": "string",
46 "conditions": [
47 {
48 "property": "plan",
49 "operator": "is",
50 "value": "pro"
51 }
52 ]
53 },
54 "attribution": "last_touch",
55 "limit": 1
56 },
57 "row_count": 1,
58 "error": "string",
59 "download_url": "string",
60 "created_at": "2026-11-21T09:30:00Z",
61 "completed_at": "2026-11-21T09:30:00Z"
62}

Errors

Every error has the same shape: error.code, a message for people and details.

StatusCode
422export_too_large
422validation_error
404not_found