API Reference Overview
Complete reference for the dakkio REST API.
Base URL
https://api.dakkio.io
Authentication
All API endpoints use API Key authentication via the X-API-Key header:
curl -H "X-API-Key: YOUR_API_KEY" \
https://api.dakkio.io/api/data
API Key Types
| Key Type | Prefix | Scope | Permissions |
|---|---|---|---|
| Admin | dakkio_a_ | Organization | Full access to all operations |
| Write | dakkio_w_ | Bucket | Data ingestion, data sources, alerts |
| Read | dakkio_r_ | Bucket | Data queries, analytics |
Response Format
All responses are in JSON format:
Success Response
{
"data": { ... },
"metadata": { ... }
}
Error Response
{
"error": "Error Type",
"message": "Human-readable error message",
"details": [ ... ]
}
HTTP Status Codes
| Code | Meaning |
|---|---|
200 | OK - Request succeeded |
201 | Created - Resource created successfully |
400 | Bad Request - Validation error |
401 | Unauthorized - Invalid/missing authentication |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource not found |
409 | Conflict - Resource already exists |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error |
Rate Limiting
API calls are limited by your plan:
- Free: 10,000 calls/month
- Pro: 1,000,000 calls/month
- Enterprise: Unlimited
Rate limit headers are included in responses:
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9523
X-RateLimit-Reset: 1705318200
When exceeded, you'll receive a 429 response:
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Resets at 2024-01-15T10:30:00Z"
}
Pagination
List endpoints support pagination:
Query Parameters
limit: Items per page (default: 100, max: 1000)offset: Number of items to skip (default: 0)
Response
{
"data": [ ... ],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1523,
"hasMore": true
}
}
Timestamps
All timestamps are in ISO 8601 format with UTC timezone:
2024-01-15T10:30:00Z
JavaScript example:
const timestamp = new Date().toISOString();
Python example:
from datetime import datetime
timestamp = datetime.utcnow().isoformat() + 'Z'
Object IDs
MongoDB ObjectIds are used for all resource identifiers:
Format: 24-character hexadecimal string
Example: 507f1f77bcf86cd799439011
Endpoints by Category
1. Bucket Management (Admin Key)
GET /api/buckets- List all bucketsPOST /api/buckets- Create bucketGET /api/buckets/:id- Get bucketPATCH /api/buckets/:id- Update bucketDELETE /api/buckets/:id- Delete bucket
2. API Key Management (Admin Key)
GET /api/buckets/:bucketId/keys- List bucket API keysPOST /api/buckets/:bucketId/keys- Create bucket API key (write or read)DELETE /api/buckets/:bucketId/keys/:keyId- Delete bucket API key
3. Data Source Management (Write Key)
GET /api/buckets/:bucketId/sources- List data sourcesPOST /api/buckets/:bucketId/sources- Create data source
4. Data Ingestion (Write Key)
POST /api/data- Ingest single data pointPOST /api/data/batch- Batch ingest data points
5. Data Queries (Read Key)
POST /api/data/query- Query time-series data
6. Alert Rules (Write Key for create, Read Key for list)
GET /api/buckets/:bucketId/alerts- List alert rulesPOST /api/alerts- Create alert rule
7. Analytics (Read Key)
GET /api/analytics/overview- Organization overviewGET /api/analytics/buckets/:bucketId- Bucket analytics
Interactive Testing
Try the API Playground to test endpoints interactively.
SDKs & Libraries
Official SDKs are available for:
Need Help?
- 📖 Browse the full API reference in the sidebar
- 🎮 Try the API Playground
- 💬 Join our Discord
- 📧 Email support@dakkio.io