> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orcrev.fit/llms.txt
> Use this file to discover all available pages before exploring further.

# API Overview

> Complete reference of all available API endpoints

# API Reference

This documentation covers all public API endpoints available in orcrev.fit.

## Endpoints Overview

| Endpoint               | Method | Description                          |
| ---------------------- | ------ | ------------------------------------ |
| `/api/services`        | GET    | List all services with pagination    |
| `/api/services/:slug`  | GET    | Get details of a specific service    |
| `/api/visitors`        | GET    | Get active visitor count             |
| `/api/visitors`        | POST   | Register an active session           |
| `/api/overview`        | GET    | Get all services with 24h history    |
| `/api/revivals`        | GET    | List revivals with pagination        |
| `/api/metrics`         | GET    | Get metrics for a specific service   |
| `/api/metrics`         | POST   | Submit metrics for a service         |
| `/api/metrics/all`     | GET    | Get metrics for all services         |
| `/api/metrics/history` | GET    | Get historical data for all services |

## Authentication

Currently, all API endpoints are publicly accessible without authentication.

## Response Codes

| Code | Description                                |
| ---- | ------------------------------------------ |
| 200  | Success                                    |
| 400  | Bad Request - Invalid parameters           |
| 403  | Forbidden - Invalid request (bots blocked) |
| 404  | Not Found - Resource doesn't exist         |
| 415  | Unsupported Media Type                     |
| 500  | Internal Server Error                      |

## Caching

Most endpoints include caching headers:

* `s-maxage=30` - CDN cache for 30 seconds
* `stale-while-revalidate=120` - Serve stale while refreshing

Some endpoints like `/api/overview` and `/api/metrics/history` use `no-store` for real-time data.
