A composite operation that (1) creates a newDocumentation 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.
Usuario in msvc-usuarios by calling POST / via OpenFeign, then (2) creates a CursoUsuario junction record that links the new user to the specified course. Both steps occur inside the same transactional service method. If either step throws a FeignException, the entire operation fails and a 404 response is returned — the course enrollment is not recorded in that case.
Use this endpoint when you need to register a brand-new user and immediately assign them to a course in one HTTP call. To enroll a user who already exists in msvc-usuarios, use PUT /asignar-usuario/{cursoId} instead.
No authentication is required for this endpoint.
Endpoint
Path Parameters
The primary key of the course the newly created user will be enrolled in.
Request Body
Content-Type: application/json
Full name of the new user. Forwarded to
msvc-usuarios verbatim.Email address of the new user. Must be unique in
msvc-usuarios.Plain-text password.
msvc-usuarios is responsible for hashing before persistence.Response
201 Created — TheUsuario object returned by msvc-usuarios after creation, reflecting the assigned id and persisted fields.
Auto-generated primary key assigned by
msvc-usuarios.Name of the newly created user.
Email address of the newly created user.
Hashed password as stored by
msvc-usuarios.404 Not Found — Returned when the Feign call to
msvc-usuarios throws a FeignException (e.g. validation failure, duplicate email, service unavailable) or when no course with cursoId exists.
Error message prefixed with
"No se pudo crear el usuarioo error en la comunicacion: " followed by the Feign exception message. Note: the string is produced by concatenating "No se pudo crear el usuario" and "o error en la comunicacion: " in the controller, resulting in a double-o and no space between usuario and o.Examples
Request
Response — 201 Created
Response — 404 Not Found (Feign error from msvc-usuarios)
This endpoint creates the user inside
msvc-usuarios (a separate microservice and separate database). If the user is created successfully but saving the CursoUsuario record subsequently fails at the database level (e.g. a constraint violation), the user may already exist in msvc-usuarios without being enrolled — there is no distributed rollback. Design your retry logic accordingly.