Check analytics configuration
/api/v1/analytics/statusReturns whether the analytics backend (Tinybird) is configured on the server.
Error responses
401Authentication required
Course analytics and usage metrics.
/api/v1/analytics/statusReturns whether the analytics backend (Tinybird) is configured on the server.
401 Authentication required/api/v1/analytics/eventsProxies a whitelisted analytics event from the frontend to the analytics backend. The authenticated user must belong to the target organization, and the event name must be in the allowed list.
event_namestringrequiredorg_idintegerrequiredsession_idstringpropertiesProperties400 Invalid event name401 Authentication required403 User is not a member of the target organization422 Validation Error — HTTPValidationError{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}/api/v1/analytics/dashboard/detail/{query_name}Executes a predefined analytics detail query against Tinybird and enriches the result rows with course, activity, and user metadata from PostgreSQL. Requires org admin privileges.
query_namestringrequiredorg_idintegerrequired400 Invalid query parameter401 Authentication required403 User is not a member or admin of the organization404 Unknown detail query name422 Validation Error — HTTPValidationError502 Upstream analytics query failed503 Analytics backend is not configured{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}/api/v1/analytics/dashboard/{query_name}Executes a predefined analytics query via Tinybird and returns the aggregated results. Advanced queries require an Enterprise plan. Requires org admin privileges.
query_namestringrequiredorg_idintegerrequired400 Invalid query parameter401 Authentication required403 User is not a member/admin, or plan does not permit advanced queries404 Unknown query name422 Validation Error — HTTPValidationError502 Upstream analytics query failed503 Analytics backend is not configured{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}/api/v1/analytics/dashboard/db/{query_name}Executes a predefined PostgreSQL analytics query (e.g. grade distribution histogram). Requires org admin privileges and a Pro plan or higher.
query_namestringrequiredorg_idintegerrequired401 Authentication required403 User is not admin or the organization lacks a Pro plan404 Unknown query name422 Validation Error — HTTPValidationError{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}/api/v1/analytics/dashboard/course/detail/{query_name}Executes a predefined course-level detail query via Tinybird with fallback to PostgreSQL TrailRun data, and enriches results with course, activity, and user metadata. Requires org admin privileges and a Pro plan or higher.
query_namestringrequiredorg_idintegerrequiredcourse_uuidstringrequired400 Invalid query parameter or course_uuid401 Authentication required403 User is not admin or the organization lacks a Pro plan404 Unknown course detail query name422 Validation Error — HTTPValidationError502 Upstream analytics query failed503 Analytics backend is not configured{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}/api/v1/analytics/dashboard/course/{query_name}Executes a predefined course-level analytics query via Tinybird and returns enriched aggregated results. Requires org admin privileges and a Pro plan or higher.
query_namestringrequiredorg_idintegerrequiredcourse_uuidstringrequired400 Invalid query parameter or course_uuid401 Authentication required403 User is not admin or the organization lacks a Pro plan404 Unknown course query name422 Validation Error — HTTPValidationError502 Upstream analytics query failed503 Analytics backend is not configured{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}/api/v1/analytics/exportExports results for a comma-separated list of analytics queries in either JSON or CSV format. Requires org admin privileges.
org_idintegerrequired400 Invalid format, queries, or parameters401 Authentication required403 User is not admin of the organization422 Validation Error — HTTPValidationError502 Upstream analytics query failed503 Analytics backend is not configured{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}/api/v1/analytics/plan-infoReturns the analytics tier (core or advanced) available to the organization based on its current plan.
org_idintegerrequired401 Authentication required403 User is not a member of the target organization422 Validation Error — HTTPValidationError{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}