Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Renzo717/Aula-Virtual-Universidad-Radiolocucion/llms.txt
Use this file to discover all available pages before exploring further.
The forum module (/api/foro) provides per-subject discussion boards. Students, teachers, and admins can open threads, post replies, and react to discussions. All write operations (editing and deleting) are restricted to the original author. Reactions use a toggle/upsert pattern — calling the endpoint again simply records the like. All routes require an authenticated session.
Threads
List threads
GET /api/foro/:materiaId/hilos
Returns all discussion threads for the specified subject, ordered by created_at descending (newest first). Each thread includes a nested autor object and two aggregated counts computed on the fly: respuestas_count and reacciones_count.
Auth: All authenticated roles
curl -X GET https://api.nuestravoz.edu.ar/api/foro/<materiaId>/hilos \
-H "Authorization: Bearer <token>"
const response = await fetch(`/api/foro/${materiaId}/hilos`, {
headers: { Authorization: `Bearer ${token}` },
});
const { data } = await response.json();
Array of thread objects, newest first.Topic tags attached to the thread.
ISO 8601 creation timestamp.
Nested author profile: nombre, apellido, avatar_url, rol.
Total number of likes/reactions.
Create thread
POST /api/foro/:materiaId/hilos
Opens a new discussion thread in a subject forum. The autor_id is derived from the authenticated session.
Auth: All authenticated roles
Request body (application/json) — createForoHiloSchema:
Thread title. Minimum 2 characters.
Thread body text. Minimum 2 characters.
Optional array of topic tag strings (e.g. ["examen", "dudas"]). Defaults to [].
curl -X POST https://api.nuestravoz.edu.ar/api/foro/<materiaId>/hilos \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"titulo": "Dudas sobre el TP 2",
"contenido": "¿La entrega tiene que incluir el guión o solo el audio?",
"tags": ["tp2", "dudas"]
}'
Returns 201 with the created ForoHilo and nested autor.
Update thread
PATCH /api/foro/hilos/:hiloId
Partially updates a thread’s title, body, or tags. Only the original author of the thread can call this endpoint; any other authenticated user receives 403.
Auth: Any authenticated user (author only)
Request body (application/json) — updateForoHiloSchema:
New title. Minimum 2 characters.
New body text. Minimum 2 characters.
Replacement tag array. Replaces the existing tags entirely.
curl -X PATCH https://api.nuestravoz.edu.ar/api/foro/hilos/<hiloId> \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"titulo": "Dudas sobre el TP 2 [RESUELTO]"}'
Returns the updated ForoHilo with nested autor.
Delete thread
DELETE /api/foro/hilos/:hiloId
Permanently deletes a thread. Only the original author can delete their own thread. Deletion cascades — all associated replies (foro_respuestas) and reactions (foro_reacciones) for this thread are removed first.
Auth: Any authenticated user (author only)
curl -X DELETE https://api.nuestravoz.edu.ar/api/foro/hilos/<hiloId> \
-H "Authorization: Bearer <token>"
Returns { data: { ok: true } }.
Replies
List replies
GET /api/foro/hilos/:hiloId/respuestas
Returns all replies for a thread, ordered by created_at ascending (chronological order). Each reply includes a nested autor object.
Auth: All authenticated roles
curl -X GET https://api.nuestravoz.edu.ar/api/foro/hilos/<hiloId>/respuestas \
-H "Authorization: Bearer <token>"
Replies in chronological order.UUID of the parent reply for nested threads, or null for top-level replies.
ISO 8601 creation timestamp.
nombre, apellido, avatar_url, rol.
Post reply
POST /api/foro/hilos/:hiloId/respuestas
Posts a new reply to a thread. Supply parent_id to nest the reply under an existing reply.
Auth: All authenticated roles
Request body (application/json) — createForoRespuestaSchema:
Reply text. Minimum 1 character.
Optional UUID of the parent reply. Omit for a top-level reply.
curl -X POST https://api.nuestravoz.edu.ar/api/foro/hilos/<hiloId>/respuestas \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"contenido": "Solo el audio, el guión es opcional según el programa."}'
Returns 201 with the created ForoRespuesta and nested autor.
Update reply
PATCH /api/foro/respuestas/:respuestaId
Updates the body text of a reply. Only the original author of the reply can edit it.
Auth: Any authenticated user (author only)
New reply text. Minimum 1 character.
curl -X PATCH https://api.nuestravoz.edu.ar/api/foro/respuestas/<respuestaId> \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"contenido": "Corregido: el guión sí es obligatorio para el TP 2."}'
Returns the updated ForoRespuesta with nested autor.
Delete reply
DELETE /api/foro/respuestas/:respuestaId
Permanently deletes a reply. Only the original author of the reply can delete it.
Auth: Any authenticated user (author only)
curl -X DELETE https://api.nuestravoz.edu.ar/api/foro/respuestas/<respuestaId> \
-H "Authorization: Bearer <token>"
Returns { data: { ok: true } }.
Reactions
Toggle reaction (like)
POST /api/foro/hilos/:hiloId/reacciones
Records a like reaction on a thread for the authenticated user. This endpoint uses an upsert — if the user has already reacted, the call is idempotent and succeeds without duplicating the record. There is no body required.
Auth: All authenticated roles
curl -X POST https://api.nuestravoz.edu.ar/api/foro/hilos/<hiloId>/reacciones \
-H "Authorization: Bearer <token>"
await fetch(`/api/foro/hilos/${hiloId}/reacciones`, {
method: "POST",
headers: { Authorization: `Bearer ${token}` },
});
Always "Reacción registrada" on success.
Topics
GET /api/foro/:materiaId/temas
Returns the top 5 most-used tags across all threads in the specified subject, ranked by frequency. Useful for surfacing popular discussion topics.
Auth: All authenticated roles
curl -X GET https://api.nuestravoz.edu.ar/api/foro/<materiaId>/temas \
-H "Authorization: Bearer <token>"
Up to 5 tag frequency entries, sorted by count descending.Number of threads that include this tag.
{
"data": [
{ "tag": "examen", "count": 12 },
{ "tag": "tp2", "count": 7 },
{ "tag": "dudas", "count": 5 },
{ "tag": "recursos", "count": 3 },
{ "tag": "horarios", "count": 2 }
]
}