Get Mission Analytics
GET/api/v1/analytics/mission
Mission performance over a time window: a 4-card summary (total missions, success rate, average, total distance) plus four per-bucket chart series — success_rate (total vs success), result_distribution (success/failed/aborted/cancelled/others), mission_source (FMS vs native, derived from the mission_id prefix) and distance_trend (per-bucket distance + running cumulative). All four charts share the same buckets. When export=true the response is a single CSV file download (Summary block + Per-bucket table) instead of JSON.
Request
Query Parameters
Mandatory. Inclusive window start — ISO 8601 datetime or epoch milliseconds. Missions are filtered into the window by start_time.
Mandatory. Inclusive window end — ISO 8601 datetime or epoch milliseconds.
Possible values: [2hour, day, 3day, 9day, 30day, auto]
Bucket size for the chart series. auto derives the bin from the span: 1 d → 2-hour bins, 7 d → 1-day, 30 d → 3-day, 90 d → 9-day, 360 d → 30-day, other spans → ceil(days/12) snapped to the nearest level. Defaults to auto.
IANA timezone. When set, buckets are local calendar days (or 2-hour slots) aligned to the local midnight of start_timestamp, and multi-day buckets count from that day. When omitted, buckets are UTC-aligned.
Possible values: [true, false]
When true, returns a single CSV file download with a Summary block and a Per-bucket table (date, total, success, failed, aborted, cancelled, others, fms, native, distance, cumulative). When false or omitted, returns the standard JSON response.
Responses
- 200
- 400
- 500
JSON summary + chart series (default) or CSV file download (when export=true)
- application/json
- text/csv
- Schema
- Example (from schema)
Schema
- Array [
- ]
data objectrequired
window objectrequired
Possible values: [2hour, day, 3day, 9day, 30day]
bucket_ranges object[]required
summary objectrequired
success_rate objectrequired
series objectrequired
result_distribution objectrequired
series objectrequired
mission_source objectrequired
series objectrequired
distance_trend objectrequired
series objectrequired
{
"success": true,
"message": "string",
"data": {
"window": {
"start_timestamp": "string",
"end_timestamp": "string",
"granularity": "2hour"
},
"bucket_ranges": [
{
"start": "string",
"end": "string"
}
],
"summary": {
"total_missions": 0,
"success_missions": 0,
"success_rate": 0,
"distance": 0,
"average": "string",
"duration": "string"
},
"success_rate": {
"buckets": [
"string"
],
"series": {
"total": [
0
],
"success": [
0
]
}
},
"result_distribution": {
"buckets": [
"string"
],
"series": {
"success": [
0
],
"failed": [
0
],
"aborted": [
0
],
"cancelled": [
0
],
"others": [
0
]
}
},
"mission_source": {
"buckets": [
"string"
],
"series": {
"fms": [
0
],
"native": [
0
]
}
},
"distance_trend": {
"buckets": [
"string"
],
"series": {
"distance": [
0
],
"cumulative": [
0
]
}
}
},
"status": 0
}
- Schema
Schema
string
Invalid timestamps or timezone
- application/json
- Schema
- Example (from schema)
Schema
{
"success": true,
"message": "string",
"status": 0
}
Internal server error
- application/json
- Schema
- Example (from schema)
Schema
{
"success": true,
"message": "string",
"status": 0
}