Skip to main content

Analytics API

Dashboard and space analytics endpoints.

Endpoints Overview

MethodEndpointDescription
GET/analytics/spaces/{slug}/statsSpace statistics
GET/analytics/spaces/{slug}/rating-distributionRating distribution
GET/analytics/spaces/{slug}/adoption/productsProduct adoption and dependency ranking
GET/analytics/spaces/{slug}/executive-proofLeadership rollup of adoption, governance, risk, and AI trust
POST/analytics/spaces/{slug}/products/{product_id}/adoption-eventsRecord an explicit product adoption event

Space Statistics

GET /analytics/spaces/{slug}/stats

Response

{
"product_count": 142,
"contract_count": 12,
"upcoming_meetings_count": 3,
"open_issues_count": 8,
"upcoming_meetings": [
{
"id": "...",
"name": "Weekly Data Review",
"scheduled_at": "2026-01-20T14:00:00Z"
}
],
"recent_issues": [
{
"id": "...",
"title": "Null rate increase",
"priority": "high"
}
],
"recent_products": [
{
"id": "...",
"name": "Customer Events",
"created_at": "2026-01-15T10:30:00Z"
}
]
}

Rating Distribution

GET /analytics/spaces/{slug}/rating-distribution

Returns distribution of product ratings in the space.

Response

{
"distribution": {
"1": 2,
"2": 5,
"3": 18,
"4": 45,
"5": 72
},
"average": 4.2,
"total_ratings": 142
}

Product Adoption Ranking

GET /analytics/spaces/{slug}/adoption/products

Ranks active products in a space by adoption, usage, and risk signals.

Query Parameters

ParameterTypeDefaultDescription
daysint30Lookback window, 1-365 days
sortstringdependency_scoreOne of dependency_score, searches, views, queries, requests, subscribers, incidents, last_activity
limitint20Page size, 1-100
offsetint0Zero-based offset
product_typestringFilter by product type
owner_idUUIDFilter by active owner or steward
domain_idUUIDFilter by assigned data domain
criticalitystringFilter by product criticality

Response

{
"items": [
{
"product": {
"id": "8ad4c1f6-2ef0-4cf4-89f6-9aee24f76363",
"name": "Customer Events",
"slug": "customer-events",
"product_type": "Table",
"criticality": "high",
"environment": "prod"
},
"owners": [
{
"id": "0f86a250-3aa6-4f5a-85ac-424c27f8d891",
"name": "Alex Rivera",
"email": "alex@example.com",
"role": "owner"
}
],
"dependency_score": 87,
"searches": 14,
"views": 42,
"queries": 96,
"requests": 5,
"subscribers": 9,
"incidents": 2,
"ignored": 0,
"stale_access_grants": 1,
"is_ignored_or_stale": true,
"last_activity": "2026-05-20T12:30:00+00:00",
"signals": {
"searched": 14,
"viewed": 42,
"queried": 96,
"requested": 5,
"subscribed": 9,
"ignored": 0,
"incidents": 2,
"stale_access_grants": 1
},
"recent_incidents": [
{
"id": "5fb9d99e-e64d-40b0-9c3b-d3c0377f53ff",
"title": "Null rate increase",
"priority": "high",
"status": "open",
"created_at": "2026-05-19T08:10:00"
}
],
"suggested_actions": [
"Prioritize recurring incidents and document mitigation."
]
}
],
"total": 142,
"summary": {
"products": 142,
"depended_on_products": 64,
"repeated_incident_products": 7,
"ignored_or_stale_products": 18
}
}

Executive Proof

GET /analytics/spaces/{slug}/executive-proof

Returns a compact leadership dashboard payload that combines product adoption, core space statistics, and AI operations health.

Query Parameters

ParameterTypeDefaultDescription
daysint30Lookback window, 1-365 days

Response

{
"days": 30,
"headline": {
"product_count": 142,
"depended_on_products": 64,
"adoption_rate": 45.1,
"open_issues_count": 8,
"contract_count": 12,
"quality_check_count": 35,
"risk_product_count": 25,
"ignored_or_stale_products": 18,
"repeated_incident_products": 7,
"ai_attention_total": 4,
"ai_estimated_cost": 83.42
},
"top_value_products": [],
"top_risk_products": [],
"ai_summary": {
"available": true,
"total_operations": 220,
"attention_total": 4,
"estimated_cost": 83.42,
"total_tokens": 184000,
"guardrail_blocks": 2,
"structured_repairs": 9,
"eval_pass_rate": 97.5,
"eval_stale": false,
"feedback_acceptance_rate": 82.0,
"top_prompt_hotspots": [
{
"prompt_key": "catalog.summary",
"count": 28,
"estimated_cost": 12.75
}
]
},
"leadership_actions": [
{
"label": "Review recurring incident hotspots",
"description": "7 depended-on products have recent incidents.",
"target": "issues"
}
],
"warnings": []
}

top_value_products and top_risk_products use the same row shape as Product Adoption Ranking.


Record Product Adoption Event

POST /analytics/spaces/{slug}/products/{product_id}/adoption-events

Records an explicit product analytics event. The product must belong to the requested space.

Request Body

{
"event_type": "ignored",
"source": "manual",
"metadata": {
"reason": "Known duplicate asset"
}
}

Supported event_type values are searched, viewed, queried, requested, subscribed, and ignored.

Response

204 No Content