An open API service indexing awesome lists of open source software.

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

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 |