Skip to content

Video Endpoint

denniscrevus edited this page Oct 13, 2021 · 3 revisions

Wiki ▸ Endpoints ▸ Video

Video

Contains data of all Videos available on our e-learning platform.

The Video Endpoint is a representation of the videos added to the application. The endpoint's purpose is to facilitate accessing, creating, updating and deleting these files.

Endpoints

GET /videos/

Retrieves all of the available videos.

Sample Response

Status code: 200
Body:

[
  {
    "id": "cc327880f-9252-444b-94c2-b3b28c006",
    "value": "English_Literature",
  },
  {
    "id": "b3b28c006-8883-9252-914a-cc327880f",
    "value": "Calculus",
  },
]

GET /videos/:id

Retrieves the video with the provided id.

Parameters

Path Parameters

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

Sample Response

Status code: 200
Body:

{
  "id": "b3b28c006-8883-9252-914a-cc327880f",
  "value": "Programming",
}

Status code: 404
Body:

{
    "error": "Not Found",
}

POST /videos/

Adds an entry composed in the body as a video. If the value attribute is null or empty, it will return an error.

Sample Response

Status code: 201
Request Body:

{
    "value": "Geography"
}

Response Body:

{
    "id": "61112f24-c44b-455a-9xxa-01ff2af1xx01",
    "value": "Geography"
}

Status code: 400
Request Body:

{
    "value":""
}

Response Body:

{
    "error": "Bad Request",
}

PATCH /videos/:id

Sends an entity at the specified id with the video entry that has been updated.

Parameters

Path Parameters

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

Sample Response

Status code: 200
Request Body:

{
  "value": "Biology",
}

Response Body:

{
    "id": "3b28c006-8883-9252-914a-cc327880f",
    "value": "Biology"
}

Status code: 404
Request Body:

{
    "value": "Biology2"   
}

Response Body:

{
    "error": "Not Found",
}

Status code: 400
Body:

    "value":""

Response Body:

{
    "error": "Bad Request",
}

DELETE /videos/:id

Deletes the video with the provided id.

Parameters

Path Parameters

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

Sample Response

Status code: 200
Body:

Status code: 404
Body:

{
    "error": "Not Found",
}

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