Skip to main content

CronAI API Documentation

Note: This document is a placeholder for future API documentation. The external API is planned for post-MVP releases.

This document will describe the API endpoints, request/response formats, and authentication mechanisms for CronAI's external API.

Current Status

The external API is currently in development and planned for post-MVP releases. The MVP version does not include external API access.

Planned API Features

The following API features are planned for future releases:

  1. Task Management API

    • Create, read, update, and delete scheduled tasks
    • Control task execution (start, stop, pause)
    • Query task execution history and status
  2. Prompt Management API

    • Create, read, update, and delete prompts
    • Organize prompts into categories
    • Test prompts with variables
  3. Model Management API

    • Configure model parameters
    • View model usage and statistics
    • Test model execution
  4. Response Processing API

    • Configure response processors
    • View response history
    • Query processed outputs

API Design Principles

The future API will follow these design principles:

  • RESTful architecture
  • JSON request/response format
  • Token-based authentication
  • Comprehensive error responses
  • Versioned endpoints
  • Rate limiting
  • Pagination for list endpoints

Planned Endpoints

A preview of planned endpoints:

# Task Management
GET /api/v1/tasks
POST /api/v1/tasks
GET /api/v1/tasks/:id
PUT /api/v1/tasks/:id
DELETE /api/v1/tasks/:id
POST /api/v1/tasks/:id/execute

# Prompt Management
GET /api/v1/prompts
POST /api/v1/prompts
GET /api/v1/prompts/:id
PUT /api/v1/prompts/:id
DELETE /api/v1/prompts/:id
POST /api/v1/prompts/:id/test

# Model Management
GET /api/v1/models
GET /api/v1/models/:id/config
PUT /api/v1/models/:id/config
POST /api/v1/models/:id/test

# Response Processing
GET /api/v1/processors
GET /api/v1/processors/:type/config
PUT /api/v1/processors/:type/config
GET /api/v1/responses
GET /api/v1/responses/:id

Authentication

Future API authentication will likely use:

  • Bearer token authentication
  • OAuth 2.0 integration (for third-party applications)
  • Role-based access control

Status Codes

The API will use standard HTTP status codes:

  • 200 OK: Successful request
  • 201 Created: Resource created successfully
  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Missing or invalid authentication
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found
  • 500 Internal Server Error: Server-side error

Stay Tuned

The API documentation will be expanded as the external API is implemented. Check back in future releases for comprehensive API documentation.