The Admin API exposes three protected endpoints used exclusively by the administration panel. All three require a valid JWT issued to a user with the admin role. The active-season endpoint provides a quick way to resolve which season is currently live, the summary endpoint aggregates entity counts and recent audit activity for the dashboard, and the upload endpoint handles image optimisation and storage to Cloudinary via Sharp.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/danielsl4/TFG_DAM_2526/llms.txt
Use this file to discover all available pages before exploring further.
GET /admin/active-season — retrieve the current active season
GET /admin/active-season — retrieve the current active season
Returns the single season that is currently marked as active. Returns Response —
404 if no active season exists.Method: GET
Path: /admin/active-season
Auth: JWT + admin role requiredResponse — 200 OK
Season ID.
Season name (e.g.
"2024/2025").Season start date.
Season end date.
Always
true for the record returned by this endpoint.Example
Response
GET /admin/summary — dashboard summary
GET /admin/summary — dashboard summary
Returns entity counts (teams, players, pending matches) and the five most recent audit-log entries. When Response —
season_id is provided, counts are scoped to that season and audit log entries are filtered to those that reference the same season in their details field.Method: GET
Path: /admin/summary
Auth: JWT + admin role requiredQuery parameters
Season to scope the counts to. When omitted, global counts across all seasons are returned.
Response — 200 OK
Aggregate counts for the requested scope.
Up to 5 most recent audit-log entries, ordered by creation date descending.
Example
Response
POST /admin/upload — upload image to Cloudinary
POST /admin/upload — upload image to Cloudinary
Accepts a Response —
multipart/form-data request with a single image file, processes it through Sharp for optimisation, and uploads the result to Cloudinary. Returns the public URL of the stored image.Method: POST
Path: /admin/upload
Auth: JWT + admin role required
Content-Type: multipart/form-dataQuery parameters
Cloudinary folder to store the image in (e.g.
"teams", "players").Optional custom public ID for the uploaded asset. When omitted, Cloudinary generates one.
Form fields
The image file to upload. Accepted via the
image multipart field name.Response — 200 OK
Public Cloudinary URL of the uploaded image.
Example
Response