Skip to content

Endpoint Documentation Template

CristiPV edited this page Sep 11, 2021 · 1 revision

Wiki ▸ Getting Started ▸ Endpoint Documentation Template

Endpoint Documentation Template

For the sake of making the template understandable, we will consider our example route to be /lectures.


Lectures

Contains information of all lectures available on our e-learning platform.

Each page should start with a description of what the endpoint does.

Endpoints


TEMPLATE

HTTP METHOD/route/:path-parameter

Endpoint description.

Parameters

Path Parameters

Path Parameter Description
:parameter The parameter description.

Query Parameters

Query Parameter Required/Optional Description Type
parameter Required or Optional The parameter description. Parameter type

Sample Response

Status code: 2--/3--/4--/5--
Body:

{
 "key": "value"
}

GET /lectures/

Retrieves all of the available lectures.

Parameters

Query Parameters

Query Parameter Required/Optional Description Type
onlyPublished Optional If true, then only the published lectures will be returned. Default: false bool

Sample Response

Status code: 200
Body:

[
  {
    "id": 1,
    "title": "Biology - Lesson 1",
  },
  {
    "id": 2,
    "title": "Maths 1",
  },
]

GET /lectures/:id

Retrieves the lecture with the provided id.

Parameters

Path Parameters

Path Parameter Description
:id The id of the lecture entry.

Query Parameters

Query Parameter Required/Optional Description Type
onlyPublished Optional If true, then only the published lectures will be returned. Default: false bool

Sample Response

Status code: 200
Body:

{
  "id": 1,
  "title": "Biology - Lesson 1",
}

Status code: 400
Body:

{
  "error": "error message",
}

Getting Started

Conventions

  1. General

  1. REST API

  1. E-Learning App

Endpoints

Custom Components

Themes

Packages Used

  1. Global

  1. REST API

  1. E-Learning App

Clone this wiki locally