Public
Documentation Settings

User

Course

POSTAdd course

{{url}}/course/add
AUTHORIZATIONBearer Token
Token

<token>

Bodyraw (json)
json
{
    "title":"Node.js mastery",
    "description":"learn about Node.js",
    "price":"1000",
    "numberOfLessons":"10"
}
Example Request
curl
curl --location -g '{{url}}/course/add' \
--data '{
    "title":"Node.js mastery",
    "description":"learn about Node.js",
    "price":"1000",
    "numberOfLessons":"10"
}'
200 OK
Example Response
json
{
  "success": true,
  "message": "Created Successfully",
  "lesson": {
    "students": [],
    "_id": "60559687d6c9dd06f4ec0453",
    "description": "learn about Node.js",
    "title": "Node.js mastery",
    "timestamp": "2021-03-20T06:30:31.997Z",
    "price": 1000,
    "numberOfLessons": 10,
    "__v": 0
  }
}
Content-Security-Policy

default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests

X-DNS-Prefetch-Control

off

Expect-CT

max-age=0

X-Frame-Options

SAMEORIGIN

Strict-Transport-Security

max-age=15552000; includeSubDomains

X-Download-Options

noopen

X-Content-Type-Options

nosniff

X-Permitted-Cross-Domain-Policies

none

Referrer-Policy

no-referrer

X-XSS-Protection

0

Access-Control-Allow-Origin

*

Access-Control-Allow-Headers

Origin, X-Requested-With, Content-Type, Accept, Authorization, auth-token

Content-Type

application/json; charset=utf-8

Content-Length

250

ETag

W/"fa-BVc5GmYPf82LLTdNipRR4M0SCc4"

Date

Sat, 20 Mar 2021 06:30:32 GMT

Connection

keep-alive

GETGet All courses

{{url}}/course/all
AUTHORIZATIONBearer Token
Token

<token>

Example Request
curl
curl --location -g '{{url}}/course/all'
200 OK
Example Response
json
{
  "success": true,
  "message": "Retrieved Successfully",
  "courses": [
    {
      "students": [],
      "_id": "60559687d6c9dd06f4ec0453",
      "description": "learn about Node.js",
      "title": "Node.js mastery",
      "timestamp": "2021-03-20T06:30:31.997Z",
      "price": 1000,
      "numberOfLessons": 10,
      "__v": 0
    }
  ]
}
Content-Security-Policy

default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests

X-DNS-Prefetch-Control

off

Expect-CT

max-age=0

X-Frame-Options

SAMEORIGIN

Strict-Transport-Security

max-age=15552000; includeSubDomains

X-Download-Options

noopen

X-Content-Type-Options

nosniff

X-Permitted-Cross-Domain-Policies

none

Referrer-Policy

no-referrer

X-XSS-Protection

0

Access-Control-Allow-Origin

*

Access-Control-Allow-Headers

Origin, X-Requested-With, Content-Type, Accept, Authorization, auth-token

Content-Type

application/json; charset=utf-8

Content-Length

255

ETag

W/"ff-a4bI/IEBhK4xEeyXC4smVwH40Gg"

Date

Sat, 20 Mar 2021 06:33:34 GMT

Connection

keep-alive

GETGet course by id

{{url}}/course/one
AUTHORIZATIONBearer Token
Token

<token>

Bodyraw (json)
json
{
    "id":"60559687d6c9dd06f4ec0453"
}
Example Request
curl
curl --location -g --request GET '{{url}}/course/one' \
--data '{
    "id":"60559687d6c9dd06f4ec0453"
}'
200 OK
Example Response
json
{
  "success": true,
  "message": "Retrieved Successfully",
  "course": {
    "students": [],
    "_id": "60559687d6c9dd06f4ec0453",
    "description": "learn about Node.js",
    "title": "Node.js mastery",
    "timestamp": "2021-03-20T06:30:31.997Z",
    "price": 1000,
    "numberOfLessons": 10,
    "__v": 0
  }
}
Content-Security-Policy

default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests

X-DNS-Prefetch-Control

off

Expect-CT

max-age=0

X-Frame-Options

SAMEORIGIN

Strict-Transport-Security

max-age=15552000; includeSubDomains

X-Download-Options

noopen

X-Content-Type-Options

nosniff

X-Permitted-Cross-Domain-Policies

none

Referrer-Policy

no-referrer

X-XSS-Protection

0

Access-Control-Allow-Origin

*

Access-Control-Allow-Headers

Origin, X-Requested-With, Content-Type, Accept, Authorization, auth-token

Content-Type

application/json; charset=utf-8

Content-Length

252

ETag

W/"fc-nmhUoSm16tnaN0PHI1CgCVNMeaY"

Date

Sat, 20 Mar 2021 06:36:06 GMT

Connection

keep-alive