API¶
JSON REST under /api for leagues, matches, question definitions, match
listeners, users, auth, and question answers.
Interactive OpenAPI¶
| Surface | URL (this environment) |
|---|---|
| Swagger UI | https://pr-api-staging.jvsassoc.com/docs |
| ReDoc | https://pr-api-staging.jvsassoc.com/redoc |
| OpenAPI schema | https://pr-api-staging.jvsassoc.com/openapi.json |
The FastAPI app title is ParlaySports API. Tag descriptions in Swagger group the same resources listed in Resources.
Admin HTML under /admin is not included in OpenAPI (login session UI).
Shared entity JSON that admin pages call still lives under /api/....
Auth¶
/api/*— Bearer API key fromPOST /api/auth/registerorPOST /api/auth/login. User-scoped routes use the authenticated user (no client-supplieduser_id). Admin-only JSON ops use[Admin]summaries in OpenAPI and requireUser.is_admin(else403). Player-allowed writes: register/login/logout,PATCH /api/users/me,PUT /api/question-answers,POST /api/user-feedback. Many catalog GETs stay open./admin/*— login form + session cookie against an active adminUser(operator UI); not part of the consumer OpenAPI. Admin JS bootstraps a Bearer key viaPOST /admin/api-session.
Errors¶
Domain and many HTTP failures return FastAPI’s standard shape:
detail may be a string or (for validation) a list of objects. Non-obvious
status codes (409, 410, locked overrides, etc.) are documented per operation in
Swagger responses.
Guides in this section¶
- Getting started — create a user, list open questions, answer, history
- Resources — short per-tag overview with path pointers
Deeper domain topics (issuance/resolution, definitions, listener startup) live under Guides and Admin.