backend/docs/api.md

70 lines
2.3 KiB
Markdown
Raw Normal View History

2020-08-25 16:40:51 +02:00
# Dokumetacja API
2020-08-29 11:56:30 +02:00
| 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 |
2020-08-25 16:40:51 +02:00
## config
Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/ConfigController.java)
```
POST /config
```
2020-08-28 16:02:33 +02:00
#### Opis
2020-08-25 16:40:51 +02:00
Endpoint konfigurujacy caly system i importujacy dane do bazy.
2020-08-28 16:03:15 +02:00
#### Parametry
2020-08-25 16:40:51 +02:00
2020-08-28 16:09:44 +02:00
| Type | Name | Consumes | Opis | Type |
2020-08-25 16:40:51 +02:00
| ---- | ----------------------- | ------------------- | ------------------------------- | ---- |
| Body | **file** </br> required | multipart/form-data | Plik .xlsx z potrzebnymi danymi | file |
2020-08-29 11:56:30 +02:00
## getCoursesWithGroups
2020-08-25 16:40:51 +02:00
Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/getCoursesWithGroups.java)
```
GET /getCoursesWithGroups
```
2020-08-28 16:02:33 +02:00
#### Opis
2020-08-25 16:40:51 +02:00
Zwraca wszystkie dostepne kursy wraz z lista grup dla poszczegolnych kursow.
2020-08-29 11:56:30 +02:00
## getCourseGroups
2020-08-25 16:40:51 +02:00
Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/GroupController.java)
```
GET /getCourseGroups
```
2020-08-28 16:02:33 +02:00
#### Opis
2020-08-25 16:40:51 +02:00
Endpoint konfigurujacy caly system i importujacy dane do bazy.
2020-08-28 16:03:15 +02:00
#### Parametry
2020-08-25 16:40:51 +02:00
2020-08-28 16:09:44 +02:00
| Type | Name | Consumes | Opis | Type |
2020-08-25 16:40:51 +02:00
| ----------- | --------------------- | -------- | ----------------------------------------- | ---- |
| Query Param | **id** </br> required | - | id kursu dla ktorego chcemy zwrocic grupy | int |
| Query Param | **capacity** </br> | - | czy ma zwrocic pole pojemnosci grupy | bool |
2020-08-28 16:02:33 +02:00
2020-08-29 11:56:30 +02:00
## getCourses
2020-08-28 16:02:33 +02:00
2020-08-29 11:56:30 +02:00
Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/CoursesController.java)
2020-08-28 16:02:33 +02:00
```
GET /getCourses
```
#### Opis
Zwraca wszystkie dostepne kursy.