70 lines
2.2 KiB
Markdown
70 lines
2.2 KiB
Markdown
# Dokumetacja API
|
|
|
|
| Api | Zadania endpointa |
|
|
| ---------------------------------------------- | ---------------------------------------------------------- |
|
|
| [/config](#config) | Załadowanie konfiguracji startowej do aplikacji PlanNaPlan |
|
|
| [/getCoursesWithGroups](#getcourseswithgroups) | Zwrócenie wszytskich kursów razem z grupami |
|
|
| [/getCourseGroups](#getcoursegroups) | Zwrócenie grup dla danego kursu |
|
|
| [/getCourses](#getcourses) | Zwrócenie wszystkich kursów |
|
|
|
|
## config
|
|
|
|
Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/ConfigController.java)
|
|
|
|
```
|
|
POST /config
|
|
```
|
|
|
|
#### Opis
|
|
|
|
Endpoint konfigurujacy caly system i importujacy dane do bazy.
|
|
|
|
#### Parametry
|
|
|
|
| Type | Name | Consumes | Opis | Type |
|
|
| ---- | ----------------------- | ------------------- | ------------------------------- | ---- |
|
|
| Body | **file** </br> required | multipart/form-data | Plik .xlsx z potrzebnymi danymi | file |
|
|
|
|
## getCoursesWithGroups
|
|
|
|
Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/getCoursesWithGroups.java)
|
|
|
|
```
|
|
GET /getCoursesWithGroups
|
|
```
|
|
|
|
#### Opis
|
|
|
|
Zwraca wszystkie dostepne kursy wraz z listą grup.
|
|
|
|
## getCourseGroups
|
|
|
|
Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/GroupController.java)
|
|
|
|
```
|
|
GET /getCourseGroups
|
|
```
|
|
|
|
#### Opis
|
|
|
|
Zwraca wszytskie grupy dla danego kursu.
|
|
|
|
#### Parametry
|
|
|
|
| Type | Name | Consumes | Opis | Type |
|
|
| ----------- | --------------------- | -------- | ----------------------------------------- | ---- |
|
|
| Query Param | **id** </br> required | - | id kursu dla ktorego chcemy zwrocic grupy | int |
|
|
| Query Param | **capacity** </br> | - | czy ma zwrocic pole pojemnosci grupy | bool |
|
|
|
|
## getCourses
|
|
|
|
Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/CoursesController.java)
|
|
|
|
```
|
|
GET /getCourses
|
|
```
|
|
|
|
#### Opis
|
|
|
|
Zwraca wszystkie dostepne kursy.
|