Files
buryan-infra/docs/architecture/MEDIA-API.md
T
architect 8431702279
lint / hygiene (push) Failing after 22s
lint / hygiene (pull_request) Failing after 25s
standard / check (pull_request) Successful in 8s
[ARCH] Stage0/1 cards, media identity, media API, fitness functions
2026-11-26 21:40:45 +03:00

39 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Media API v1 — contract draft
Статус: Stage 1 draft
Основание: REVIEW-v2, HYB-01
## Endpoints
| Method | Path | Назначение |
|---|---|---|
| GET | /v1/media/search | поиск с ACL |
| GET | /v1/media/works/{id} | Work |
| GET | /v1/media/works/{id}/editions | Edition |
| GET | /v1/media/works/{id}/availability | Availability |
| POST | /v1/media/requests | request + idempotency |
| GET | /v1/media/requests/{id} | status |
| GET | /v1/media/continue | UserMediaState |
| GET | /v1/media/releases | Release Radar |
| POST | /v1/media/playback/resolve | route, не прокси |
| GET | /v1/media/recommendations | кандидаты |
## Правила
- identity + object ACL на каждом вызове;
- actor_id не доверять из body;
- Idempotency-Key: subject+op+payload hash;
- 202 + status_url для async;
- typed errors;
- freshness/unknown;
- Hub не проксирует поток;
- native playback остаётся.
## Gate
- OpenAPI/JSON Schema;
- contract tests;
- ACL/revoke;
- duplicate/lost response;
- без LLM работает.