https://github.com/murilodamarioo/api-courses
https://github.com/murilodamarioo/api-courses
crud-application jwt spring-boot spring-security
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/murilodamarioo/api-courses
- Owner: murilodamarioo
- Created: 2024-10-25T00:14:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T02:58:05.000Z (over 1 year ago)
- Last Synced: 2025-02-10T03:25:35.812Z (over 1 year ago)
- Topics: crud-application, jwt, spring-boot, spring-security
- Language: Java
- Homepage:
- Size: 92.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## API Documentation 🚀
Create User - POST
```
/api/user
```
| Body Params | Type | Example |
|:------------|:---------|:---------------|
| `firstName` | `string` | John |
| `lastName` | `string` | Doe |
| `email` | `string` | john@email.com |
| `role` | `string` | TEACHER |
| `password` | `string` | 123456 |
Authentication - POST
The request creates a token for user session
```
/api/user/auth
```
| Body Params | Type | Example |
|:------------|:---------|:---------------|
| `email` | `string` | jhon@email.com |
| `password` | `string` | 123456 |
Show Profile - GET
The request gets data about the authentication user in the application.
```
/api/user/profile
```
List Courses - GET
Show all courses registered.
```
/api/courses/list
```
List courses with query params - GET
Show all courses that match the filter
```
/api/courses/list
```
| Query Params | Type | Example |
|:-------------|:---------|:--------|
| `name` | `string` | python |
| `category` | `string` | ai |
> [!NOTE]
> All requests below require an authenticated user of the TEACHER type.
> [!TIP]
> The DELETE, PUT and PATCH methods can only be completed by the course owner.
Create a course - POST
```
/api/courses
```
| Body Params | Type | Example |
|:------------|:---------|:---------------------|
| `name` | `string` | Python for beginners |
| `category` | `string` | AI Development |
Delete a course - DELETE
```
/api/courses/{id}
```
| Path Params | Type | Example |
|:------------|:-------|:-------------------|
| `id` | `UUID` | UUID string format |
Update a course - PUT
```
/api/courses/{id}
```
| Path Params | Type | Example |
|:------------|:-------|:-------------------|
| `id` | `UUID` | UUID string format |
| Body Params | Type | Example |
|:------------|:---------|:-------------------|
| `name` | `string` | Java for beginners |
| `category` | `string` | Development |
Change status course - PATCH
The request changes the course status, between active and inactive
```
/api/courses/{id}/active
```
| Path Params | Type | Example |
|:------------|:-------|:-------------------|
| `id` | `UUID` | UUID string format |