Getting Started with Kaman API
Welcome to the Kaman API documentation. This guide will help you get started with integrating Kaman into your applications.
Overview
Kaman provides a powerful API for:
- Executing Workflows - Trigger automated multi-step processes
- Querying Data - Access your data through KDL (Kaman Data Lake)
- Managing Users & Roles - User and access management
Base URLs
All API requests go through the marketplace proxy:
| Service | Base URL |
|---|---|
| Agent API | /api/agent |
| Auth API | /api/auth |
| KDL API | /api/kdl |
For self-hosted installations, prepend your instance URL (e.g., http://kaman.ai/api/agent).
Quick Start
1. Get Your API Key
- Log in to the Kaman Marketplace
- Navigate to Settings > API Keys
- Click Create New Key
- Copy and securely store your API key (starts with
kam_)
2. Make Your First API Call
bash
# List available workflows
curl -X GET "http://kaman.ai/api/agent/workflows" \
-H "Authorization: Bearer kam_your_api_key"
3. Execute a Workflow
bash
curl -X POST "http://kaman.ai/api/agent/workflows/123/execute" \
-H "Authorization: Bearer kam_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"param1": "value1",
"param2": "value2"
}'
4. Query Your Data Lake
bash
curl -X POST "http://kaman.ai/api/kdl/datalakes/my_lake/data/query" \
-H "Authorization: Bearer kam_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"query": "SELECT * FROM main.sales LIMIT 10"
}'
Authentication
All API requests require authentication via Bearer token:
bash
Authorization: Bearer kam_your_api_key
API keys starting with kam_ are authenticated against the auth service automatically.
API Documentation
- Interactive Docs: Visit
/api-docsfor Swagger UI with try-it-out functionality - OpenAPI Spec: Download the spec at
/api/api-docs
Code Examples
TypeScript/JavaScript
typescript
const API_KEY = process.env.KAMAN_API_KEY;
const BASE_URL = 'http://kaman.ai';
// List workflows
const response = await fetch(`${BASE_URL}/api/agent/workflows`, {
headers: {
'Authorization': `Bearer ${API_KEY}`
}
});
const workflows = await response.json();
// Execute a workflow
const result = await fetch(`${BASE_URL}/api/agent/workflows/123/execute`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ param1: 'value1' })
});
Python
python
import requests
import os
API_KEY = os.getenv('KAMAN_API_KEY')
BASE_URL = 'http://kaman.ai'
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
}
# List workflows
workflows = requests.get(
f'{BASE_URL}/api/agent/workflows',
headers=headers
).json()
# Execute a workflow
result = requests.post(
f'{BASE_URL}/api/agent/workflows/123/execute',
headers=headers,
json={'param1': 'value1'}
).json()
Next Steps
- Authentication Guide - Learn about API authentication
- Workflows API - Execute and manage workflows
- KDL API - Query your data lake
Need Help?
- Check the Interactive API Docs for detailed endpoint documentation
- Contact support at support@kaman.ai