Education Platform

List Courses

get
​

β€Žhttps://<domain>/<api prefix>/<version>/education-platform/available/course/
This API endpoint will return a list of available and subscribed courses.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Query Parameters
limit
optional
string
​
offset
optional
string
​
subscribed
optional
string
Possible values are 0 and 1, default 0 0 - available course list 1 - subscribed course list
name
optional
string
course name
language
optional
string
course language code
Response
200: OK
HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {
"results": [
{
"id": <course_id>,
"course_name": "<course_name>",
"course_title": "<course_title>",
"course_description": "<course_description>",
"course_image": "<course_image_url>",
"course_active": <course_active_status>,
"course_create_date": "<course_create_date>",
"course_language": "<course_language_code>",
"course_rating": <course_rating>,
"slug": "<course_slug>",
"course_category": "<course_category>",
"course_modify_date": "<course_modify_date>",
"suscribers": <suscribers_count>
}
...
],
"count": <list_count>,
"previous": <previous_page_url>,
"next": <next_page_url>
}
}

Sample Code

Node

var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/education-platform/available/course/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/education-platform/available/course/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;
​

Subscribe Course

post
​

β€Žhttps://<domain>/<api prefix>/<version>/education-platform/subscribe/course/
This API endpoint will subscribe to a course.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Beare access token
Body Parameters
slug
required
string
Course slug
Response
200: OK
HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}

Sample Code

Node

var request = require('request');
var options = {
'method': 'POST',
'url': 'https://<domain>/<api prefix>/<version>/education-platform/subscribe/course/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
},
formData: {
'slug': '<course_slug>'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/education-platform/subscribe/course/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('slug' => '<course_slug>'),
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;

Error Responses

Status Code

Error Type

FIeld

Description

400

Validation Error

slug

This field is required and it may not be blank.

Invalid slug.

401

Request Failed

​

Somthing went wrong.

Unsubscribe Course

delete
​

β€Žhttps://<domain>/<api prefix>/<version>/education-platform/subscribe/course/?slug=<course-slug>
This API endpoint will unsubscribe to a course.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Form Data Parameters
slug
required
string
Course slug
Response
200: OK
HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}

Sample Code

Node

var request = require('request');
var options = {
'method': 'DELETE',
'url': 'https://<domain>/<api prefix>/<version>/education-platform/subscribe/course/?slug=<course-slug>',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/education-platform/subscribe/course/?slug=<course-slug>',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;

Error Responses

Status Code

Error Type

FIeld

Description

400

Validation Error

slug

This field is required and it may not be blank.

Invalid slug.

401

Request Failed

​

Somthing went wrong.

Course Detailed View

get
​

β€Žhttps://<domain>/<api prefix>/<version>/education-platform/course/detailed-view/?slug=<course_slug>
This API endpoint will return a detailed view of the course.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Query Parameters
slug
required
string
Course slug
Response
200: OK
HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {
"name": "<course_name>",
"title": "<course_title>",
"description": "<course_description>",
"subscribers": <subscribers_count>,
"course_presented_by": "<course_presenter_username>",
"tags": [
{
"tag_name": "<tag_name>"
}
...
],
"language": "<course_language>",
"last_update": "<last_update_date>",
"other_links": [
{
"link_title": "<link_titile>",
"link_url": "<link_url>"
}
...
],
"course_modules": [
{
"module_number": <module_number>,
"title": "<module_title>",
"module_description": "<module_description>",
"slug": "<module_slug>",
"chapters": [
{
"chapter_number": <chapter_number>,
"chapter_title": "<chapter_title>",
"chapter_description": "<chapter_description>",
"chapter_duration": "<chapter_duration>",
"slug": "<chapter_slug>",
"resources": [
{
"resource_number": <resource_number>,
"resource_title": "<resource_title>",
"resource_description": "<resource_description>",
"resource_duration": "<resource_duration>",
"resource_platform": "<resource_platform>",
"slug": "<resource_slug>",
"resource_file_type": "<resource_file_type>",
"resource_url": "<resource_url>",
},
...
]
},
...
]
},
...
]
}
}

Sample Code

Node

var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/education-platform/course/detailed-view/?slug=<course_slug>',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
​

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/education-platform/course/detailed-view/?slug=<course_slug>',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;

Error Responses

Status Code

Error Type

FIeld

Description

400

Validation Error

slug

This field is required and it may not be blank.

Invalid slug.

401

Request Failed

​

No access to view this course.

Resource Centre

get
​

β€Žhttps://<domain>/<api prefix>/<version>/resource_centre/view-list/
This API endpoint will return a list of training resources.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Query Parameters
offset
optional
string
​
limit
optional
string
​
Response
200: OK
HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {
"results": [
{
"id": <resource_id>,
"title": "<title>",
"short_description": "<short_description>",
"long_description": "<long_description>",
"image": "<banner_image>",
"upload_images": [
"<uploaded_images_url>","<uploaded_images_url>",...
],
"upload_videos": [
"<uploaded_videos_url>","<uploaded_videos_url>",...
],
"upload_files": [
"<uploaded_files_url>","<uploaded_files_url>"...
],
"created": "<created_date>",
"video_link": "<video_link>",
"share_links": {
"faceook": "<facebook_share_link>",
"linkedin": "<linkedin_share_link>",
"twitter": "<twitter_share_link>"
}
}
...
],
"count": 1,
"previous": <previous_page_url>,
"next": < <next_page_url>>
}
}

Sample Code

Node

var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/resource/view-list/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
​

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/resource/view-list/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;

Get Resource

get
​

β€Žhttps://<domain>/<api prefix>/<version>/education-platform/resource/view/<resource-slug>/
This API endpoint will return an HTTP Response of resource data.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Response
200: OK
Get HTTP Response of resource file

Sample Code

Node

var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/resource/view/<resource-slug>/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
​

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/resource/view/<resource-slug>/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;