Skip to main content

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 TypePrefixScopePermissions
Admindakkio_a_OrganizationFull access to all operations
Writedakkio_w_BucketData ingestion, data sources, alerts
Readdakkio_r_BucketData 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

CodeMeaning
200OK - Request succeeded
201Created - Resource created successfully
400Bad Request - Validation error
401Unauthorized - Invalid/missing authentication
403Forbidden - Insufficient permissions
404Not Found - Resource not found
409Conflict - Resource already exists
429Too Many Requests - Rate limit exceeded
500Internal 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 buckets
  • POST /api/buckets - Create bucket
  • GET /api/buckets/:id - Get bucket
  • PATCH /api/buckets/:id - Update bucket
  • DELETE /api/buckets/:id - Delete bucket

2. API Key Management (Admin Key)

  • GET /api/buckets/:bucketId/keys - List bucket API keys
  • POST /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 sources
  • POST /api/buckets/:bucketId/sources - Create data source

4. Data Ingestion (Write Key)

  • POST /api/data - Ingest single data point
  • POST /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 rules
  • POST /api/alerts - Create alert rule

7. Analytics (Read Key)

  • GET /api/analytics/overview - Organization overview
  • GET /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?