TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CristianRR94/springCommunity/llms.txt
Use this file to discover all available pages before exploring further.
/api/participantes/** routes manage the social profile layer of Spring Community. Every endpoint in this group requires a valid, non-expired ACCESS token passed as a Bearer header. A participant is the in-app social identity tied to a registered user account — it holds the display name, event memberships, friend list, and profile image. Participant IDs and User IDs are distinct; the usuarioId field on a participant record links back to the underlying authentication account.
Participant IDs are separate from User IDs. A participant’s
usuarioId links
back to the user account created during registration. Always use the
participant id when calling participant-scoped endpoints.GET /api/participantes — List all participants
Returns the full list of registered participants as an array ofParticipanteDTO objects. Useful for administrative views or seeding a user-search UI before the user has typed anything.
Authentication: Bearer token required.
Response fields
Unique identifier for the participant record.
The participant’s display name. Must be between 6 and 20 characters.
IDs of all events the participant has joined as a member.
IDs of all events the participant administers.
ID of the linked user account (authentication identity).
Filename of the participant’s profile image. Defaults to
"default.png" if no
custom image has been uploaded.Response example
curl
GET /api/participantes/{id} — Get participant by ID
Retrieves theParticipanteDTO for a single participant identified by their numeric ID. Returns 404 if no participant with that ID exists, and 401 if the token is missing or invalid.
Authentication: Bearer token required.
Path parameters
The unique numeric ID of the participant to retrieve.
Response fields
Same fields as List all participants:id, nombreParticipante, eventosId, eventosAdministradosId, usuarioId, imagenParticipante.
Response example
Error responses
| Status | Condition |
|---|---|
401 Unauthorized | Token is missing, expired, or has an invalid signature. |
404 Not Found | No participant exists with the given id. |
curl
GET /api/participantes/amigos — List authenticated user’s friends
Returns the friend list of the currently authenticated participant as a set ofParticipanteAmigoDTO objects. The caller is identified by the token — no additional parameter is needed.
Authentication: Bearer token required.
Response fields
Unique identifier of the friend participant.
Display name of the friend.
IDs of participants who are friends of this friend (their own friend list).
ID of the friend’s linked user account.
Response example
curl
GET /api/participantes/amigos/{id} — Get a specific friend’s profile
Fetches theParticipanteAmigoDTO for one specific friend by their participant ID. This endpoint exposes the friend’s own friend list (amigosId) in addition to the basic profile, which makes it suitable for rendering a mutual-friends UI.
Authentication: Bearer token required.
Path parameters
The participant ID of the friend whose profile you want to retrieve.
Response fields
Same fields as List friends:id, nombreParticipante, amigosId, usuarioId.
Response example
curl
GET /api/participantes/amigos/mostrar — Search for potential friends
Performs a partial-name search across all participants and returns those whosenombreParticipante matches the provided input string. Intended for the friend-search autocomplete feature.
Authentication: Bearer token required.
Query parameters
Partial display name to search for. Case handling is determined by the
underlying service query. Submit at least one character.
Response fields
Returns a set ofParticipanteDTO objects (same shape as List all participants).
Response example
curl
POST /api/participantes/amigos/add/{id} — Add a friend
Adds the participant identified byid to the authenticated user’s friend list. The operation is idempotent in the sense that attempting to add a participant who is already a friend, or attempting to add yourself, will result in a 422 Unprocessable Content error rather than a silent no-op.
Authentication: Bearer token required.
Path parameters
The participant ID of the person to add as a friend.
Response
200 OK with an empty body on success.
Error responses
| Status | Condition |
|---|---|
401 Unauthorized | Token is missing, expired, or has an invalid signature. |
422 Unprocessable Content | The target participant cannot be added — possible reasons include attempting to add yourself (agregarAmigo rejects amigo.equals(this)) or the relationship violating a business rule enforced by ParticipanteException. |
curl
POST /api/participantes/imagen — Upload profile image
Replaces the authenticated participant’s profile image with the uploaded file. The request must be sent asmultipart/form-data with a single part named image. The service layer enforces a maximum file size of 5 MB; larger files will be rejected with a 400 Bad Request.
Authentication: Bearer token required.
Content-Type: multipart/form-data
Request parts
The image file to set as the participant’s profile picture. Maximum size: 5 MB.
Common accepted formats are JPEG and PNG. Stored under the participant’s record
as
imagenParticipante.Response
200 OK with an empty body on success.
Error responses
| Status | Condition |
|---|---|
400 Bad Request | The file exceeds 5 MB or is otherwise invalid (handled by StorageException). |
401 Unauthorized | Token is missing, expired, or has an invalid signature. |