Skip to main content

Documentation 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.

Updating an event uses the same multipart/form-data structure as creation: a JSON-encoded EventoDTO in the evento part, and an optional replacement image in the image part. All editable metadata fields are applied to the target event at once — the update is a full replacement of those fields, not a partial patch. If a new image is supplied it overwrites the existing one; if image is omitted the existing banner is retained.
The fields updated by this endpoint are: nombreEvento, tipoEvento, fechaEvento, informacion, privado, oculto, and maxNumParticipantes. Participant lists (participantesEvento) and administrator lists (administradores) are not modified through this endpoint — use the dedicated participant and admin management endpoints for those operations.

Endpoint

PUT /api/eventos/modificar/{id}
Requires a valid JWT access token sent in the Authorization header.
Content-Type: multipart/form-data

Path Parameters

id
integer
required
The unique numeric database ID of the event to update.

Request Parts

evento
string (JSON)
required
A JSON-encoded EventoDTO object containing the new values for the event. Must be sent as the part named evento. The following fields are applied:
  • nombreEvento (string, required) — The updated display name. Must not be blank. Maximum 255 characters.
  • tipoEvento (string, optional) — Updated category or type label. Maximum 255 characters.
  • fechaEvento (string, optional) — Updated scheduled date in YYYY-MM-DD format. Must not be in the past if provided.
  • informacion (string, optional) — Updated free-text description.
  • privado (boolean, optional, default false) — Updated visibility flag.
  • oculto (boolean, optional, default false) — Updated hidden flag.
  • maxNumParticipantes (integer, optional, default 255) — Updated participant cap. Must be between 0 and 255 inclusive.
image
file
An optional replacement banner image. If supplied, the previous image is replaced with this file. Accepted formats: JPEG, PNG, GIF, WebP. Maximum file size: 5 MB. If omitted, the existing image is left unchanged.

Response

Returns the full EventoDTO of the updated event. See Get Event for a description of every response field.

Response Example

{
  "id": 7,
  "nombreEvento": "Autumn Hackathon 2025 — Updated",
  "tipoEvento": "hackathon",
  "fechaEvento": "2025-11-22",
  "informacion": "Rescheduled to 22 November. Same venue, same format.",
  "chat": null,
  "imagenEvento": "autumn-hackathon-v2.png",
  "privado": false,
  "oculto": false,
  "maxNumParticipantes": 120,
  "participantesEvento": [5, 11, 14],
  "administradores": [5]
}

curl Example

curl --request PUT \
  --url http://localhost:8080/api/eventos/modificar/7 \
  --header 'Authorization: Bearer <your_access_token>' \
  --form 'evento={
    "nombreEvento": "Autumn Hackathon 2025 — Updated",
    "tipoEvento": "hackathon",
    "fechaEvento": "2025-11-22",
    "informacion": "Rescheduled to 22 November. Same venue, same format.",
    "privado": false,
    "oculto": false,
    "maxNumParticipantes": 120
  };type=application/json' \
  --form 'image=@/path/to/new-banner.png;type=image/png'

Error Responses

StatusDescription
400 Bad RequestA @Valid constraint on the DTO was violated — for example, nombreEvento is blank or maxNumParticipantes exceeds 255. The mensaje field will contain the first failing validation message.
401 UnauthorizedThe Authorization header is missing, the token has expired, or the token signature is invalid.
404 Not FoundNo event exists with the supplied id.
422 Unprocessable EntityA domain-level validation rule was violated — for example, fechaEvento is set to a past date.

400 Example

{
  "status": 400,
  "mensaje": "El nombre del evento es obligatorio",
  "timestamp": 1718467200000
}

404 Example

{
  "status": 404,
  "mensaje": "Evento no encontrado",
  "timestamp": 1718467200000
}

422 Example

{
  "status": 422,
  "mensaje": "No puedes asignar una fecha pasada",
  "timestamp": 1718467200000
}

Build docs developers (and LLMs) love