Quick Start
Get started with dakkio in just a few minutes. This guide will walk you through creating an account, generating an API key, and sending your first data point.
Prerequisites
- A modern web browser
- Basic knowledge of REST APIs
- cURL or any HTTP client (Postman, Insomnia, etc.)
Step 1: Create an Account
- Visit app.dakkio.io
- Click "Sign Up" in the top right
- Enter your email, password, and name
- Click "Create Account"
An organization will be automatically created for you with a Free plan.
Using cURL
curl -X POST https://api.dakkio.io/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "your@email.com",
"password": "securepassword123",
"name": "Your Name"
}'
Response:
{
"user": {
"_id": "507f1f77bcf86cd799439011",
"email": "your@email.com",
"name": "Your Name",
"organizationId": "507f1f77bcf86cd799439012",
"role": "owner",
"status": "active"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Step 2: Create Your First Bucket
Buckets are containers for your time-series data. Each bucket can hold multiple data sources.
Via Dashboard
- Log into app.dakkio.io
- Navigate to "Buckets" in the sidebar
- Click "Create Bucket"
- Enter a name (e.g., "IoT Sensors")
- Set retention period (e.g., 365 days)
- Click "Create"
Using cURL
curl -X POST https://api.dakkio.io/api/buckets \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "IoT Sensors",
"description": "Temperature and humidity sensors",
"retentionDays": 365
}'
Response:
{
"bucket": {
"_id": "507f1f77bcf86cd799439013",
"organizationId": "507f1f77bcf86cd799439012",
"name": "IoT Sensors",
"description": "Temperature and humidity sensors",
"retentionDays": 365,
"status": "active",
"createdAt": "2024-01-15T10:00:00Z"
}
}
Save the _id - you'll need it for data ingestion!
Step 3: Create a Data Source
Data sources define the schema and type of data you'll be storing.
Via Dashboard
- Go to your bucket's detail page
- Click "Data Sources" tab
- Click "Create Data Source"
- Enter name (e.g., "Temperature Sensor")
- Select type (e.g., "sensor")
- Click "Create"
Using cURL
curl -X POST https://api.dakkio.io/api/datasources \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bucketId": "507f1f77bcf86cd799439013",
"name": "Temperature Sensor",
"description": "Living room temperature sensor",
"type": "sensor",
"schema": {
"temperature": "number",
"humidity": "number"
}
}'
Response:
{
"dataSource": {
"_id": "507f1f77bcf86cd799439014",
"bucketId": "507f1f77bcf86cd799439013",
"name": "Temperature Sensor",
"type": "sensor",
"schema": {
"temperature": "number",
"humidity": "number"
},
"status": "active"
}
}
Step 4: Generate an API Key
API keys are used to send data from your IoT devices and applications.
Via Dashboard
- Go to "API Keys" in the sidebar
- Click "Generate API Key"
- Enter a label (e.g., "Production Sensors")
- Select permissions (data:read, data:write, bucket:read)
- Click "Generate"
- Copy the key immediately - it won't be shown again!
Using cURL
curl -X POST https://api.dakkio.io/api/apikeys \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"label": "Production Sensors",
"permissions": ["data:read", "data:write", "bucket:read"]
}'
Response:
{
"apiKey": {
"_id": "507f1f77bcf86cd799439015",
"keyPreview": "dakkio_a1b2c3d4...",
"label": "Production Sensors",
"permissions": ["data:read", "data:write", "bucket:read"],
"status": "active"
},
"key": "dakkio_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}
The full API key is only shown once. Store it securely!
Step 5: Send Your First Data Point
Now you can start sending data using your API key!
Single Data Point
curl -X POST https://api.dakkio.io/api/data \
-H "X-API-Key: dakkio_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6" \
-H "Content-Type: application/json" \
-d '{
"bucketId": "507f1f77bcf86cd799439013",
"dataSourceId": "507f1f77bcf86cd799439014",
"timestamp": "2024-01-15T10:30:00Z",
"values": {
"temperature": 22.5,
"humidity": 65
},
"metadata": {
"location": "Living Room",
"deviceId": "ESP32-001"
}
}'
Response:
{
"message": "Data point ingested successfully",
"dataPoint": {
"_id": "507f1f77bcf86cd799439016",
"timestamp": "2024-01-15T10:30:00Z",
"values": {
"temperature": 22.5,
"humidity": 65
}
}
}
Batch Data Points
For efficiency, you can send multiple data points at once:
curl -X POST https://api.dakkio.io/api/data/batch \
-H "X-API-Key: dakkio_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6" \
-H "Content-Type: application/json" \
-d '{
"bucketId": "507f1f77bcf86cd799439013",
"dataPoints": [
{
"dataSourceId": "507f1f77bcf86cd799439014",
"timestamp": "2024-01-15T10:30:00Z",
"values": { "temperature": 22.5, "humidity": 65 }
},
{
"dataSourceId": "507f1f77bcf86cd799439014",
"timestamp": "2024-01-15T10:31:00Z",
"values": { "temperature": 22.6, "humidity": 64 }
},
{
"dataSourceId": "507f1f77bcf86cd799439014",
"timestamp": "2024-01-15T10:32:00Z",
"values": { "temperature": 22.7, "humidity": 63 }
}
]
}'
Response:
{
"message": "Batch data ingested successfully",
"insertedCount": 3
}
Step 6: Query Your Data
Retrieve your time-series data with filters and aggregations:
curl -X POST https://api.dakkio.io/api/data/query \
-H "X-API-Key: dakkio_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6" \
-H "Content-Type: application/json" \
-d '{
"bucketId": "507f1f77bcf86cd799439013",
"filters": {
"dataSourceIds": ["507f1f77bcf86cd799439014"],
"startTime": "2024-01-15T10:00:00Z",
"endTime": "2024-01-15T11:00:00Z",
"fields": ["temperature"]
},
"aggregation": "avg",
"groupBy": "hour"
}'
Response:
{
"data": [
{
"timestamp": "2024-01-15T10:00:00Z",
"temperature": 22.6
}
],
"metadata": {
"count": 3,
"aggregation": "avg",
"groupBy": "hour"
}
}
Next Steps
Congratulations! You've successfully:
- ✅ Created a dakkio account
- ✅ Set up a bucket and data source
- ✅ Generated an API key
- ✅ Sent your first data point
- ✅ Queried your data
Now you can:
- Set Up Alerts - Get notified when values exceed thresholds
- Configure Webhooks - Send events to external services
- Explore Examples - See real-world use cases
- Try the Playground - Test API calls interactively
Troubleshooting
Invalid API Key
{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}
- Verify your API key is correct
- Check the
X-API-Keyheader is included - Ensure the API key hasn't been revoked
Bucket Not Found
{
"error": "Not Found",
"message": "Bucket not found"
}
- Verify the
bucketIdis correct - Ensure the bucket belongs to your organization
- Check the bucket status is "active"
Rate Limit Exceeded
{
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}
- You've exceeded your plan's API call limit
- Upgrade your plan or wait for the next billing cycle
- Use batch operations to reduce API calls
Getting Help
Need assistance?
- 📖 Read the Full API Reference
- 💬 Join our Discord Community
- 📧 Email us at support@dakkio.io