1 Room booking endpoints
Tim Svensson edited this page 2026-05-11 11:53:47 +00:00

Room booking endpoints

GET /roombooking/createMockup

Path to endpoint

GET /roombooking/createMockup

Required values

None

Return values

  • Creates mockup booking data
  • Inserts bookings into the database

When no error occurs

  • Mockup bookings are created and saved
  • Status: 200 OK

When error occurs

  • Server failure or database issue
  • Status: 500

GET /roombooking/delete/{id}

Path to endpoint

GET /roombooking/delete/{id}

Required values

  • id: booking id

Return values

  • Deletes the booking with the given id

When no error occurs

  • Booking is deleted
  • Status: 200 OK

When error occurs

  • Server failure or database issue
  • Status: 500

GET /roombooking/search/{building}

Path to endpoint

GET /roombooking/search/{building}

Required values

  • building: building letter

Return values

Returns a JSON array:

  • id: booking id
  • building: building letter
  • roomNr: room number
  • startTime: booking start time
  • endTime: booking end time

When no error occurs

  • Returns all bookings for the given building
  • Status: 200 OK

When error occurs

  • Server failure or database issue
  • Status: 500

GET /roombooking/search/{building}/{roomNr}

Path to endpoint

GET /roombooking/search/{building}/{roomNr}

Required values

  • building: building letter
  • roomNr: room number

Return values

Returns a JSON array:

  • id: booking id
  • building: building letter
  • roomNr: room number
  • startTime: booking start time
  • endTime: booking end time

When no error occurs

  • Returns all bookings for the given room in the given building
  • Status: 200 OK

When error occurs

  • Server failure or database issue
  • Status: 500

GET /roombooking/all

Path to endpoint

GET /roombooking/all

Required values

None

Return values

Returns a JSON array:

  • id: booking id
  • building: building letter
  • roomNr: room number
  • startTime: booking start time
  • endTime: booking end time

When no error occurs

  • Returns all room bookings
  • Status: 200 OK

When error occurs

  • Server failure or database issue
  • Status: 500