Skip to content

Commit

Permalink
Update endpoints.md
Browse files Browse the repository at this point in the history
Signed-off-by: Raydo Matthee <[email protected]>
  • Loading branch information
burnt-exe authored May 19, 2024
1 parent ed5f8e9 commit 488dfe1
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions docs/api/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ Retrieve a list of courses.

### Request

```sh
``` sh
curl -X GET https://api.skunkworks.africa/v1/courses -H "Authorization: Bearer YOUR_API_KEY"
Response
json
Copy code
```

### Response
``` json Copy code
[
{
"id": 1,
Expand All @@ -23,21 +24,27 @@ Copy code
"description": "Description of Course 2"
}
]
POST /courses
Create a new course.
```
### POST /courses

*_Create a new course._*

#### Request

Request
sh
Copy code
``` sh Copy code
curl -X POST https://api.skunkworks.africa/v1/courses -H "Authorization: Bearer YOUR_API_KEY" -d '{
"name": "New Course",
"description": "Description of the new course"
}'
Response
json
Copy code
```

#### Response

``` json Copy code
{
"id": 3,
"name": "New Course",
"description": "Description of the new course"
}
```

0 comments on commit 488dfe1

Please sign in to comment.