The WIA Time-Series Data API provides a standardized interface for ingesting, querying, and managing time-series data across different database systems.
All API requests require authentication using an API key in the header:
Authorization: Bearer YOUR_API_KEY
https://api.wiastandards.com/v1/timeseries
Write time-series data points to the database.
{
"measurement": "temperature",
"tags": {
"location": "server1",
"region": "us-east-1"
},
"fields": {
"value": 23.5,
"unit": "celsius"
},
"timestamp": "2025-12-26T10:30:00Z"
}
{
"status": "success",
"points_written": 1,
"timestamp": "2025-12-26T10:30:01Z"
}
Write multiple data points in a single request.
{
"points": [
{
"measurement": "cpu",
"tags": {"host": "server1"},
"fields": {"value": 45.2},
"timestamp": "2025-12-26T10:30:00Z"
},
{
"measurement": "cpu",
"tags": {"host": "server2"},
"fields": {"value": 67.8},
"timestamp": "2025-12-26T10:30:00Z"
}
]
}
Query time-series data with filters and aggregations.
| Parameter | Type | Description |
|---|---|---|
| measurement | string | Measurement name (required) |
| start | ISO8601 | Start timestamp (required) |
| end | ISO8601 | End timestamp (required) |
| tags | object | Filter by tags (optional) |
| aggregation | string | mean, sum, min, max, count (optional) |
| interval | string | Group by interval: 1m, 5m, 1h, 1d (optional) |
GET /query?measurement=temperature&start=2025-12-26T00:00:00Z&end=2025-12-26T23:59:59Z&aggregation=mean&interval=1h
{
"measurement": "temperature",
"results": [
{
"timestamp": "2025-12-26T00:00:00Z",
"value": 22.3
},
{
"timestamp": "2025-12-26T01:00:00Z",
"value": 21.8
}
],
"count": 24
}
Execute advanced queries with custom expressions.
{
"query": "SELECT mean(value) FROM temperature WHERE location='server1' GROUP BY time(1h)",
"format": "json"
}
Detect anomalies in time-series data using statistical methods.
{
"measurement": "cpu",
"start": "2025-12-26T00:00:00Z",
"end": "2025-12-26T23:59:59Z",
"method": "zscore",
"threshold": 3.0
}
{
"anomalies": [
{
"timestamp": "2025-12-26T14:23:15Z",
"value": 98.5,
"zscore": 3.2,
"severity": "high"
}
],
"total_anomalies": 5
}
Generate forecasts for future values.
{
"measurement": "network_traffic",
"history_start": "2025-12-20T00:00:00Z",
"history_end": "2025-12-26T00:00:00Z",
"forecast_periods": 24,
"model": "arima"
}
{
"forecast": [
{
"timestamp": "2025-12-27T00:00:00Z",
"predicted_value": 156.3,
"confidence_interval": [142.1, 170.5]
}
]
}
List all available measurements.
{
"measurements": [
"temperature",
"cpu",
"memory",
"network_traffic"
]
}
Delete data by time range and filters.
DELETE /data?measurement=temperature&start=2025-01-01T00:00:00Z&end=2025-01-31T23:59:59Z
Configure data retention policies.
{
"name": "one_week",
"duration": "7d",
"replication": 1,
"default": false
}
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |