NAV
bash javascript php python

Info

Welcome to the generated API reference. Get Postman Collection

Additional Fields

APIs for managing additional fields

Update sequence of additional fields

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/additional-fields/update_sequence?additional_fields=%22fields%22%3A+%5B%7B%22id%22%3A+%22integer%22%2C%22name%22%3A+%22string%22%2C%22type%22%3A+%22string%22%2C+%22parent_id%22%3A+%22integer%22%2C+%22mandatory%22%3A+%22integer%22%2C+%22editable_by_user%22%3A+%22integer%22%2C+%22is_default%22%3A+%22integer%22%2C+%22available_for_filters%22%3A+%22integer%22%2C%22column_name%22%3A+%22string%22%2C%22validations%22%3A+%22string%22%2C+%22sequence_no%22%3A+%22integer%22%2C+%22created_at%22%3A+%22date%22%2C%22updated_at%22%3A+%22date%22%2C+%22deleted_at%22%3A+%22date%22%2C+%22text%22%3A+%22string%22%2C+%22type_text%22%3A+%22string%22%7D%5D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/additional-fields/update_sequence"
);

let params = {
    "additional_fields": ""fields": [{"id": "integer","name": "string","type": "string", "parent_id": "integer", "mandatory": "integer", "editable_by_user": "integer", "is_default": "integer", "available_for_filters": "integer","column_name": "string","validations": "string", "sequence_no": "integer", "created_at": "date","updated_at": "date", "deleted_at": "date", "text": "string", "type_text": "string"}]",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/additional-fields/update_sequence',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'additional_fields'=> '"fields": [{"id": "integer","name": "string","type": "string", "parent_id": "integer", "mandatory": "integer", "editable_by_user": "integer", "is_default": "integer", "available_for_filters": "integer","column_name": "string","validations": "string", "sequence_no": "integer", "created_at": "date","updated_at": "date", "deleted_at": "date", "text": "string", "type_text": "string"}]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/additional-fields/update_sequence'
params = {
  'additional_fields': '"fields": [{"id": "integer","name": "string","type": "string", "parent_id": "integer", "mandatory": "integer", "editable_by_user": "integer", "is_default": "integer", "available_for_filters": "integer","column_name": "string","validations": "string", "sequence_no": "integer", "created_at": "date","updated_at": "date", "deleted_at": "date", "text": "string", "type_text": "string"}]',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "sequence updated successfully.",
    "status": true
}

HTTP Request

POST api/additional-fields/update_sequence

Query Parameters

Parameter Status Description
additional_fields required Array of additional fields.

Retrive children additional fields.

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/additional-fields/multiple_dropdowns/eum" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/additional-fields/multiple_dropdowns/eum"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/additional-fields/multiple_dropdowns/eum',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/additional-fields/multiple_dropdowns/eum'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

[
    {
        "children": [
            {
                "id": "integer",
                "name": "string",
                "additional_field_id": "integer",
                "parent_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "text": "string"
            }
        ]
    },
    {
        "children": [
            {
                "id": "integer",
                "name": "string",
                "additional_field_id": "integer",
                "parent_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "text": "string"
            }
        ]
    }
]

HTTP Request

GET api/additional-fields/multiple_dropdowns/{id}

URL Parameters

Parameter Status Description
id required The ID of additional field to fetch

Retrives dropdowns.

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/additional-fields/dropdowns/facilis" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/additional-fields/dropdowns/facilis"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/additional-fields/dropdowns/facilis',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/additional-fields/dropdowns/facilis'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

[
    {
        "children": [
            {
                "id": "integer",
                "name": "string",
                "additional_field_id": "integer",
                "parent_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "text": "string"
            }
        ]
    },
    {
        "children": [
            {
                "id": "integer",
                "name": "string",
                "additional_field_id": "integer",
                "parent_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "text": "string"
            }
        ]
    }
]

HTTP Request

GET api/additional-fields/dropdowns/{id}

URL Parameters

Parameter Status Description
id required The ID of additional fields to fetch.

Retrieves all additional fields

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/additional-fields" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/additional-fields"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/additional-fields',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/additional-fields'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "fields": [
        {
            "id": "integer",
            "name": "string",
            "type": "string",
            "parent_id": "integer",
            "mandatory": "integer",
            "editable_by_user": "integer",
            "is_default": "integer",
            "available_for_filters": "integer",
            "column_name": "string",
            "validations": "string",
            "sequence_no": "integer",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "text": "string",
            "type_text": "string"
        }
    ],
    "dropdowns": [
        {
            "id": "integer",
            "additional_field_id": "integer",
            "parent_id": "integer",
            "name": "string",
            "text": "string",
            "created_at": "date",
            "updated_at": "date"
        }
    ]
}

HTTP Request

GET api/additional-fields

Creates a new additional field

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/additional-fields" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ForDropdown":[],"type":"string","parent_id":0,"name":"string","mandatory":true,"options":"{name: \"string\", parent_id: \"integer\"}","editable_by_user":true,"available_for_filters":true}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/additional-fields"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ForDropdown": [],
    "type": "string",
    "parent_id": 0,
    "name": "string",
    "mandatory": true,
    "options": "{name: \"string\", parent_id: \"integer\"}",
    "editable_by_user": true,
    "available_for_filters": true
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/additional-fields',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ForDropdown' => [],
            'type' => 'string',
            'parent_id' => 0,
            'name' => 'string',
            'mandatory' => true,
            'options' => '{name: "string", parent_id: "integer"}',
            'editable_by_user' => true,
            'available_for_filters' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/additional-fields'
payload = {
    "ForDropdown": [],
    "type": "string",
    "parent_id": 0,
    "name": "string",
    "mandatory": true,
    "options": "{name: \"string\", parent_id: \"integer\"}",
    "editable_by_user": true,
    "available_for_filters": true
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Additional Fields created successfully.",
    "status": false
}

HTTP Request

POST api/additional-fields

Body Parameters

Parameter Type Status Description
ForDropdown array optional For dropdowns value
type string required The type of addtional fields.
parent_id integer optional The parent id of aadition fields.
name string required The name of aadition fields .
mandatory boolean optional specify additional fields is mandatory or not.
options Array optional array of option for children additional fields.
editable_by_user boolean optional specify addition fields is editable by user or not.
available_for_filters boolean optional specify addition fields is available for filter or not.

View a additional field

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/additional-fields/integer" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/additional-fields/integer"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/additional-fields/integer',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/additional-fields/integer'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "id": "integer",
    "name": "string",
    "type": "string",
    "parent_id": "integer",
    "mandatory": "integer",
    "editable_by_user": "integer",
    "is_default": "integer",
    "available_for_filters": "integer",
    "column_name": "string",
    "validations": "string",
    "sequence_no": "integer",
    "created_at": "date",
    "updated_at": "date",
    "deleted_at": "date",
    "text": "date",
    "dropdowns": {
        "id": {
            "id": "integer",
            "name": "string",
            "additional_field_id": "integer",
            "parent_id": "integer",
            "created_at": "date",
            "updated_at": "date",
            "text": "string"
        }
    }
}

HTTP Request

GET api/additional-fields/{additional_field}

URL Parameters

Parameter Status Description
additional_field required The ID of additional fields to fetch.

Update a additional field

Example request:

curl -X PUT \
    "https://your_lms_domain_url/v1/api/additional-fields/integer" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ForDropdown":[],"type":"string","parent_id":0,"name":"string","options":"{name: \"string\", parent_id: \"integer\"}","mandatory":true,"editable_by_user":true,"available_for_filters":true}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/additional-fields/integer"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ForDropdown": [],
    "type": "string",
    "parent_id": 0,
    "name": "string",
    "options": "{name: \"string\", parent_id: \"integer\"}",
    "mandatory": true,
    "editable_by_user": true,
    "available_for_filters": true
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://your_lms_domain_url/v1/api/additional-fields/integer',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ForDropdown' => [],
            'type' => 'string',
            'parent_id' => 0,
            'name' => 'string',
            'options' => '{name: "string", parent_id: "integer"}',
            'mandatory' => true,
            'editable_by_user' => true,
            'available_for_filters' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/additional-fields/integer'
payload = {
    "ForDropdown": [],
    "type": "string",
    "parent_id": 0,
    "name": "string",
    "options": "{name: \"string\", parent_id: \"integer\"}",
    "mandatory": true,
    "editable_by_user": true,
    "available_for_filters": true
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Additional Fields updated successfully.",
    "status": false
}

HTTP Request

PUT api/additional-fields/{additional_field}

PATCH api/additional-fields/{additional_field}

URL Parameters

Parameter Status Description
additional_field required The ID od additional field.

Body Parameters

Parameter Type Status Description
ForDropdown array optional For dropdowns value
type string required The type of addtional fields.
parent_id integer optional The parent id of aadition fields.
name string required The name of aadition fields .
options Array optional array of option for children additional fields.
mandatory boolean optional specify additional fields is mandatory or not.
editable_by_user boolean optional specify addition fields is editable by user or not.
available_for_filters boolean optional specify addition fields is available for filter or not.

Delete a additional field.

Example request:

curl -X DELETE \
    "https://your_lms_domain_url/v1/api/additional-fields/integer" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/additional-fields/integer"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://your_lms_domain_url/v1/api/additional-fields/integer',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/additional-fields/integer'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Additional Fields deleted successfully.",
    "status": false
}

HTTP Request

DELETE api/additional-fields/{additional_field}

URL Parameters

Parameter Status Description
additional_field required The ID of additional field to fetch.

Branch Dashboard Report

APIs for managing Branch Dashboard Report

View branch dashboard report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/branch-report?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=%7B%22branch_id%22%3A%22integer%22%2C%22descendant%22%3A%22enum%280%2C1%29%22%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/branch-report"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "{"branch_id":"integer","descendant":"enum(0,1)"}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/branch-report',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> '{"branch_id":"integer","descendant":"enum(0,1)"}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/branch-report'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': '{"branch_id":"integer","descendant":"enum(0,1)"}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "name": "string",
            "branch_code": "string",
            "branch_id": "integer",
            "created_at": "date",
            "updated_at": "date",
            "data": {
                "id": "integer",
                "name": "string",
                "branch_code": "string",
                "branch_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "total_not_started": "integer",
                "total_inprogress": "integer",
                "total_completed": "integer",
                "total_not_completed": "integer",
                "total_user_count": "integer",
                "total_enrolled": "integer"
            },
            "total_enrolled": "integer",
            "total_not_started": "integer",
            "total_inprogress": "integer",
            "total_completed": "integer",
            "total_not_completed": "integer",
            "total_user_count": "integer"
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/branch-report

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the branches name . Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result. example: {"branch_id":"integer","descendant":"enum(0,1)"}.

View total branch report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/branch-report-total?advanced_filter=%7B%22branch_id%22%3A%22integer%22%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/branch-report-total"
);

let params = {
    "advanced_filter": "{"branch_id":"integer"}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/branch-report-total',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'advanced_filter'=> '{"branch_id":"integer"}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/branch-report-total'
params = {
  'advanced_filter': '{"branch_id":"integer"}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "name": "string",
            "branch_code": "string",
            "branch_id": "integer",
            "created_at": "date",
            "updated_at": "date",
            "data": {
                "id": "integer",
                "name": "string",
                "branch_code": "string",
                "branch_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "total_not_started": "integer",
                "total_inprogress": "integer",
                "total_completed": "integer",
                "total_not_completed": "integer",
                "total_user_count": "integer",
                "total_enrolled": "integer"
            },
            "total_enrolled": "integer",
            "total_not_started": "integer",
            "total_inprogress": "integer",
            "total_completed": "integer",
            "total_not_completed": "integer",
            "total_user_count": "integer"
        }
    ]
}

HTTP Request

GET api/branch-report-total

Query Parameters

Parameter Status Description
advanced_filter optional Additional optional filters to be applied over the returned result. example: {"branch_id":"integer"}.

Branches

APIs for managing branches

Retrieves all branches

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/branches" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/branches"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/branches',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/branches'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

[
    {
        "id": "integer",
        "name": "string",
        "branch_code": "string",
        "branch_id": "integer",
        "created_at": "date",
        "updated_at": "date",
        "children_recursive": [
            {
                "id": "integer",
                "name": "string",
                "branch_code": "string",
                "branch_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "children_recursive": []
            }
        ],
        "text": "string"
    }
]

HTTP Request

GET api/branches

Creates a new branch

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/branches" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"branch_code":"string","branch_id":0,"language":"string","name":"string"}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/branches"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "branch_code": "string",
    "branch_id": 0,
    "language": "string",
    "name": "string"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/branches',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'branch_code' => 'string',
            'branch_id' => 0,
            'language' => 'string',
            'name' => 'string',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/branches'
payload = {
    "branch_code": "string",
    "branch_id": 0,
    "language": "string",
    "name": "string"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Branch created successfully.",
    "status": true
}

HTTP Request

POST api/branches

Body Parameters

Parameter Type Status Description
branch_code string required The branch code of branch.
branch_id integer optional parameter required while creating children branch.
language string required langauge for branch.
name string required The name of the branch.

View a branch

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/branches/voluptate" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/branches/voluptate"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/branches/voluptate',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/branches/voluptate'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

[
    {
        "id": "integer",
        "name": "string",
        "branch_code": "string",
        "branch_id": "integer",
        "created_at": "date",
        "updated_at": "date",
        "text": "string"
    }
]

HTTP Request

GET api/branches/{branch}

URL Parameters

Parameter Status Description
branch required ID of the branch to fetch.

Update a branch

Example request:

curl -X PUT \
    "https://your_lms_domain_url/v1/api/branches/ratione" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"branch_code":"string","branch_id":0,"language":"string","name":"string"}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/branches/ratione"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "branch_code": "string",
    "branch_id": 0,
    "language": "string",
    "name": "string"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://your_lms_domain_url/v1/api/branches/ratione',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'branch_code' => 'string',
            'branch_id' => 0,
            'language' => 'string',
            'name' => 'string',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/branches/ratione'
payload = {
    "branch_code": "string",
    "branch_id": 0,
    "language": "string",
    "name": "string"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Branch updated successfully.",
    "status": true
}

HTTP Request

PUT api/branches/{branch}

PATCH api/branches/{branch}

URL Parameters

Parameter Status Description
branch required ID of the branch to fetch.

Body Parameters

Parameter Type Status Description
branch_code string required The branch code of branch.
branch_id integer optional parameter required while creating children branch.
language string required langauge for branch.
name string required The name of the branch.

Delete a branch

Example request:

curl -X DELETE \
    "https://your_lms_domain_url/v1/api/branches/corrupti" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/branches/corrupti"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://your_lms_domain_url/v1/api/branches/corrupti',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/branches/corrupti'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "branch deleted successfully",
    "status": false
}

Example response (406):

{
    "message": "Unable to delete default branch.",
    "status": false
}

Example response (406):

{
    "message": "Unable to delete branch as branch exists.",
    "status": false
}

Example response (406):

{
    "message": "Unable to delete branch as user exists.",
    "status": false
}

HTTP Request

DELETE api/branches/{branch}

URL Parameters

Parameter Status Description
branch required ID of the branch to fetch.

Courses

APIs for managing courses

Retrieves all courses, filtered on input parameters

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/courses?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=%7B%22branch_id%22%3A%22integer%22%2C%22descendant%22%3A%22enum%280%2C1%29%22%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/courses"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "{"branch_id":"integer","descendant":"enum(0,1)"}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/courses',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> '{"branch_id":"integer","descendant":"enum(0,1)"}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/courses'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': '{"branch_id":"integer","descendant":"enum(0,1)"}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "parent_course_id": "integer",
            "name": "string",
            "type": "string",
            "description": "string",
            "thumbnail": "string",
            "code": "string",
            "credits": "string",
            "material": "string",
            "original_name": "string",
            "language_id": "integer",
            "status": "string",
            "category_id": "integer",
            "created_by": "integer",
            "updated_by": "date",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "training_materials_count": "integer",
            "keywords": [
                {
                    "id": "integer",
                    "name": "string",
                    "created_at": "date",
                    "updated_at": "date",
                    "pivot": {
                        "course_id": "integer",
                        "keyword_id": "integer"
                    }
                }
            ],
            "language": {
                "id": "integer",
                "code": "string",
                "text": "string",
                "created_at": "date",
                "updated_at": "date"
            },
            "course_setting": {
                "id": "integer",
                "course_id": "integer",
                "navigation": "string",
                "completion": "string",
                "enrollment": "string",
                "start_date": "date",
                "end_date": "date",
                "duration_days": "integer",
                "duration_from": "string",
                "average_hours": "integer",
                "average_minutes": "integer",
                "average_seconds": "integer",
                "certificate_id": "integer",
                "certificate_validity": "string",
                "for_days": "integer",
                "till_date": "date",
                "allow_re_enroll_course": "interger",
                "before_days_to_re_enroll": "integer",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date"
            },
            "course_name": "string"
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/courses

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the courses name,description and code. Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result. example: advanced_filter:{"category_id": id of category,"descendant":value: 0 or 1}.

View a course

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/courses/labore" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/courses/labore"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/courses/labore',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/courses/labore'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (200):

{
    "id": "integer",
    "parent_course_id": "integer",
    "name": "string",
    "type": "string",
    "description": "string",
    "thumbnail": "string",
    "code": "string",
    "credits": "integer",
    "material": "integer",
    "original_name": "integer",
    "language_id": "integer",
    "status": "string",
    "category_id": "string",
    "created_by": "integer",
    "updated_by": "integer",
    "created_at": "date",
    "updated_at": "date",
    "deleted_at": "date",
    "completion_material": [
        "integer"
    ],
    "show_evaluate_saq": "boolean",
    "keywords": [
        {
            "id": "integer",
            "name": "string",
            "created_at": "date",
            "updated_at": "date",
            "pivot": {
                "course_id": "integer",
                "keyword_id": "integer"
            }
        }
    ],
    "training_materials": [
        {
            "id": "integer",
            "parent_training_material_id": "integer",
            "title": "string",
            "description": "string",
            "thumbnail": "string",
            "file": "string",
            "original_name": "string",
            "view_mode_desktop": "string",
            "view_mode_tablet": "string",
            "view_mode_mobile_app": "string",
            "type": "string",
            "created_by": "integer",
            "updated_by": "date",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "pivot": {
                "course_id": "integer",
                "training_material_id": "integer",
                "checked_for_course_completion": "boolean",
                "publish_from": "date",
                "publish_to": "date",
                "sequence_number": "integer",
                "number_of_views": "integer",
                "set_delay": "time",
                "number_of_attempts": "integer",
                "folder_id": "integer",
                "deleted_at": "date"
            },
            "users": [
                {
                    "id": "integer",
                    "course_user_id": "integer",
                    "user_id": "integer",
                    "course_id": "integer",
                    "training_material_id": "integer",
                    "assign_date": "date",
                    "first_access_date": "date",
                    "last_access_date": "date",
                    "completion_date": "date",
                    "score": "integer",
                    "status": "string",
                    "assessment_data": "string",
                    "answer_data": "string",
                    "attempt": "integer",
                    "level": "string",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date"
                }
            ]
        }
    ],
    "course_setting": {
        "id": "integer",
        "course_id": "integer",
        "navigation": "string",
        "completion": "string",
        "enrollment": "string",
        "start_date": "date",
        "end_date": "date",
        "duration_days": "integer",
        "duration_from": "string",
        "average_hours": "string",
        "average_minutes": "string",
        "average_seconds": "string",
        "certificate_id": "integer",
        "certificate_validity": "string",
        "for_days": "string",
        "till_date": "date",
        "allow_re_enroll_course": "integer",
        "before_days_to_re_enroll": "integer",
        "created_at": "date",
        "updated_at": "date",
        "deleted_at": "date"
    },
    "course_notification": {
        "id": "integer",
        "course_id": "integer",
        "on_course_assignment_checkbox": "boolean",
        "on_course_completion_checkbox": "boolean",
        "on_course_unassignment_checkbox": "boolean",
        "for_course_not_started_notification_afterdays_checkbox": "boolean",
        "for_course_not_started_notification_afterdays": "boolean",
        "for_course_about_to_start_notification_before_days_checkbox": "boolean",
        "for_course_about_to_start_notification_before_days": "boolean",
        "for_certificate_about_to_expire_notification_before_checkbox": "boolean",
        "for_certificate_about_to_expire_notification_before": "boolean",
        "for_expired_course_notification_before_days_checkbox": "boolean",
        "for_expired_course_notification_before_days": "boolean",
        "for_expired_course_notification_after_days_checkbox": "boolean",
        "for_expired_course_notification_after_days": "boolean",
        "created_at": "date",
        "updated_at": "date"
    }
}

Example response (404):

{
    "message": "No query results for model [App\\Models\\Course] ID"
}

HTTP Request

GET api/courses/{course}

URL Parameters

Parameter Status Description
course required ID of the course to fetch.

Retrieves all users that are assigned or unassigned to particular course , filtered on input parameters

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/courses/assign-users/est/enum(0,1)?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=cum" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/courses/assign-users/est/enum(0,1)"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "cum",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/courses/assign-users/est/enum(0,1)',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> 'cum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/courses/assign-users/est/enum(0,1)'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': 'cum',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "username": "string",
            "first_name": "string",
            "last_name": "string",
            "name": "string",
            "email": "string",
            "email_verified_at": "date",
            "password_updated": "integer",
            "profile_picture": "string",
            "level": "string",
            "status": "integer",
            "language": "string",
            "date_format": "string",
            "timezone": "string",
            "permission_id": "integer",
            "role_id": "integer",
            "expire_on": "date",
            "created_at": "date",
            "updated_at": "date",
            "courses": [
                {
                    "id": "integer",
                    "parent_course_id": "integer",
                    "name": "string",
                    "type": "string",
                    "description": "string",
                    "thumbnail": "string",
                    "code": "string",
                    "credits": "integer",
                    "material": "string",
                    "original_name": "string",
                    "language_id": "integer",
                    "status": "string",
                    "category_id": "integer",
                    "created_by": "integer",
                    "updated_by": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date",
                    "pivot": {
                        "user_id": "integer",
                        "course_id": "integer"
                    }
                }
            ],
            "user_status": "string"
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "username": "string",
            "first_name": "string",
            "last_name": "string",
            "name": "string",
            "email": "string",
            "email_verified_at": "date",
            "password_updated": "integer",
            "profile_picture": "string",
            "level": "string",
            "status": "integer",
            "language": "string",
            "date_format": "string",
            "timezone": "string",
            "permission_id": "integer",
            "role_id": "integer",
            "expire_on": "date",
            "created_at": "date",
            "updated_at": "date",
            "courses": [],
            "user_status": "string"
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/courses/assign-users/{id}/{status}

URL Parameters

Parameter Status Description
id required ID of the course to fetch.
status required status of the course. example assigned users: enabled and unassigned users:disabled.

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the users username,first name, last name and email. Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result.

Assign course to user using branch

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/courses/get-users-using-branch/dicta?ids=officiis" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/courses/get-users-using-branch/dicta"
);

let params = {
    "ids": "officiis",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/courses/get-users-using-branch/dicta',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'ids'=> 'officiis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/courses/get-users-using-branch/dicta'
params = {
  'ids': 'officiis',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Users assigned successfully.",
    "status": true
}

Example response (404):

{
    "message": "No query results for model [App\\Models\\Course] ID"
}

HTTP Request

POST api/courses/get-users-using-branch/{id}

URL Parameters

Parameter Status Description
id required ID of the course to fetch.

Query Parameters

Parameter Status Description
ids required Array of selected branch id.

Assign course to user

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/courses/assign/et?ids=sequi" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/courses/assign/et"
);

let params = {
    "ids": "sequi",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/courses/assign/et',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'ids'=> 'sequi',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/courses/assign/et'
params = {
  'ids': 'sequi',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Users assigned successfully.",
    "status": true
}

Example response (404):

{
    "message": "No query results for model [App\\Models\\Course] ID"
}

HTTP Request

POST api/courses/assign/{id}

URL Parameters

Parameter Status Description
id required ID of the course to fetch.

Query Parameters

Parameter Status Description
ids required Array of selected user id.

Unassign course to user

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/courses/unassign/adipisci?ids=ea" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/courses/unassign/adipisci"
);

let params = {
    "ids": "ea",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/courses/unassign/adipisci',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'ids'=> 'ea',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/courses/unassign/adipisci'
params = {
  'ids': 'ea',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Users unassigned successfully.",
    "status": true
}

Example response (404):

{
    "message": "No query results for model [App\\Models\\Course] ID"
}

HTTP Request

POST api/courses/unassign/{id}

URL Parameters

Parameter Status Description
id required ID of the course to fetch.

Query Parameters

Parameter Status Description
ids required Array of selected user id.

View course settings

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/courses/course-setting/fugiat" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/courses/course-setting/fugiat"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/courses/course-setting/fugiat',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/courses/course-setting/fugiat'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (200):

{
    "id": "integer",
    "parent_course_id": "integer",
    "name": "string",
    "type": "string",
    "description": "string",
    "thumbnail": "string",
    "code": "string",
    "credits": "integer",
    "material": "integer",
    "original_name": "integer",
    "language_id": "integer",
    "status": "string",
    "category_id": "string",
    "created_by": "integer",
    "updated_by": "integer",
    "created_at": "date",
    "updated_at": "date",
    "deleted_at": "date",
    "completion_material": [
        "integer"
    ],
    "show_evaluate_saq": "boolean",
    "keywords": [
        {
            "id": "integer",
            "name": "string",
            "created_at": "date",
            "updated_at": "date",
            "pivot": {
                "course_id": "integer",
                "keyword_id": "integer"
            }
        }
    ],
    "training_materials": [
        {
            "id": "integer",
            "parent_training_material_id": "integer",
            "title": "string",
            "description": "string",
            "thumbnail": "string",
            "file": "string",
            "original_name": "string",
            "view_mode_desktop": "string",
            "view_mode_tablet": "string",
            "view_mode_mobile_app": "string",
            "type": "string",
            "created_by": "integer",
            "updated_by": "date",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "pivot": {
                "course_id": "integer",
                "training_material_id": "integer",
                "checked_for_course_completion": "boolean",
                "publish_from": "date",
                "publish_to": "date",
                "sequence_number": "integer",
                "number_of_views": "integer",
                "set_delay": "time",
                "number_of_attempts": "integer",
                "folder_id": "integer",
                "deleted_at": "date"
            }
        }
    ],
    "course_setting": {
        "id": "integer",
        "course_id": "integer",
        "navigation": "string",
        "completion": "string",
        "enrollment": "string",
        "start_date": "date",
        "end_date": "date",
        "duration_days": "integer",
        "duration_from": "string",
        "average_hours": "string",
        "average_minutes": "string",
        "average_seconds": "string",
        "certificate_id": "integer",
        "certificate_validity": "string",
        "for_days": "string",
        "till_date": "date",
        "allow_re_enroll_course": "integer",
        "before_days_to_re_enroll": "integer",
        "created_at": "date",
        "updated_at": "date",
        "deleted_at": "date"
    }
}

Example response (404):

{
    "message": "No query results for model [App\\Models\\Course] ID"
}

HTTP Request

GET api/courses/course-setting/{id}

URL Parameters

Parameter Status Description
id required ID of the course to fetch.

Courses User Report

APIs for managing Courses User Report

View course user report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/courses-users?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=%7B%22name%22%3A%22string%22%2C%22type%22%3A%22string%22%2C%22code%22%3A%22string%22%2C%22category%22%3A%22string%22%2C%22category_id%22%3A%22integer%22%2C%22criteria%22%3A%22string%22%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/courses-users"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "{"name":"string","type":"string","code":"string","category":"string","category_id":"integer","criteria":"string"}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/courses-users',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> '{"name":"string","type":"string","code":"string","category":"string","category_id":"integer","criteria":"string"}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/courses-users'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': '{"name":"string","type":"string","code":"string","category":"string","category_id":"integer","criteria":"string"}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "parent_course_id": "integer",
            "name": "string",
            "type": "string",
            "description": "string",
            "thumbnail": "string",
            "code": "string",
            "credits": "integer",
            "material": "string",
            "original_name": "string",
            "language_id": "integer",
            "status": "string",
            "category_id": "integer",
            "created_by": "integer",
            "updated_by": "intger",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "course_users_count": "integer",
            "not_started": "integer",
            "completed": "integer",
            "not_completed": "integer",
            "in_progress": "integer",
            "language": {
                "id": "integer",
                "code": "string",
                "text": "string",
                "created_at": "date",
                "updated_at": "date"
            },
            "course_setting": {
                "id": "integer",
                "course_id": "integer",
                "navigation": "string",
                "completion": "string",
                "enrollment": "string",
                "start_date": "date",
                "end_date": "date",
                "duration_days": "integer",
                "duration_from": "string",
                "average_hours": "string",
                "average_minutes": "string",
                "average_seconds": "string",
                "certificate_id": "integer",
                "certificate_validity": "string",
                "for_days": "integer",
                "till_date": "date",
                "allow_re_enroll_course": "integer",
                "before_days_to_re_enroll": "integer",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date"
            },
            "course_name": "string"
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/reports/courses-users

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the courses name and code. Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result. example: {"name":"string","type":"string","code":"string","category":"string","category_id":"integer","criteria":"string"}.

Download course user report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/courses-users/csv" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/courses-users/csv"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/courses-users/csv',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/courses-users/csv'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "parent_course_id": "integer",
            "name": "string",
            "type": "string",
            "description": "string",
            "thumbnail": "string",
            "code": "string",
            "credits": "integer",
            "material": "string",
            "original_name": "string",
            "language_id": "integer",
            "status": "string",
            "category_id": "integer",
            "created_by": "integer",
            "updated_by": "intger",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "course_users_count": "integer",
            "not_started": "integer",
            "completed": "integer",
            "not_completed": "integer",
            "in_progress": "integer",
            "language": {
                "id": "integer",
                "code": "string",
                "text": "string",
                "created_at": "date",
                "updated_at": "date"
            },
            "course_setting": {
                "id": "integer",
                "course_id": "integer",
                "navigation": "string",
                "completion": "string",
                "enrollment": "string",
                "start_date": "date",
                "end_date": "date",
                "duration_days": "integer",
                "duration_from": "string",
                "average_hours": "string",
                "average_minutes": "string",
                "average_seconds": "string",
                "certificate_id": "integer",
                "certificate_validity": "string",
                "for_days": "integer",
                "till_date": "date",
                "allow_re_enroll_course": "integer",
                "before_days_to_re_enroll": "integer",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date"
            },
            "course_name": "string"
        }
    ]
}

HTTP Request

GET api/reports/courses-users/csv

Enrollments

APIs for managing user side APIs

Retrieves all user assigned courses, filtered on input parameters

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/user/get-user-assigned-courses?sort=string&filter=string&courseStatus=string" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/user/get-user-assigned-courses"
);

let params = {
    "sort": "string",
    "filter": "string",
    "courseStatus": "string",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/user/get-user-assigned-courses',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort'=> 'string',
            'filter'=> 'string',
            'courseStatus'=> 'string',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/user/get-user-assigned-courses'
params = {
  'sort': 'string',
  'filter': 'string',
  'courseStatus': 'string',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "current_page": "integer",
    "data": [
        {
            "id": "integer",
            "parent_course_id": "integer",
            "name": "string",
            "type": "string",
            "description": "string",
            "thumbnail": "string",
            "code": "string",
            "credits": "integer",
            "material": "string",
            "original_name": "string",
            "language_id": "integer",
            "status": "string",
            "category_id": "integer",
            "created_by": "integer",
            "updated_by": "integer",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "completion_material": "integer",
            "course_setting": {
                "id": "integer",
                "course_id": "integer",
                "navigation": "string",
                "completion": "string",
                "enrollment": "string",
                "start_date": "date",
                "end_date": "date",
                "duration_days": "integer",
                "duration_from": "string",
                "average_hours": "string",
                "average_minutes": "string",
                "average_seconds": "string",
                "certificate_id": "string",
                "certificate_validity": "string",
                "for_days": "integer",
                "till_date": "date",
                "allow_re_enroll_course": "integer",
                "before_days_to_re_enroll": "integer",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date"
            },
            "keywords": [
                {
                    "id": "integer",
                    "name": "string",
                    "created_at": "date",
                    "updated_at": "date",
                    "pivot": {
                        "course_id": "integer",
                        "keyword_id": "integer"
                    }
                }
            ],
            "language": {
                "id": "integer",
                "code": "string",
                "text": "string",
                "created_at": "date",
                "updated_at": "date"
            },
            "training_materials": [
                {
                    "id": "integer",
                    "parent_training_material_id": "integer",
                    "title": "string",
                    "description": "string",
                    "thumbnail": "string",
                    "file": "string",
                    "original_name": "string",
                    "view_mode_desktop": "string",
                    "view_mode_tablet": "string",
                    "view_mode_mobile_app": "string",
                    "type": "string",
                    "created_by": "integer",
                    "updated_by": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date",
                    "pivot": {
                        "course_id": "integer",
                        "training_material_id": "integer",
                        "checked_for_course_completion": "integer",
                        "publish_from": "date",
                        "publish_to": "date",
                        "sequence_number": "integer",
                        "number_of_views": "string",
                        "set_delay": "string",
                        "number_of_attempts": "integer",
                        "folder_id": "integer",
                        "deleted_at": "date"
                    }
                }
            ],
            "course_users": [
                {
                    "id": "integer",
                    "user_id": "integer",
                    "course_id": "integer",
                    "available_from": "date",
                    "available_to": "date",
                    "duration_days": "integer",
                    "duration_from": "string",
                    "first_access_date": "date",
                    "last_access_date": "date",
                    "completion_date": "date",
                    "status": "string",
                    "assigned_date": "date",
                    "assigned_by": "integer",
                    "score": "integer",
                    "certificate_id": "integer",
                    "certificate_validity": "string",
                    "for_days": "string",
                    "till_date": "date",
                    "allow_re_enroll_course": "integer",
                    "before_days_to_re_enroll": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date"
                }
            ]
        }
    ],
    "first_page_url": "url",
    "from": "integer",
    "last_page": "integer",
    "last_page_url": "url",
    "next_page_url": "url",
    "path": "url",
    "per_page": "integer",
    "prev_page_url": "url",
    "to": "integer",
    "total": "integer"
}

HTTP Request

GET api/user/get-user-assigned-courses

Query Parameters

Parameter Status Description
sort required Sorting Direction: a-z = A-Z, z-a = Z-A, newest_to_oldest=Newest to Oldest,oldest_to_newest=Oldest to Newest,code_ascending=Code(Ascending Order),code_descending=Code(Descending Order) default - newest_to_oldest.
filter optional Search text in the courses name. Default empty array. OR is performed across array items.
courseStatus optional filter courses based on course status. not_started=Not Started,in_progress=In Progress,completed=Completed,not_completed=Not Completed default-null.

Retrieves assigned course details

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/user/get-course-details/assumenda" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/user/get-course-details/assumenda"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/user/get-course-details/assumenda',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/user/get-course-details/assumenda'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "id": "integer",
    "parent_course_id": "integer",
    "name": "string",
    "type": "string",
    "description": "string",
    "thumbnail": "string",
    "code": "string",
    "credits": "integer",
    "material": "string",
    "original_name": "string",
    "language_id": "integer",
    "status": "string",
    "category_id": "integer",
    "created_by": "integer",
    "updated_by": "integer",
    "created_at": "date",
    "updated_at": "date",
    "deleted_at": "date",
    "startDateForLaunch": "boolean",
    "currentDate": "date",
    "folders": [
        {
            "id": "integer",
            "name": "string",
            "course_id": "integer",
            "folder_id": "integer",
            "parent_folder_id": "integer",
            "folder_type": "string",
            "sequence_number": "integer",
            "created_by": "integer",
            "updated_by": "integer",
            "created_at": "date",
            "updated_at": "date",
            "training_materials": [
                {
                    "id": "integer",
                    "parent_training_material_id": "integer",
                    "title": "string",
                    "description": "string",
                    "thumbnail": "string",
                    "file": "string",
                    "original_name": "string",
                    "view_mode_desktop": "string",
                    "view_mode_tablet": "string",
                    "view_mode_mobile_app": "string",
                    "type": "string",
                    "created_by": "integer",
                    "updated_by": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date",
                    "pivot": {
                        "folder_id": "integer",
                        "training_material_id": "integer",
                        "checked_for_course_completion": "integer",
                        "publish_from": "date",
                        "publish_to": "date",
                        "sequence_number": "integer",
                        "number_of_views": "string",
                        "set_delay": "string",
                        "number_of_attempts": "integer",
                        "launchTrainingMaterial": "boolean",
                        "launchMaterialOnNumberofViews": "boolean"
                    }
                }
            ],
            "children_recursive_training_materials": [
                {
                    "id": "integer",
                    "name": "string",
                    "course_id": "integer",
                    "folder_id": "integer",
                    "parent_folder_id": "integer",
                    "folder_type": "integer",
                    "sequence_number": "integer",
                    "created_by": "integer",
                    "updated_by": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "training_materials": [],
                    "children_recursive_training_materials": []
                }
            ]
        }
    ],
    "folder_materials": [
        {
            "id": "integer",
            "parent_training_material_id": "integer",
            "title": "string",
            "description": "string",
            "thumbnail": "string",
            "file": "string",
            "original_name": "string",
            "view_mode_desktop": "string",
            "view_mode_tablet": "string",
            "view_mode_mobile_app": "string",
            "type": "string",
            "created_by": "integer",
            "updated_by": "integer",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "pivot": {
                "folder_id": "integer",
                "training_material_id": "integer",
                "checked_for_course_completion": "integer",
                "publish_from": "date",
                "publish_to": "date",
                "sequence_number": "integer",
                "number_of_views": "string",
                "set_delay": "string",
                "number_of_attempts": "integer",
                "launchTrainingMaterial": "boolean",
                "launchMaterialOnNumberofViews": "boolean"
            }
        }
    ],
    "completion_material": "integer",
    "selected_material": [
        "integer",
        "integer",
        "integer"
    ],
    "keywords": [
        {
            "id": "integer",
            "name": "string",
            "created_at": "date",
            "updated_at": "date",
            "pivot": {
                "course_id": "integer",
                "keyword_id": "integer"
            }
        }
    ],
    "training_materials": [
        {
            "id": "integer",
            "parent_training_material_id": "integer",
            "title": "string",
            "description": "string",
            "thumbnail": "string",
            "file": "string",
            "original_name": "string",
            "view_mode_desktop": "string",
            "view_mode_tablet": "string",
            "view_mode_mobile_app": "string",
            "type": "string",
            "created_by": "integer",
            "updated_by": "integer",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "pivot": {
                "course_id": "integer",
                "training_material_id": "integer",
                "checked_for_course_completion": "integer",
                "publish_from": "date",
                "publish_to": "date",
                "sequence_number": "integer",
                "number_of_views": "string",
                "set_delay": "string",
                "number_of_attempts": "integer",
                "folder_id": "integer",
                "deleted_at": "date"
            }
        }
    ],
    "course_setting": {
        "id": "integer",
        "course_id": "integer",
        "navigation": "string",
        "completion": "string",
        "enrollment": "string",
        "start_date": "date",
        "end_date": "date",
        "duration_days": "integer",
        "duration_from": "string",
        "average_hours": "integer",
        "average_minutes": "integer",
        "average_seconds": "integer",
        "certificate_id": "integer",
        "certificate_validity": "string",
        "for_days": "integer",
        "till_date": "date",
        "allow_re_enroll_course": "interger",
        "before_days_to_re_enroll": "integer",
        "created_at": "date",
        "updated_at": "date",
        "deleted_at": "date"
    },
    "course_notification": {
        "id": "integer",
        "course_id": "integer",
        "on_course_assignment_checkbox": "boolean",
        "on_course_completion_checkbox": "boolean",
        "on_course_unassignment_checkbox": "boolean",
        "for_course_not_started_notification_afterdays_checkbox": "boolean",
        "for_course_not_started_notification_afterdays": "boolean",
        "for_course_about_to_start_notification_before_days_checkbox": "boolean",
        "for_course_about_to_start_notification_before_days": "boolean",
        "for_certificate_about_to_expire_notification_before_checkbox": "boolean",
        "for_certificate_about_to_expire_notification_before": "boolean",
        "for_expired_course_notification_before_days_checkbox": "boolean",
        "for_expired_course_notification_before_days": "boolean",
        "for_expired_course_notification_after_days_checkbox": "boolean",
        "for_expired_course_notification_after_days": "boolean",
        "created_at": "date",
        "updated_at": "date"
    },
    "folder": [],
    "course_users": [
        {
            "id": "integer",
            "user_id": "integer",
            "course_id": "integer",
            "available_from": "date",
            "available_to": "date",
            "duration_days": "integer",
            "duration_from": "integer",
            "first_access_date": "date",
            "last_access_date": "date",
            "completion_date": "date",
            "status": "string",
            "assigned_date": "date",
            "assigned_by": "integer",
            "score": "integer",
            "certificate_id": "integer",
            "certificate_validity": "string",
            "for_days": "integer",
            "till_date": "date",
            "allow_re_enroll_course": "integer",
            "before_days_to_re_enroll": "intger",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date"
        }
    ]
}

HTTP Request

GET api/user/get-course-details/{id}

URL Parameters

Parameter Status Description
id required The ID of course to fetch

Retrieves certificate of particular course

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/user/certificate/et" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/user/certificate/et"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/user/certificate/et',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/user/certificate/et'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "name": "string",
    "code": "string",
    "description": "string",
    "background_image": "url"
}

HTTP Request

GET api/user/certificate/{course_user_id}

URL Parameters

Parameter Status Description
course_user_id required The ID of assigned course to fetch

Get calender view

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/user/get-calendar-view-detail" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/user/get-calendar-view-detail"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/user/get-calendar-view-detail',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/user/get-calendar-view-detail'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "id": "integer",
    "user_id": "integer",
    "course_id": "integer",
    "duration_days": "integer",
    "duration_from": "string",
    "first_access_date": "date",
    "for_days": "integer",
    "last_access_date": "date",
    "score": "integer",
    "allow_re_enroll_course": "integer",
    "assigned_by": "integer",
    "assigned_date": "date",
    "available_from": "date",
    "available_to": "date",
    "before_days_to_re_enroll": "integer",
    "certificate_id": "integer",
    "certificate_validity": "string",
    "completion_date": "date",
    "status": "string",
    "till_date": "date",
    "created_at": "date",
    "deleted_at": "date",
    "updated_at": "date",
    "course": {
        "id": "integer",
        "parent_course_id": "integer",
        "name": "string",
        "description": "string",
        "thumbnail": "string",
        "type": "string",
        "category_id": "integer",
        "code": "string",
        "credits": "integer",
        "language_id": "integer",
        "material": "string",
        "original_name": "string",
        "status": "string",
        "created_at": "date",
        "created_by": "integer",
        "updated_at": "date",
        "deleted_at": "date",
        "updated_by": "integer"
    },
    "user": {
        "id": "integer",
        "username": "string",
        "first_name": "string",
        "last_name": "string",
        "name": "string",
        "email": "string",
        "email_verified_at": "date",
        "password_updated": "integer",
        "profile_picture": "string",
        "level": "string",
        "status": "integer",
        "language": "string",
        "date_format": "string",
        "timezone": "string",
        "permission_id": "integer",
        "role_id": "integer",
        "expire_on": "date",
        "created_at": "date",
        "updated_at": "date"
    }
}

HTTP Request

GET api/user/get-calendar-view-detail

Group Course Report

APIs for managing Group Course Report

View group course report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/groups-courses?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=%7B%22course%22%3A%7B%22name%22%3A%22string%22%2C%22code%22%3A%22string%22%2C%22type%22%3A%22string%22%2C%22criteria%22%3A%22string%22%2C%22category%22%3A%22string%22%2C%22category_id%22%3A%22integer%22%7D%2C%22group%22%3A%7B%22name%22%3A%22string%22%7D%2C%22criteria%22%3A%22string%22%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/groups-courses"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "{"course":{"name":"string","code":"string","type":"string","criteria":"string","category":"string","category_id":"integer"},"group":{"name":"string"},"criteria":"string"}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/groups-courses',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> '{"course":{"name":"string","code":"string","type":"string","criteria":"string","category":"string","category_id":"integer"},"group":{"name":"string"},"criteria":"string"}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/groups-courses'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': '{"course":{"name":"string","code":"string","type":"string","criteria":"string","category":"string","category_id":"integer"},"group":{"name":"string"},"criteria":"string"}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "group_id": "integer",
            "course_id": "integer",
            "enrolled": "integer",
            "not_started": "integer",
            "in_progress": "integer",
            "completed": "integer",
            "not_completed": "integer",
            "group": {
                "id": "integer",
                "name": "string",
                "description": "string",
                "branch_id": "integer",
                "role_id": "integer",
                "additional_field_id": "integer",
                "assignment_type": "string",
                "apply_existing_user": "string",
                "criteria": "string",
                "user_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "group_members": "integer"
            },
            "course": {
                "id": "integer",
                "parent_course_id": "integer",
                "name": "string",
                "type": "string",
                "description": "string",
                "thumbnail": "string",
                "code": "string",
                "credits": "integer",
                "material": "string",
                "original_name": "string",
                "language_id": "integer",
                "status": "string",
                "category_id": "integer",
                "created_by": "integer",
                "updated_by": "date",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date",
                "language": {
                    "id": "integer",
                    "code": "string",
                    "text": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "course_name": "new Course"
            }
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/reports/groups-courses

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the groups name and courses name,code Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result. example: {"course":{"course":{"name":"string","code":"string","type":"string","criteria":"string","category":"string","category_id":"integer"},"group":{"name":"string"},"criteria":"string"}.

Download group course report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/groups-courses/csv" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/groups-courses/csv"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/groups-courses/csv',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/groups-courses/csv'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "group_id": "integer",
            "course_id": "integer",
            "enrolled": "integer",
            "not_started": "integer",
            "in_progress": "integer",
            "completed": "integer",
            "not_completed": "integer",
            "group": {
                "id": "integer",
                "name": "string",
                "description": "string",
                "branch_id": "integer",
                "role_id": "integer",
                "additional_field_id": "integer",
                "assignment_type": "string",
                "apply_existing_user": "string",
                "criteria": "string",
                "user_id": "integer",
                "created_at": "date",
                "updated_at": "date",
                "group_members": "integer"
            },
            "course": {
                "id": "integer",
                "parent_course_id": "integer",
                "name": "string",
                "type": "string",
                "description": "string",
                "thumbnail": "string",
                "code": "string",
                "credits": "integer",
                "material": "string",
                "original_name": "string",
                "language_id": "integer",
                "status": "string",
                "category_id": "integer",
                "created_by": "integer",
                "updated_by": "date",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date",
                "language": {
                    "id": "integer",
                    "code": "string",
                    "text": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "course_name": "new Course"
            }
        }
    ]
}

HTTP Request

GET api/reports/groups-courses/csv

Roles

APIs for managing roles

View assigned user to particular role

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/view-users/neque" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/view-users/neque"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/view-users/neque',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/view-users/neque'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "name": "string",
            "created_at": "date",
            "updated_at": "date",
            "users": [
                {
                    "id": "integer",
                    "username": "string",
                    "first_name": "string",
                    "last_name": "string",
                    "name": "string",
                    "email": "string",
                    "email_verified_at": "date",
                    "password_updated": "integer",
                    "profile_picture": "string",
                    "level": "string",
                    "status": "integer",
                    "language": "string",
                    "date_format": "string",
                    "timezone": "string",
                    "permission_id": "integer",
                    "role_id": "integer",
                    "expire_on": "date",
                    "created_at": "date",
                    "updated_at": "date"
                }
            ]
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/view-users/{id}

URL Parameters

Parameter Status Description
id required ID of the role to fetch.

Retrieves all roles

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/roles" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/roles"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/roles',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/roles'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "name": "string",
            "created_at": "date",
            "updated_at": "date"
        }
    ],
    "current_page": "integer",
    "first_page_url": "url",
    "from": "integer",
    "last_page": "integer",
    "last_page_url": "url",
    "next_page_url": "url",
    "path": "url",
    "per_page": "integer",
    "prev_page_url": "url",
    "to": "integer",
    "total": "integer"
}

HTTP Request

GET api/roles

Creates a new role

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/roles" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"langauge":"string","name":"string","description":"string"}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/roles"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "langauge": "string",
    "name": "string",
    "description": "string"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/roles',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'langauge' => 'string',
            'name' => 'string',
            'description' => 'string',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/roles'
payload = {
    "langauge": "string",
    "name": "string",
    "description": "string"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Role created successfully.",
    "status": true
}

HTTP Request

POST api/roles

Body Parameters

Parameter Type Status Description
langauge string required The language of role.
name string required The name of role.
description string required The description of role.

View a role

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/roles/soluta" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/roles/soluta"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/roles/soluta',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/roles/soluta'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

[
    {
        "id": "integer",
        "name": "string",
        "created_at": "date",
        "updated_at": "date"
    }
]

HTTP Request

GET api/roles/{role}

URL Parameters

Parameter Status Description
role required ID of the role to fetch.

Update a role

Example request:

curl -X PUT \
    "https://your_lms_domain_url/v1/api/roles/cumque" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"langauge":"string","name":"string","description":"string"}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/roles/cumque"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "langauge": "string",
    "name": "string",
    "description": "string"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://your_lms_domain_url/v1/api/roles/cumque',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'langauge' => 'string',
            'name' => 'string',
            'description' => 'string',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/roles/cumque'
payload = {
    "langauge": "string",
    "name": "string",
    "description": "string"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Role updatedF successfully.",
    "status": true
}

HTTP Request

PUT api/roles/{role}

PATCH api/roles/{role}

URL Parameters

Parameter Status Description
role required ID of the role to fetch.

Body Parameters

Parameter Type Status Description
langauge string required The language of role.
name string required The name of role.
description string required The description of role.

Delete a role

Example request:

curl -X DELETE \
    "https://your_lms_domain_url/v1/api/roles/omnis" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/roles/omnis"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://your_lms_domain_url/v1/api/roles/omnis',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/roles/omnis'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "Role deleted successfully.",
    "status": true
}

Example response (406):

{
    "message": "Unable to delete role as user exists.",
    "status": true
}

HTTP Request

DELETE api/roles/{role}

URL Parameters

Parameter Status Description
role required ID of the role to fetch.

Training Material

APIs for managing trainig material

Retrieves all Training Materials, filtered on input parameters

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/training-materials?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=qui" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/training-materials"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "qui",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/training-materials',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> 'qui',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/training-materials'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': 'qui',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "parent_training_material_id": "integer",
            "title": "string",
            "description": "string",
            "thumbnail": "string",
            "file": "string",
            "original_name": "string",
            "view_mode_desktop": "string",
            "view_mode_tablet": "string",
            "view_mode_mobile_app": "string",
            "type": "string",
            "created_by": "integer",
            "updated_by": "integer",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "users_count": "integer",
            "training_material_completion_id": "integer",
            "answersheet": "boolean",
            "file_type": "string"
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/training-materials

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the Trainig Material title,description and type. Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result.

User Courses Report

APIs for managing User Courses Report

View user courses report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/user-courses?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=%7B%22course%22%3A%7B%22name%22%3A%22string%22%2C%22code%22%3A%22string%22%2C%22type%22%3A%22string%22%2C%22criteria%22%3A%22string%22%2C%22category%22%3A%22string%22%2C%22category_id%22%3A%22integer%22%7D%2C%22from_completion_date%22%3A%22string%22%2C%22to_completion_date%22%3A%22string%22%2C%22status%22%3A%5Bstring%5D%2C%22from_assigned_date%22%3A%22string%22%2C%22to_assigned_date%22%3A%22string%22%2C%22criteria%22%3A%22string%22%2C%22user.branch_id%22%3A%22integer%22%2C%22user.descendant%22%3A%22enum%280%2C1%29%2C%22user%22%3A%7B%22username%22%3A%22string%22%2C%22level%22%3A%22string%22%2C%22email%22%3A%22string%22%2C%22first_name%22%3A%22string%22%2C%22last_name%22%3A%22string%22%2C%22role_id%22%3A%22integer%22%2C%22language%22%3A%22string%22%2C%22criteria%22%3A%22string%22%7D%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/user-courses"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "{"course":{"name":"string","code":"string","type":"string","criteria":"string","category":"string","category_id":"integer"},"from_completion_date":"string","to_completion_date":"string","status":[string],"from_assigned_date":"string","to_assigned_date":"string","criteria":"string","user.branch_id":"integer","user.descendant":"enum(0,1),"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"}}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/user-courses',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> '{"course":{"name":"string","code":"string","type":"string","criteria":"string","category":"string","category_id":"integer"},"from_completion_date":"string","to_completion_date":"string","status":[string],"from_assigned_date":"string","to_assigned_date":"string","criteria":"string","user.branch_id":"integer","user.descendant":"enum(0,1),"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/user-courses'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': '{"course":{"name":"string","code":"string","type":"string","criteria":"string","category":"string","category_id":"integer"},"from_completion_date":"string","to_completion_date":"string","status":[string],"from_assigned_date":"string","to_assigned_date":"string","criteria":"string","user.branch_id":"integer","user.descendant":"enum(0,1),"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"}}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "inetger",
            "user_id": "integer",
            "course_id": "intger",
            "available_from": "date",
            "available_to": "date",
            "duration_days": "integer",
            "duration_from": "string",
            "first_access_date": "date",
            "last_access_date": "date",
            "completion_date": "date",
            "status": "string",
            "assigned_date": "date",
            "assigned_by": "integer",
            "score": "integer",
            "certificate_id": "integer",
            "certificate_validity": "string",
            "for_days": "integer",
            "till_date": "date",
            "allow_re_enroll_course": "integer",
            "before_days_to_re_enroll": "integer",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "user": {
                "id": "integer",
                "username": "string",
                "first_name": "string",
                "last_name": "string",
                "name": "string",
                "email": "string",
                "email_verified_at": "date",
                "password_updated": "integer",
                "profile_picture": "string",
                "level": "string",
                "status": "integer",
                "language": "string",
                "date_format": "string",
                "timezone": "string",
                "permission_id": "integer",
                "role_id": "integer",
                "expire_on": "date",
                "created_at": "date",
                "updated_at": "date",
                "role": {
                    "id": "integer",
                    "name": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "user_status": "string"
            },
            "course": {
                "id": "integer",
                "parent_course_id": "integer",
                "name": "string",
                "type": "string",
                "description": "string",
                "thumbnail": "string",
                "code": "string",
                "credits": "integer",
                "material": "string",
                "original_name": "string",
                "language_id": "integer",
                "status": "string",
                "category_id": "integer",
                "created_by": "integer",
                "updated_by": "date",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date",
                "course_setting": {
                    "id": "integer",
                    "course_id": "integer",
                    "navigation": "string",
                    "completion": "string",
                    "enrollment": "string",
                    "start_date": "date",
                    "end_date": "date",
                    "duration_days": "integer",
                    "duration_from": "string",
                    "average_hours": "string",
                    "average_minutes": "string",
                    "average_seconds": "string",
                    "certificate_id": "integer",
                    "certificate_validity": "string",
                    "for_days": "integer",
                    "till_date": "date",
                    "allow_re_enroll_course": "integer",
                    "before_days_to_re_enroll": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date"
                },
                "language": {
                    "id": "integer",
                    "code": "string",
                    "text": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "course_name": "string"
            },
            "status_code": "string"
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/reports/user-courses

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the users username,first name,last name and email and courses name,code,description. Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result. example: {"course":{"name":"string","code":"string","type":"string","criteria":"string","category":"string","category_id":"integer"},"from_completion_date":"string","to_completion_date":"string","status":[string],"from_assigned_date":"string","to_assigned_date":"string","criteria":"string","user.branch_id":"integer","user.descendant":"enum(0,1),"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"}}.

Download user courses report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/user-courses/csv" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/user-courses/csv"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/user-courses/csv',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/user-courses/csv'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "inetger",
            "user_id": "integer",
            "course_id": "intger",
            "available_from": "date",
            "available_to": "date",
            "duration_days": "integer",
            "duration_from": "string",
            "first_access_date": "date",
            "last_access_date": "date",
            "completion_date": "date",
            "status": "string",
            "assigned_date": "date",
            "assigned_by": "integer",
            "score": "integer",
            "certificate_id": "integer",
            "certificate_validity": "string",
            "for_days": "integer",
            "till_date": "date",
            "allow_re_enroll_course": "integer",
            "before_days_to_re_enroll": "integer",
            "created_at": "date",
            "updated_at": "date",
            "deleted_at": "date",
            "user": {
                "id": "integer",
                "username": "string",
                "first_name": "string",
                "last_name": "string",
                "name": "string",
                "email": "string",
                "email_verified_at": "date",
                "password_updated": "integer",
                "profile_picture": "string",
                "level": "string",
                "status": "integer",
                "language": "string",
                "date_format": "string",
                "timezone": "string",
                "permission_id": "integer",
                "role_id": "integer",
                "expire_on": "date",
                "created_at": "date",
                "updated_at": "date",
                "role": {
                    "id": "integer",
                    "name": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "user_status": "string"
            },
            "course": {
                "id": "integer",
                "parent_course_id": "integer",
                "name": "string",
                "type": "string",
                "description": "string",
                "thumbnail": "string",
                "code": "string",
                "credits": "integer",
                "material": "string",
                "original_name": "string",
                "language_id": "integer",
                "status": "string",
                "category_id": "integer",
                "created_by": "integer",
                "updated_by": "date",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date",
                "course_setting": {
                    "id": "integer",
                    "course_id": "integer",
                    "navigation": "string",
                    "completion": "string",
                    "enrollment": "string",
                    "start_date": "date",
                    "end_date": "date",
                    "duration_days": "integer",
                    "duration_from": "string",
                    "average_hours": "string",
                    "average_minutes": "string",
                    "average_seconds": "string",
                    "certificate_id": "integer",
                    "certificate_validity": "string",
                    "for_days": "integer",
                    "till_date": "date",
                    "allow_re_enroll_course": "integer",
                    "before_days_to_re_enroll": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date"
                },
                "language": {
                    "id": "integer",
                    "code": "string",
                    "text": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "course_name": "string"
            },
            "status_code": "string"
        }
    ]
}

HTTP Request

GET api/reports/user-courses/csv

User Login Report

APIs for managing User Login Report

View user login report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/user-login?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=%7B%22user%22%3A%7B%22username%22%3A%22string%22%2C%22level%22%3A%22string%22%2C%22email%22%3A%22string%22%2C%22first_name%22%3A%22string%22%2C%22last_name%22%3A%22string%22%2C%22role_id%22%3A%22integer%22%2C%22language%22%3A%22string%22%2C%22criteria%22%3A%22string%22%7D%2C%22from_login_date%22%3A%22string%22%2C%22to_login_date%22%3A%22string%22%2C%22criteria%22%3A%22string%22%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/user-login"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "{"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"},"from_login_date":"string","to_login_date":"string","criteria":"string"}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/user-login',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> '{"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"},"from_login_date":"string","to_login_date":"string","criteria":"string"}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/user-login'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': '{"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"},"from_login_date":"string","to_login_date":"string","criteria":"string"}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "user_id": "integer",
            "created_at": "date",
            "updated_at": "date",
            "user": {
                "id": "integer",
                "username": "string",
                "first_name": "string",
                "last_name": "string",
                "name": "string",
                "email": "string",
                "email_verified_at": "date",
                "password_updated": "integer",
                "profile_picture": "string",
                "level": "string",
                "status": "integer",
                "language": "string",
                "date_format": "string",
                "timezone": "string",
                "permission_id": "integer",
                "role_id": "integer",
                "expire_on": "date",
                "created_at": "date",
                "updated_at": "date",
                "role": {
                    "id": "integer",
                    "name": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "user_status": "string"
            }
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/reports/user-login

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the users username,first name, last name and email. Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result. example: {"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"},"from_login_date":"string","to_login_date":"string","criteria":"string"}.

Download user login report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/user-login/csv" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/user-login/csv"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/user-login/csv',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/user-login/csv'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "user_id": "integer",
            "created_at": "date",
            "updated_at": "date",
            "user": {
                "id": "integer",
                "username": "string",
                "first_name": "string",
                "last_name": "string",
                "name": "string",
                "email": "string",
                "email_verified_at": "date",
                "password_updated": "integer",
                "profile_picture": "string",
                "level": "string",
                "status": "integer",
                "language": "string",
                "date_format": "string",
                "timezone": "string",
                "permission_id": "integer",
                "role_id": "integer",
                "expire_on": "date",
                "created_at": "date",
                "updated_at": "date",
                "role": {
                    "id": "integer",
                    "name": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "user_status": "string"
            }
        }
    ]
}

HTTP Request

GET api/reports/user-login/csv

User Training Material Report

APIs for managing User Training Material Report

View user training material report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/user-learning-object?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=%7B%22user%22%3A%7B%22username%22%3A%22string%22%2C%22level%22%3A%22string%22%2C%22email%22%3A%22string%22%2C%22first_name%22%3A%22string%22%2C%22last_name%22%3A%22string%22%2C%22role_id%22%3A%22integer%22%2C%22language%22%3A%22string%22%2C%22criteria%22%3A%22string%22%7D%2C%22course%22%3A%7B%22name%22%3A%22string%22%2C%22code%22%3A%22string%22%2C%22type%22%3A%22string%22%2C%22criteria%22%3A%22string%22%7D%2C%22training_materials_user%22%3A%7B%22from_completion_date%22%3A%22string%22%2C%22to_completion_date%22%3A%22string%22%2C%22status%22%3A%22string%22%2C%22from_assigned_date%22%3A%22string%22%2C%22to_assigned_date%22%3A%22string%22%7D%2C%22training_material%22%3A%7B%22title%22%3A%22string%22%2C%22type%22%3A%22string%22%7D%2C%22criteria%22%3A%22string%22%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/user-learning-object"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "{"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"},"course":{"name":"string","code":"string","type":"string","criteria":"string"},"training_materials_user":{"from_completion_date":"string","to_completion_date":"string","status":"string","from_assigned_date":"string","to_assigned_date":"string"},"training_material":{"title":"string","type":"string"},"criteria":"string"}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/user-learning-object',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> '{"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"},"course":{"name":"string","code":"string","type":"string","criteria":"string"},"training_materials_user":{"from_completion_date":"string","to_completion_date":"string","status":"string","from_assigned_date":"string","to_assigned_date":"string"},"training_material":{"title":"string","type":"string"},"criteria":"string"}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/user-learning-object'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': '{"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"},"course":{"name":"string","code":"string","type":"string","criteria":"string"},"training_materials_user":{"from_completion_date":"string","to_completion_date":"string","status":"string","from_assigned_date":"string","to_assigned_date":"string"},"training_material":{"title":"string","type":"string"},"criteria":"string"}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "user_id": "integer",
            "training_material_id": "integer",
            "checked_for_course_completion": "string",
            "course_id": "integer",
            "assign_date": "date",
            "first_access_date": "date",
            "last_access_date": "date",
            "completion_date": "date",
            "score": "integer",
            "status": "string",
            "attempt": "integer",
            "created_at": "date",
            "user": {
                "id": "integer",
                "username": "string",
                "first_name": "string",
                "last_name": "string",
                "name": "string",
                "email": "string",
                "email_verified_at": "string",
                "password_updated": "integer",
                "profile_picture": "string",
                "level": "string",
                "status": "integer",
                "language": "string",
                "date_format": "string",
                "timezone": "string",
                "permission_id": "integer",
                "role_id": "string",
                "expire_on": "date",
                "created_at": "date",
                "updated_at": "date",
                "role": {
                    "id": "integer",
                    "name": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "user_status": "string"
            },
            "course": {
                "id": "integer",
                "parent_course_id": "integer",
                "name": "string",
                "type": "string",
                "description": "string",
                "thumbnail": "string",
                "code": "string",
                "credits": "integer",
                "material": "string",
                "original_name": "string",
                "language_id": "integer",
                "status": "string",
                "category_id": "integer",
                "created_by": "integer",
                "updated_by": "integer",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date",
                "course_setting": {
                    "id": "integer",
                    "course_id": "integer",
                    "navigation": "string",
                    "completion": "string",
                    "enrollment": "string",
                    "start_date": "date",
                    "end_date": "string",
                    "duration_days": "integer",
                    "duration_from": "string",
                    "average_hours": "string",
                    "average_minutes": "string",
                    "average_seconds": "string",
                    "certificate_id": "integer",
                    "certificate_validity": "string",
                    "for_days": "integer",
                    "till_date": "date",
                    "allow_re_enroll_course": "integer",
                    "before_days_to_re_enroll": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date"
                },
                "language": {
                    "id": "integer",
                    "code": "string",
                    "text": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "course_name": "string"
            },
            "training_material": {
                "id": "integer",
                "parent_training_material_id": "integer",
                "title": "string",
                "description": "string",
                "thumbnail": "string",
                "file": "string",
                "original_name": "string",
                "view_mode_desktop": "string",
                "view_mode_tablet": "string",
                "view_mode_mobile_app": "string",
                "type": "string",
                "created_by": "integer",
                "updated_by": "integer",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date",
                "file_type": "string"
            }
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/reports/user-learning-object

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the users username,first name, last name and email and courses name and code and tarining material title. Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result. example: {"user":{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","role_id":"integer","language":"string","criteria":"string"},"course":{"name":"string","code":"string","type":"string","criteria":"string"},"training_materials_user":{"from_completion_date":"string","to_completion_date":"string","status":"string","from_assigned_date":"string","to_assigned_date":"string"},"training_material":{"title":"string","type":"string"},"criteria":"string"}.

Download user training material report

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/reports/user-learning-object/csv" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/reports/user-learning-object/csv"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/reports/user-learning-object/csv',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/reports/user-learning-object/csv'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "user_id": "integer",
            "training_material_id": "integer",
            "checked_for_course_completion": "string",
            "course_id": "integer",
            "assign_date": "date",
            "first_access_date": "date",
            "last_access_date": "date",
            "completion_date": "date",
            "score": "integer",
            "status": "string",
            "attempt": "integer",
            "created_at": "date",
            "user": {
                "id": "integer",
                "username": "string",
                "first_name": "string",
                "last_name": "string",
                "name": "string",
                "email": "string",
                "email_verified_at": "string",
                "password_updated": "integer",
                "profile_picture": "string",
                "level": "string",
                "status": "integer",
                "language": "string",
                "date_format": "string",
                "timezone": "string",
                "permission_id": "integer",
                "role_id": "string",
                "expire_on": "date",
                "created_at": "date",
                "updated_at": "date",
                "role": {
                    "id": "integer",
                    "name": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "user_status": "string"
            },
            "course": {
                "id": "integer",
                "parent_course_id": "integer",
                "name": "string",
                "type": "string",
                "description": "string",
                "thumbnail": "string",
                "code": "string",
                "credits": "integer",
                "material": "string",
                "original_name": "string",
                "language_id": "integer",
                "status": "string",
                "category_id": "integer",
                "created_by": "integer",
                "updated_by": "integer",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date",
                "course_setting": {
                    "id": "integer",
                    "course_id": "integer",
                    "navigation": "string",
                    "completion": "string",
                    "enrollment": "string",
                    "start_date": "date",
                    "end_date": "string",
                    "duration_days": "integer",
                    "duration_from": "string",
                    "average_hours": "string",
                    "average_minutes": "string",
                    "average_seconds": "string",
                    "certificate_id": "integer",
                    "certificate_validity": "string",
                    "for_days": "integer",
                    "till_date": "date",
                    "allow_re_enroll_course": "integer",
                    "before_days_to_re_enroll": "integer",
                    "created_at": "date",
                    "updated_at": "date",
                    "deleted_at": "date"
                },
                "language": {
                    "id": "integer",
                    "code": "string",
                    "text": "string",
                    "created_at": "date",
                    "updated_at": "date"
                },
                "course_name": "string"
            },
            "training_material": {
                "id": "integer",
                "parent_training_material_id": "integer",
                "title": "string",
                "description": "string",
                "thumbnail": "string",
                "file": "string",
                "original_name": "string",
                "view_mode_desktop": "string",
                "view_mode_tablet": "string",
                "view_mode_mobile_app": "string",
                "type": "string",
                "created_by": "integer",
                "updated_by": "integer",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date",
                "file_type": "string"
            }
        }
    ]
}

HTTP Request

GET api/reports/user-learning-object/csv

Users

APIs for managing users

Upload users via CSV

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/users/upload" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"users":"molestiae"}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/users/upload"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": "molestiae"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/users/upload',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'users' => 'molestiae',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users/upload'
payload = {
    "users": "molestiae"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "message": "OK"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "message": "(number) out of (number) Users added successfully.",
    "status": true
}

Example response (200):

{
    "message": "(number) out of (number) Users added successfully. Download error file link",
    "status": false,
    "url": "url"
}

Example response (200):

{
    "message": "The User must be a file of type: CSV",
    "status": true
}

HTTP Request

POST api/users/upload

Body Parameters

Parameter Type Status Description
users binary required csv file of users

Download sample file to upload users

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/users/sample" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/users/sample"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/users/sample',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users/sample'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

{
    "message": "OK"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "Username": "string",
    "Level": "string",
    "First Name": "string",
    "Last Name": "string",
    "Password": "string",
    "Role": "string",
    "Language": "string",
    "Branch Code": "string"
}

HTTP Request

GET api/users/sample

Change status of a user

Example request:

curl -X PUT \
    "https://your_lms_domain_url/v1/api/activate/qui" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/activate/qui"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://your_lms_domain_url/v1/api/activate/qui',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/activate/qui'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers)
response.json()

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (200):

{
    "message": "Status updated successfully.",
    "status": true
}

Example response (404):

{
    "message": "No query results for model [App\\User] ID"
}

HTTP Request

PUT api/activate/{id}

URL Parameters

Parameter Status Description
id required ID of the user to fetch.

Retrieves all users, filtered on input parameters

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/users?sort_dir=string&sort_name=string&pageNumber=integer&filter=string&size=integer&advanced_filter=%7B%22branch_id%22%3A%221%22%2C%22descendant%22%3A%221%22%7D" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/users"
);

let params = {
    "sort_dir": "string",
    "sort_name": "string",
    "pageNumber": "integer",
    "filter": "string",
    "size": "integer",
    "advanced_filter": "{"branch_id":"1","descendant":"1"}",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/users',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_dir'=> 'string',
            'sort_name'=> 'string',
            'pageNumber'=> 'integer',
            'filter'=> 'string',
            'size'=> 'integer',
            'advanced_filter'=> '{"branch_id":"1","descendant":"1"}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users'
params = {
  'sort_dir': 'string',
  'sort_name': 'string',
  'pageNumber': 'integer',
  'filter': 'string',
  'size': 'integer',
  'advanced_filter': '{"branch_id":"1","descendant":"1"}',
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (500):

{
    "message": "Internal server error"
}

Example response (403):

{
    "message": "You are not authorized"
}

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (200):

{
    "data": [
        {
            "id": "integer",
            "username": "string",
            "first_name": "string",
            "last_name": "string",
            "name": "string",
            "email": "string",
            "email_verified_at": "date",
            "password_updated": "integer",
            "profile_picture": "string",
            "level": "string",
            "status": "enum(0,1)",
            "language": "string",
            "date_format": "string",
            "timezone": "string",
            "permission_id": "integer",
            "role_id": "integer",
            "expire_on": "date",
            "created_at": "date",
            "updated_at": "date",
            "permission": {
                "id": "integer",
                "name": "string",
                "permissions": "string",
                "created_at": "date",
                "updated_at": "date",
                "deleted_at": "date"
            },
            "role": "string",
            "branches": "array",
            "user_status": "string"
        }
    ],
    "links": {
        "first": "url",
        "last": "url",
        "prev": "url",
        "next": "url"
    },
    "meta": {
        "current_page": "integer",
        "from": "integer",
        "last_page": "integer",
        "path": "url",
        "per_page": "integer",
        "to": "integer",
        "total": "integer"
    }
}

HTTP Request

GET api/users

Query Parameters

Parameter Status Description
sort_dir optional Sorting Direction: asc = Ascending, desc = descending, default - desc.
sort_name optional Sort by this field, default value - id.
pageNumber optional Page to return, default 1.
filter optional Search text in the users username,first name,last name and email. Default empty array. OR is performed across array items.
size optional Maximum number of results per page.
advanced_filter optional Additional optional filters to be applied over the returned result. example: advanced_filter:{"branch_id": id of branch,"descendant":value: 0 or 1}.

Creates a new user

Example request:

curl -X POST \
    "https://your_lms_domain_url/v1/api/users" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","password":"string","role_id":0,"language":"string","branch_id":0,"status":"enum(0,1)"}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/users"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "string",
    "level": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "password": "string",
    "role_id": 0,
    "language": "string",
    "branch_id": 0,
    "status": "enum(0,1)"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://your_lms_domain_url/v1/api/users',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'username' => 'string',
            'level' => 'string',
            'email' => 'string',
            'first_name' => 'string',
            'last_name' => 'string',
            'password' => 'string',
            'role_id' => 0,
            'language' => 'string',
            'branch_id' => 0,
            'status' => 'enum(0,1)',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users'
payload = {
    "username": "string",
    "level": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "password": "string",
    "role_id": 0,
    "language": "string",
    "branch_id": 0,
    "status": "enum(0,1)"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (201):

{
    "message": "User created successfully.",
    "status": true
}

Example response (422):

{
    "message": "The given data was invalid.",
    "errors": {
        "branch_id": [
            "The branch id field is required."
        ],
        "username": [
            "The Username field is required.",
            "The Username has already been taken.",
            "Username cannot contain space."
        ],
        "level": [
            "The Level field is required."
        ],
        "first_name": [
            "The First Name field is required."
        ],
        "last_name": [
            "The Last Name field is required."
        ],
        "password": [
            "The Password field is required.",
            "The Password must be at least 8 characters."
        ],
        "email": [
            "The Email has already been taken.",
            "FThe Email must be a valid email address."
        ],
        "language": [
            "The Language field is required."
        ]
    }
}

HTTP Request

POST api/users

Body Parameters

Parameter Type Status Description
username string required The username of user.
level string required The level of the user.
email string optional The email of the user.
first_name string required The first name of the user.
last_name string required The last name of the user.
password string required The password of the user.
role_id integer optional The role id to manage role of user.
language string required The language of the user.
branch_id integer required The branch id of branch.
status enum optional The user status .

View a user

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/users/nesciunt" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/users/nesciunt"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/users/nesciunt',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users/nesciunt'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (200):

{
    "id": "integer",
    "username": "string",
    "first_name": "string",
    "last_name": "string",
    "name": "string",
    "email": "string",
    "email_verified_at": "date",
    "password_updated": "integer",
    "profile_picture": "string",
    "level": "string",
    "status": "enum(0,1)",
    "language": "string",
    "date_format": "string",
    "timezone": "string",
    "permission_id": "integer",
    "role_id": "integer",
    "expire_on": "date",
    "created_at": "date",
    "updated_at": "date",
    "branches": [
        {
            "id": "integer",
            "name": "string",
            "branch_code": "string",
            "branch_id": "integer",
            "created_at": "date",
            "updated_at": "date",
            "pivot": {
                "user_id": "integer",
                "branch_id": "integer"
            }
        }
    ],
    "role": "string"
}

Example response (404):

{
    "message": "No query results for model [App\\User] ID"
}

HTTP Request

GET api/users/{user}

URL Parameters

Parameter Status Description
user required ID of the user to fetch.

Update a user

Example request:

curl -X PUT \
    "https://your_lms_domain_url/v1/api/users/nesciunt" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"username":"string","level":"string","email":"string","first_name":"string","last_name":"string","password":"string","role_id":0,"language":"string","branch_id":0,"status":"enum(0,1)"}'
const url = new URL(
    "https://your_lms_domain_url/v1/api/users/nesciunt"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "string",
    "level": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "password": "string",
    "role_id": 0,
    "language": "string",
    "branch_id": 0,
    "status": "enum(0,1)"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://your_lms_domain_url/v1/api/users/nesciunt',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'username' => 'string',
            'level' => 'string',
            'email' => 'string',
            'first_name' => 'string',
            'last_name' => 'string',
            'password' => 'string',
            'role_id' => 0,
            'language' => 'string',
            'branch_id' => 0,
            'status' => 'enum(0,1)',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users/nesciunt'
payload = {
    "username": "string",
    "level": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "password": "string",
    "role_id": 0,
    "language": "string",
    "branch_id": 0,
    "status": "enum(0,1)"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (201):

{
    "message": "User updated successfully.",
    "status": true
}

Example response (422):

{
    "message": "The given data was invalid.",
    "errors": {
        "branch_id": [
            "The branch id field is required."
        ],
        "username": [
            "The Username field is required.",
            "The Username has already been taken.",
            "Username cannot contain space."
        ],
        "level": [
            "The Level field is required."
        ],
        "first_name": [
            "The First Name field is required."
        ],
        "last_name": [
            "The Last Name field is required."
        ],
        "password": [
            "The Password field is required.",
            "The Password must be at least 8 characters."
        ],
        "email": [
            "The Email has already been taken.",
            "FThe Email must be a valid email address."
        ],
        "language": [
            "The Language field is required."
        ]
    }
}

HTTP Request

PUT api/users/{user}

PATCH api/users/{user}

URL Parameters

Parameter Status Description
user required ID of user to update.

Body Parameters

Parameter Type Status Description
username string required The username of user.
level string required The level of the user.
email string optional The email of the user.
first_name string required The first name of the user.
last_name string required The last name of the user.
password string required The password of the user.
role_id integer optional The role id to manage role of user.
language string required The language of the user.
branch_id integer required The branch id of branch.
status enum optional The user status .

Deletes a user

Example request:

curl -X DELETE \
    "https://your_lms_domain_url/v1/api/users/qui" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/users/qui"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://your_lms_domain_url/v1/api/users/qui',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users/qui'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (401):

{
    "message": "Unauthenticated"
}

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (200):

{
    "message": "User deleted successfully.",
    "status": true
}

Example response (404):

{
    "message": "No query results for model [App\\User] ID"
}

HTTP Request

DELETE api/users/{user}

URL Parameters

Parameter Status Description
user required ID of the user to fetch.

Re-send user creation mail to particular user

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/users/resend-mail/officia" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/users/resend-mail/officia"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/users/resend-mail/officia',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users/resend-mail/officia'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (404):

{
    "message": "No query results for model [App\\User] ID"
}

Example response (200):

{
    "message": "Send",
    "status": true
}

HTTP Request

GET api/users/resend-mail/{id}

URL Parameters

Parameter Status Description
id required ID of the user to fetch.

Proxy login to particular user

Example request:

curl -X GET \
    -G "https://your_lms_domain_url/v1/api/users/proxy-login/inventore" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://your_lms_domain_url/v1/api/users/proxy-login/inventore"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://your_lms_domain_url/v1/api/users/proxy-login/inventore',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://your_lms_domain_url/v1/api/users/proxy-login/inventore'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (400):

{
    "message": "General Error"
}

Example response (500):

{
    "message": "Internal server error"
}

Example response (404):

{
    "message": "No query results for model [App\\User] ID"
}

Example response (401):

{
    "error": "Unauthenticated."
}

HTTP Request

GET api/users/proxy-login/{id}

URL Parameters

Parameter Status Description
id required ID of the user to fetch.