The OnlyAutomator Microservice is a backend service that handles resource-intensive tasks such as data processing, asynchronous operations, and third-party integrations. This API documentation provides details about the available endpoints and how to interact with them.

Base URL

http://localhost:3000
For production environments:
https://onlyautomator.com

Authentication

Most endpoints require authentication. Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY

Available Endpoints

The microservice provides the following key endpoints:

Health Check

GET /api/test

Check if the microservice is operational

Account Processing

POST /api/process-account/{accountId}

Process a specific account for data collection and synchronization

Implementation Details

The microservice uses a queue-based system to handle resource-intensive tasks. When you call the process-account endpoint, the task is added to one of several load-balanced queues and processed asynchronously to prevent rate limiting and resource exhaustion.

Response Formats

All API responses follow a consistent JSON format:
{
  "success": true|false,
  "message": "Human-readable message",
  "data": {
    // Response data if applicable
  },
  "error": "Error message if applicable"
}

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of requests:
  • 200 OK: The request was successful
  • 201 Created: A resource was successfully created
  • 400 Bad Request: The request was malformed or missing required parameters
  • 401 Unauthorized: Authentication failed or was not provided
  • 403 Forbidden: Authentication succeeded, but the user lacks permission
  • 404 Not Found: The requested resource was not found
  • 500 Server Error: An unexpected error occurred on the server

Rate Limiting

The API implements rate limiting to prevent abuse. You can make up to 100 requests per minute. If you exceed this limit, you will receive a 429 Too Many Requests response.