API Overview
Olytix Core provides multiple API interfaces to access your semantic layer. Choose the best API for your use case: REST for simplicity, GraphQL for flexibility, or DAX for Power BI integration.
Available APIs
| API | Use Case | Best For |
|---|---|---|
| REST API | Standard HTTP/JSON interface | General applications, scripts, dashboards |
| GraphQL API | Flexible query interface | Complex queries, custom clients |
| DAX API | Power BI/Excel compatibility | Microsoft BI tools, XMLA clients |
Quick Start
REST API
curl -X POST http://localhost:8000/api/v1/query \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"metrics": ["monthly_revenue"],
"dimensions": ["orders.region"],
"filters": [
{"dimension": "orders.order_date.year", "operator": "equals", "value": 2024}
]
}'
GraphQL API
query {
query(
metrics: ["monthly_revenue"]
dimensions: ["orders.region"]
) {
data
query { sql }
}
}
DAX API
EVALUATE
SUMMARIZECOLUMNS(
'orders'[region],
"Revenue", [monthly_revenue]
)
Base URLs
| Environment | URL |
|---|---|
| Local Development | http://localhost:8000 |
| Production | https://api.your-domain.com |
Authentication
All APIs support the same authentication methods:
# API Key (Header)
-H "Authorization: Bearer YOUR_API_KEY"
# API Key (Query Parameter)
?api_key=YOUR_API_KEY
# JWT Token
-H "Authorization: Bearer YOUR_JWT_TOKEN"
See Authentication for details.
Response Format
All APIs return consistent response structures:
{
"data": [...],
"query": {
"sql": "SELECT ...",
"duration_ms": 45
},
"meta": {
"total_rows": 100,
"cached": false
}
}
API Sections
REST API
Standard HTTP endpoints for:
- Semantic queries
- Metadata exploration
- Lineage information
- Project management
GraphQL API
Flexible GraphQL interface with:
- Custom query shapes
- Subscriptions for real-time updates
- Introspection
DAX API
Power BI compatibility with:
- DAX query execution
- XMLA protocol support
- Excel integration