Skip to main content

API Overview

The Evaluate API provides comprehensive evaluation and analytics capabilities for decision outcomes and system performance. This document outlines the available endpoints and how to use them.

Base URL

http://localhost:5049/api

Authentication

All API endpoints (except /health) require JWT authentication. Include the token in the Authorization header:

Authorization: Bearer <your-jwt-token>

Available Endpoints

Health Check

  • GET /health - Check API health status (no auth required)

Outcome Endpoints

  • POST /outcomes/upload - Create new outcome records
  • GET /outcomes/get - Retrieve outcome records

Statistics Endpoints

  • GET /stats/decision/{decision_id} - Get statistics for specific decision
  • GET /stats/overall - Get overall statistics across all decisions
  • GET /stats/trends - Get outcome trends over time
  • GET /stats/summary - Get comprehensive evaluation summary
  • GET /stats/comparison - Compare performance across decisions
  • GET /stats/performance - Get system performance metrics

Response Format

All responses follow a consistent JSON format with appropriate HTTP status codes.

Error Handling

The API returns standard HTTP status codes and error messages in JSON format for failed requests.

Data Storage

The Evaluate API uses MongoDB for storing:

  • Outcomes: Decision results and customer feedback
  • Decisions: Decision records and actions taken
  • Analytics: Computed statistics and performance metrics