API Reference
Comprehensive documentation for the DataPulse Analytics API. Build integrations, automate workflows, and access advanced analytics programmatically.
Overview
The DataPulse API provides programmatic access to your analytics workspace, predictive models, and historical datasets. All endpoints use standard HTTP methods and return JSON responses. The base URL for all API requests is:
https://api.datapulse.io/v1
api-sandbox.datapulse.io for testing. Sandbox credentials auto-refresh daily and do not affect production data.
Authentication
Authenticate your requests using Bearer tokens included in the Authorization header. Generate API keys from your Dashboard > Settings > API Keys.
Authorization: Bearer dp_live_sk_9x8y7z6w5v4u3t2s1r
Keys prefixed with dp_live_ access production data. Keys prefixed with dp_test_ are scoped to the sandbox environment. Keep your keys secure and rotate them regularly.
Rate Limits
API requests are throttled to ensure platform stability. Limits are applied per API key:
| Plan | Requests / Minute | Requests / Day | Concurrent |
|---|---|---|---|
| Starter | 60 | 10,000 | 5 |
| Professional | 300 | 100,000 | 15 |
| Enterprise | Unlimited | Unlimited | 50 |
Rate limit headers are included in every response:
X-RateLimit-Limit: 300 X-RateLimit-Remaining: 284 X-RateLimit-Reset: 1698765432
Error Handling
The API uses standard HTTP status codes and returns detailed error objects in the response body:
{
"error": {
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid or expired.",
"type": "authentication_error",
"request_id": "req_8x9y2z3a4b"
}
}| Code | Meaning |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource does not exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Platform issue |
Endpoints
Retrieve a paginated list of analytics reports generated by your workspace.
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
limit | integer | No | Results per page (max: 100) |
status | string | No | Filter by completed, processing, or failed |
{
"data": [
{
"id": "rpt_9x8y7z",
"name": "Q3 Revenue Analysis",
"status": "completed",
"created_at": "2024-10-15T14:32:00Z",
"download_url": "https://cdn.datapulse.io/reports/rpt_9x8y7z.pdf"
}
],
"pagination": { "total": 42, "page": 1, "next": "/v1/analytics/reports?page=2" }
}Submit data points for real-time predictive analysis using your deployed ML models.
| Parameter | Type | Required | Description |
|---|---|---|---|
model_id | string | Yes | ID of the trained prediction model |
features | object | Yes | Key-value pairs matching model schema |
confidence_threshold | float | No | Min confidence to return (0.0-1.0) |
{
"model_id": "mdl_churn_v2",
"features": {
"tenure_months": 14,
"monthly_spend": 89.50,
"support_tickets": 3
}
}Fetch metadata and schema information for a specific dataset.
{
"id": "ds_cust_2024",
"name": "Customer Transactions 2024",
"row_count": 148205,
"columns": ["user_id", "amount", "timestamp", "region"],
"size_mb": 24.8,
"last_updated": "2024-11-02T09:15:00Z"
}Update workspace-level analytics configuration, retention policies, and data export settings.
{
"retention_days": 90,
"auto_archive": true,
"export_format": "parquet",
"notifications": {
"email_on_failure": true,
"slack_webhook": "https://hooks.slack.com/services/..."
}
}