API Reference Overview
Complete reference for the dakkio REST API.
Base URL
https://api.dakkio.io
Authentication
dakkio supports two authentication methods:
JWT Authentication
For dashboard and administrative operations:
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
https://api.dakkio.io/api/buckets
API Key Authentication
For data operations from IoT devices:
curl -H "X-API-Key: YOUR_API_KEY" \
https://api.dakkio.io/api/data
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
Authentication (JWT)
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
Buckets (JWT)
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
API Keys (JWT)
GET /api/apikeys- Get organization API keyPOST /api/apikeys- Create/regenerate API keyPOST /api/apikeys/revoke- Revoke API key
Data Sources (JWT)
GET /api/buckets/:bucketId/datasources- List data sourcesPOST /api/datasources- Create data sourcePATCH /api/datasources/:id- Update data sourceDELETE /api/datasources/:id- Delete data source
Alerts (JWT)
GET /api/buckets/:bucketId/alerts- List alert rulesPOST /api/alerts- Create alert rulePATCH /api/alerts/:id- Update alert ruleDELETE /api/alerts/:id- Delete alert rule
Webhooks (JWT)
GET /api/buckets/:bucketId/webhooks- List webhooksPOST /api/webhooks- Create webhookPATCH /api/webhooks/:id- Update webhookDELETE /api/webhooks/:id- Delete webhook
Analytics (JWT)
GET /api/analytics/overview- Dashboard overviewGET /api/analytics/buckets/:bucketId- Bucket analytics
Data Ingestion (API Key)
POST /api/data- Ingest single data pointPOST /api/data/batch- Batch ingest data points
Data Queries (API Key)
POST /api/data/query- Query time-series data
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