Business Intelligence API
Overview
The Business Intelligence (BI) API provides RPC-style operations, task scheduling, email services, and business workflow utilities.
Base Endpoint: /bi
API Endpoints
1. RPC Call
Execute remote procedure call operations.
Endpoint: POST /bi/rpc/call
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| method | String | Yes | RPC method name |
| params | Object | Yes | Method parameters |
| id | String | No | Request identifier |
| timeout | Integer | No | Timeout in milliseconds (default: 30000) |
Request:
curl -X POST "https://api.alaikis.com/std/bi/rpc/call" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"method\": \"getAnalyticsReport\", \"params\": {\"reportType\": \"sales\", \"dateRange\": \"2026-05\"}}"Response:
{
"code": 200,
"msg": "Request successful",
"data": {
"jsonrpc": "2.0",
"id": "req-12345",
"result": {
"reportType": "sales",
"period": "2026-05",
"totalRevenue": 125450.75,
"currency": "USD",
"transactions": 842,
"avgOrderValue": 148.99
}
},
"timestamp": 1715385600
}2. Batch RPC Call
Execute multiple RPC operations in a single request.
Endpoint: POST /bi/rpc/batch
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| calls | Array | Yes | Array of RPC call objects |
| parallel | Boolean | No | Execute in parallel (default: false) |
Request:
curl -X POST "https://api.alaikis.com/std/bi/rpc/batch" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"calls\": [{\"method\": \"getUserStats\", \"params\": {}}, {\"method\": \"getRevenue\", \"params\": {\"days\": 7}}], \"parallel\": true}"3. Schedule Task
Schedule a recurring task using celery-style scheduling.
Endpoint: POST /bi/scheduler/create
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| taskName | String | Yes | Task identifier |
| schedule | Object | Yes | Schedule definition (cron or interval) |
| endpoint | String | Yes | Webhook endpoint URL |
| payload | Object | No | Task payload data |
| enabled | Boolean | No | Enable immediately (default: true) |
Request:
curl -X POST "https://api.alaikis.com/std/bi/scheduler/create" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"taskName\": \"daily-sales-report\", \"schedule\": {\"cron\": \"0 9 * * *\"}, \"endpoint\": \"https://your-api.com/webhook/report\"}"Response:
{
"code": 200,
"msg": "Request successful",
"data": {
"taskId": "task-abc123xyz",
"taskName": "daily-sales-report",
"schedule": {"cron": "0 9 * * *", "timezone": "UTC"},
"nextRun": "2026-05-12T09:00:00Z",
"status": "active",
"createdAt": "2026-05-11T02:30:00Z"
},
"timestamp": 1715385600
}4. List Scheduled Tasks
Get all scheduled tasks with status.
Endpoint: POST /bi/scheduler/list
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | String | No | Filter by status: active, paused, completed |
| limit | Integer | No | Result limit (default: 50) |
Request:
curl -X POST "https://api.alaikis.com/std/bi/scheduler/list" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"status\": \"active\"}"5. Get Task Execution History
Retrieve execution history for a scheduled task.
Endpoint: POST /bi/scheduler/history
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| taskId | String | Yes | Task identifier |
| limit | Integer | No | Result limit (default: 20) |
Request:
curl -X POST "https://api.alaikis.com/std/bi/scheduler/history" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"taskId\": \"task-abc123xyz\"}"6. Pause/Resume Task
Control task execution status.
Endpoint: POST /bi/scheduler/status
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| taskId | String | Yes | Task identifier |
| action | String | Yes | Action: pause, resume, cancel |
Request:
curl -X POST "https://api.alaikis.com/std/bi/scheduler/status" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"taskId\": \"task-abc123xyz\", \"action\": \"pause\"}"7. Send Email
Send transactional or marketing emails.
Endpoint: POST /bi/email/send
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| to | Array | Yes | Recipient email addresses |
| subject | String | Yes | Email subject |
| body | String | Yes | Email body (HTML or plain text) |
| from | String | No | Sender email (default: system) |
| cc | Array | No | CC recipients |
| bcc | Array | No | BCC recipients |
| attachments | Array | No | Email attachments |
| templateId | String | No | Template identifier |
| templateData | Object | No | Template merge data |
Request:
curl -X POST "https://api.alaikis.com/std/bi/email/send" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"to\": [\"user@example.com\"], \"subject\": \"Order Confirmation\", \"body\": \"<h1>Thank you!</h1>\"}"Response:
{
"code": 200,
"msg": "Request successful",
"data": {
"messageId": "msg-789xyz",
"status": "queued",
"recipients": 1,
"queuedAt": "2026-05-11T02:30:00Z",
"estimatedDelivery": "2026-05-11T02:30:05Z"
},
"timestamp": 1715385600
}8. Email Status
Check delivery status of sent emails.
Endpoint: POST /bi/email/status
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| messageId | String | Yes | Message identifier |
Request:
curl -X POST "https://api.alaikis.com/std/bi/email/status" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"messageId\": \"msg-789xyz\"}"Response:
{
"code": 200,
"msg": "Request successful",
"data": {
"messageId": "msg-789xyz",
"status": "delivered",
"deliveredAt": "2026-05-11T02:30:03Z",
"opened": true,
"openedAt": "2026-05-11T02:35:12Z",
"clicked": false,
"bounced": false
},
"timestamp": 1715385600
}9. Verify Email (Advanced)
Advanced email verification with detailed diagnostics.
Endpoint: POST /bi/email/verify-advanced
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | Email address | |
| deepCheck | Boolean | No | Perform deep SMTP check (default: true) |
| catchAllTest | Boolean | No | Test for catch-all domain (default: true) |
Request:
curl -X POST "https://api.alaikis.com/std/bi/email/verify-advanced" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"email\": \"support@alaikis.com\", \"deepCheck\": true}"10. Generate Report
Generate business intelligence reports.
Endpoint: POST /bi/report/generate
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| reportType | String | Yes | Report type: sales, users, inventory, financial |
| parameters | Object | Yes | Report parameters |
| format | String | No | Output format: json, csv, pdf, xlsx (default: json) |
| schedule | String | No | Schedule: now, daily, weekly, monthly |
Request:
curl -X POST "https://api.alaikis.com/std/bi/report/generate" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"reportType\": \"sales\", \"parameters\": {\"startDate\": \"2026-05-01\", \"endDate\": \"2026-05-10\"}, \"format\": \"xlsx\"}"Schedule Format
Cron Expression
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6) (Sunday=0)
│ │ │ │ │
* * * * *Interval Format
{"minutes": 30}
{"hours": 4}
{"days": 1}
{"weeks": 1}Email Attachment Format
{
"filename": "report.pdf",
"contentType": "application/pdf",
"contentBase64": "JVBERi0xLjMKJcfs..."
}Rate Limiting
- RPC Calls: 1000 requests/hour
- Scheduler Operations: 100 requests/hour
- Email Sending: 500 emails/hour
- Report Generation: 50 reports/hour
Task Statuses
| Status | Description |
|---|---|
| pending | Task created and waiting |
| active | Task is scheduled and running |
| paused | Task execution suspended |
| completed | Task finished successfully |
| failed | Task execution failed |
| cancelled | Task manually cancelled |
Support
Contact: support@alaikis.com