AVA Backend & API

AVA Backend API

RESTful API endpoints for programmatic access to AVA's automation capabilities. All endpoints require authentication via API key.

Real-time Processing

Process commands instantly with low latency responses

Secure & Scalable

Enterprise-grade security with automatic scaling for high workloads

Webhook Support

Receive real-time notifications for workflow completions and errors

Core API Endpoints

POST /api/v1/commands/execute
// Execute a natural language command
POST https://api.ava-ai.com/v1/commands/execute
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "command": "Extract sales data from columns A to F and create a pivot table",
  "workflow_id": "optional_workflow_reference",
  "parameters": {
    "output_format": "excel",
    "email_results": true
}
GET /api/v1/workflows
// List all workflows
GET https://api.ava-ai.com/v1/workflows
Authorization: Bearer YOUR_API_KEY
POST /api/v1/workflows
// Create a new workflow
POST https://api.ava-ai.com/v1/workflows
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "name": "Monthly Sales Report",
  "description": "Automated Q3 sales analysis",
  "steps": [
    {
      "action": "extract_data",
      "parameters": {"range": "A1:F100"}
    },
    {
      "action": "create_pivot",
      "parameters": {"rows": ["Region"], "values": ["Revenue"]}
  ]
}

API Documentation

Authentication

All API requests require an API key in the Authorization header:

Authorization: Bearer ava_sk_1234567890abcdef

Rate Limiting

• 1000 requests per hour per API key
• 100 concurrent connections
• 10MB maximum payload size

Response Format

// Success Response
{
  "success": true,
  "data": {
    "workflow_id": "wf_123456",
    "status": "completed",
    "result_url": "https://api.ava-ai.com/results/wf_123456",
  "execution_time": 2.45
}

// Error Response
{
  "success": false,
  "error": {
    "code": "invalid_command",
    "message": "The provided command could not be processed"
}

Webhook Integration

Configure Webhooks

// Webhook Configuration
POST https://api.ava-ai.com/v1/webhooks
Content-Type: application/json

{
  "url": "https://your-app.com/ava-webhook",
  "events": ["workflow.completed", "workflow.failed"]
}

Webhook Payload

// Webhook Event Example
{
  "event": "workflow.completed",
  "workflow_id": "wf_123456",
  "timestamp": "2023-11-15T10:30:00Z",
  "data": {
    "workflow_name": "Monthly Sales Report",
    "execution_time": 3.21,
    "result_url": "https://api.ava-ai.com/results/wf_123456",
    "status": "success"
  }
}

SDK & Libraries

Python

pip install ava-ai-sdk

from ava import Client

client = Client(api_key="your_api_key")
result = client.execute_command(
    "Create a bar chart of monthly revenue"
)

JavaScript

npm install ava-ai-sdk

import { AVA } from 'ava-ai-sdk';

const ava = new AVA('your_api_key');
const workflow = await ava.execute('Analyze Q3 data');

REST API

Direct HTTP requests with any language

curl -X POST \
  https://api.ava-ai.com/v1/commands/execute \
  -H 'Authorization: Bearer your_api_key' \
  -d '{"command": "Your natural language command"}'