| Crates.io | oxify-api |
| lib.rs | oxify-api |
| version | 0.1.0 |
| created_at | 2026-01-19 06:00:26.676949+00 |
| updated_at | 2026-01-19 06:00:26.676949+00 |
| description | GraphQL and REST API server for OxiFY AI orchestration platform |
| homepage | |
| repository | https://github.com/cool-japan/oxify |
| max_upload_size | |
| id | 2053830 |
| size | 620,275 |
The Face - REST API Server for OxiFY Workflow Orchestration
oxify-api provides a production-ready HTTP API for managing and executing LLM workflows. Built on top of oxify-server (Axum-based HTTP runtime), it offers complete CRUD operations, real-time execution monitoring via Server-Sent Events, and OpenAPI documentation.
Status: ✅ Phase 1 Complete - Production Ready with SSE Part of: OxiFY Enterprise Architecture (Codename: Absolute Zero)
┌─────────────────────────────────────────┐
│ oxify-api Server │
│ │
│ ┌───────────────────────────────────┐ │
│ │ Axum HTTP Server │ │
│ │ - CORS middleware │ │
│ │ - Compression (gzip/brotli) │ │
│ │ - Request tracing │ │
│ └───────────────────────────────────┘ │
│ ↓ │
│ ┌───────────────────────────────────┐ │
│ │ API Handlers │ │
│ │ - Workflow CRUD │ │
│ │ - Execution endpoints │ │
│ │ - SSE streaming │ │
│ └───────────────────────────────────┘ │
│ ↓ │
│ ┌───────────────────────────────────┐ │
│ │ Storage Layer │ │
│ │ - WorkflowStore (in-memory) │ │
│ │ - ExecutionStore (in-memory) │ │
│ └───────────────────────────────────┘ │
│ ↓ │
│ ┌───────────────────────────────────┐ │
│ │ oxify-engine │ │
│ │ - DAG execution │ │
│ │ - Parallel node execution │ │
│ └───────────────────────────────────┘ │
└─────────────────────────────────────────┘
GET /health
Response:
{
"status": "healthy",
"version": "0.1.0"
}
POST /api/v1/workflows
Content-Type: application/json
{
"workflow": {
"metadata": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My RAG Workflow",
"description": "Retrieval-Augmented Generation workflow",
"version": "1.0.0",
"tags": ["rag", "production"]
},
"nodes": [...],
"edges": [...]
}
}
Response (201 Created):
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Workflow created successfully"
}
GET /api/v1/workflows
Response:
{
"workflows": [...],
"total": 10
}
GET /api/v1/workflows/:id
Response:
{
"workflow": {...}
}
PUT /api/v1/workflows/:id
Content-Type: application/json
{
"workflow": {...}
}
Response:
{
"message": "Workflow updated successfully"
}
DELETE /api/v1/workflows/:id
Response:
{
"message": "Workflow deleted successfully"
}
POST /api/v1/workflows/:id/execute
Content-Type: application/json
{
"variables": {
"user_query": "What is the weather in Tokyo?",
"max_results": 5
}
}
Response (202 Accepted):
{
"execution_id": "660e8400-e29b-41d4-a716-446655440000",
"message": "Workflow execution started"
}
GET /api/v1/executions/:id
Response:
{
"execution_id": "660e8400-e29b-41d4-a716-446655440000",
"workflow_id": "550e8400-e29b-41d4-a716-446655440000",
"state": "Completed",
"variables": {...},
"node_results": [...]
}
GET /api/v1/executions
Response:
{
"executions": [
{
"execution_id": "...",
"workflow_id": "...",
"state": "Completed",
"started_at": null
}
],
"total": 5
}
GET /api/v1/workflows/:id/executions
Response:
{
"executions": [...],
"total": 3
}
GET /api/v1/executions/:id/stream
Accept: text/event-stream
Response (SSE stream):
data: {"execution_id":"...","workflow_id":"...","state":"Running","node_results_count":2}
data: {"execution_id":"...","workflow_id":"...","state":"Completed","node_results_count":5}
cargo run --bin oxify-api
Server starts on http://0.0.0.0:3000
cargo build --release
./target/release/oxify-api
The API is fully documented with OpenAPI 3.0 schemas using utoipa.
Access documentation:
http://localhost:3000/api-docs/openapi.json (when Swagger UI is enabled)http://localhost:3000/swagger-ui (currently disabled due to Axum 0.8 compatibility)Current implementation uses in-memory storage (HashMap with RwLock):
WorkflowStore: Stores workflow definitionsExecutionStore: Stores execution contextsNote: In-memory storage is volatile. For production, implement persistent storage:
The API is integrated with OxiFY's security layer:
oxify-authn)oxify-authz)Note: Middleware is available but not enforced in current endpoints. Add authentication to routes as needed.
Rate limiting infrastructure is included (tower_governor) but not yet implemented.
Planned:
Environment variables (planned):
OXIFY_HOST=0.0.0.0
OXIFY_PORT=3000
OXIFY_DATABASE_URL=postgresql://localhost/oxify
OXIFY_REDIS_URL=redis://localhost:6379
OXIFY_LOG_LEVEL=info
All errors follow a consistent format:
{
"error": "ValidationError",
"message": "Workflow must have at least one Start node"
}
HTTP Status Codes:
200 OK: Success201 Created: Resource created202 Accepted: Async operation started400 Bad Request: Validation error404 Not Found: Resource not found500 Internal Server Error: Unexpected error# Create workflow
curl -X POST http://localhost:3000/api/v1/workflows \
-H "Content-Type: application/json" \
-d @workflow.json
# Execute workflow
curl -X POST http://localhost:3000/api/v1/workflows/550e8400-e29b-41d4-a716-446655440000/execute \
-H "Content-Type: application/json" \
-d '{"variables": {"input": "Hello"}}'
# Stream execution (SSE)
curl -N http://localhost:3000/api/v1/executions/660e8400-e29b-41d4-a716-446655440000/stream
See TODO.md for detailed roadmap.
Highlights:
oxify-model: Workflow data modelsoxify-engine: DAG execution engineoxify-server: HTTP server runtimeoxify-authn: Authentication layeroxify-authz: Authorization layerApache-2.0