Skip to main content

API Overview

The Ascend API provides programmatic access to the enterprise AI governance platform for agent management, action approval, policy enforcement, and analytics.

Base URL

https://pilot.owkai.app/api

All API endpoints are versioned where applicable. The primary action submission API uses /api/v1/.

Authentication Methods

The API supports three authentication methods:

MethodHeaderUse Case
Session CookieCookie: access_token=...Admin UI, browser-based access
Bearer TokenAuthorization: Bearer <jwt>Cognito JWT, programmatic access
API KeyX-API-Key: <key> or Authorization: Bearer <key>SDK integration, automation

Quick Start with API Key

# Generate an API key from the Admin Console
# Then use it in your requests:

curl "https://pilot.owkai.app/api/v1/actions" \
-H "X-API-Key: owkai_admin_your_api_key_here"

Quick Start with JWT

# After Cognito authentication:
curl "https://pilot.owkai.app/api/v1/actions" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."

API Categories

CategoryBase PathDescription
Actions/api/v1/actionsSubmit and manage agent actions
Agents/api/registry/agentsAgent registration and management
Smart Rules/api/smart-rulesAutomated governance rules
Analytics/api/analyticsMetrics and reporting
MCP Governance/api/mcp-governanceMCP server governance

Request Format

All POST/PUT/PATCH requests should use JSON:

curl -X POST "https://pilot.owkai.app/api/v1/actions/submit" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "customer-service-agent",
"action_type": "email_send",
"description": "Send welcome email"
}'

Response Format

All responses are JSON with consistent structure:

Success Response

{
"success": true,
"data": {
"id": "action_123",
"status": "approved"
}
}

Error Response

{
"detail": "Authentication required",
"status_code": 401
}

Validation Error

{
"detail": [
{
"loc": ["body", "agent_id"],
"msg": "field required",
"type": "value_error.missing"
}
]
}

Rate Limiting

API keys have configurable rate limits:

SettingDefaultMaximum
Requests per hour1,000100,000
Requests per day10,0001,000,000

Rate limit headers are included in responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 1704067200

When rate limited, you'll receive:

{
"detail": "Rate limit exceeded"
}

Headers:

Retry-After: 3600

Pagination

List endpoints support pagination:

ParameterDefaultDescription
limit50Items per page (max 100)
offset0Starting position
page1Page number (alternative)

Example:

curl "https://pilot.owkai.app/api/v1/actions?limit=20&offset=40"

Response:

{
"total": 150,
"limit": 20,
"offset": 40,
"items": [...]
}

Multi-Tenant Isolation

All API requests are automatically filtered by organization:

  • Your API key is linked to your organization
  • You can only access data belonging to your organization
  • Cross-tenant access is blocked at the database layer (SEC-007)

Compliance: SOC 2 CC6.1, PCI-DSS 7.1, HIPAA 164.312(a)

Common Headers

HeaderRequiredDescription
Content-TypeYes (POST/PUT)application/json
X-API-KeyConditionalAPI key authentication
AuthorizationConditionalBearer token authentication
X-Request-IDNoRequest correlation ID
X-CSRF-TokenCookie auth onlyCSRF protection token

SDK Integration

Official SDKs are available for common languages:

LanguagePackageDocumentation
Pythonascend-sdkPython SDK
Node.js@ascend/sdkNode.js SDK
RESTN/AREST API

Webhooks

Configure webhooks to receive real-time notifications:

{
"event_type": "action.approved",
"webhook_url": "https://your-server.com/webhook",
"secret": "your_webhook_secret"
}

Events are signed with HMAC-SHA256 for verification.

Health Check

Verify API availability:

curl "https://pilot.owkai.app/health"

Response:

{
"status": "healthy",
"version": "1.0.0",
"timestamp": "2025-01-15T10:00:00Z"
}

Support


Source: main.py, dependencies.py