Query your analytics
Easily query analytics from your phospho project
This is the main endpoint for querying data from phospho. It can be used add an analytics dashboard in your product, query data for further analysis or export to destinations not yet supported by phospho.
Most of the vizualisations in the phospho dashboard are built using this service.
Using temporal dimensions
If the dimension is month
, week
or day
the data will be grouped by the corresponding time unit from the created_at
field.
The time will be formated in UTC time with the corresponding format: YYYY-MM
for months, YYYY-MM-DD
for days,…
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The metric to be analyzed.
sum
, avg
, count_unique
, nb_messages
, nb_sessions
, tags_count
, avg_scorer_value
, avg_success_rate
, avg_session_length
, tags_distribution
The metadata field to be analyzed.
The field to break down the metric by. If the metric is a free string, it will be interpreted as a metadata field.
day
, week
, month
, tagger_name
, scorer_value
, classifier_value
, task_position
, session_length
When using the scorer_value or classifier_value breakdown_by, this is the EventDefinition.id
of the scorer or classifier. Check the id in the Event page URL.
When using the avg_scorer_value metric, this is the EventDefinition.id
of the scorer. Check the id of the scorer in the Event page URL.
This is a model used to filter tasks, sessions or events in different endpoints.
Response
Was this page helpful?