DashboardService¶
GetChartsData¶
Gets chart data for a list of charts.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.dashboards.v1.DashboardService/GetChartsData \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"and_filter": {
"filter": [
{
"name": "My Workflow",
"value": "example"
}
]
},
"charts": [
{
"chart_id": {
"workflow": {
"aggregated_action_id": "actn_ghi789",
"chart_rule_id": "actn_ghi789",
"workflow_id": "wrkf_abc123"
}
},
"counter_configuration": {
"aggregation_type": "SUM"
},
"histogram_configuration": {
"percentile": 1.0,
"percentiles": [
1.0
]
},
"insight_comparison_configuration": {
"lhs_id": "abc-123-def",
"rhs_id": "abc-123-def"
},
"limit_strategy": {},
"rate_configuration": {
"aggregation_type": "AVG"
},
"sankey_configuration": {
"compaction_target": 1,
"top_k_paths": 1
},
"time_series_display_mode": {},
"top_k_configuration": {
"algorithm_name": "My Workflow"
}
}
],
"platform_filter": [
{
"apple": {
"apps": [
{
"app_id": "com.example.app"
}
]
}
}
],
"time_range": {
"relative_time_range": {
"duration": "3600s",
"offset": "3600s"
}
}
}'
Example Response¶
JSON
{
"data": [
{
"chart_id": {
"workflow": {
"aggregated_action_id": "actn_ghi789",
"chart_rule_id": "actn_ghi789",
"workflow_id": "wrkf_abc123"
}
},
"line_data": {
"time_series": [
{
"aggregated_rollup": 1.0,
"aggregation_window": "3600s",
"cardinality_overflows": {
"group_by_overflows": 1,
"query_group_by_collapsed": false,
"total_overflows": 42
},
"data": [
{
"rate_details": {
"denominator_count": 42,
"numerator_count": 42
},
"timestamp": "2024-01-15T09:30:00Z",
"unique_devices": 1,
"value": 1.0
}
],
"id": "abc-123-def",
"labels": [
{
"name": "My Workflow",
"value": "example"
}
],
"legend": {
"title": "My Workflow"
},
"title": "My Workflow",
"unique_devices": 1
}
]
}
}
]
}