Skip to content

tams-server — API & Store

The hub everything else talks to: a REST API that stores the metadata (what sources, flows, and segments exist) and hands out signed URLs to the media objects in object storage. It implements the BBC/AMWA TAMS specification.

TAMS — components tams-recorder tams-player tams-flow-manager tams-flow-visualiser tams-serverREST APIMySQL meta · S3 alloc register fetch delete reqs browse MySQL — metadata MinIO / S3 — media objects metadata in MySQL · media blobs in object storage via signed URLs · retention by flow-manager

  • Language: Rust (Axum + sqlx, MySQL) · Default port: 4010
  • API docs: http://<host>:4010/docs (OpenAPI/Swagger)
  • Database (required): DB_HOST, DB_PORT (3306), DB_USER (openapi_server), DB_PASSWORD, DB_NAME, plus DB_POOL_SIZE / DB_MAX_OVERFLOW tuning.
  • Authentication: SECURITY_PROVIDER (keycloak / basic / noop) and, for Keycloak, KEYCLOAK_SERVER_URL / _REALM / _CLIENT_ID / _CLIENT_SECRET (KEYCLOAK_VERIFY_SSL=false for self-signed).
  • Object storage: STORAGE_TYPE (noop / minio / s3), STORAGE_ENDPOINT, STORAGE_ACCESS_KEY / _SECRET_KEY, STORAGE_BUCKET (tams), STORAGE_REGION / STORAGE_SECURE.
  • Server: PORT (4010), RUST_LOG (info), OTEL_EXPORTER_OTLP_ENDPOINT (optional tracing).

~83 endpoints (see Swagger for the authoritative list):

GroupCovers
/serviceservice info / capabilities, /service/webhooks
/sourcessource CRUD, properties, collections
/flowsflow CRUD, properties, tags, collections
/flows/{id}/segmentslist / add / delete flow segments
/flows/{id}/storageallocate storage → signed PUT URLs
/flow-delete-requestsasync deletion tracking
/objectsmedia object metadata / instances

Time ranges use the seconds:nanoseconds bracket notation from the TAMS overview. Playback segments carry get_urls (signed downloads).

./phrame-make.sh <TAG> build-image (or cargo build --release). Migrations in migrations/ run on startup (sqlx migrate … to manage manually). Stack: axum, tokio, sqlx (async MySQL), utoipa (OpenAPI), rust-s3, jsonwebtoken, OpenTelemetry. Storage and auth are trait-based (ObjectStorage, AuthProvider) with S3-compatible and no-op implementations.