Delete Event Endpoint

In this lesson, we'll build the delete event endpoint in our REST controller.

Implementation

The delete endpoint follows REST conventions by using the HTTP DELETE method and accepting the event ID as a path variable. Let's add the endpoint to our EventController:

@DeleteMapping(path = "/{eventId}") public ResponseEntity<Void> deleteEvent( @AuthenticationPrincipal Jwt jwt, @PathVariable UUID eventId ) { UUID userId = parseUserId(jwt); eventService.deleteEventForOrganizer(userId, eventId); return ResponseEntity.noContent().build(); }

Summary

  • Implemented the delete event endpoint
© 2026 Devtiro Ltd. All rights reserved