Skip to content

API Reference

https://api.strike48.com/v1

All API requests require authentication using an API key. You can generate API keys from your account dashboard.

Terminal window
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.strike48.com/v1/datasets
Terminal window
curl https://api.strike48.com/v1/datasets?api_key=YOUR_API_KEY

Rate limits vary by plan:

  • Starter: 1,000 requests/hour
  • Professional: 10,000 requests/hour
  • Business: 100,000 requests/hour
  • Enterprise: Unlimited

Rate limit headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200
GET /datasets

Response:

{
"datasets": [
{
"id": "ds_123",
"name": "Sales Data",
"created_at": "2024-01-01T00:00:00Z",
"rows": 1000000,
"size_bytes": 50000000
}
],
"total": 10,
"page": 1
}
GET /datasets/{dataset_id}
POST /datasets
Content-Type: application/json
{
"name": "Sales Data",
"description": "Monthly sales records",
"schema": {
"fields": [
{"name": "date", "type": "date"},
{"name": "amount", "type": "decimal"},
{"name": "product", "type": "string"}
]
}
}
PUT /datasets/{dataset_id}
DELETE /datasets/{dataset_id}
POST /query
Content-Type: application/json
{
"sql": "SELECT * FROM sales WHERE amount > 1000",
"dataset_id": "ds_123",
"timeout": 30,
"cache": true
}

Response:

{
"query_id": "q_456",
"status": "completed",
"rows": 500,
"execution_time_ms": 245,
"data": [
{"date": "2024-01-01", "amount": 1500, "product": "Widget"},
{"date": "2024-01-02", "amount": 2000, "product": "Gadget"}
],
"metadata": {
"fields": [
{"name": "date", "type": "date"},
{"name": "amount", "type": "decimal"},
{"name": "product", "type": "string"}
]
}
}
GET /query/{query_id}/status
POST /query/{query_id}/cancel
GET /dashboards
GET /dashboards/{dashboard_id}
POST /dashboards
Content-Type: application/json
{
"name": "Sales Dashboard",
"description": "Monthly sales overview",
"widgets": [
{
"type": "chart",
"position": {"x": 0, "y": 0, "w": 6, "h": 4},
"config": {
"query": "SELECT date, SUM(amount) FROM sales GROUP BY date",
"chart_type": "line",
"title": "Sales Trend"
}
}
]
}
PUT /dashboards/{dashboard_id}
DELETE /dashboards/{dashboard_id}
POST /dashboards/{dashboard_id}/share
{
"users": ["user@example.com"],
"permission": "view",
"expires_at": "2024-12-31T23:59:59Z"
}
POST /visualizations
Content-Type: application/json
{
"name": "Revenue Chart",
"type": "bar",
"query_id": "q_456",
"config": {
"x_axis": "month",
"y_axis": "revenue",
"color": "category"
}
}
GET /visualizations/{viz_id}/export?format=png

Supported formats: png, svg, pdf, csv

GET /ml/models
POST /ml/models/train
{
"name": "Sales Predictor",
"type": "regression",
"dataset_id": "ds_123",
"target": "amount",
"features": ["date", "product", "region"],
"config": {
"algorithm": "random_forest",
"hyperparameters": {
"n_estimators": 100,
"max_depth": 10
}
}
}
GET /ml/models/{model_id}/status
POST /ml/models/{model_id}/predict
{
"data": [
{"date": "2024-12-01", "product": "Widget", "region": "North"}
]
}
POST /ml/models/{model_id}/deploy
{
"name": "production-sales-predictor",
"auto_retrain": true,
"retrain_schedule": "0 0 * * 0"
}
POST /data/import
{
"dataset_id": "ds_123",
"source": {
"type": "s3",
"bucket": "my-bucket",
"key": "data/sales.csv"
},
"format": "csv",
"options": {
"header": true,
"delimiter": ","
}
}
POST /data/export
{
"dataset_id": "ds_123",
"destination": {
"type": "s3",
"bucket": "my-bucket",
"key": "exports/sales.parquet"
},
"format": "parquet"
}
const ws = new WebSocket('wss://api.strike48.com/v1/stream');
ws.onopen = () => {
ws.send(JSON.stringify({
action: 'subscribe',
dataset_id: 'ds_123',
filters: {
amount: {'>': 1000}
}
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('New data:', data);
};
POST /webhooks
{
"url": "https://your-app.com/webhook",
"events": ["query.completed", "dataset.updated"],
"secret": "your-webhook-secret"
}
GET /webhooks
DELETE /webhooks/{webhook_id}
{
"error": {
"code": "INVALID_QUERY",
"message": "Syntax error in SQL query",
"details": "Unexpected token 'SELCT' at line 1, column 1",
"request_id": "req_789"
}
}

Common error codes:

  • AUTHENTICATION_FAILED - Invalid API key
  • RATE_LIMIT_EXCEEDED - Too many requests
  • INVALID_REQUEST - Malformed request
  • RESOURCE_NOT_FOUND - Resource doesn’t exist
  • PERMISSION_DENIED - Insufficient permissions
  • INTERNAL_ERROR - Server error

Official SDKs available:

Access our GraphQL endpoint at:

https://api.strike48.com/graphql

Interactive playground available at:

https://api.strike48.com/graphql/playground

Download our Postman collection: Prospector Studio API Collection