-
Notifications
You must be signed in to change notification settings - Fork 3
Endpoint Documentation Template
CristiPV edited this page Sep 11, 2021
·
1 revision
Wiki ▸ Getting Started ▸ Endpoint Documentation Template
For the sake of making the template understandable, we will consider our example route to be /lectures.
Contains information of all lectures available on our e-learning platform.
Each page should start with a description of what the endpoint does.
TEMPLATE
Endpoint description.
Path Parameter Description :parameterThe parameter description.
Query Parameter Required/Optional Description Type parameterRequired or Optional The parameter description. Parameter typeStatus code:
2--/3--/4--/5--
Body:{ "key": "value" }
Retrieves all of the available lectures.
| Query Parameter | Required/Optional | Description | Type |
|---|---|---|---|
onlyPublished |
Optional | If true, then only the published lectures will be returned. Default: false
|
bool |
Status code: 200
Body:
[
{
"id": 1,
"title": "Biology - Lesson 1",
},
{
"id": 2,
"title": "Maths 1",
},
]Retrieves the lecture with the provided id.
| Path Parameter | Description |
|---|---|
:id |
The id of the lecture entry. |
| Query Parameter | Required/Optional | Description | Type |
|---|---|---|---|
onlyPublished |
Optional | If true, then only the published lectures will be returned. Default: false
|
bool |
Status code: 200
Body:
{
"id": 1,
"title": "Biology - Lesson 1",
}Status code: 400
Body:
{
"error": "error message",
}Wiki | Site | Project Roadmap | Figma