Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Rubick65/calenderyBack/llms.txt

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

Overview

CalenderyBack exposes two distinct discovery endpoints for finding other users:
  • Search (getSearchUsers) — queries the entire user directory by name, excluding the currently authenticated user. Use this for a global user-discovery screen.
  • Contacts (getUserContacts) — filters only the users with whom the authenticated user already has an active chat, enriching each result with last-message preview data. Use this for a messaging inbox or contact list screen.
Use getUserContacts to populate your messaging screen — it returns only users the current user is already chatting with, plus a last-message preview for each conversation. Use getSearchUsers for a “find people” or “add a friend” flow where you need to search across the full user base.

Spring Data Pageable Parameters

Both endpoints accept standard Spring Data pagination parameters as query parameters:
ParameterTypeDefaultDescription
pageint0Zero-based page index
sizeint20Number of items per page
sortStringSort expression, e.g. nombre,asc or nombre,desc. Can be repeated for multi-field sorting.

Endpoints

Search Users

GET /api/users/app/getSearchUsers Searches the entire user directory for users whose nombre (username) matches the provided filter, excluding the currently authenticated user from results. Required role: ROLE_USER

Query Parameters

ParameterTypeRequiredDescription
nombreStringName filter (partial match). Pass an empty string to list all users.
pageintPage index (default 0)
sizeintPage size (default 20)
sortStringSort expression, e.g. nombre,asc

Response: Page<UserReducedData>

{
  "content": [
    {
      "idUsuario": 7,
      "nombre": "alice",
      "fotoPerfil": "https://cdn.example.com/avatars/signed-url..."
    },
    {
      "idUsuario": 13,
      "nombre": "alicia_88",
      "fotoPerfil": "https://cdn.example.com/avatars/signed-url..."
    }
  ],
  "pageable": {
    "pageNumber": 0,
    "pageSize": 10
  },
  "totalElements": 2,
  "totalPages": 1,
  "last": true
}
FieldTypeDescription
idUsuarioLongUnique user identifier
nombreStringUsername / display name
fotoPerfilStringSigned URL for the user’s profile photo

Example

curl -X GET \
  "https://api.example.com/api/users/app/getSearchUsers?nombre=alice&page=0&size=10" \
  -H "Authorization: Bearer <your_jwt_token>"

Get User Contacts

GET /api/users/app/getUserContacts Returns a paginated list of users with whom the authenticated user has an existing chat, filtered by name. Each result is enriched with last-message preview data drawn from the most recent message in the shared conversation. Required role: ROLE_USER The authenticated user’s identity is resolved from the JWT (Authentication object) — no explicit user ID parameter is needed.

Query Parameters

ParameterTypeRequiredDescription
nombreStringName filter for contacts (partial match). Pass an empty string to return all contacts.
pageintPage index (default 0)
sizeintPage size (default 20)
sortStringSort expression, e.g. nombre,asc

Response: Page<UserChatDataDto>

{
  "content": [
    {
      "idUsuario": 99,
      "nombre": "bob",
      "fotoPerfil": "https://cdn.example.com/avatars/signed-url...",
      "idChat": 5,
      "ultimoMensaje": "Hey, are you free tonight?",
      "mensajeNuevo": true
    }
  ],
  "pageable": {
    "pageNumber": 0,
    "pageSize": 10
  },
  "totalElements": 1,
  "totalPages": 1,
  "last": true
}
FieldTypeDescription
idUsuarioLongUnique user identifier of the contact
nombreStringUsername / display name of the contact
fotoPerfilStringSigned URL for the contact’s profile photo
idChatLongID of the shared chat conversation
ultimoMensajeStringText content of the most recent message in the chat (mapped from LastMessageDataModel.contenido)
mensajeNuevoBooleantrue if the last message has not been read by the authenticated user (mapped from LastMessageDataModel.noRead)

Example

curl -X GET \
  "https://api.example.com/api/users/app/getUserContacts?nombre=&page=0&size=10" \
  -H "Authorization: Bearer <your_jwt_token>"

Search vs. Contacts at a Glance

getSearchUsersgetUserContacts
ScopeAll users in the systemOnly users already in a chat with you
Excludes self✅ Yes✅ Yes (implicit via auth)
Last message preview❌ No✅ Yes
Unread indicator❌ No✅ Yes (mensajeNuevo)
Typical use caseUser discovery / “Add people”Messaging inbox / contact list

Build docs developers (and LLMs) love