Skip to content

API Overview

rust-srec provides a comprehensive REST API for managing all aspects of the streaming recorder.

Under Construction

Detailed API guides are currently being rewritten. Please refer to the Swagger UI for the most up-to-date endpoint information.

Base URL

http://localhost:12555/api

Swagger Documentation

Interactive API documentation is available at:

Swagger UI - http://localhost:12555/api/docs

API Testing

For exploring the API, you can also use tools like Postman or Insomnia. Just remember to include the Authorization header.

Authentication

All API endpoints (except /auth/login and /health/*) require JWT authentication.

bash
# Login to get token
curl -X POST http://localhost:12555/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": "password"}'

# Use token in subsequent requests
curl http://localhost:12555/api/streamers \
  -H "Authorization: Bearer <access_token>"

Common Response Format

Success

json
{
  "id": "uuid",
  "name": "...",
  ...
}

Error

json
{
  "error": "Error message",
  "code": "ERROR_CODE"
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
404Not Found
409Conflict (duplicate)
500Internal Server Error