All endpoints on this page require a valid JWT and theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526_Consulta/llms.txt
Use this file to discover all available pages before exploring further.
admin role. Requests that are unauthenticated or belong to a non-admin account receive 401 or 403 respectively.
GET /admin/summary
Returns headline counts for the admin dashboard and the five most recent audit log entries. Results can be scoped to a specific season.When provided,
totalTeams, totalPlayers, and pendingMatches are filtered to that season. totalUsers is always global. Audit logs are filtered to entries whose details reference the same season (entries with no season reference are included regardless).- Request
- Response
cURL
Response fields
Five most recent audit log entries.
GET /admin/active-season
Returns the currently active season. Useful for initialising admin views that must always operate in the context of the live season.- Request
- Response
cURL
404 when no season has is_active = true.
POST /admin/upload
Uploads an image to Cloudinary. The server processes the file with Sharp before uploading. Send the image as amultipart/form-data request using the field name image.
Cloudinary folder to upload the image into (e.g.
teams, players).Custom public ID to use in Cloudinary. When omitted, a generated ID is used.
multipart/form-data containing a field named image with the binary file data.
- Request
- Response
cURL
Public Cloudinary URL of the uploaded image.
The server converts images to WebP format via Sharp before uploading. The original file format does not affect the output URL extension.
GET /admin/users
Returns a paginated, searchable list of active user accounts.Case-insensitive, accent-insensitive filter applied to both
username and email.Page number.
Results per page.
- Request
- Response
cURL
Total matching active accounts.
Current page.
Results per page.
PUT /admin/users/:id
Changes the role of a user account.User identifier.
New role. One of
user, referee, or admin.- Request
- Response
cURL
Confirmation message.
DELETE /admin/users/:id
Deactivates a user account and anonymises its username and email by appending a deletion timestamp. The account is set tois_active = false and cannot be recovered through the API.
User identifier.
- Request
- Response
cURL
GET /admin/logs
Returns paginated audit logs with optional filters. Logs record every significant admin or referee action in the system.Page number.
Results per page.
Filter to logs referencing this season (entries with no season in their details are still included).
Filter by actor username (accent-insensitive partial match).
Filter to logs created on a specific date (ISO 8601 date, e.g.
2025-03-15).- Request
- Response
cURL
Total matching log entries.
Current page.
Results per page.