Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Miguel-Rodriguez15/msvc/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new Curso record in the cursos table. The request body must contain a nombre value — the field is annotated @NotEmpty in the entity class. On success the newly created course is returned with its auto-generated id, an empty cursoUsuarios list, and an empty usuarios list. No authentication is required for this endpoint.

Endpoint

POST http://localhost:8002/
Via API Gateway:
POST http://localhost:8090/api/cursos/

Request Body

Content-Type: application/json
nombre
string
required
The name of the course. The nombre field is annotated @NotEmpty on the entity.

Response

201 Created — The persisted Curso object.
id
number
Auto-generated primary key assigned by PostgreSQL.
nombre
string
The name supplied in the request body.
cursoUsuarios
array
Always an empty array on creation — no users are enrolled yet.
usuarios
array
Always an empty array on creation (transient field, not persisted).

Example

Request

curl -X POST http://localhost:8002/ \
  -H "Content-Type: application/json" \
  -d '{"nombre":"Spring Boot 3"}'

Response — 201 Created

{
  "id": 3,
  "nombre": "Spring Boot 3",
  "cursoUsuarios": [],
  "usuarios": []
}

Only the nombre field is persisted. Any additional fields sent in the request body are ignored. To add users to a course after creation, use PUT /asignar-usuario/{cursoId} or POST /crear-usuario/{cursoId}.

Build docs developers (and LLMs) love