Skip to content

Backend ‐ API Documentation

Daenges edited this page Mar 29, 2025 · 1 revision

API Specification

This document provides an overview of the available endpoints, request types, payloads, and expected responses for the Study Buddies backend server API.

Base URL

The local base URL for the API is: http://localhost:8080

Authentication

The API uses Bearer Authentication with a JWT token. Make sure to include the token in the Authorization header of your requests.

Endpoints

Meeting Controller

1. Get Meeting

  • Endpoint: /meeting
  • Method: GET
  • Description: Retrieves information about a specific meeting.
  • Parameters:
    • id (query, optional): The ID of the meeting to retrieve.
  • Response:
    • 200 OK: Returns an object containing the meeting details.

2. Change Meeting

  • Endpoint: /meeting
  • Method: PUT
  • Description: Updates the details of an existing meeting.
  • Parameters:
    • id (query, required): The ID of the meeting to update.
    • date_from/date_until: Use following format: dd-MM-yyyy:HH:mm
    • repeatable: (daily, weekly, monthly, never)
  • Request Body:
    {
      "title": "string",
      "description": "string",
      "date_from": "string",
      "date_until": "string",
      "repeatable": "string",
      "place": "string"
    }
  • Response:
    • 200 OK: Returns an object confirming the update.

3. Create Meeting

  • Endpoint: /meeting
  • Method: POST
  • Description: Creates a new meeting.
  • Parameters:
    • id (query, required): The ID of the meeting to update.
    • date_from/date_until: Use following format: dd-MM-yyyy:HH:mm
    • repeatable: (daily, weekly, monthly, never)
  • Request Body:
    {
      "title": "string",
      "description": "string",
      "date_from": "string",
      "date_until": "string",
      "repeatable": "string",
      "place": "string"
    }
  • Response:
    • 200 OK: Returns an object confirming the creation of the meeting.

4. Delete Meeting

  • Endpoint: /meeting
  • Method: DELETE
  • Description: Deletes a specific meeting.
  • Parameters:
    • id (query, required): The ID of the meeting to delete.
  • Response:
    • 200 OK: Returns an object confirming the deletion.

User Controller

1. Hello (deprecated)

  • Endpoint: /user
  • Method: GET
  • Description: Returns a greeting message.
  • Response:
    • 200 OK: Returns a string message.

2. Create User

  • Endpoint: /user
  • Method: POST
  • Description: Creates a new user account.
  • Request Body:
    {
      "username": "string"
    }
  • Response:
    • 200 OK: Returns an object confirming the creation of the user account.

Models

MeetingChangeRequest

  • Properties:
    • title (string)
    • description (string)
    • date_from (string)
    • date_until (string)
    • repeatable (string)
    • place (string)

UserAccountSetupRequest

  • Properties:
    • username (string, required)

MeetingCreationRequest

  • Properties:
    • title (string, required)
    • description (string)
    • date_from (string, required)
    • date_until (string, required)
    • repeatable (string)
    • place (string)

This API specification provides a foundation for interacting with the Study Buddies backend server. For more detailed information and examples, please refer to the dedicated wiki pages.

User Guide

Backend

Frontend

Clone this wiki locally