Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/devdavco/backend_1/llms.txt

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

The GET /usuarios/{id} endpoint fetches a single user account identified by its integer primary key. Use this when you already know a user’s ID — for example, to display a profile page, pre-fill an edit form, or verify a user’s role before granting access to a resource.

Path parameters

id
integer
required
The integer primary key of the user to retrieve. This value is assigned automatically when the user is created and is returned in every Usuario object under the id field.

Request

curl http://localhost:8080/usuarios/1

Response

200 OK

Returns a single Usuario object when a user with the given ID exists.
id
integer
The auto-generated primary key of the user.
nombre
string
The user’s full display name (max 100 characters).
email
string
The user’s unique email address (max 150 characters).
password_hash
string
The password value stored for this user. See the security warning below.
rol
string
The user’s role identifier — e.g., "admin" or "usuario".
{
  "id": 1,
  "nombre": "María García",
  "email": "[email protected]",
  "password_hash": "s3cr3tP@ssword",
  "rol": "usuario"
}
password_hash is included in the response. The server returns the stored password value as-is. Avoid exposing this endpoint to untrusted clients until proper password hashing is in place.

Error: ID not found

If no user exists for the supplied id, the service throws an unhandled RuntimeException ("Usuario no encontrado con ID: {id}"). Spring Boot maps this to a 500 Internal Server Error rather than a 404. Treat any 500 response from this endpoint as a potential “not found” condition and check the id value before retrying.

Build docs developers (and LLMs) love