Introduction
List of all API endpoints
Welcome to our API documentation!
Authenticating requests
This API is not authenticated.
Users
You can perform user management tasks like creating, deleting and updating users.
Retrieve Custom User Fields that needs to be shown onthe Registration page
Retrieves the details of pre saved Custom User Fields.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/customRegistrationFields" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/customRegistrationFields"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"fields": [
{
"id": 1,
"type": "text",
"label": "How you left",
"defaultValue": null,
"isRequired": false,
"optionLabel": [],
"isFieldOnRegistrationPage": false,
"isFieldOnCertificate": true,
"includeInReportExports": [
"export-users",
"export-orders"
]
},
{
"id": 2,
"type": "textarea",
"label": "What is your home address",
"defaultValue": null,
"isRequired": true,
"optionLabel": [],
"isFieldOnRegistrationPage": true,
"isFieldOnCertificate": false,
"includeInReportExports": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user/portals
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/portals" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/portals"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 294
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Type
Retrieve all user types
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/userType/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/userType/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "admin",
"display_name": "Admin"
},
{
"db_value": "owner",
"display_name": "Owner"
},
{
"db_value": "staff",
"display_name": "Staff"
},
{
"db_value": "general",
"display_name": "General"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the users in a tabular list format with pagination mode. You can apply filter using search_param via courseCategoryIds(course category ID), courseName
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22courseCategoryIds%22%3A%5B%5D%2C%22courseName%22%3A%22course+1%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"courseCategoryIds":[],"courseName":"course 1"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 4,
"records": [
{
"id": 4,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"user_type": "general",
"display_user_type": "General",
"created_at": "Aug 06, 2020 07:20 AM",
"last_login": "2 days ago"
},
{
"id": 2,
"first_name": "Client",
"last_name": "Admin",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#673AB7\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">CA</text></svg>",
"user_type": "owner",
"display_user_type": "Owner",
"created_at": "Aug 03, 2020 09:31 AM",
"last_login": "Never"
},
{
"id": 3,
"first_name": "Demoss",
"last_name": "Student",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#FF5722\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">DS</text></svg>",
"user_type": "general",
"display_user_type": "General",
"created_at": "Aug 03, 2020 09:31 AM",
"last_login": "5 days ago"
},
{
"id": 1,
"first_name": "Aom",
"last_name": "Staff",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"user_type": "admin",
"display_user_type": "Admin",
"created_at": "Aug 03, 2020 09:31 AM",
"last_login": "1 minute ago"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Type
Retrieve details of users of type Staff
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/getUsersByType?userType=10" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/getUsersByType"
);
const params = {
"userType": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"id": 4,
"name": "John Doe([email protected])"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Lookup
Retrieves all the users. Helps in showing users in forms elements like dropdown.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"full_name": "Aom Staff",
"email": "[email protected]"
},
{
"id": 2,
"full_name": "Client Admin",
"email": "[email protected]"
},
{
"id": 3,
"full_name": "Demoss Student",
"email": "[email protected]"
},
{
"id": 4,
"full_name": "John Doe",
"email": "[email protected]"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create User
To create user, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"firstName\": \"John\",
\"lastName\": \"Doe\",
\"email\": \"[email protected]\",
\"password\": \"somePassword\",
\"password_confirmation\": \"somePassword\"
}"
const url = new URL(
"https://demo.aomlms.com/api/user/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"password": "somePassword",
"password_confirmation": "somePassword"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 11,
"message": "User created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bulk Upload
To create users in bulk, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/bulkUpload" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"userList\": [
{
\"email\": \"[email protected]\",
\"first_name\": \"Fake FName\",
\"last_name\": \"Fake LName\",
\"password\": \"Qwerty@123\"
},
{
\"email\": \"[email protected]\",
\"first_name\": \"Fake FName 2\",
\"last_name\": \"Fake LName 2\",
\"password\": \"\"
}
],
\"selectedCourses\": [
1,
2
],
\"membershipId\": 12,
\"classIds\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/user/bulkUpload"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"userList": [
{
"email": "[email protected]",
"first_name": "Fake FName",
"last_name": "Fake LName",
"password": "Qwerty@123"
},
{
"email": "[email protected]",
"first_name": "Fake FName 2",
"last_name": "Fake LName 2",
"password": ""
}
],
"selectedCourses": [
1,
2
],
"membershipId": 12,
"classIds": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "User(s) uploaded successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Sample file for Bulk Upload
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/getBulkUploadSampleFile" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/getBulkUploadSampleFile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"headers": [
"email",
"first_name",
"last_name",
"password"
],
"records": [
{
"email": "[email protected]",
"first_name": "Fake FName1",
"last_name": "Fake LName1",
"password": "Qwerty@123"
},
{
"email": "[email protected]",
"first_name": "Fake FName2",
"last_name": "Fake LName2",
"password": ""
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User By ID
This endpoint returns the user details based on the ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"lastLoggedIn": "Never",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100\" height=\"100\" viewBox=\"0 0 100 100\"><circle cx=\"50\" cy=\"50\" r=\"50\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"50\" y=\"50\" font-size=\"40\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"disabled": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update User
Updates user details using parameters mentioned.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/user/11" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 9,
\"firstName\": \"John\",
\"lastName\": \"Doe\",
\"email\": \"[email protected]\",
\"lastLoggedIn\": \"Never\",
\"avatar\": \"<svg xmlns=\\\\\\\"http:\\/\\/www.w3.org\\/2000\\/svg\\\\\\\" width=\\\\\\\"100\\\\\\\" height=\\\\\\\"100\\\\\\\" viewBox=\\\\\\\"0 0 100 100\\\\\\\"><circle cx=\\\\\\\"50\\\\\\\" cy=\\\\\\\"50\\\\\\\" r=\\\\\\\"50\\\\\\\" stroke=\\\\\\\"background\\\\\\\" stroke-width=\\\\\\\"0\\\\\\\" fill=\\\\\\\"#E91E63\\\\\\\" \\/><text x=\\\\\\\"50\\\\\\\" y=\\\\\\\"50\\\\\\\" font-size=\\\\\\\"40\\\\\\\" fill=\\\\\\\"#FFFFFF\\\\\\\" alignment-baseline=\\\\\\\"middle\\\\\\\" text-anchor=\\\\\\\"middle\\\\\\\" dominant-baseline=\\\\\\\"central\\\\\\\">AW<\\/text><\\/svg>\",
\"disabled\": false,
\"customUserMetas\": [
\"sed\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/user/11"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 9,
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"lastLoggedIn": "Never",
"avatar": "<svg xmlns=\\\"http:\/\/www.w3.org\/2000\/svg\\\" width=\\\"100\\\" height=\\\"100\\\" viewBox=\\\"0 0 100 100\\\"><circle cx=\\\"50\\\" cy=\\\"50\\\" r=\\\"50\\\" stroke=\\\"background\\\" stroke-width=\\\"0\\\" fill=\\\"#E91E63\\\" \/><text x=\\\"50\\\" y=\\\"50\\\" font-size=\\\"40\\\" fill=\\\"#FFFFFF\\\" alignment-baseline=\\\"middle\\\" text-anchor=\\\"middle\\\" dominant-baseline=\\\"central\\\">AW<\/text><\/svg>",
"disabled": false,
"customUserMetas": [
"sed"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "User updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update User's Membership
Updates user membership plan using parameters mentioned.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/user/11/update-membership" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"membership\": \"{\\\"id\\\":4,\\\"name\\\":\\\"Gold Plan\\\",\\\"expired_at\\\": \\\"2021-10-01 23:00:00\\\"}\"
}"
const url = new URL(
"https://demo.aomlms.com/api/user/11/update-membership"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"membership": "{\"id\":4,\"name\":\"Gold Plan\",\"expired_at\": \"2021-10-01 23:00:00\"}"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "User updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Password
Updates password for the user.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/user/updatePassword/11" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"password\": \"somePassword\",
\"confirmPassword\": \"Doe\",
\"userId\": 11
}"
const url = new URL(
"https://demo.aomlms.com/api/user/updatePassword/11"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"password": "somePassword",
"confirmPassword": "Doe",
"userId": 11
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Password updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled Courses
Retrieves all the courses opted by specified user. You can apply filters using search_param via status(course status)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/enrolled-courses?user_id=4&page_size=10&page_number=1&order_by=registered_on&search_param=%7B%22status%22%3A%5B%22In+Progress%22%2C%22Not+Started%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/enrolled-courses"
);
const params = {
"user_id": "4",
"page_size": "10",
"page_number": "1",
"order_by": "registered_on",
"search_param": "{"status":["In Progress","Not Started"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 6,
"courseId": 1,
"featuredImageUrl": null,
"courseSlug": "http://localhost:8000/course/course-1",
"courseName": "course 1",
"lastAccessed": "Never",
"status": "Not Started",
"display_status": "Not Started",
"accessStatus": "Allowed",
"percentComplete": 0,
"registered_on": "Aug 09, 2020",
"started_on": "",
"completed_on": "",
"expire_on": "Never",
"isExpired": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete User
To delete a user, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
2,
3,
4
]
}"
const url = new URL(
"https://demo.aomlms.com/api/user/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
2,
3,
4
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) not deleted as they has enrollments. Please remove the student(s) from the course and try again."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified user. Parameters is provided which needs to be updated.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_ids\": [
4,
2
],
\"disabled\": false,
\"course_ids\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/user/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_ids": [
4,
2
],
"disabled": false,
"course_ids": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Users updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add Address
To add address for a user, you need to use this request using mentioned parameters.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/1/addAddress" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fullName\": \"John Doe\",
\"addressLine1\": \"Boring Street\",
\"addressLine2\": \"Awesome Colony\",
\"zipcode\": \"123456\",
\"city\": \"Mumbai\",
\"state\": \"NY\",
\"country\": \"US\",
\"isDefault\": false,
\"userId\": 4
}"
const url = new URL(
"https://demo.aomlms.com/api/user/1/addAddress"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fullName": "John Doe",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "NY",
"country": "US",
"isDefault": false,
"userId": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Address added successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Addresses
Retrieves all the addresses which are added by the specified user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/userAddress/4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/userAddress/4"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"isDefault": false,
"fullName": "John Doe",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "MH",
"country": "IN"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Dashboard Stats
Retrieves Dashboard details for specified user. Returned information contains in-progress, notStarted and completed items details as well as time spent details.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/dashboard/statistics?user_id=4&page_size=10&page_number=1&order_by=registered_on&search_param=%7B%22status%22%3A%5B%22In+Progress%22%2C%22Not+Started%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/dashboard/statistics"
);
const params = {
"user_id": "4",
"page_size": "10",
"page_number": "1",
"order_by": "registered_on",
"search_param": "{"status":["In Progress","Not Started"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"notStarted": 1,
"inProgress": 0,
"completed": 0,
"total": 1,
"studentName": "John Doe",
"timeSpent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": 0
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Activities
Returns all activities performed by a specified user. You can apply filter using search_param via courseCategoryIds(course category ID), courseName or status(course status)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-activities?user_id=4&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22courseCategoryIds%22%3A%5B%5D%2C%22courseName%22%3A%22course-1%22%2C%22status%22%3A%22In+Progress%22%7D&context=admin" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-activities"
);
const params = {
"user_id": "4",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"courseCategoryIds":[],"courseName":"course-1","status":"In Progress"}",
"context": "admin",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"name": "John Doe",
"email": "[email protected]",
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 15,
"verb": "ENROLLED",
"created_at": "Aug 09, 2020 10:27 AM",
"message": "John Doe is enrolled to course 1",
"course": "course 1"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Orders
Retrieve order details, purchased by a specified user. Returned data is in pagination form.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-orders?user_id=4&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-orders"
);
const params = {
"user_id": "4",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"recordsTotal": 0,
"recordsFiltered": 0,
"currencySymbol": "$",
"records": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Certificates
Retrieve all certificates earned by the user for every course they pursued/completed.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-certificates/4?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22courseCategoryIds%22%3A%5B%5D%2C%22courseName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-certificates/4"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"courseCategoryIds":[],"courseName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"courseId": 1,
"userId": 3,
"templateId": 1,
"courseName": "course 1",
"coursefeaturedImage": null,
"issueDate": "Aug 03, 2020 10:02 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Certificate
To removes the certificate for a specified user, you need to use this request.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/user/{id}/delete-certificate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/user/{id}/delete-certificate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Certificate Deleted Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Certificate Issue Date
Updates the Issue date of Certificate for a user.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/update-certificate-issue-date" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"rowId\": 1,
\"newIssueDate\": \"2020-08-04 00:00:00\"
}"
const url = new URL(
"https://demo.aomlms.com/api/update-certificate-issue-date"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"rowId": 1,
"newIssueDate": "2020-08-04 00:00:00"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Issue Date Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Default Address
Retrieves the default address for the specified user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/default-address/4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/default-address/4"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"addresstype": null,
"isDefault": true,
"fullName": "John Doe",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "MH",
"country": "IN"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Address
Retrieves the address for the specified user address ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/getaddress/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/getaddress/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"isDefault": false,
"fullName": "John Doe",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "MH",
"country": "IN"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Address
Updates the address for a specified user using UserAddress ID. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/updateAddress/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fullName\": \"John Doe\",
\"addressLine1\": \"Boring Street\",
\"addressLine2\": \"Awesome Colony\",
\"zipcode\": \"123456\",
\"city\": \"Mumbai\",
\"state\": \"NY\",
\"country\": \"US\",
\"isDefault\": false,
\"userId\": 4
}"
const url = new URL(
"https://demo.aomlms.com/api/user/updateAddress/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fullName": "John Doe",
"addressLine1": "Boring Street",
"addressLine2": "Awesome Colony",
"zipcode": "123456",
"city": "Mumbai",
"state": "NY",
"country": "US",
"isDefault": false,
"userId": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Address updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Report
Retrieves detailed report for a specified user. You can apply filter using search_params via course(course ID) and status(course status). (See parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/reports/user-detailed?user_id=4&page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22course%22%3A%221%22%2C%22status%22%3A%5B%22In+Progress%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/reports/user-detailed"
);
const params = {
"user_id": "4",
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"course":"1","status":["In Progress"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalNotStarted": 1,
"totalInProgress": 0,
"totalCompleted": 0,
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"courseName": "course 1",
"status": "Not Started",
"percent_complete": 0,
"access_status": "Allowed",
"registered_on": "Aug 09, 2020",
"started_on": "",
"completed_on": "",
"expire_on": "Never",
"last_accessed_on": "Never",
"total_time_spent": "0h 0m",
"certifcate_issued": "No"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Report With Custom User Data
Retrieves detailed report for all user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/report?page_size=10&page_number=1®istered_between=%7B%22first_name%22%3A%22Aom%22%2C%22last_name%22Staff%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/report"
);
const params = {
"page_size": "10",
"page_number": "1",
"registered_between": "{"first_name":"Aom","last_name"Staff"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalNotStarted": 1,
"totalInProgress": 0,
"totalCompleted": 0,
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"first_name": "Aom",
"last_name": "Staff",
"email": "[email protected]",
"user_type": "General",
"created_at": "Aug 09, 2020",
"last_login": "Oct 09, 2020"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve User Subscription Tabular List
Returns all the user subscriptions created in a tabular list format. You can apply filter using search_param.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-subscriptions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": 4,
\"page_size\": \"10\",
\"page_number\": \"1\",
\"order_by\": \"{\\\"colName\\\":\\\"created_at\\\",\\\"direction\\\":\\\"desc\\\"}\",
\"search_param\": \"Active\"
}"
const url = new URL(
"https://demo.aomlms.com/api/user-subscriptions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 4,
"page_size": "10",
"page_number": "1",
"order_by": "{\"colName\":\"created_at\",\"direction\":\"desc\"}",
"search_param": "Active"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"avatar": 4,
"recordsTotal": 1,
"currencySymbol": "$",
"recordsFiltered": 1,
"name": "Aom Staff",
"email": "[email protected]",
"records": [
{
"id": 3,
"item": "Professional Training and Education",
"status": "Active",
"total": "100",
"created_at": "Aug 10, 2020 12:43 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve List of User Source
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-source" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-source"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"id": 1,
"name": "Excel",
"identifier": "excel",
"description": "Bulk upload user from excel.",
"logoUrl": "https://demo.aomlms.com/images/excel.svg"
},
{
"id": 2,
"name": "Hubspot",
"identifier": "hubspot",
"description": "Bulk import user from hubspot.",
"logoUrl": "https://demo.aomlms.com/images/hubspot.svg"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/user/portal-create
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/portal-create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/portal-create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled Learning Paths
Retrieves all the learning path opted by specified user.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/enrolled-learningpaths" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/enrolled-learningpaths"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 275
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Membership Content
Retrieves all the Membership contents in a tabular list format with pagination mode. You can apply filter using search_param via content-type (course or modules), content name or Description
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/membership/user-contents?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22type%22%3A%5B%27course%27%5D%2C%22nameOrDescription%22%3A%22course+1+description%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/membership/user-contents"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"type":['course'],"nameOrDescription":"course 1 description"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 4,
"records": [
{
"id": 4,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"user_type": "general",
"display_user_type": "General",
"created_at": "Aug 06, 2020 07:20 AM",
"last_login": "2 days ago"
},
{
"id": 2,
"first_name": "Client",
"last_name": "Admin",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#673AB7\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">CA</text></svg>",
"user_type": "owner",
"display_user_type": "Owner",
"created_at": "Aug 03, 2020 09:31 AM",
"last_login": "Never"
},
{
"id": 3,
"first_name": "Demoss",
"last_name": "Student",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#FF5722\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">DS</text></svg>",
"user_type": "general",
"display_user_type": "General",
"created_at": "Aug 03, 2020 09:31 AM",
"last_login": "5 days ago"
},
{
"id": 1,
"first_name": "Aom",
"last_name": "Staff",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"user_type": "admin",
"display_user_type": "Admin",
"created_at": "Aug 03, 2020 09:31 AM",
"last_login": "1 minute ago"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Custom User Field Types Lookup
Retrieves all the type of the custom user fields that platform supports. Helps while showing fields types in form elements like dropdown while creating Custom User Fields. Returns a list of all custom user field types. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/fieldtype/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/fieldtype/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "text",
"display_value": "Text"
},
{
"db_value": "textarea",
"display_value": "Text Area"
},
{
"db_value": "date",
"display_value": "Date"
},
{
"db_value": "radio",
"display_value": "Single Select"
},
{
"db_value": "checkbox",
"display_value": "Multiple Select"
},
{
"db_value": "dropdown",
"display_value": "Drop Down"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Custom User Fields
Retrieves the details of pre saved Custom User Fields.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/customUserFields" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/customUserFields"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"fields": [
{
"id": 1,
"type": "text",
"label": "How you left",
"defaultValue": null,
"isRequired": false,
"optionLabel": [],
"isFieldOnRegistrationPage": false,
"isFieldOnCertificate": true,
"includeInReportExports": [
"export-users",
"export-orders"
]
},
{
"id": 2,
"type": "textarea",
"label": "What is your home address",
"defaultValue": null,
"isRequired": true,
"optionLabel": [],
"isFieldOnRegistrationPage": true,
"isFieldOnCertificate": false,
"includeInReportExports": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Custom User fields
Updates the Custom User Fields. (See parameters) Custom User Fields can be used to collect additional details from the user from registration page and user profile page.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/users/customUserFields" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fields\": [
{
\"type\": \"text\",
\"label\": \"How you left\",
\"defaultValue\": \"\",
\"isRequired\": false,
\"optionLabel\": [],
\"isFieldOnRegistrationPage\": true,
\"isFieldOnCertificate\": true,
\"includeInReportExports\": []
},
{
\"type\": \"date\",
\"label\": \"What is your Date of Birth\",
\"defaultValue\": \"\",
\"isRequired\": false,
\"optionLabel\": [],
\"isFieldOnRegistrationPage\": false,
\"isFieldOnCertificate\": true,
\"includeInReportExports\": []
}
]
}"
const url = new URL(
"https://demo.aomlms.com/api/users/customUserFields"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fields": [
{
"type": "text",
"label": "How you left",
"defaultValue": "",
"isRequired": false,
"optionLabel": [],
"isFieldOnRegistrationPage": true,
"isFieldOnCertificate": true,
"includeInReportExports": []
},
{
"type": "date",
"label": "What is your Date of Birth",
"defaultValue": "",
"isRequired": false,
"optionLabel": [],
"isFieldOnRegistrationPage": false,
"isFieldOnCertificate": true,
"includeInReportExports": []
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Fields updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Custom User Field Reports Lookup
Retrieves all the Reports that can include the Custom User Field as an additional column in its export. Helps while showing report name in form field like dropdown while creating Custom User Fields. Returns a list of reports that supports Custom User Fields. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/customUserFieldsReports/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/customUserFieldsReports/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "export-users",
"display_value": "Export Users"
},
{
"db_value": "course-insight",
"display_value": "Course Insight"
},
{
"db_value": "export-orders",
"display_value": "Export Orders"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Check if the given Custom User Field is eligible for deletion
To delete a custom field, you need to use this request.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/can-delete-field" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fieldToDelete\": \"{\\\"id\\\":2,\\\"type\\\":\\\"text\\\",\\\"displayType\\\":\\\"Text\\\",\\\"label\\\":\\\"Source\\\",\\\"defaultValue\\\":\\\"Enter Source\\\",\\\"isRequired\\\":false,\\\"userMetaKey\\\":\\\"source\\\",\\\"optionLabel\\\":[],\\\"isFieldOnRegistrationPage\\\":false,\\\"isFieldOnCertificate\\\":false,\\\"includeInReportExports\\\":[],\\\"display_order\\\":0,\\\"error\\\":false}\"
}"
const url = new URL(
"https://demo.aomlms.com/api/users/can-delete-field"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fieldToDelete": "{\"id\":2,\"type\":\"text\",\"displayType\":\"Text\",\"label\":\"Source\",\"defaultValue\":\"Enter Source\",\"isRequired\":false,\"userMetaKey\":\"source\",\"optionLabel\":[],\"isFieldOnRegistrationPage\":false,\"isFieldOnCertificate\":false,\"includeInReportExports\":[],\"display_order\":0,\"error\":false}"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"canDeleteField": true,
"message": "",
"certificateTemplates": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update class status of the student
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/update-class-status?id=3&status=Attended&classId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/update-class-status"
);
const params = {
"id": "3",
"status": "Attended",
"classId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Status Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve enrolled class details
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/users/enrolled-classes?user_id=3&page_size=50&page_number=1&search_param=%7B%22course_id%22%3A%22%22%7D&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/users/enrolled-classes"
);
const params = {
"user_id": "3",
"page_size": "50",
"page_number": "1",
"search_param": "{"course_id":""}",
"order_by": "{"colName":"registered_on","direction":"desc"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 6,
"webinarId": null,
"classId": 57,
"title": "test ilt",
"courseId": 34,
"studyMethod": "instructor_led",
"featuredImageUrl": null,
"launchUrl": "https://staging.aomlms.com/class/test-ilt/launch/webinar/NTc=",
"classStudyMaterial": "https://staging.aomlms.com/class/test-ilt/study-material/launch/NTc=",
"status": "Registered",
"display_status": "Registered",
"registered_on": "Jan 04, 2024",
"last_accessed_on": "Never",
"startDate": "11-Jan-2024",
"startTime": "21:00 PM",
"endDate": "31-Jan-2024",
"endTime": "04:00 AM",
"location": "Cherry Hill",
"start": "2024-01-11 21:00:00",
"end": "2024-01-31 04:00:00",
"instructor": "t t",
"class": "orange",
"add_calendar_link": "https://calendar.google.com/calendar/r/eventedit?text=test+ilt&dates=20240111T210000Z%2F20240131T040000Z&details=test+ilt.+For+details%2C+link+here+%3A+https%3A%2F%2Fstaging.aomlms.com"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve enrolled class details
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/class/reports?user_id=3&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22course%22%3A%22%22%2C%22status%22%3A%5B%5D%2C%22started_on%22%3A%5B%5D%2C%22completed_on%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/class/reports"
);
const params = {
"user_id": "3",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"course":"","status":[],"started_on":[],"completed_on":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalAttended": 0,
"totalNoshow": 0,
"totalCancelled": 0,
"totalRegistered": 1,
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"courseName": "test ilt",
"start_time": "11-Jan-2024 21:00 PM",
"end_time": "31-Jan-2024 04:00 AM",
"location": "Cherry Hill",
"status": "Registered",
"display_status": "Registered",
"registered_on": "Jan 04, 2024",
"last_accessed_on": "Never",
"certificate_issued": "No"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve user badges
This endpoint returns the badges gained based on the user ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/badges/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/badges/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "1",
"badgeIconUrl": "/images/badges/Badge_1.png",
"points": 1,
"organizationId": "97852067",
"count": 2
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve leaderboard details
This endpoint returns the leaderboard detials based on the user ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user/leaderboard/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user/leaderboard/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"rankedUsers": [
{
"id": 24,
"rank": 1,
"firstName": "John",
"lastName": "Doe",
"points": "6",
"badgeCount": 2
},
{
"id": 1,
"rank": 2,
"firstName": "Aom",
"lastName": "Staff",
"points": 0,
"badgeCount": 0
}
],
"userTier": "Level 1",
"userRank": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve 2fa
Retrieves two factor authentication details for a specified user. Returned data includes QR code and String code.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-meta/2fa?user_id=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-meta/2fa"
);
const params = {
"user_id": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"as_qr_code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"200\" height=\"200\" viewBox=\"0 0 200 200\"><rect x=\"0\" y=\"0\" width=\"200\" height=\"200\" fill=\"#fefefe\"/><g transform=\"scale(4.444)\"><g transform=\"translate(0,0)\"><path fill-rule=\"evenodd\" d=\"M10 0L10 1L8 1L8 2L9 2L9 3L8 3L8 4L10 4L10 5L8 5L8 7L9 7L9 6L10 6L10 8L6 8L6 9L8 9L8 10L5 10L5 8L0 8L0 9L4 9L4 11L7 11L7 12L5 12L5 13L7 13L7 12L8 12L8 11L9 11L9 14L10 14L10 11L9 11L9 10L10 10L10 8L11 8L11 9L12 9L12 8L11 8L11 6L12 6L12 7L13 7L13 8L14 8L14 7L15 7L15 6L14 6L14 7L13 7L13 6L12 6L12 5L13 5L13 4L12 4L12 2L13 2L13 3L14 3L14 2L16 2L16 3L15 3L15 4L14 4L14 5L15 5L15 4L17 4L17 5L16 5L16 8L18 8L18 9L17 9L17 12L16 12L16 11L15 11L15 10L16 10L16 9L15 9L15 10L14 10L14 9L13 9L13 10L11 10L11 13L12 13L12 12L13 12L13 13L14 13L14 14L13 14L13 15L14 15L14 16L8 16L8 17L10 17L10 18L11 18L11 19L12 19L12 21L14 21L14 22L15 22L15 24L16 24L16 22L15 22L15 21L20 21L20 23L19 23L19 24L20 24L20 25L18 25L18 24L17 24L17 25L18 25L18 26L17 26L17 28L16 28L16 27L15 27L15 26L16 26L16 25L15 25L15 26L14 26L14 25L13 25L13 24L14 24L14 23L13 23L13 24L12 24L12 25L11 25L11 22L9 22L9 21L10 21L10 20L8 20L8 18L6 18L6 17L7 17L7 16L6 16L6 15L7 15L7 14L3 14L3 16L1 16L1 14L2 14L2 13L1 13L1 11L2 11L2 12L3 12L3 10L1 10L1 11L0 11L0 13L1 13L1 14L0 14L0 16L1 16L1 17L0 17L0 20L1 20L1 21L0 21L0 22L1 22L1 23L0 23L0 24L1 24L1 25L4 25L4 26L2 26L2 28L3 28L3 29L2 29L2 30L3 30L3 29L4 29L4 32L5 32L5 33L8 33L8 34L6 34L6 35L8 35L8 36L6 36L6 37L8 37L8 39L9 39L9 40L8 40L8 45L12 45L12 43L11 43L11 42L12 42L12 41L13 41L13 43L14 43L14 44L13 44L13 45L14 45L14 44L15 44L15 45L17 45L17 44L16 44L16 43L14 43L14 41L13 41L13 40L14 40L14 39L12 39L12 38L13 38L13 37L11 37L11 35L12 35L12 36L14 36L14 35L16 35L16 37L14 37L14 38L16 38L16 37L20 37L20 38L19 38L19 40L20 40L20 41L18 41L18 40L17 40L17 41L18 41L18 42L17 42L17 43L18 43L18 42L20 42L20 44L18 44L18 45L20 45L20 44L21 44L21 45L23 45L23 44L24 44L24 45L26 45L26 44L28 44L28 42L34 42L34 43L37 43L37 41L39 41L39 44L38 44L38 45L44 45L44 44L43 44L43 41L42 41L42 40L45 40L45 39L44 39L44 38L45 38L45 36L44 36L44 34L45 34L45 33L44 33L44 34L43 34L43 33L41 33L41 34L39 34L39 33L35 33L35 34L34 34L34 32L35 32L35 31L37 31L37 32L39 32L39 31L38 31L38 30L35 30L35 31L34 31L34 30L33 30L33 29L35 29L35 28L36 28L36 29L38 29L38 28L36 28L36 27L38 27L38 25L42 25L42 26L43 26L43 27L41 27L41 28L39 28L39 30L40 30L40 32L43 32L43 31L44 31L44 32L45 32L45 31L44 31L44 30L45 30L45 27L44 27L44 26L45 26L45 25L44 25L44 22L45 22L45 21L44 21L44 20L43 20L43 19L44 19L44 18L45 18L45 17L44 17L44 16L43 16L43 14L45 14L45 13L43 13L43 11L44 11L44 10L45 10L45 9L44 9L44 8L43 8L43 9L44 9L44 10L42 10L42 8L41 8L41 12L42 12L42 14L39 14L39 15L37 15L37 14L38 14L38 13L37 13L37 12L38 12L38 11L39 11L39 10L40 10L40 8L39 8L39 10L38 10L38 8L37 8L37 6L36 6L36 7L35 7L35 6L34 6L34 5L37 5L37 3L36 3L36 1L37 1L37 0L36 0L36 1L35 1L35 4L32 4L32 3L31 3L31 2L33 2L33 3L34 3L34 2L33 2L33 1L34 1L34 0L32 0L32 1L31 1L31 0L28 0L28 1L26 1L26 0L25 0L25 1L24 1L24 0L23 0L23 3L22 3L22 2L21 2L21 1L22 1L22 0L21 0L21 1L19 1L19 2L18 2L18 0L16 0L16 1L13 1L13 0L12 0L12 1L11 1L11 0ZM28 1L28 2L30 2L30 1ZM10 2L10 4L11 4L11 5L12 5L12 4L11 4L11 2ZM17 2L17 4L18 4L18 6L17 6L17 7L18 7L18 6L19 6L19 7L20 7L20 5L19 5L19 4L20 4L20 3L21 3L21 4L22 4L22 3L21 3L21 2L19 2L19 4L18 4L18 2ZM23 3L23 4L24 4L24 3ZM27 3L27 4L26 4L26 5L27 5L27 7L26 7L26 6L25 6L25 8L27 8L27 9L26 9L26 10L29 10L29 12L27 12L27 11L25 11L25 12L24 12L24 11L20 11L20 12L19 12L19 13L15 13L15 12L14 12L14 11L13 11L13 12L14 12L14 13L15 13L15 15L16 15L16 17L11 17L11 18L13 18L13 19L15 19L15 20L14 20L14 21L15 21L15 20L16 20L16 19L15 19L15 18L16 18L16 17L17 17L17 20L19 20L19 18L21 18L21 19L20 19L20 20L23 20L23 18L24 18L24 16L25 16L25 15L26 15L26 18L25 18L25 19L24 19L24 20L26 20L26 22L28 22L28 23L26 23L26 26L27 26L27 27L26 27L26 28L25 28L25 29L26 29L26 30L25 30L25 33L24 33L24 34L17 34L17 36L18 36L18 35L19 35L19 36L20 36L20 35L22 35L22 36L23 36L23 35L25 35L25 37L26 37L26 38L25 38L25 39L26 39L26 38L28 38L28 39L29 39L29 38L30 38L30 40L26 40L26 42L24 42L24 41L20 41L20 42L24 42L24 44L25 44L25 43L27 43L27 42L28 42L28 41L31 41L31 40L32 40L32 41L34 41L34 42L35 42L35 37L36 37L36 36L39 36L39 34L38 34L38 35L36 35L36 34L35 34L35 36L34 36L34 35L33 35L33 32L34 32L34 31L33 31L33 32L32 32L32 31L30 31L30 30L27 30L27 29L31 29L31 28L32 28L32 29L33 29L33 27L32 27L32 25L33 25L33 26L35 26L35 27L34 27L34 28L35 28L35 27L36 27L36 26L35 26L35 24L36 24L36 23L34 23L34 22L36 22L36 21L34 21L34 20L36 20L36 19L32 19L32 21L31 21L31 22L32 22L32 23L30 23L30 22L29 22L29 20L26 20L26 18L27 18L27 19L28 19L28 17L29 17L29 16L30 16L30 15L31 15L31 16L32 16L32 17L33 17L33 18L35 18L35 17L33 17L33 16L36 16L36 17L37 17L37 16L36 16L36 14L35 14L35 13L36 13L36 11L38 11L38 10L35 10L35 9L37 9L37 8L35 8L35 7L34 7L34 6L33 6L33 7L34 7L34 8L32 8L32 6L31 6L31 5L30 5L30 4L31 4L31 3ZM28 4L28 5L29 5L29 6L28 6L28 8L29 8L29 6L30 6L30 9L29 9L29 10L31 10L31 9L32 9L32 8L31 8L31 6L30 6L30 5L29 5L29 4ZM21 5L21 8L24 8L24 5ZM22 6L22 7L23 7L23 6ZM19 8L19 9L18 9L18 11L19 11L19 9L20 9L20 10L24 10L24 9L20 9L20 8ZM32 10L32 11L33 11L33 12L34 12L34 11L35 11L35 10L34 10L34 11L33 11L33 10ZM30 11L30 12L31 12L31 13L30 13L30 14L28 14L28 13L27 13L27 12L26 12L26 13L25 13L25 14L23 14L23 15L25 15L25 14L26 14L26 15L27 15L27 16L29 16L29 15L30 15L30 14L32 14L32 16L33 16L33 15L34 15L34 14L32 14L32 12L31 12L31 11ZM21 12L21 14L20 14L20 13L19 13L19 14L17 14L17 15L19 15L19 16L18 16L18 18L19 18L19 16L20 16L20 17L23 17L23 16L22 16L22 15L21 15L21 14L22 14L22 13L23 13L23 12ZM26 13L26 14L27 14L27 15L28 15L28 14L27 14L27 13ZM19 14L19 15L20 15L20 16L21 16L21 15L20 15L20 14ZM39 15L39 17L38 17L38 18L39 18L39 20L41 20L41 19L40 19L40 17L41 17L41 18L42 18L42 19L43 19L43 18L42 18L42 17L43 17L43 16L42 16L42 17L41 17L41 16L40 16L40 15ZM5 16L5 17L6 17L6 16ZM2 17L2 21L1 21L1 22L2 22L2 23L1 23L1 24L2 24L2 23L3 23L3 21L4 21L4 20L3 20L3 19L5 19L5 20L7 20L7 19L6 19L6 18L3 18L3 17ZM29 18L29 19L31 19L31 18ZM5 21L5 24L8 24L8 21ZM21 21L21 24L24 24L24 21ZM32 21L32 22L34 22L34 21ZM37 21L37 24L40 24L40 21ZM6 22L6 23L7 23L7 22ZM17 22L17 23L18 23L18 22ZM22 22L22 23L23 23L23 22ZM38 22L38 23L39 23L39 22ZM9 23L9 24L10 24L10 23ZM28 23L28 24L27 24L27 25L28 25L28 24L29 24L29 26L28 26L28 27L27 27L27 28L29 28L29 26L31 26L31 25L32 25L32 24L33 24L33 23L32 23L32 24L31 24L31 25L30 25L30 23ZM42 24L42 25L43 25L43 24ZM6 25L6 26L5 26L5 27L4 27L4 28L5 28L5 27L6 27L6 28L9 28L9 30L8 30L8 29L5 29L5 30L7 30L7 31L5 31L5 32L7 32L7 31L9 31L9 32L8 32L8 33L9 33L9 34L8 34L8 35L9 35L9 34L12 34L12 33L10 33L10 30L11 30L11 29L13 29L13 30L14 30L14 29L16 29L16 31L15 31L15 32L16 32L16 33L13 33L13 34L16 34L16 33L18 33L18 32L17 32L17 31L18 31L18 30L19 30L19 31L20 31L20 30L19 30L19 29L23 29L23 30L24 30L24 29L23 29L23 28L21 28L21 27L23 27L23 26L24 26L24 27L25 27L25 26L24 26L24 25L23 25L23 26L21 26L21 27L20 27L20 26L18 26L18 28L19 28L19 29L16 29L16 28L14 28L14 29L13 29L13 25L12 25L12 26L11 26L11 27L10 27L10 26L9 26L9 25ZM0 26L0 28L1 28L1 26ZM6 26L6 27L8 27L8 26ZM11 27L11 28L12 28L12 27ZM30 27L30 28L31 28L31 27ZM41 28L41 29L40 29L40 30L41 30L41 31L42 31L42 30L41 30L41 29L42 29L42 28ZM43 29L43 30L44 30L44 29ZM0 30L0 31L1 31L1 32L0 32L0 34L2 34L2 33L3 33L3 31L1 31L1 30ZM21 30L21 31L22 31L22 33L23 33L23 31L22 31L22 30ZM26 30L26 31L27 31L27 32L26 32L26 33L27 33L27 32L29 32L29 33L28 33L28 35L27 35L27 34L25 34L25 35L26 35L26 36L27 36L27 37L28 37L28 36L30 36L30 38L32 38L32 39L34 39L34 38L33 38L33 37L34 37L34 36L33 36L33 37L32 37L32 36L30 36L30 35L29 35L29 33L30 33L30 34L32 34L32 32L30 32L30 31L27 31L27 30ZM13 31L13 32L14 32L14 31ZM1 32L1 33L2 33L2 32ZM19 32L19 33L21 33L21 32ZM4 34L4 35L1 35L1 36L0 36L0 37L1 37L1 36L3 36L3 37L5 37L5 34ZM40 35L40 36L41 36L41 35ZM8 36L8 37L9 37L9 36ZM43 36L43 37L41 37L41 40L42 40L42 38L43 38L43 37L44 37L44 36ZM21 37L21 40L24 40L24 37ZM37 37L37 40L40 40L40 37ZM10 38L10 39L11 39L11 40L10 40L10 41L9 41L9 42L11 42L11 41L12 41L12 39L11 39L11 38ZM17 38L17 39L18 39L18 38ZM22 38L22 39L23 39L23 38ZM38 38L38 39L39 39L39 38ZM15 41L15 42L16 42L16 41ZM41 41L41 42L40 42L40 43L42 43L42 41ZM44 42L44 43L45 43L45 42ZM9 43L9 44L11 44L11 43ZM21 43L21 44L23 44L23 43ZM29 43L29 44L30 44L30 45L32 45L32 44L31 44L31 43ZM34 44L34 45L35 45L35 44ZM36 44L36 45L37 45L37 44ZM0 0L0 7L7 7L7 0ZM1 1L1 6L6 6L6 1ZM2 2L2 5L5 5L5 2ZM38 0L38 7L45 7L45 0ZM39 1L39 6L44 6L44 1ZM40 2L40 5L43 5L43 2ZM0 38L0 45L7 45L7 38ZM1 39L1 44L6 44L6 39ZM2 40L2 43L5 43L5 40Z\" fill=\"#000000\"/></g></g></svg>\n",
"as_uri": "otpauth://totp/Laravel%[email protected]?issuer=Laravel&label=john%40aom.com&secret=CREPRUYTMCBSCPEAG2LGKOFYOF25BL4A&algorithm=SHA1&digits=6",
"as_string": "CREPRUYTMCBSCPEAG2LGKOFYOF25BL4A"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Prepare 2fa
To prepares QR code for Two factor authentication, you need to use this request. Returns QR code, URI code and String code for users to authenticate themselves using their authenticator app.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/prepareTwoFactorAuth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": 4
}"
const url = new URL(
"https://demo.aomlms.com/api/user/prepareTwoFactorAuth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"as_qr_code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"200\" height=\"200\" viewBox=\"0 0 200 200\"><rect x=\"0\" y=\"0\" width=\"200\" height=\"200\" fill=\"#fefefe\"/><g transform=\"scale(4.444)\"><g transform=\"translate(0,0)\"><path fill-rule=\"evenodd\" d=\"M10 0L10 1L8 1L8 2L9 2L9 3L8 3L8 4L10 4L10 5L8 5L8 7L9 7L9 6L10 6L10 8L6 8L6 9L8 9L8 10L5 10L5 8L0 8L0 9L4 9L4 11L7 11L7 12L5 12L5 13L7 13L7 12L8 12L8 11L9 11L9 14L10 14L10 11L9 11L9 10L10 10L10 8L11 8L11 9L12 9L12 8L11 8L11 6L12 6L12 7L13 7L13 8L14 8L14 7L15 7L15 6L14 6L14 7L13 7L13 6L12 6L12 5L13 5L13 4L12 4L12 2L13 2L13 3L14 3L14 2L16 2L16 3L15 3L15 4L14 4L14 5L15 5L15 4L17 4L17 5L16 5L16 8L18 8L18 9L17 9L17 12L16 12L16 11L15 11L15 10L16 10L16 9L15 9L15 10L14 10L14 9L13 9L13 10L11 10L11 13L12 13L12 12L13 12L13 13L14 13L14 14L13 14L13 15L14 15L14 16L8 16L8 17L10 17L10 18L11 18L11 19L12 19L12 21L14 21L14 22L15 22L15 24L16 24L16 22L15 22L15 21L20 21L20 23L19 23L19 24L20 24L20 25L18 25L18 24L17 24L17 25L18 25L18 26L17 26L17 28L16 28L16 27L15 27L15 26L16 26L16 25L15 25L15 26L14 26L14 25L13 25L13 24L14 24L14 23L13 23L13 24L12 24L12 25L11 25L11 22L9 22L9 21L10 21L10 20L8 20L8 18L6 18L6 17L7 17L7 16L6 16L6 15L7 15L7 14L3 14L3 16L1 16L1 14L2 14L2 13L1 13L1 11L2 11L2 12L3 12L3 10L1 10L1 11L0 11L0 13L1 13L1 14L0 14L0 16L1 16L1 17L0 17L0 20L1 20L1 21L0 21L0 22L1 22L1 23L0 23L0 24L1 24L1 25L4 25L4 26L2 26L2 28L3 28L3 29L2 29L2 30L3 30L3 29L4 29L4 32L5 32L5 33L8 33L8 34L6 34L6 35L8 35L8 36L6 36L6 37L8 37L8 39L9 39L9 40L8 40L8 45L12 45L12 43L11 43L11 42L12 42L12 41L13 41L13 43L14 43L14 44L13 44L13 45L14 45L14 44L15 44L15 45L17 45L17 44L16 44L16 43L14 43L14 41L13 41L13 40L14 40L14 39L12 39L12 38L13 38L13 37L11 37L11 35L12 35L12 36L14 36L14 35L16 35L16 37L14 37L14 38L16 38L16 37L20 37L20 38L19 38L19 40L20 40L20 41L18 41L18 40L17 40L17 41L18 41L18 42L17 42L17 43L18 43L18 42L20 42L20 44L18 44L18 45L20 45L20 44L21 44L21 45L23 45L23 44L24 44L24 45L26 45L26 44L28 44L28 42L34 42L34 43L37 43L37 41L39 41L39 44L38 44L38 45L44 45L44 44L43 44L43 41L42 41L42 40L45 40L45 39L44 39L44 38L45 38L45 36L44 36L44 34L45 34L45 33L44 33L44 34L43 34L43 33L41 33L41 34L39 34L39 33L35 33L35 34L34 34L34 32L35 32L35 31L37 31L37 32L39 32L39 31L38 31L38 30L35 30L35 31L34 31L34 30L33 30L33 29L35 29L35 28L36 28L36 29L38 29L38 28L36 28L36 27L38 27L38 25L42 25L42 26L43 26L43 27L41 27L41 28L39 28L39 30L40 30L40 32L43 32L43 31L44 31L44 32L45 32L45 31L44 31L44 30L45 30L45 27L44 27L44 26L45 26L45 25L44 25L44 22L45 22L45 21L44 21L44 20L43 20L43 19L44 19L44 18L45 18L45 17L44 17L44 16L43 16L43 14L45 14L45 13L43 13L43 11L44 11L44 10L45 10L45 9L44 9L44 8L43 8L43 9L44 9L44 10L42 10L42 8L41 8L41 12L42 12L42 14L39 14L39 15L37 15L37 14L38 14L38 13L37 13L37 12L38 12L38 11L39 11L39 10L40 10L40 8L39 8L39 10L38 10L38 8L37 8L37 6L36 6L36 7L35 7L35 6L34 6L34 5L37 5L37 3L36 3L36 1L37 1L37 0L36 0L36 1L35 1L35 4L32 4L32 3L31 3L31 2L33 2L33 3L34 3L34 2L33 2L33 1L34 1L34 0L32 0L32 1L31 1L31 0L28 0L28 1L26 1L26 0L25 0L25 1L24 1L24 0L23 0L23 3L22 3L22 2L21 2L21 1L22 1L22 0L21 0L21 1L19 1L19 2L18 2L18 0L16 0L16 1L13 1L13 0L12 0L12 1L11 1L11 0ZM28 1L28 2L30 2L30 1ZM10 2L10 4L11 4L11 5L12 5L12 4L11 4L11 2ZM17 2L17 4L18 4L18 6L17 6L17 7L18 7L18 6L19 6L19 7L20 7L20 5L19 5L19 4L20 4L20 3L21 3L21 4L22 4L22 3L21 3L21 2L19 2L19 4L18 4L18 2ZM23 3L23 4L24 4L24 3ZM27 3L27 4L26 4L26 5L27 5L27 7L26 7L26 6L25 6L25 8L27 8L27 9L26 9L26 10L29 10L29 12L27 12L27 11L25 11L25 12L24 12L24 11L20 11L20 12L19 12L19 13L15 13L15 12L14 12L14 11L13 11L13 12L14 12L14 13L15 13L15 15L16 15L16 17L11 17L11 18L13 18L13 19L15 19L15 20L14 20L14 21L15 21L15 20L16 20L16 19L15 19L15 18L16 18L16 17L17 17L17 20L19 20L19 18L21 18L21 19L20 19L20 20L23 20L23 18L24 18L24 16L25 16L25 15L26 15L26 18L25 18L25 19L24 19L24 20L26 20L26 22L28 22L28 23L26 23L26 26L27 26L27 27L26 27L26 28L25 28L25 29L26 29L26 30L25 30L25 33L24 33L24 34L17 34L17 36L18 36L18 35L19 35L19 36L20 36L20 35L22 35L22 36L23 36L23 35L25 35L25 37L26 37L26 38L25 38L25 39L26 39L26 38L28 38L28 39L29 39L29 38L30 38L30 40L26 40L26 42L24 42L24 41L20 41L20 42L24 42L24 44L25 44L25 43L27 43L27 42L28 42L28 41L31 41L31 40L32 40L32 41L34 41L34 42L35 42L35 37L36 37L36 36L39 36L39 34L38 34L38 35L36 35L36 34L35 34L35 36L34 36L34 35L33 35L33 32L34 32L34 31L33 31L33 32L32 32L32 31L30 31L30 30L27 30L27 29L31 29L31 28L32 28L32 29L33 29L33 27L32 27L32 25L33 25L33 26L35 26L35 27L34 27L34 28L35 28L35 27L36 27L36 26L35 26L35 24L36 24L36 23L34 23L34 22L36 22L36 21L34 21L34 20L36 20L36 19L32 19L32 21L31 21L31 22L32 22L32 23L30 23L30 22L29 22L29 20L26 20L26 18L27 18L27 19L28 19L28 17L29 17L29 16L30 16L30 15L31 15L31 16L32 16L32 17L33 17L33 18L35 18L35 17L33 17L33 16L36 16L36 17L37 17L37 16L36 16L36 14L35 14L35 13L36 13L36 11L38 11L38 10L35 10L35 9L37 9L37 8L35 8L35 7L34 7L34 6L33 6L33 7L34 7L34 8L32 8L32 6L31 6L31 5L30 5L30 4L31 4L31 3ZM28 4L28 5L29 5L29 6L28 6L28 8L29 8L29 6L30 6L30 9L29 9L29 10L31 10L31 9L32 9L32 8L31 8L31 6L30 6L30 5L29 5L29 4ZM21 5L21 8L24 8L24 5ZM22 6L22 7L23 7L23 6ZM19 8L19 9L18 9L18 11L19 11L19 9L20 9L20 10L24 10L24 9L20 9L20 8ZM32 10L32 11L33 11L33 12L34 12L34 11L35 11L35 10L34 10L34 11L33 11L33 10ZM30 11L30 12L31 12L31 13L30 13L30 14L28 14L28 13L27 13L27 12L26 12L26 13L25 13L25 14L23 14L23 15L25 15L25 14L26 14L26 15L27 15L27 16L29 16L29 15L30 15L30 14L32 14L32 16L33 16L33 15L34 15L34 14L32 14L32 12L31 12L31 11ZM21 12L21 14L20 14L20 13L19 13L19 14L17 14L17 15L19 15L19 16L18 16L18 18L19 18L19 16L20 16L20 17L23 17L23 16L22 16L22 15L21 15L21 14L22 14L22 13L23 13L23 12ZM26 13L26 14L27 14L27 15L28 15L28 14L27 14L27 13ZM19 14L19 15L20 15L20 16L21 16L21 15L20 15L20 14ZM39 15L39 17L38 17L38 18L39 18L39 20L41 20L41 19L40 19L40 17L41 17L41 18L42 18L42 19L43 19L43 18L42 18L42 17L43 17L43 16L42 16L42 17L41 17L41 16L40 16L40 15ZM5 16L5 17L6 17L6 16ZM2 17L2 21L1 21L1 22L2 22L2 23L1 23L1 24L2 24L2 23L3 23L3 21L4 21L4 20L3 20L3 19L5 19L5 20L7 20L7 19L6 19L6 18L3 18L3 17ZM29 18L29 19L31 19L31 18ZM5 21L5 24L8 24L8 21ZM21 21L21 24L24 24L24 21ZM32 21L32 22L34 22L34 21ZM37 21L37 24L40 24L40 21ZM6 22L6 23L7 23L7 22ZM17 22L17 23L18 23L18 22ZM22 22L22 23L23 23L23 22ZM38 22L38 23L39 23L39 22ZM9 23L9 24L10 24L10 23ZM28 23L28 24L27 24L27 25L28 25L28 24L29 24L29 26L28 26L28 27L27 27L27 28L29 28L29 26L31 26L31 25L32 25L32 24L33 24L33 23L32 23L32 24L31 24L31 25L30 25L30 23ZM42 24L42 25L43 25L43 24ZM6 25L6 26L5 26L5 27L4 27L4 28L5 28L5 27L6 27L6 28L9 28L9 30L8 30L8 29L5 29L5 30L7 30L7 31L5 31L5 32L7 32L7 31L9 31L9 32L8 32L8 33L9 33L9 34L8 34L8 35L9 35L9 34L12 34L12 33L10 33L10 30L11 30L11 29L13 29L13 30L14 30L14 29L16 29L16 31L15 31L15 32L16 32L16 33L13 33L13 34L16 34L16 33L18 33L18 32L17 32L17 31L18 31L18 30L19 30L19 31L20 31L20 30L19 30L19 29L23 29L23 30L24 30L24 29L23 29L23 28L21 28L21 27L23 27L23 26L24 26L24 27L25 27L25 26L24 26L24 25L23 25L23 26L21 26L21 27L20 27L20 26L18 26L18 28L19 28L19 29L16 29L16 28L14 28L14 29L13 29L13 25L12 25L12 26L11 26L11 27L10 27L10 26L9 26L9 25ZM0 26L0 28L1 28L1 26ZM6 26L6 27L8 27L8 26ZM11 27L11 28L12 28L12 27ZM30 27L30 28L31 28L31 27ZM41 28L41 29L40 29L40 30L41 30L41 31L42 31L42 30L41 30L41 29L42 29L42 28ZM43 29L43 30L44 30L44 29ZM0 30L0 31L1 31L1 32L0 32L0 34L2 34L2 33L3 33L3 31L1 31L1 30ZM21 30L21 31L22 31L22 33L23 33L23 31L22 31L22 30ZM26 30L26 31L27 31L27 32L26 32L26 33L27 33L27 32L29 32L29 33L28 33L28 35L27 35L27 34L25 34L25 35L26 35L26 36L27 36L27 37L28 37L28 36L30 36L30 38L32 38L32 39L34 39L34 38L33 38L33 37L34 37L34 36L33 36L33 37L32 37L32 36L30 36L30 35L29 35L29 33L30 33L30 34L32 34L32 32L30 32L30 31L27 31L27 30ZM13 31L13 32L14 32L14 31ZM1 32L1 33L2 33L2 32ZM19 32L19 33L21 33L21 32ZM4 34L4 35L1 35L1 36L0 36L0 37L1 37L1 36L3 36L3 37L5 37L5 34ZM40 35L40 36L41 36L41 35ZM8 36L8 37L9 37L9 36ZM43 36L43 37L41 37L41 40L42 40L42 38L43 38L43 37L44 37L44 36ZM21 37L21 40L24 40L24 37ZM37 37L37 40L40 40L40 37ZM10 38L10 39L11 39L11 40L10 40L10 41L9 41L9 42L11 42L11 41L12 41L12 39L11 39L11 38ZM17 38L17 39L18 39L18 38ZM22 38L22 39L23 39L23 38ZM38 38L38 39L39 39L39 38ZM15 41L15 42L16 42L16 41ZM41 41L41 42L40 42L40 43L42 43L42 41ZM44 42L44 43L45 43L45 42ZM9 43L9 44L11 44L11 43ZM21 43L21 44L23 44L23 43ZM29 43L29 44L30 44L30 45L32 45L32 44L31 44L31 43ZM34 44L34 45L35 45L35 44ZM36 44L36 45L37 45L37 44ZM0 0L0 7L7 7L7 0ZM1 1L1 6L6 6L6 1ZM2 2L2 5L5 5L5 2ZM38 0L38 7L45 7L45 0ZM39 1L39 6L44 6L44 1ZM40 2L40 5L43 5L43 2ZM0 38L0 45L7 45L7 38ZM1 39L1 44L6 44L6 39ZM2 40L2 43L5 43L5 40Z\" fill=\"#000000\"/></g></g></svg>\n",
"as_uri": "otpauth://totp/Laravel%[email protected]?issuer=Laravel&label=john%40aom.com&secret=CREPRUYTMCBSCPEAG2LGKOFYOF25BL4A&algorithm=SHA1&digits=6",
"as_string": "CREPRUYTMCBSCPEAG2LGKOFYOF25BL4A"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Confirm 2fa
To confirms relation between your AOM site and your authnticator app for 2fa, you need to use this request. User need to provided secret code from authenticator app. It enables Two factor authentication feature in the system for users. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/confirmTwoFactorAuth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": 4,
\"secretCode\": 250987,
\"qrCode\": \"<?xml version=\\\\\\\"1.0\\\\\\\" encoding=\\\\\\\"UTF-8\\\\\\\"?>\\\\n<svg xmlns=\\\\\\\"http:\\\\\\/\\\\\\/www.w3.org\\\\\\/2000\\\\\\/svg\\\\\\\" version=\\\\\\\"1.1\\\\\\\" width=\\\\\\\"200\\\\\\\" height=\\\\\\\"200\\\\\\\" viewBox=\\\\\\\"0 0 200 200\\\\\\\"><rect x=\\\\\\\"0\\\\\\\" y=\\\\\\\"0\\\\\\\" width=\\\\\\\"200\\\\\\\" height=\\\\\\\"200\\\\\\\" fill=\\\\\\\"#fefefe\\\\\\\"\\\\\\/><g transform=\\\\\\\"scale(4.444)\\\\\\\"><g transform=\\\\\\\"translate(0,0)\\\\\\\"><path fill-rule=\\\\\\\"evenodd\\\\\\\" d=\\\\\\\"M10 0L10 1L8 1L8 2L9 2L9 3L8 3L8 4L10 4L10 5L8 5L8 7L9 7L9 6L10 6L10 8L6 8L6 9L8 9L8 10L5 10L5 8L0 8L0 9L4 9L4 11L7 11L7 12L5 12L5 13L7 13L7 12L8 12L8 11L9 11L9 14L10 14L10 11L9 11L9 10L10 10L10 8L11 8L11 9L12 9L12 8L11 8L11 6L12 6L12 7L13 7L13 8L14 8L14 7L15 7L15 6L14 6L14 7L13 7L13 6L12 6L12 5L13 5L13 4L12 4L12 2L13 2L13 3L14 3L14 2L16 2L16 3L15 3L15 4L14 4L14 5L15 5L15 4L17 4L17 5L16 5L16 8L18 8L18 9L17 9L17 12L16 12L16 11L15 11L15 10L16 10L16 9L15 9L15 10L14 10L14 9L13 9L13 10L11 10L11 13L12 13L12 12L13 12L13 13L14 13L14 14L13 14L13 15L14 15L14 16L8 16L8 17L10 17L10 18L11 18L11 19L12 19L12 21L14 21L14 22L15 22L15 24L16 24L16 22L15 22L15 21L20 21L20 23L19 23L19 24L20 24L20 25L18 25L18 24L17 24L17 25L18 25L18 26L17 26L17 28L16 28L16 27L15 27L15 26L16 26L16 25L15 25L15 26L14 26L14 25L13 25L13 24L14 24L14 23L13 23L13 24L12 24L12 25L11 25L11 22L9 22L9 21L10 21L10 20L8 20L8 18L6 18L6 17L7 17L7 16L6 16L6 15L7 15L7 14L3 14L3 16L1 16L1 14L2 14L2 13L1 13L1 11L2 11L2 12L3 12L3 10L1 10L1 11L0 11L0 13L1 13L1 14L0 14L0 16L1 16L1 17L0 17L0 20L1 20L1 21L0 21L0 22L1 22L1 23L0 23L0 24L1 24L1 25L4 25L4 26L2 26L2 28L3 28L3 29L2 29L2 30L3 30L3 29L4 29L4 32L5 32L5 33L8 33L8 34L6 34L6 35L8 35L8 36L6 36L6 37L8 37L8 39L9 39L9 40L8 40L8 45L12 45L12 43L11 43L11 42L12 42L12 41L13 41L13 43L14 43L14 44L13 44L13 45L14 45L14 44L15 44L15 45L17 45L17 44L16 44L16 43L14 43L14 41L13 41L13 40L14 40L14 39L12 39L12 38L13 38L13 37L11 37L11 35L12 35L12 36L14 36L14 35L16 35L16 37L14 37L14 38L16 38L16 37L20 37L20 38L19 38L19 40L20 40L20 41L18 41L18 40L17 40L17 41L18 41L18 42L17 42L17 43L18 43L18 42L20 42L20 44L18 44L18 45L20 45L20 44L21 44L21 45L23 45L23 44L24 44L24 45L26 45L26 44L28 44L28 42L34 42L34 43L37 43L37 41L39 41L39 44L38 44L38 45L44 45L44 44L43 44L43 41L42 41L42 40L45 40L45 39L44 39L44 38L45 38L45 36L44 36L44 34L45 34L45 33L44 33L44 34L43 34L43 33L41 33L41 34L39 34L39 33L35 33L35 34L34 34L34 32L35 32L35 31L37 31L37 32L39 32L39 31L38 31L38 30L35 30L35 31L34 31L34 30L33 30L33 29L35 29L35 28L36 28L36 29L38 29L38 28L36 28L36 27L38 27L38 25L42 25L42 26L43 26L43 27L41 27L41 28L39 28L39 30L40 30L40 32L43 32L43 31L44 31L44 32L45 32L45 31L44 31L44 30L45 30L45 27L44 27L44 26L45 26L45 25L44 25L44 22L45 22L45 21L44 21L44 20L43 20L43 19L44 19L44 18L45 18L45 17L44 17L44 16L43 16L43 14L45 14L45 13L43 13L43 11L44 11L44 10L45 10L45 9L44 9L44 8L43 8L43 9L44 9L44 10L42 10L42 8L41 8L41 12L42 12L42 14L39 14L39 15L37 15L37 14L38 14L38 13L37 13L37 12L38 12L38 11L39 11L39 10L40 10L40 8L39 8L39 10L38 10L38 8L37 8L37 6L36 6L36 7L35 7L35 6L34 6L34 5L37 5L37 3L36 3L36 1L37 1L37 0L36 0L36 1L35 1L35 4L32 4L32 3L31 3L31 2L33 2L33 3L34 3L34 2L33 2L33 1L34 1L34 0L32 0L32 1L31 1L31 0L28 0L28 1L26 1L26 0L25 0L25 1L24 1L24 0L23 0L23 3L22 3L22 2L21 2L21 1L22 1L22 0L21 0L21 1L19 1L19 2L18 2L18 0L16 0L16 1L13 1L13 0L12 0L12 1L11 1L11 0ZM28 1L28 2L30 2L30 1ZM10 2L10 4L11 4L11 5L12 5L12 4L11 4L11 2ZM17 2L17 4L18 4L18 6L17 6L17 7L18 7L18 6L19 6L19 7L20 7L20 5L19 5L19 4L20 4L20 3L21 3L21 4L22 4L22 3L21 3L21 2L19 2L19 4L18 4L18 2ZM23 3L23 4L24 4L24 3ZM27 3L27 4L26 4L26 5L27 5L27 7L26 7L26 6L25 6L25 8L27 8L27 9L26 9L26 10L29 10L29 12L27 12L27 11L25 11L25 12L24 12L24 11L20 11L20 12L19 12L19 13L15 13L15 12L14 12L14 11L13 11L13 12L14 12L14 13L15 13L15 15L16 15L16 17L11 17L11 18L13 18L13 19L15 19L15 20L14 20L14 21L15 21L15 20L16 20L16 19L15 19L15 18L16 18L16 17L17 17L17 20L19 20L19 18L21 18L21 19L20 19L20 20L23 20L23 18L24 18L24 16L25 16L25 15L26 15L26 18L25 18L25 19L24 19L24 20L26 20L26 22L28 22L28 23L26 23L26 26L27 26L27 27L26 27L26 28L25 28L25 29L26 29L26 30L25 30L25 33L24 33L24 34L17 34L17 36L18 36L18 35L19 35L19 36L20 36L20 35L22 35L22 36L23 36L23 35L25 35L25 37L26 37L26 38L25 38L25 39L26 39L26 38L28 38L28 39L29 39L29 38L30 38L30 40L26 40L26 42L24 42L24 41L20 41L20 42L24 42L24 44L25 44L25 43L27 43L27 42L28 42L28 41L31 41L31 40L32 40L32 41L34 41L34 42L35 42L35 37L36 37L36 36L39 36L39 34L38 34L38 35L36 35L36 34L35 34L35 36L34 36L34 35L33 35L33 32L34 32L34 31L33 31L33 32L32 32L32 31L30 31L30 30L27 30L27 29L31 29L31 28L32 28L32 29L33 29L33 27L32 27L32 25L33 25L33 26L35 26L35 27L34 27L34 28L35 28L35 27L36 27L36 26L35 26L35 24L36 24L36 23L34 23L34 22L36 22L36 21L34 21L34 20L36 20L36 19L32 19L32 21L31 21L31 22L32 22L32 23L30 23L30 22L29 22L29 20L26 20L26 18L27 18L27 19L28 19L28 17L29 17L29 16L30 16L30 15L31 15L31 16L32 16L32 17L33 17L33 18L35 18L35 17L33 17L33 16L36 16L36 17L37 17L37 16L36 16L36 14L35 14L35 13L36 13L36 11L38 11L38 10L35 10L35 9L37 9L37 8L35 8L35 7L34 7L34 6L33 6L33 7L34 7L34 8L32 8L32 6L31 6L31 5L30 5L30 4L31 4L31 3ZM28 4L28 5L29 5L29 6L28 6L28 8L29 8L29 6L30 6L30 9L29 9L29 10L31 10L31 9L32 9L32 8L31 8L31 6L30 6L30 5L29 5L29 4ZM21 5L21 8L24 8L24 5ZM22 6L22 7L23 7L23 6ZM19 8L19 9L18 9L18 11L19 11L19 9L20 9L20 10L24 10L24 9L20 9L20 8ZM32 10L32 11L33 11L33 12L34 12L34 11L35 11L35 10L34 10L34 11L33 11L33 10ZM30 11L30 12L31 12L31 13L30 13L30 14L28 14L28 13L27 13L27 12L26 12L26 13L25 13L25 14L23 14L23 15L25 15L25 14L26 14L26 15L27 15L27 16L29 16L29 15L30 15L30 14L32 14L32 16L33 16L33 15L34 15L34 14L32 14L32 12L31 12L31 11ZM21 12L21 14L20 14L20 13L19 13L19 14L17 14L17 15L19 15L19 16L18 16L18 18L19 18L19 16L20 16L20 17L23 17L23 16L22 16L22 15L21 15L21 14L22 14L22 13L23 13L23 12ZM26 13L26 14L27 14L27 15L28 15L28 14L27 14L27 13ZM19 14L19 15L20 15L20 16L21 16L21 15L20 15L20 14ZM39 15L39 17L38 17L38 18L39 18L39 20L41 20L41 19L40 19L40 17L41 17L41 18L42 18L42 19L43 19L43 18L42 18L42 17L43 17L43 16L42 16L42 17L41 17L41 16L40 16L40 15ZM5 16L5 17L6 17L6 16ZM2 17L2 21L1 21L1 22L2 22L2 23L1 23L1 24L2 24L2 23L3 23L3 21L4 21L4 20L3 20L3 19L5 19L5 20L7 20L7 19L6 19L6 18L3 18L3 17ZM29 18L29 19L31 19L31 18ZM5 21L5 24L8 24L8 21ZM21 21L21 24L24 24L24 21ZM32 21L32 22L34 22L34 21ZM37 21L37 24L40 24L40 21ZM6 22L6 23L7 23L7 22ZM17 22L17 23L18 23L18 22ZM22 22L22 23L23 23L23 22ZM38 22L38 23L39 23L39 22ZM9 23L9 24L10 24L10 23ZM28 23L28 24L27 24L27 25L28 25L28 24L29 24L29 26L28 26L28 27L27 27L27 28L29 28L29 26L31 26L31 25L32 25L32 24L33 24L33 23L32 23L32 24L31 24L31 25L30 25L30 23ZM42 24L42 25L43 25L43 24ZM6 25L6 26L5 26L5 27L4 27L4 28L5 28L5 27L6 27L6 28L9 28L9 30L8 30L8 29L5 29L5 30L7 30L7 31L5 31L5 32L7 32L7 31L9 31L9 32L8 32L8 33L9 33L9 34L8 34L8 35L9 35L9 34L12 34L12 33L10 33L10 30L11 30L11 29L13 29L13 30L14 30L14 29L16 29L16 31L15 31L15 32L16 32L16 33L13 33L13 34L16 34L16 33L18 33L18 32L17 32L17 31L18 31L18 30L19 30L19 31L20 31L20 30L19 30L19 29L23 29L23 30L24 30L24 29L23 29L23 28L21 28L21 27L23 27L23 26L24 26L24 27L25 27L25 26L24 26L24 25L23 25L23 26L21 26L21 27L20 27L20 26L18 26L18 28L19 28L19 29L16 29L16 28L14 28L14 29L13 29L13 25L12 25L12 26L11 26L11 27L10 27L10 26L9 26L9 25ZM0 26L0 28L1 28L1 26ZM6 26L6 27L8 27L8 26ZM11 27L11 28L12 28L12 27ZM30 27L30 28L31 28L31 27ZM41 28L41 29L40 29L40 30L41 30L41 31L42 31L42 30L41 30L41 29L42 29L42 28ZM43 29L43 30L44 30L44 29ZM0 30L0 31L1 31L1 32L0 32L0 34L2 34L2 33L3 33L3 31L1 31L1 30ZM21 30L21 31L22 31L22 33L23 33L23 31L22 31L22 30ZM26 30L26 31L27 31L27 32L26 32L26 33L27 33L27 32L29 32L29 33L28 33L28 35L27 35L27 34L25 34L25 35L26 35L26 36L27 36L27 37L28 37L28 36L30 36L30 38L32 38L32 39L34 39L34 38L33 38L33 37L34 37L34 36L33 36L33 37L32 37L32 36L30 36L30 35L29 35L29 33L30 33L30 34L32 34L32 32L30 32L30 31L27 31L27 30ZM13 31L13 32L14 32L14 31ZM1 32L1 33L2 33L2 32ZM19 32L19 33L21 33L21 32ZM4 34L4 35L1 35L1 36L0 36L0 37L1 37L1 36L3 36L3 37L5 37L5 34ZM40 35L40 36L41 36L41 35ZM8 36L8 37L9 37L9 36ZM43 36L43 37L41 37L41 40L42 40L42 38L43 38L43 37L44 37L44 36ZM21 37L21 40L24 40L24 37ZM37 37L37 40L40 40L40 37ZM10 38L10 39L11 39L11 40L10 40L10 41L9 41L9 42L11 42L11 41L12 41L12 39L11 39L11 38ZM17 38L17 39L18 39L18 38ZM22 38L22 39L23 39L23 38ZM38 38L38 39L39 39L39 38ZM15 41L15 42L16 42L16 41ZM41 41L41 42L40 42L40 43L42 43L42 41ZM44 42L44 43L45 43L45 42ZM9 43L9 44L11 44L11 43ZM21 43L21 44L23 44L23 43ZM29 43L29 44L30 44L30 45L32 45L32 44L31 44L31 43ZM34 44L34 45L35 45L35 44ZM36 44L36 45L37 45L37 44ZM0 0L0 7L7 7L7 0ZM1 1L1 6L6 6L6 1ZM2 2L2 5L5 5L5 2ZM38 0L38 7L45 7L45 0ZM39 1L39 6L44 6L44 1ZM40 2L40 5L43 5L43 2ZM0 38L0 45L7 45L7 38ZM1 39L1 44L6 44L6 39ZM2 40L2 43L5 43L5 40Z\\\\\\\" fill=\\\\\\\"#000000\\\\\\\"\\\\\\/><\\\\\\/g><\\\\\\/g><\\\\\\/svg>\\\\n\",
\"stringCode\": \"CREPRUYTMCBSCPEAG2LGKOFYOF25BLR3E\"
}"
const url = new URL(
"https://demo.aomlms.com/api/user/confirmTwoFactorAuth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 4,
"secretCode": 250987,
"qrCode": "<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<svg xmlns=\\\"http:\\\/\\\/www.w3.org\\\/2000\\\/svg\\\" version=\\\"1.1\\\" width=\\\"200\\\" height=\\\"200\\\" viewBox=\\\"0 0 200 200\\\"><rect x=\\\"0\\\" y=\\\"0\\\" width=\\\"200\\\" height=\\\"200\\\" fill=\\\"#fefefe\\\"\\\/><g transform=\\\"scale(4.444)\\\"><g transform=\\\"translate(0,0)\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M10 0L10 1L8 1L8 2L9 2L9 3L8 3L8 4L10 4L10 5L8 5L8 7L9 7L9 6L10 6L10 8L6 8L6 9L8 9L8 10L5 10L5 8L0 8L0 9L4 9L4 11L7 11L7 12L5 12L5 13L7 13L7 12L8 12L8 11L9 11L9 14L10 14L10 11L9 11L9 10L10 10L10 8L11 8L11 9L12 9L12 8L11 8L11 6L12 6L12 7L13 7L13 8L14 8L14 7L15 7L15 6L14 6L14 7L13 7L13 6L12 6L12 5L13 5L13 4L12 4L12 2L13 2L13 3L14 3L14 2L16 2L16 3L15 3L15 4L14 4L14 5L15 5L15 4L17 4L17 5L16 5L16 8L18 8L18 9L17 9L17 12L16 12L16 11L15 11L15 10L16 10L16 9L15 9L15 10L14 10L14 9L13 9L13 10L11 10L11 13L12 13L12 12L13 12L13 13L14 13L14 14L13 14L13 15L14 15L14 16L8 16L8 17L10 17L10 18L11 18L11 19L12 19L12 21L14 21L14 22L15 22L15 24L16 24L16 22L15 22L15 21L20 21L20 23L19 23L19 24L20 24L20 25L18 25L18 24L17 24L17 25L18 25L18 26L17 26L17 28L16 28L16 27L15 27L15 26L16 26L16 25L15 25L15 26L14 26L14 25L13 25L13 24L14 24L14 23L13 23L13 24L12 24L12 25L11 25L11 22L9 22L9 21L10 21L10 20L8 20L8 18L6 18L6 17L7 17L7 16L6 16L6 15L7 15L7 14L3 14L3 16L1 16L1 14L2 14L2 13L1 13L1 11L2 11L2 12L3 12L3 10L1 10L1 11L0 11L0 13L1 13L1 14L0 14L0 16L1 16L1 17L0 17L0 20L1 20L1 21L0 21L0 22L1 22L1 23L0 23L0 24L1 24L1 25L4 25L4 26L2 26L2 28L3 28L3 29L2 29L2 30L3 30L3 29L4 29L4 32L5 32L5 33L8 33L8 34L6 34L6 35L8 35L8 36L6 36L6 37L8 37L8 39L9 39L9 40L8 40L8 45L12 45L12 43L11 43L11 42L12 42L12 41L13 41L13 43L14 43L14 44L13 44L13 45L14 45L14 44L15 44L15 45L17 45L17 44L16 44L16 43L14 43L14 41L13 41L13 40L14 40L14 39L12 39L12 38L13 38L13 37L11 37L11 35L12 35L12 36L14 36L14 35L16 35L16 37L14 37L14 38L16 38L16 37L20 37L20 38L19 38L19 40L20 40L20 41L18 41L18 40L17 40L17 41L18 41L18 42L17 42L17 43L18 43L18 42L20 42L20 44L18 44L18 45L20 45L20 44L21 44L21 45L23 45L23 44L24 44L24 45L26 45L26 44L28 44L28 42L34 42L34 43L37 43L37 41L39 41L39 44L38 44L38 45L44 45L44 44L43 44L43 41L42 41L42 40L45 40L45 39L44 39L44 38L45 38L45 36L44 36L44 34L45 34L45 33L44 33L44 34L43 34L43 33L41 33L41 34L39 34L39 33L35 33L35 34L34 34L34 32L35 32L35 31L37 31L37 32L39 32L39 31L38 31L38 30L35 30L35 31L34 31L34 30L33 30L33 29L35 29L35 28L36 28L36 29L38 29L38 28L36 28L36 27L38 27L38 25L42 25L42 26L43 26L43 27L41 27L41 28L39 28L39 30L40 30L40 32L43 32L43 31L44 31L44 32L45 32L45 31L44 31L44 30L45 30L45 27L44 27L44 26L45 26L45 25L44 25L44 22L45 22L45 21L44 21L44 20L43 20L43 19L44 19L44 18L45 18L45 17L44 17L44 16L43 16L43 14L45 14L45 13L43 13L43 11L44 11L44 10L45 10L45 9L44 9L44 8L43 8L43 9L44 9L44 10L42 10L42 8L41 8L41 12L42 12L42 14L39 14L39 15L37 15L37 14L38 14L38 13L37 13L37 12L38 12L38 11L39 11L39 10L40 10L40 8L39 8L39 10L38 10L38 8L37 8L37 6L36 6L36 7L35 7L35 6L34 6L34 5L37 5L37 3L36 3L36 1L37 1L37 0L36 0L36 1L35 1L35 4L32 4L32 3L31 3L31 2L33 2L33 3L34 3L34 2L33 2L33 1L34 1L34 0L32 0L32 1L31 1L31 0L28 0L28 1L26 1L26 0L25 0L25 1L24 1L24 0L23 0L23 3L22 3L22 2L21 2L21 1L22 1L22 0L21 0L21 1L19 1L19 2L18 2L18 0L16 0L16 1L13 1L13 0L12 0L12 1L11 1L11 0ZM28 1L28 2L30 2L30 1ZM10 2L10 4L11 4L11 5L12 5L12 4L11 4L11 2ZM17 2L17 4L18 4L18 6L17 6L17 7L18 7L18 6L19 6L19 7L20 7L20 5L19 5L19 4L20 4L20 3L21 3L21 4L22 4L22 3L21 3L21 2L19 2L19 4L18 4L18 2ZM23 3L23 4L24 4L24 3ZM27 3L27 4L26 4L26 5L27 5L27 7L26 7L26 6L25 6L25 8L27 8L27 9L26 9L26 10L29 10L29 12L27 12L27 11L25 11L25 12L24 12L24 11L20 11L20 12L19 12L19 13L15 13L15 12L14 12L14 11L13 11L13 12L14 12L14 13L15 13L15 15L16 15L16 17L11 17L11 18L13 18L13 19L15 19L15 20L14 20L14 21L15 21L15 20L16 20L16 19L15 19L15 18L16 18L16 17L17 17L17 20L19 20L19 18L21 18L21 19L20 19L20 20L23 20L23 18L24 18L24 16L25 16L25 15L26 15L26 18L25 18L25 19L24 19L24 20L26 20L26 22L28 22L28 23L26 23L26 26L27 26L27 27L26 27L26 28L25 28L25 29L26 29L26 30L25 30L25 33L24 33L24 34L17 34L17 36L18 36L18 35L19 35L19 36L20 36L20 35L22 35L22 36L23 36L23 35L25 35L25 37L26 37L26 38L25 38L25 39L26 39L26 38L28 38L28 39L29 39L29 38L30 38L30 40L26 40L26 42L24 42L24 41L20 41L20 42L24 42L24 44L25 44L25 43L27 43L27 42L28 42L28 41L31 41L31 40L32 40L32 41L34 41L34 42L35 42L35 37L36 37L36 36L39 36L39 34L38 34L38 35L36 35L36 34L35 34L35 36L34 36L34 35L33 35L33 32L34 32L34 31L33 31L33 32L32 32L32 31L30 31L30 30L27 30L27 29L31 29L31 28L32 28L32 29L33 29L33 27L32 27L32 25L33 25L33 26L35 26L35 27L34 27L34 28L35 28L35 27L36 27L36 26L35 26L35 24L36 24L36 23L34 23L34 22L36 22L36 21L34 21L34 20L36 20L36 19L32 19L32 21L31 21L31 22L32 22L32 23L30 23L30 22L29 22L29 20L26 20L26 18L27 18L27 19L28 19L28 17L29 17L29 16L30 16L30 15L31 15L31 16L32 16L32 17L33 17L33 18L35 18L35 17L33 17L33 16L36 16L36 17L37 17L37 16L36 16L36 14L35 14L35 13L36 13L36 11L38 11L38 10L35 10L35 9L37 9L37 8L35 8L35 7L34 7L34 6L33 6L33 7L34 7L34 8L32 8L32 6L31 6L31 5L30 5L30 4L31 4L31 3ZM28 4L28 5L29 5L29 6L28 6L28 8L29 8L29 6L30 6L30 9L29 9L29 10L31 10L31 9L32 9L32 8L31 8L31 6L30 6L30 5L29 5L29 4ZM21 5L21 8L24 8L24 5ZM22 6L22 7L23 7L23 6ZM19 8L19 9L18 9L18 11L19 11L19 9L20 9L20 10L24 10L24 9L20 9L20 8ZM32 10L32 11L33 11L33 12L34 12L34 11L35 11L35 10L34 10L34 11L33 11L33 10ZM30 11L30 12L31 12L31 13L30 13L30 14L28 14L28 13L27 13L27 12L26 12L26 13L25 13L25 14L23 14L23 15L25 15L25 14L26 14L26 15L27 15L27 16L29 16L29 15L30 15L30 14L32 14L32 16L33 16L33 15L34 15L34 14L32 14L32 12L31 12L31 11ZM21 12L21 14L20 14L20 13L19 13L19 14L17 14L17 15L19 15L19 16L18 16L18 18L19 18L19 16L20 16L20 17L23 17L23 16L22 16L22 15L21 15L21 14L22 14L22 13L23 13L23 12ZM26 13L26 14L27 14L27 15L28 15L28 14L27 14L27 13ZM19 14L19 15L20 15L20 16L21 16L21 15L20 15L20 14ZM39 15L39 17L38 17L38 18L39 18L39 20L41 20L41 19L40 19L40 17L41 17L41 18L42 18L42 19L43 19L43 18L42 18L42 17L43 17L43 16L42 16L42 17L41 17L41 16L40 16L40 15ZM5 16L5 17L6 17L6 16ZM2 17L2 21L1 21L1 22L2 22L2 23L1 23L1 24L2 24L2 23L3 23L3 21L4 21L4 20L3 20L3 19L5 19L5 20L7 20L7 19L6 19L6 18L3 18L3 17ZM29 18L29 19L31 19L31 18ZM5 21L5 24L8 24L8 21ZM21 21L21 24L24 24L24 21ZM32 21L32 22L34 22L34 21ZM37 21L37 24L40 24L40 21ZM6 22L6 23L7 23L7 22ZM17 22L17 23L18 23L18 22ZM22 22L22 23L23 23L23 22ZM38 22L38 23L39 23L39 22ZM9 23L9 24L10 24L10 23ZM28 23L28 24L27 24L27 25L28 25L28 24L29 24L29 26L28 26L28 27L27 27L27 28L29 28L29 26L31 26L31 25L32 25L32 24L33 24L33 23L32 23L32 24L31 24L31 25L30 25L30 23ZM42 24L42 25L43 25L43 24ZM6 25L6 26L5 26L5 27L4 27L4 28L5 28L5 27L6 27L6 28L9 28L9 30L8 30L8 29L5 29L5 30L7 30L7 31L5 31L5 32L7 32L7 31L9 31L9 32L8 32L8 33L9 33L9 34L8 34L8 35L9 35L9 34L12 34L12 33L10 33L10 30L11 30L11 29L13 29L13 30L14 30L14 29L16 29L16 31L15 31L15 32L16 32L16 33L13 33L13 34L16 34L16 33L18 33L18 32L17 32L17 31L18 31L18 30L19 30L19 31L20 31L20 30L19 30L19 29L23 29L23 30L24 30L24 29L23 29L23 28L21 28L21 27L23 27L23 26L24 26L24 27L25 27L25 26L24 26L24 25L23 25L23 26L21 26L21 27L20 27L20 26L18 26L18 28L19 28L19 29L16 29L16 28L14 28L14 29L13 29L13 25L12 25L12 26L11 26L11 27L10 27L10 26L9 26L9 25ZM0 26L0 28L1 28L1 26ZM6 26L6 27L8 27L8 26ZM11 27L11 28L12 28L12 27ZM30 27L30 28L31 28L31 27ZM41 28L41 29L40 29L40 30L41 30L41 31L42 31L42 30L41 30L41 29L42 29L42 28ZM43 29L43 30L44 30L44 29ZM0 30L0 31L1 31L1 32L0 32L0 34L2 34L2 33L3 33L3 31L1 31L1 30ZM21 30L21 31L22 31L22 33L23 33L23 31L22 31L22 30ZM26 30L26 31L27 31L27 32L26 32L26 33L27 33L27 32L29 32L29 33L28 33L28 35L27 35L27 34L25 34L25 35L26 35L26 36L27 36L27 37L28 37L28 36L30 36L30 38L32 38L32 39L34 39L34 38L33 38L33 37L34 37L34 36L33 36L33 37L32 37L32 36L30 36L30 35L29 35L29 33L30 33L30 34L32 34L32 32L30 32L30 31L27 31L27 30ZM13 31L13 32L14 32L14 31ZM1 32L1 33L2 33L2 32ZM19 32L19 33L21 33L21 32ZM4 34L4 35L1 35L1 36L0 36L0 37L1 37L1 36L3 36L3 37L5 37L5 34ZM40 35L40 36L41 36L41 35ZM8 36L8 37L9 37L9 36ZM43 36L43 37L41 37L41 40L42 40L42 38L43 38L43 37L44 37L44 36ZM21 37L21 40L24 40L24 37ZM37 37L37 40L40 40L40 37ZM10 38L10 39L11 39L11 40L10 40L10 41L9 41L9 42L11 42L11 41L12 41L12 39L11 39L11 38ZM17 38L17 39L18 39L18 38ZM22 38L22 39L23 39L23 38ZM38 38L38 39L39 39L39 38ZM15 41L15 42L16 42L16 41ZM41 41L41 42L40 42L40 43L42 43L42 41ZM44 42L44 43L45 43L45 42ZM9 43L9 44L11 44L11 43ZM21 43L21 44L23 44L23 43ZM29 43L29 44L30 44L30 45L32 45L32 44L31 44L31 43ZM34 44L34 45L35 45L35 44ZM36 44L36 45L37 45L37 44ZM0 0L0 7L7 7L7 0ZM1 1L1 6L6 6L6 1ZM2 2L2 5L5 5L5 2ZM38 0L38 7L45 7L45 0ZM39 1L39 6L44 6L44 1ZM40 2L40 5L43 5L43 2ZM0 38L0 45L7 45L7 38ZM1 39L1 44L6 44L6 39ZM2 40L2 43L5 43L5 40Z\\\" fill=\\\"#000000\\\"\\\/><\\\/g><\\\/g><\\\/svg>\\n",
"stringCode": "CREPRUYTMCBSCPEAG2LGKOFYOF25BLR3E"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"message": "Two Factor Authentication activated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Disable 2fa
To disables Two factor authentication feature in system for specified user, you need to use this request. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/user/disableTwoFactorAuth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": 4
}"
const url = new URL(
"https://demo.aomlms.com/api/user/disableTwoFactorAuth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2factor authentication disabled successfully",
"qrcode": null,
"stringcode": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Resend New Account Email
Send New Account Created email again.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/email/resendNewAccountEmail" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"user_id\": 4
}"
const url = new URL(
"https://demo.aomlms.com/api/email/resendNewAccountEmail"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"status": "success",
"message": "New Password is created and New Account Email Sent."
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user-consents/tabularlist
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/user-consents/tabularlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/user-consents/tabularlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 261
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Accredible
It allows users to receive digital credentials
Validate Accredible Key
Validates whether the given key is correct.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/accredible/validate-key/3cc557a91d67378f7fc29fed973e5c94" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/accredible/validate-key/3cc557a91d67378f7fc29fed973e5c94"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Success",
"status": "success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Accredible Groups Lookup
Retrieves all the accredible groups. Helps while showing group names in dropdown elements.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/accredible/group/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/accredible/group/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"isEnabled": true,
"data": [
{
"id": 353767,
"name": "group_aom_course"
},
{
"id": 353282,
"name": "intro-ce"
},
{
"id": 352594,
"name": "aom"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assignments
An Assignment Module is a lesson module used as course content. Helps to perform CRUD operation to and for Assignments modules.
Assignment Modules Tabular List
Returns all the assignment modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/assignment?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/assignment"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 2,
"recordsFiltered": 2,
"records": [
{
"id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"submissionType": "file",
"totalPoints": 50,
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 06:43 AM"
},
{
"id": 2,
"name": "assignment 1",
"slug": "assignment-1",
"type": "assignment",
"submissionType": "text",
"totalPoints": 100,
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"author": "Aom Staff",
"created_at": "Aug 09, 2020 07:25 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Assignment Module
To create a assignment module, you need to use this request. (See parameters) Created assignment modules can be used in the course as course content/lesson.
Returns : id of the assignment created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/assignment" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Essay on LMS\",
\"content\": \"A brief description\",
\"submission_type\": \"file\",
\"totalPoints\": 25,
\"allowed_filetypes\": \"[\\\"image\\\", \\\"pdf\\\"]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/assignment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Essay on LMS",
"content": "A brief description",
"submission_type": "file",
"totalPoints": 25,
"allowed_filetypes": "[\"image\", \"pdf\"]"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 10,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Assignment Module
Updates the details of specified assignment module. (See parameters) Assignment modules can be used in the course as course content.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/assignment/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Essay on LMS\",
\"content\": \"An Updated brief description\",
\"submission_type\": \"file\",
\"totalPoints\": 25,
\"allowed_filetypes\": \"[\\\"image\\\", \\\"pdf\\\"]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/assignment/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Essay on LMS",
"content": "An Updated brief description",
"submission_type": "file",
"totalPoints": 25,
"allowed_filetypes": "[\"image\", \"pdf\"]"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Assignment Modules
Retrieves the details of the specified assignment module. Helps in fetching assignment module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/assignment/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/assignment/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "assignment 1",
"slug": "assignment-1",
"content": "Hola",
"totalPoints": 100,
"submission_type": "text",
"allowed_filetypes": [
""
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Assignment Module Info
Retrieves details of assignment module in depth as well as different modules details that are being used as course content for the same course the current assignment module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/assignment/details?registrationId=1&moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/details"
);
const params = {
"registrationId": "1",
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Essay on LMS",
"slug": "essay-on-lms",
"content": "A brief description",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"totalPoints": 25,
"submissionType": "text",
"maxUploadSize": 5,
"min_time_spent": 0,
"allowedFileTypes": ".",
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "8 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 3
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 7,
"name": "First-quiz",
"slug": "first-quiz",
"type": "quiz",
"icon": "<i class=\"el-icon-discover\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 9,
"name": "My-video-lesson",
"slug": "my-video-lesson",
"type": "video",
"icon": "<i class=\"el-icon-video-play\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 4,
"status": "In Progress",
"started_on": "2020-08-10T20:04:14.000000Z",
"completed_on": null,
"last_accessed_on": "6 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 0,
"no_of_times_accessed": 1
},
{
"module_id": 10,
"name": "Essay on LMS",
"slug": "essay-on-lms",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 5,
"status": "Completed",
"started_on": "2020-08-11T02:47:32.000000Z",
"completed_on": "2020-08-11T02:47:32.000000Z",
"last_accessed_on": "46 seconds ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 100,
"no_of_times_accessed": 1
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "my-video-lesson",
"nextSlug": "",
"status": "Completed",
"statusRowId": 5,
"timeSpent": null,
"prevSubmission": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Assignment Submissions
Retrieves the submissions of the assigment the student have given. Helps in grading a student. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/assignment/submissions?statusRowId=7" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/submissions"
);
const params = {
"statusRowId": "7",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseId": 1,
"courseName": "course 1",
"assignmentName": "assign",
"status": "Submitted",
"content": "Desc",
"totalPoints": 50,
"submissions": [
{
"id": 1,
"file_path": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/assignments/aom-sample-bulkupload_1597042007.csv",
"student_message": null,
"instructor_message": null,
"points_awarded": null,
"evaluated_by": "",
"submitted_on": "Aug 10, 2020",
"evaluated_on": ""
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Submit Assignment
Submits the assignment after attempting all the aspects of the assignment. Updates the status of assignment to submitted if student is finished the assignment and submits. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/assignment/submit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"statusRowId\": \"7\",
\"submission\": \"This is text based assignment submission\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/submit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"statusRowId": "7",
"submission": "This is text based assignment submission"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Assignment submitted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload Assignment File
Helps in upload the assignment file by students. You can use File form to upload a file to the system. (See Parameters) Returns the S3 bucket URL link for the uploaded file.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/assignment/upload" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"file\": \"binary\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/upload"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"file": "binary"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"s3_url": "https://s3.aws.com/wTsycTYRCLKIUVXXIYFYVXBXIXUGIXB"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Evaluate Assignment
Evaluates the assignment from Instructor side.Updates the status of assignment to completed if Instructor thinks student's submission is upto the marks. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/assignment/evaluate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"statusRowId\": \"7\",
\"evaluation\": \"{instructorMessage : \'Assignment looks good\', pointsAwarded: \'50\', isAccepted : true }\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/assignment/evaluate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"statusRowId": "7",
"evaluation": "{instructorMessage : 'Assignment looks good', pointsAwarded: '50', isAccepted : true }"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Assignment evaluated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Audit Logs
It allows you to track the user activity in the LMS.
Tabular List
Retrieves all the audit log activities in a tabular list format with pagination mode. You can apply filter using search_param via user_id, activityName or dates
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/audit-activities?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22performed_by%22%3A%22Aom+Staff%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/audit-activities"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"performed_by":"Aom Staff"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"performed_by": "Aom Staff",
"effect_on": "User",
"subject": "User",
"action": "Created",
"created_at": "Aug 06, 2020 07:20 AM",
"details": []
}
],
"performedOnList": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Audit Activity Lookup
Retrieves all the activity for the user. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/audit-activities/verb/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/audit-activities/verb/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "login",
"display_value": "LOGIN"
},
{
"db_value": "created",
"display_value": "CREATED"
},
{
"db_value": "updated",
"display_value": "UPDATED"
},
{
"db_value": "deleted",
"display_value": "DELETED"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Badge
Endpoints for handling and managing Gamification badges
Retrieve Badge details
Retrieves the details of badges. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/badges/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22title%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badges/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"title":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"title": "1",
"badgeIconUrl": "/images/badges/Badge_1.png",
"points": 1
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Badge
Create a new badge.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/badge/create?title=Gold&points=100&badgeIconUrl=https%3A%2F%2Fapi.example.com%2Fabc.jpg&defaultIconUrl=https%3A%2F%2Fapi.example.com%2Fabc.jpg&organizationId=AOM1234" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badge/create"
);
const params = {
"title": "Gold",
"points": "100",
"badgeIconUrl": "https://api.example.com/abc.jpg",
"defaultIconUrl": "https://api.example.com/abc.jpg",
"organizationId": "AOM1234",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 3,
"message": "Badge created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve default Badges details
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/badges/defaultBadgeLookUp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badges/defaultBadgeLookUp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": "Badge 1",
"url": "/images/badges/Badge_1.png"
},
{
"value": "Badge 2",
"url": "/images/badges/Badge_2.png"
},
{
"value": "Badge 3",
"url": "/images/badges/Badge_3.png"
},
{
"value": "Badge 4",
"url": "/images/badges/Badge_4.png"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve details of specific badge
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/badge/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badge/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"title": "Gold",
"points": 1,
"organizationId": "97852067",
"badgeIconUrl": "/images/badges/Badge_1.png"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Badge
Update the existing badge.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/badge/3?title=Gold&points=100&badgeIconUrl=https%3A%2F%2Fapi.example.com%2Fabc.jpg&defaultIconUrl=https%3A%2F%2Fapi.example.com%2Fabc.jpg&organizationId=AOM1234" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badge/3"
);
const params = {
"title": "Gold",
"points": "100",
"badgeIconUrl": "https://api.example.com/abc.jpg",
"defaultIconUrl": "https://api.example.com/abc.jpg",
"organizationId": "AOM1234",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 3,
"message": "Badge updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete badge
Delete a badge by ID.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/badge/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/badge/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "1 badge(s) deleted. 0 badge(s) not deleted as they are assigned to users. 0 badge(s) not deleted as they are used in gamification events."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Categories
Categories represents Course category, Product category, Question category. Helps performimg operations in all these models.
Product Category Lookup
Retrieves all the categories of the product user has ever created. This request helps in showing all product categories in form elements like dropdown, etc. Returns ID and name of the product category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/product/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/product/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 4,
"name": "Question-cat"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Category Lookup
Retrieves all the categories of the courses user has ever created. This request helps in showing all course categories in form elements like dropdown, etc. Returns ID and name of the course category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/course/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/course/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Category-1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Module category Lookup
Retrieves all the categories of the module user has ever created. This request helps in showing all module categories in form elements like dropdown, etc. Returns ID and name of the module category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/module/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/module/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Category-1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Question Category Lookup
Retrieves all the categories of the question user has ever created. This request helps in showing all question categories in form elements like dropdown, etc. Returns ID and name of the question category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/question/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/question/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 4,
"name": "Question-cat"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Category Lookup
Retrieves all the categories of the user user has ever created. This request helps in showing all user categories in form elements like dropdown, etc. Returns ID and name of the user category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/user/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/user/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 4,
"name": "User-cat"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Category Lookup
Retrieves all the categories of the learning paths ever created. This request helps in showing all learning path categories in form elements like dropdown, etc. Returns ID and name of the learning path category.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/categories/learning-path/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/categories/learning-path/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 4,
"name": "Learning Path-1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Category Tabular List
Returns all the course categories in a tabular list format in paginated mode. You can apply filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coursecategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coursecategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 3,
"records": [
{
"id": 3,
"name": "superman_postman",
"author": "Client Admin",
"count": 0,
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 2,
"name": "category-new",
"author": "Aom Staff",
"count": 0,
"created_at": "Aug 10, 2020 12:37 PM"
},
{
"id": 1,
"name": "Category-1",
"author": "Aom Staff",
"count": 1,
"created_at": "Aug 09, 2020 06:20 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Module Category Tabular List
Returns all the module categories in a tabular list format in paginated mode. You can apply filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modulecategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modulecategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 2,
"recordsFiltered": 1,
"records": [
{
"id": 2,
"name": "module memberships",
"author": "Aom Staff",
"count": 1,
"created_at": "May 10, 2022 03:39 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Category Tabular List
Returns all the product categories in a tabular list format in paginated mode. You can apply filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/productcategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/productcategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 3,
"records": [
{
"id": 3,
"name": "superman_postman",
"author": "Client Admin",
"count": 0,
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 2,
"name": "category-new",
"author": "Aom Staff",
"count": 0,
"created_at": "Aug 10, 2020 12:37 PM"
},
{
"id": 1,
"name": "Category-1",
"author": "Aom Staff",
"count": 1,
"created_at": "Aug 09, 2020 06:20 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Question Category Tabular List
Returns all the question categories in a tabular list format in paginated mode. You can apply filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/questioncategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/questioncategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 1,
"records": [
{
"id": 4,
"name": "Question-cat",
"author": "Aom Staff",
"count": 0,
"created_at": "Aug 10, 2020 01:58 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Category
To create a category, you need to use this request. Provide category name and it will be created. (See parameters) Helps in grouping multiple courses, question and products.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/category/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"category_name\": \"category-new\",
\"categoryType\": \"course\"
}"
const url = new URL(
"https://demo.aomlms.com/api/category/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"category_name": "category-new",
"categoryType": "course"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Category Created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Category
Updates a category using parameters mentioned. (See parameters) Updates the course/question/product category details using category name and category ID.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/category/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"category_name\": \"category-new-updated\"
}"
const url = new URL(
"https://demo.aomlms.com/api/category/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"category_name": "category-new-updated"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Category Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Category
Retrieves category details for specified category ID.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/category/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/category/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 3,
"name": "superman_postman",
"type": "course",
"created_by": 2,
"updated_by": null,
"deleted_by": null,
"created_at": "2020-08-10 12:43:12",
"updated_at": "2020-08-10 12:56:37",
"deleted_at": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Category
To delete a category, you need to use this request. Returns number of category deleted(if multiple selected)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/category/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1
]
}"
const url = new URL(
"https://demo.aomlms.com/api/category/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 category(s) deleted "
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Category Tabular List
Returns all the learning path categories in a tabular list format in paginated mode. You can apply filter using search_param via categoryName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-pathcategory/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22categoryName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-pathcategory/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"categoryName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 3,
"records": [
{
"id": 3,
"name": "superman_postman",
"author": "Client Admin",
"count": 0,
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 2,
"name": "category-new",
"author": "Aom Staff",
"count": 0,
"created_at": "Aug 10, 2020 12:37 PM"
},
{
"id": 1,
"name": "Category-1",
"author": "Aom Staff",
"count": 1,
"created_at": "Aug 09, 2020 06:20 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Certificate Templates
A Certificate template is used to provide to students. Students can achieve this award by completing the course. Helps in performing CRUD operations for and to certificates
Certificates Lookup
Retrieves all the certificate templates. Helps while showing certificate templates in form elements like dropdown. Returns Id and name of the certificate templates. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_templates/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_templates/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "cert 1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Certificate Template Tabular List
Returns all the certificate templates in a tabular list format in paginated mode. You can apply filter using search_param via templateName(certificate template name) and courseId(course Id).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_templates/tabularlist?page_size=50&page_number=tempora&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22templateName%22%3A%22%22%2C%22courseId%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_templates/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "tempora",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"templateName":"","courseId":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "cert 1",
"author": "Aom Staff",
"courses": "course 1, Awesome Course, course 1_copy",
"created_at": "Aug 03, 2020 09:58 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for specified certificate templates. Parameters is provided which needs to be updated. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/certificate_templates/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"template_ids\": [
3,
1
],
\"author_id\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_templates/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"template_ids": [
3,
1
],
"author_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Certificate Templates updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Certificate Template Fields Lookup
Retrieves all the fields name user can add in the certificate templates. Fields like student name, instructor name, course name, etc. Helps showing options in dropdowns elements while creating certificate template.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_template/keysLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/keysLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "student_first_name",
"display_value": "Student First Name"
},
{
"db_value": "student_last_name",
"display_value": "Student Last Name"
},
{
"db_value": "student_full_name",
"display_value": "Student Full Name"
},
{
"db_value": "course_name",
"display_value": "Course Name"
},
{
"db_value": "issue_date",
"display_value": "Date of Issue"
},
{
"db_value": "expiry_date",
"display_value": "Date of Expiry"
},
{
"db_value": "instructor_name",
"display_value": "Instructor Name"
},
{
"db_value": "certificate_code",
"display_value": "Certificate Code"
},
{
"db_value": "course_credit",
"display_value": "Course Credit"
},
{
"db_value": "custom_text",
"display_value": "Custom Text"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Certificate Template Fonts Lookup
Retrieves all the fonts user can add in the certificate templates. Fonts like Arial, Times-Roman, Helvetica, etc. Helps showing options in dropdowns elements while creating certificate template.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_template/fontFamilyLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/fontFamilyLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "Arial",
"display_value": "Arial",
"is_selected": "true"
},
{
"db_value": "Courier",
"display_value": "Courier"
},
{
"db_value": "Times-Roman",
"display_value": "Times-Roman"
},
{
"db_value": "Helvetica",
"display_value": "Helvetica"
},
{
"db_value": "Times-Bold",
"display_value": "Times-Bold"
},
{
"db_value": "Courier-Bold",
"display_value": "Courier-Bold"
},
{
"db_value": "DejaVuSans-Bold",
"display_value": "DejaVuSans-Bold"
},
{
"db_value": "DejaVuSansMono-Bold",
"display_value": "DejaVuSansMono-Bold"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Certificate Template
To create a certificate template, you need to use this request. (See parameters) Created certificate template can be used to assign students when they completed the course.
Returns : id of the certificate template created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/certificate_template" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Completion-Certificate\",
\"bg_url\": \"http:\\/\\/aom.com\\/images\\/default-certificate.png\",
\"height\": 680,
\"width\": 1075,
\"fields\": [
{
\"key\": \"course_name\",
\"value\": \"Course Name\",
\"font_size\": \"20\",
\"align_center\": false,
\"font_family\": \"Arial\",
\"font_color\": \"#222\",
\"top\": 432,
\"left\": 469,
\"width\": 200,
\"height\": 40,
\"show_tools\": false
},
{
\"key\": \"student_first_name\",
\"value\": \"Student First Name\",
\"font_size\": \"20\",
\"align_center\": false,
\"font_family\": \"Arial\",
\"font_color\": \"#222\",
\"top\": 332,
\"left\": 452,
\"width\": 200,
\"height\": 40,
\"show_tools\": false
}
]
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Completion-Certificate",
"bg_url": "http:\/\/aom.com\/images\/default-certificate.png",
"height": 680,
"width": 1075,
"fields": [
{
"key": "course_name",
"value": "Course Name",
"font_size": "20",
"align_center": false,
"font_family": "Arial",
"font_color": "#222",
"top": 432,
"left": 469,
"width": 200,
"height": 40,
"show_tools": false
},
{
"key": "student_first_name",
"value": "Student First Name",
"font_size": "20",
"align_center": false,
"font_family": "Arial",
"font_color": "#222",
"top": 332,
"left": 452,
"width": 200,
"height": 40,
"show_tools": false
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 2,
"message": "Certificate Template created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Certificate Template
Retrieves the details of the specified certificate template. Helps in fetching certificate template using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_template/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "cert 1",
"bg_url": "https://v3.academyofmine.net/wp-content/uploads/2020/07/default-certificate.png",
"height": 827,
"width": 1070,
"fields": [
{
"key": "student_full_name",
"value": "Student Full Name",
"font_size": 20,
"font_family": "Arial",
"font_color": "#222",
"top": 401,
"left": 443,
"align_center": false,
"width": 200,
"height": 60
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Preview Certificate Template
It let users preview certificate by downloading it with demo data. Changes the completion percentage to 100% and mark completed the text module.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/certificate_template/preview/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/preview/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
pdf file as download option
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Certificate Template
Updates the details of a specified certificate template. (See parameters) Certificate template can be used to assign students when they completed the course.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/certificate_template/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Updated-Completion-Certificate\",
\"bg_url\": \"http:\\/\\/aom.com\\/images\\/default-certificate.png\",
\"height\": 780,
\"width\": 1075,
\"fields\": [
{
\"key\": \"course_name\",
\"value\": \"Course Name\",
\"font_size\": \"20\",
\"align_center\": false,
\"font_family\": \"Arial\",
\"font_color\": \"#222\",
\"top\": 432,
\"left\": 469,
\"width\": 200,
\"height\": 40,
\"show_tools\": false
},
{
\"key\": \"student_first_name\",
\"value\": \"Student First Name\",
\"font_size\": \"20\",
\"align_center\": false,
\"font_family\": \"Arial\",
\"font_color\": \"#222\",
\"top\": 332,
\"left\": 452,
\"width\": 200,
\"height\": 40,
\"show_tools\": false
}
]
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Updated-Completion-Certificate",
"bg_url": "http:\/\/aom.com\/images\/default-certificate.png",
"height": 780,
"width": 1075,
"fields": [
{
"key": "course_name",
"value": "Course Name",
"font_size": "20",
"align_center": false,
"font_family": "Arial",
"font_color": "#222",
"top": 432,
"left": 469,
"width": 200,
"height": 40,
"show_tools": false
},
{
"key": "student_first_name",
"value": "Student First Name",
"font_size": "20",
"align_center": false,
"font_family": "Arial",
"font_color": "#222",
"top": 332,
"left": 452,
"width": 200,
"height": 40,
"show_tools": false
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 2,
"message": "Certificate Template created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Certificate Template
To delete a certificate template, you need to use this request. Returns number of certificate template deleted(if multiple selected) and also not deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/certificate_template/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/certificate_template/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 template(s) deleted 1 template(s) not deleted as it is used in course. Please remove the template(s) from the course and try again."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Discount Coupons
A Coupon is used by the students to reduce ther price by some discount, provided by the Instructor. It helps for adding/updating/editing discount coupons applied on products.
Coupons Tabular List
Returns all the coupons in a tabular list format in paginated mode. You can apply filter using search_param via code(coupon code).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coupons/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22code%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coupons/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"code":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"code": "code75",
"type": "percent_amount",
"value": 1500,
"total_limit": 12,
"expired_at": "Aug 26, 2020"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Coupon Lookup
Retrieves all the coupons. Helps while showing coupons in form elements like dropdown. You can apply filters using search_term(coupons) parameter. (See Parameter)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coupons/lookup?search_term=aut" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coupons/lookup"
);
const params = {
"search_term": "aut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"code": "code75"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Coupon Types Lookup
Retrieves all types of the coupons. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coupons/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coupons/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "fixed_amount",
"display_value": "Fixed cart discount"
},
{
"db_value": "percent_amount",
"display_value": "Percentage Discount"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Coupon
To create a coupon, you need to use this request. (See parameters) Created coupons can be used by the students to get some discount while purchasing the course.
Returns : id of the coupon created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/coupon/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"code\": \"code75\",
\"notes\": \"Discount upto 75%\",
\"value\": \"1500\",
\"type\": \"percent_amount\",
\"usage_limit\": 1200,
\"expiry\": \"2020-08-26\",
\"allowed_emails\": \"null\"
}"
const url = new URL(
"https://demo.aomlms.com/api/coupon/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"code": "code75",
"notes": "Discount upto 75%",
"value": "1500",
"type": "percent_amount",
"usage_limit": 1200,
"expiry": "2020-08-26",
"allowed_emails": "null"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Coupon created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Coupon
Retrieves the details of the specified coupon. Helps in fetching coupon using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/coupon/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/coupon/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"code": "code75",
"type": "percent_amount",
"value": 1500,
"usage_limit": 12,
"expiry": "2020-08-26",
"allowed_emails": null,
"note_privacy": null,
"notes": "Discount upto 75%",
"allowed_products": [],
"excluded_products": [],
"allowed_product_categories": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Coupon
Updates the details of a specified coupon. (See parameters) Coupons can be used by the students to get some discount while purchasing the course.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/coupon/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"code\": \"code75\",
\"notes\": \"Discount upto 75%\",
\"value\": \"1500\",
\"type\": \"percent_amount\",
\"usage_limit\": 2000,
\"expiry\": \"2020-08-26\",
\"allowed_emails\": \"null\"
}"
const url = new URL(
"https://demo.aomlms.com/api/coupon/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"code": "code75",
"notes": "Discount upto 75%",
"value": "1500",
"type": "percent_amount",
"usage_limit": 2000,
"expiry": "2020-08-26",
"allowed_emails": "null"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Coupon updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Coupon
To delete a coupon, you need to use this request. Returns number of coupons deleted(if multiple selected) and also not deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/coupon/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/coupon/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 coupon(s) deleted 1 coupon(s) not deleted as they are associated with orders"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Discussions
A Discussion module is used as course content and a platform where students can have discussions. Helps to perform CRUD operation to and for discussion modules.
Discussion modules Tabular List
Returns all the discussion modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/discussion?page_size=50&page_number=tenetur&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/discussion"
);
const params = {
"page_size": "50",
"page_number": "tenetur",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 13,
"name": "First-discussion",
"slug": "first-discussion",
"type": "discussion",
"totalPoints": 20,
"icon": "<i class=\"el-icon-chat-line-round\"></i>",
"author": "Aom Staff",
"created_at": "Aug 11, 2020 05:25 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Discussion Module
To create a discussion module, you need to use this request. (See parameters) Created discussion modules can be used in the course as course content/lesson.
Returns : id of the discussion created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/discussion" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"First-discussion\",
\"content\": \"A brief description\",
\"should_be_evaluated\": true,
\"totalPoints\": 20,
\"minComments\": 3
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/discussion"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "First-discussion",
"content": "A brief description",
"should_be_evaluated": true,
"totalPoints": 20,
"minComments": 3
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 13,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Discussion Module
Update the details of specified discussion module. (See Response) Discussion modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/discussion/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"First-discussion\",
\"content\": \"An updatedbrief description\",
\"should_be_evaluated\": true,
\"totalPoints\": 20,
\"minComments\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/discussion/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "First-discussion",
"content": "An updatedbrief description",
"should_be_evaluated": true,
"totalPoints": 20,
"minComments": 5
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Discussion modules
Retrieves the details of the specified discussion module. Helps in fetching discussion module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/discussion/13" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/discussion/13"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "First-discussion",
"slug": "first-discussion",
"content": "A Brief Description",
"totalPoints": 20,
"should_be_evaluated": true,
"minComments": 3
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Discussion Module Info
Retrieves details of discussion module in depth as well as different modules details that are being used as course content for the same course the current discussion module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/discussion/details?registrationId=1&moduleId=13" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/details"
);
const params = {
"registrationId": "1",
"moduleId": "13",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "First-discussion",
"slug": "first-discussion",
"content": "A Brief Description",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"url": null,
"totalPoints": 20,
"shouldBeEvaluated": true,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "11 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 3
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 7,
"name": "First-quiz",
"slug": "first-quiz",
"type": "quiz",
"icon": "<i class=\"el-icon-discover\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 9,
"name": "My-video-lesson",
"slug": "my-video-lesson",
"type": "video",
"icon": "<i class=\"el-icon-video-play\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 4,
"status": "In Progress",
"started_on": "2020-08-10T20:04:14.000000Z",
"completed_on": null,
"last_accessed_on": "9 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 0,
"no_of_times_accessed": 1
},
{
"module_id": 10,
"name": "Essay on LMS",
"slug": "essay-on-lms",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 5,
"status": "Completed",
"started_on": "2020-08-11T02:47:32.000000Z",
"completed_on": "2020-08-11T02:47:32.000000Z",
"last_accessed_on": "2 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 100,
"no_of_times_accessed": 2
},
{
"module_id": 12,
"name": "New-Webinar",
"slug": "new-webinar",
"type": "webinar",
"icon": "<i class=\"el-icon-date\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 13,
"name": "First-discussion",
"slug": "first-discussion",
"type": "discussion",
"icon": "<i class=\"el-icon-chat-line-round\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "new-webinar",
"nextSlug": "",
"currentUserId": 3,
"currentStudentAvatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#4CAF50\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">DS</text></svg>",
"currentUserName": "Demo Student",
"status": "In Progress",
"statusRowId": 6,
"timeSpent": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Comments
Retrieves the comments posted by students in the disussion. Helps in showing all the comments student have posted in the specified discussion in one place. (See Response) You can apply filters using search_param via nameOrEmail(student email or name) and registrationId(student course registration id)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/discussion/loadComments?page_size=50&page_number=expedita&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22registrationId%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/loadComments"
);
const params = {
"page_size": "50",
"page_number": "expedita",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"nameOrEmail":"","registrationId":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"comment": "My first comment",
"userAvatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"userFullName": "Aom Staff",
"date": "Aug 11, 2020 05:56 AM",
"replies": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Post Comment
Posts a comment in a discussion. Updates the status of discussion to submitted if student has posted minimum numner of posts for the discussion per user.. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/discussion/postComment" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"statusRowId\": 4,
\"currentUserId\": 1,
\"comment\": \"My first comment\",
\"parentId\": 4
}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/postComment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"statusRowId": 4,
"currentUserId": 1,
"comment": "My first comment",
"parentId": 4
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "In Progress",
"message": "Comment Posted"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Discussion Submission Details
Retrieves the submission details of the duscussion the student have taken participation. Helps to get discussion and its submission in one place. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/discussion/submissions?statusRowId=7" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/submissions"
);
const params = {
"statusRowId": "7",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseId": 1,
"courseName": "course 1",
"discussionName": "First-discussion",
"status": "In Progress",
"content": "A Brief Description",
"totalPoints": 20,
"userAvatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"userFullName": "Aom Staff",
"comments": [
{
"id": 1,
"comment": "My first comment",
"date": "Aug 11, 2020 05:56 AM"
}
],
"replies": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Evaluate Discussion
Evaluates the discussion from Instructor side. Updates the status of discussion to completed if Instructor thinks student's submission is upto the marks. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/discussion/evaluate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"statusRowId\": \"7\",
\"evaluation\": \"{instructorMessage : \'You comments look good\', pointsAwarded: \'50\' }\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/evaluate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"statusRowId": "7",
"evaluation": "{instructorMessage : 'You comments look good', pointsAwarded: '50' }"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Discussion evaluated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/module/discussion/comments
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/discussion/comments" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/comments"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 277
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/module/discussion/deleteComments
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/discussion/deleteComments" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/discussion/deleteComments"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ECommerce
Endpoints for managing ecommerce settings. Getting and setting items status and values for the platform and the products.
Retrieve Ecommerce Global Product Settings
Retrieves the details of Ecommerce Global Product Settings. (See parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/global" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"freeProductCta\": \"Enroll Now\",
\"simpleProductCta\": \"Add to Cart\",
\"subscriptionProductCta\": \"Subscribe\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/global"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"freeProductCta": "Enroll Now",
"simpleProductCta": "Add to Cart",
"subscriptionProductCta": "Subscribe"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Country Lookup
Retrieves all the countries in list format. Helps while showing countries in form elements like dropdown.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/countries/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/countries/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"AF": "Afghanistan",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
"AG": "Antigua and Barbuda",
"AR": "Argentina",
"AM": "Armenia",
"AW": "Aruba",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbaijan",
"BS": "Bahamas",
"BH": "Bahrain",
"BD": "Bangladesh",
"BB": "Barbados",
"BY": "Belarus",
"BE": "Belgium",
"PW": "Belau",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhutan",
"BO": "Bolivia",
"BQ": "Bonaire, Saint Eustatius and Saba",
"BA": "Bosnia and Herzegovina",
"BW": "Botswana",
"BV": "Bouvet Island",
"BR": "Brazil",
"IO": "British Indian Ocean Territory",
"BN": "Brunei",
"BG": "Bulgaria",
"BF": "Burkina Faso",
"BI": "Burundi",
"KH": "Cambodia",
"CM": "Cameroon",
"CA": "Canada",
"CV": "Cape Verde",
"KY": "Cayman Islands",
"CF": "Central African Republic",
"TD": "Chad",
"CL": "Chile",
"CN": "China",
"CX": "Christmas Island",
"CC": "Cocos (Keeling) Islands",
"CO": "Colombia",
"KM": "Comoros",
"CG": "Congo (Brazzaville)",
"CD": "Congo (Kinshasa)",
"CK": "Cook Islands",
"CR": "Costa Rica",
"HR": "Croatia",
"CU": "Cuba",
"CW": "Curaçao",
"CY": "Cyprus",
"CZ": "Czech Republic",
"DK": "Denmark",
"DJ": "Djibouti",
"DM": "Dominica",
"DO": "Dominican Republic",
"EC": "Ecuador",
"EG": "Egypt",
"SV": "El Salvador",
"GQ": "Equatorial Guinea",
"ER": "Eritrea",
"EE": "Estonia",
"ET": "Ethiopia",
"FK": "Falkland Islands",
"FO": "Faroe Islands",
"FJ": "Fiji",
"FI": "Finland",
"FR": "France",
"GF": "French Guiana",
"PF": "French Polynesia",
"TF": "French Southern Territories",
"GA": "Gabon",
"GM": "Gambia",
"GE": "Georgia",
"DE": "Germany",
"GH": "Ghana",
"GI": "Gibraltar",
"GR": "Greece",
"GL": "Greenland",
"GD": "Grenada",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HM": "Heard Island and McDonald Islands",
"HN": "Honduras",
"HK": "Hong Kong",
"HU": "Hungary",
"IS": "Iceland",
"IN": "India",
"ID": "Indonesia",
"IR": "Iran",
"IQ": "Iraq",
"IE": "Ireland",
"IM": "Isle of Man",
"IL": "Israel",
"IT": "Italy",
"CI": "Ivory Coast",
"JM": "Jamaica",
"JP": "Japan",
"JE": "Jersey",
"JO": "Jordan",
"KZ": "Kazakhstan",
"KE": "Kenya",
"KI": "Kiribati",
"KW": "Kuwait",
"KG": "Kyrgyzstan",
"LA": "Laos",
"LV": "Latvia",
"LB": "Lebanon",
"LS": "Lesotho",
"LR": "Liberia",
"LY": "Libya",
"LI": "Liechtenstein",
"LT": "Lithuania",
"LU": "Luxembourg",
"MO": "Macao",
"MK": "North Macedonia",
"MG": "Madagascar",
"MW": "Malawi",
"MY": "Malaysia",
"MV": "Maldives",
"ML": "Mali",
"MT": "Malta",
"MH": "Marshall Islands",
"MQ": "Martinique",
"MR": "Mauritania",
"MU": "Mauritius",
"YT": "Mayotte",
"MX": "Mexico",
"FM": "Micronesia",
"MD": "Moldova",
"MC": "Monaco",
"MN": "Mongolia",
"ME": "Montenegro",
"MS": "Montserrat",
"MA": "Morocco",
"MZ": "Mozambique",
"MM": "Myanmar",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NL": "Netherlands",
"NC": "New Caledonia",
"NZ": "New Zealand",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigeria",
"NU": "Niue",
"NF": "Norfolk Island",
"MP": "Northern Mariana Islands",
"KP": "North Korea",
"NO": "Norway",
"OM": "Oman",
"PK": "Pakistan",
"PS": "Palestinian Territory",
"PA": "Panama",
"PG": "Papua New Guinea",
"PY": "Paraguay",
"PE": "Peru",
"PH": "Philippines",
"PN": "Pitcairn",
"PL": "Poland",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Qatar",
"RE": "Reunion",
"RO": "Romania",
"RU": "Russia",
"RW": "Rwanda",
"BL": "Saint Barthélemy",
"SH": "Saint Helena",
"KN": "Saint Kitts and Nevis",
"LC": "Saint Lucia",
"MF": "Saint Martin (French part)",
"SX": "Saint Martin (Dutch part)",
"PM": "Saint Pierre and Miquelon",
"VC": "Saint Vincent and the Grenadines",
"SM": "San Marino",
"ST": "São Tomé and Príncipe",
"SA": "Saudi Arabia",
"SN": "Senegal",
"RS": "Serbia",
"SC": "Seychelles",
"SL": "Sierra Leone",
"SG": "Singapore",
"SK": "Slovakia",
"SI": "Slovenia",
"SB": "Solomon Islands",
"SO": "Somalia",
"ZA": "South Africa",
"GS": "South Georgia/Sandwich Islands",
"KR": "South Korea",
"SS": "South Sudan",
"ES": "Spain",
"LK": "Sri Lanka",
"SD": "Sudan",
"SR": "Suriname",
"SJ": "Svalbard and Jan Mayen",
"SZ": "Swaziland",
"SE": "Sweden",
"CH": "Switzerland",
"SY": "Syria",
"TW": "Taiwan",
"TJ": "Tajikistan",
"TZ": "Tanzania",
"TH": "Thailand",
"TL": "Timor-Leste",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad and Tobago",
"TN": "Tunisia",
"TR": "Turkey",
"TM": "Turkmenistan",
"TC": "Turks and Caicos Islands",
"TV": "Tuvalu",
"UG": "Uganda",
"UA": "Ukraine",
"AE": "United Arab Emirates",
"GB": "United Kingdom",
"US": "United States",
"UM": "United States (US) Minor Outlying Islands",
"UY": "Uruguay",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"VA": "Vatican",
"VE": "Venezuela",
"VN": "Vietnam",
"VG": "Virgin Islands (British)",
"VI": "Virgin Islands (US)",
"WF": "Wallis and Futuna",
"EH": "Western Sahara",
"WS": "Samoa",
"YE": "Yemen",
"ZM": "Zambia",
"ZW": "Zimbabwe"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
States Lookup
Retrieves all the states in list format. Helps while showing states in form elements like dropdown.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/states/lookup?countryCode=IN" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/states/lookup"
);
const params = {
"countryCode": "IN",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"AP": "Andhra Pradesh",
"AR": "Arunachal Pradesh",
"AS": "Assam",
"BR": "Bihar",
"CT": "Chhattisgarh",
"GA": "Goa",
"GJ": "Gujarat",
"HR": "Haryana",
"HP": "Himachal Pradesh",
"JK": "Jammu and Kashmir",
"JH": "Jharkhand",
"KA": "Karnataka",
"KL": "Kerala",
"MP": "Madhya Pradesh",
"MH": "Maharashtra",
"MN": "Manipur",
"ML": "Meghalaya",
"MZ": "Mizoram",
"NL": "Nagaland",
"OR": "Orissa",
"PB": "Punjab",
"RJ": "Rajasthan",
"SK": "Sikkim",
"TN": "Tamil Nadu",
"TS": "Telangana",
"TR": "Tripura",
"UK": "Uttarakhand",
"UP": "Uttar Pradesh",
"WB": "West Bengal",
"AN": "Andaman and Nicobar Islands",
"CH": "Chandigarh",
"DN": "Dadra and Nagar Haveli",
"DD": "Daman and Diu",
"DL": "Delhi",
"LD": "Lakshadeep",
"PY": "Pondicherry (Puducherry)"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Currency Lookup
Retrieves all the currencies in list format. Helps while showing states in form elements like dropdown.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/currency/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/currency/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"AED": {
"display_name": "United Arab Emirates dirham",
"symbol": "د.إ"
},
"AFN": {
"display_name": "Afghan afghani",
"symbol": "؋"
},
"ALL": {
"display_name": "Albanian lek",
"symbol": "L"
},
"AMD": {
"display_name": "Armenian dram",
"symbol": "AMD"
},
"ANG": {
"display_name": "Netherlands Antillean guilder",
"symbol": "ƒ"
},
"AOA": {
"display_name": "Angolan kwanza",
"symbol": "Kz"
},
"ARS": {
"display_name": "Argentine peso",
"symbol": "$"
},
"AUD": {
"display_name": "Australian dollar",
"symbol": "$"
},
"AWG": {
"display_name": "Aruban florin",
"symbol": "Afl."
},
"AZN": {
"display_name": "Azerbaijani manat",
"symbol": "AZN"
},
"BAM": {
"display_name": "Bosnia and Herzegovina convertible mark",
"symbol": "KM"
},
"BBD": {
"display_name": "Barbadian dollar",
"symbol": "$"
},
"BDT": {
"display_name": "Bangladeshi taka",
"symbol": "৳ "
},
"BGN": {
"display_name": "Bulgarian lev",
"symbol": "лв."
},
"BHD": {
"display_name": "Bahraini dinar",
"symbol": ".د.ب"
},
"BIF": {
"display_name": "Burundian franc",
"symbol": "Fr"
},
"BMD": {
"display_name": "Bermudian dollar",
"symbol": "$"
},
"BND": {
"display_name": "Brunei dollar",
"symbol": "$"
},
"BOB": {
"display_name": "Bolivian boliviano",
"symbol": "Bs."
},
"BRL": {
"display_name": "Brazilian real",
"symbol": "R$"
},
"BSD": {
"display_name": "Bahamian dollar",
"symbol": "$"
},
"BTC": {
"display_name": "Bitcoin",
"symbol": "฿"
},
"BTN": {
"display_name": "Bhutanese ngultrum",
"symbol": "Nu."
},
"BWP": {
"display_name": "Botswana pula",
"symbol": "P"
},
"BYR": {
"display_name": "Belarusian ruble (old)",
"symbol": "Br"
},
"BYN": {
"display_name": "Belarusian ruble",
"symbol": "Br"
},
"BZD": {
"display_name": "Belize dollar",
"symbol": "$"
},
"CAD": {
"display_name": "Canadian dollar",
"symbol": "$"
},
"CDF": {
"display_name": "Congolese franc",
"symbol": "Fr"
},
"CHF": {
"display_name": "Swiss franc",
"symbol": "CHF"
},
"CLP": {
"display_name": "Chilean peso",
"symbol": "$"
},
"CNY": {
"display_name": "Chinese yuan",
"symbol": "¥"
},
"COP": {
"display_name": "Colombian peso",
"symbol": "$"
},
"CRC": {
"display_name": "Costa Rican colón",
"symbol": "₡"
},
"CUC": {
"display_name": "Cuban convertible peso",
"symbol": "$"
},
"CUP": {
"display_name": "Cuban peso",
"symbol": "$"
},
"CVE": {
"display_name": "Cape Verdean escudo",
"symbol": "$"
},
"CZK": {
"display_name": "Czech koruna",
"symbol": "Kč"
},
"DJF": {
"display_name": "Djiboutian franc",
"symbol": "Fr"
},
"DKK": {
"display_name": "Danish krone",
"symbol": "DKK"
},
"DOP": {
"display_name": "Dominican peso",
"symbol": "RD$"
},
"DZD": {
"display_name": "Algerian dinar",
"symbol": "د.ج"
},
"EGP": {
"display_name": "Egyptian pound",
"symbol": "EGP"
},
"ERN": {
"display_name": "Eritrean nakfa",
"symbol": "Nfk"
},
"ETB": {
"display_name": "Ethiopian birr",
"symbol": "Br"
},
"EUR": {
"display_name": "Euro",
"symbol": "€"
},
"FJD": {
"display_name": "Fijian dollar",
"symbol": "$"
},
"FKP": {
"display_name": "Falkland Islands pound",
"symbol": "£"
},
"GBP": {
"display_name": "Pound sterling",
"symbol": "£"
},
"GEL": {
"display_name": "Georgian lari",
"symbol": "₾"
},
"GGP": {
"display_name": "Guernsey pound",
"symbol": "£"
},
"GHS": {
"display_name": "Ghana cedi",
"symbol": "₵"
},
"GIP": {
"display_name": "Gibraltar pound",
"symbol": "£"
},
"GMD": {
"display_name": "Gambian dalasi",
"symbol": "D"
},
"GNF": {
"display_name": "Guinean franc",
"symbol": "Fr"
},
"GTQ": {
"display_name": "Guatemalan quetzal",
"symbol": "Q"
},
"GYD": {
"display_name": "Guyanese dollar",
"symbol": "$"
},
"HKD": {
"display_name": "Hong Kong dollar",
"symbol": "$"
},
"HNL": {
"display_name": "Honduran lempira",
"symbol": "L"
},
"HRK": {
"display_name": "Croatian kuna",
"symbol": "kn"
},
"HTG": {
"display_name": "Haitian gourde",
"symbol": "G"
},
"HUF": {
"display_name": "Hungarian forint",
"symbol": "Ft"
},
"IDR": {
"display_name": "Indonesian rupiah",
"symbol": "Rp"
},
"ILS": {
"display_name": "Israeli new shekel",
"symbol": "₪"
},
"IMP": {
"display_name": "Manx pound",
"symbol": "£"
},
"INR": {
"display_name": "Indian rupee",
"symbol": "₹"
},
"IQD": {
"display_name": "Iraqi dinar",
"symbol": "ع.د"
},
"IRR": {
"display_name": "Iranian rial",
"symbol": "﷼"
},
"IRT": {
"display_name": "Iranian toman",
"symbol": "تومان"
},
"ISK": {
"display_name": "Icelandic króna",
"symbol": "kr."
},
"JEP": {
"display_name": "Jersey pound",
"symbol": "£"
},
"JMD": {
"display_name": "Jamaican dollar",
"symbol": "$"
},
"JOD": {
"display_name": "Jordanian dinar",
"symbol": "د.ا"
},
"JPY": {
"display_name": "Japanese yen",
"symbol": "¥"
},
"KES": {
"display_name": "Kenyan shilling",
"symbol": "KSh"
},
"KGS": {
"display_name": "Kyrgyzstani som",
"symbol": "сом"
},
"KHR": {
"display_name": "Cambodian riel",
"symbol": "៛"
},
"KMF": {
"display_name": "Comorian franc",
"symbol": "Fr"
},
"KPW": {
"display_name": "North Korean won",
"symbol": "₩"
},
"KRW": {
"display_name": "South Korean won",
"symbol": "₩"
},
"KWD": {
"display_name": "Kuwaiti dinar",
"symbol": "د.ك"
},
"KYD": {
"display_name": "Cayman Islands dollar",
"symbol": "$"
},
"KZT": {
"display_name": "Kazakhstani tenge",
"symbol": "KZT"
},
"LAK": {
"display_name": "Lao kip",
"symbol": "₭"
},
"LBP": {
"display_name": "Lebanese pound",
"symbol": "ل.ل"
},
"LKR": {
"display_name": "Sri Lankan rupee",
"symbol": "රු"
},
"LRD": {
"display_name": "Liberian dollar",
"symbol": "$"
},
"LSL": {
"display_name": "Lesotho loti",
"symbol": "L"
},
"LYD": {
"display_name": "Libyan dinar",
"symbol": "ل.د"
},
"MAD": {
"display_name": "Moroccan dirham",
"symbol": "د.م."
},
"MDL": {
"display_name": "Moldovan leu",
"symbol": "MDL"
},
"MGA": {
"display_name": "Malagasy ariary",
"symbol": "Ar"
},
"MKD": {
"display_name": "Macedonian denar",
"symbol": "ден"
},
"MMK": {
"display_name": "Burmese kyat",
"symbol": "Ks"
},
"MNT": {
"display_name": "Mongolian tögrög",
"symbol": "₮"
},
"MOP": {
"display_name": "Macanese pataca",
"symbol": "P"
},
"MRU": {
"display_name": "Mauritanian ouguiya",
"symbol": "UM"
},
"MUR": {
"display_name": "Mauritian rupee",
"symbol": "₨"
},
"MVR": {
"display_name": "Maldivian rufiyaa",
"symbol": ".ރ"
},
"MWK": {
"display_name": "Malawian kwacha",
"symbol": "MK"
},
"MXN": {
"display_name": "Mexican peso",
"symbol": "$"
},
"MYR": {
"display_name": "Malaysian ringgit",
"symbol": "RM"
},
"MZN": {
"display_name": "Mozambican metical",
"symbol": "MT"
},
"NAD": {
"display_name": "Namibian dollar",
"symbol": "N$"
},
"NGN": {
"display_name": "Nigerian naira",
"symbol": "₦"
},
"NIO": {
"display_name": "Nicaraguan córdoba",
"symbol": "C$"
},
"NOK": {
"display_name": "Norwegian krone",
"symbol": "kr"
},
"NPR": {
"display_name": "Nepalese rupee",
"symbol": "₨"
},
"NZD": {
"display_name": "New Zealand dollar",
"symbol": "$"
},
"OMR": {
"display_name": "Omani rial",
"symbol": "ر.ع."
},
"PAB": {
"display_name": "Panamanian balboa",
"symbol": "B/."
},
"PEN": {
"display_name": "Sol",
"symbol": "S/"
},
"PGK": {
"display_name": "Papua New Guinean kina",
"symbol": "K"
},
"PHP": {
"display_name": "Philippine peso",
"symbol": "₱"
},
"PKR": {
"display_name": "Pakistani rupee",
"symbol": "₨"
},
"PLN": {
"display_name": "Polish złoty",
"symbol": "zł"
},
"PRB": {
"display_name": "Transnistrian ruble",
"symbol": "р."
},
"PYG": {
"display_name": "Paraguayan guaraní",
"symbol": "₲"
},
"QAR": {
"display_name": "Qatari riyal",
"symbol": "ر.ق"
},
"RON": {
"display_name": "Romanian leu",
"symbol": "lei"
},
"RSD": {
"display_name": "Serbian dinar",
"symbol": "дин."
},
"RUB": {
"display_name": "Russian ruble",
"symbol": "₽"
},
"RWF": {
"display_name": "Rwandan franc",
"symbol": "Fr"
},
"SAR": {
"display_name": "Saudi riyal",
"symbol": "ر.س"
},
"SBD": {
"display_name": "Solomon Islands dollar",
"symbol": "$"
},
"SCR": {
"display_name": "Seychellois rupee",
"symbol": "₨"
},
"SDG": {
"display_name": "Sudanese pound",
"symbol": "ج.س."
},
"SEK": {
"display_name": "Swedish krona",
"symbol": "kr"
},
"SGD": {
"display_name": "Singapore dollar",
"symbol": "$"
},
"SHP": {
"display_name": "Saint Helena pound",
"symbol": "£"
},
"SLL": {
"display_name": "Sierra Leonean leone",
"symbol": "Le"
},
"SOS": {
"display_name": "Somali shilling",
"symbol": "Sh"
},
"SRD": {
"display_name": "Surinamese dollar",
"symbol": "$"
},
"SSP": {
"display_name": "South Sudanese pound",
"symbol": "£"
},
"STN": {
"display_name": "São Tomé and Príncipe dobra",
"symbol": "Db"
},
"SYP": {
"display_name": "Syrian pound",
"symbol": "ل.س"
},
"SZL": {
"display_name": "Swazi lilangeni",
"symbol": "L"
},
"THB": {
"display_name": "Thai baht",
"symbol": "฿"
},
"TJS": {
"display_name": "Tajikistani somoni",
"symbol": "ЅМ"
},
"TMT": {
"display_name": "Turkmenistan manat",
"symbol": "m"
},
"TND": {
"display_name": "Tunisian dinar",
"symbol": "د.ت"
},
"TOP": {
"display_name": "Tongan paʻanga",
"symbol": "T$"
},
"TRY": {
"display_name": "Turkish lira",
"symbol": "₺"
},
"TTD": {
"display_name": "Trinidad and Tobago dollar",
"symbol": "$"
},
"TWD": {
"display_name": "New Taiwan dollar",
"symbol": "NT$"
},
"TZS": {
"display_name": "Tanzanian shilling",
"symbol": "Sh"
},
"UAH": {
"display_name": "Ukrainian hryvnia",
"symbol": "₴"
},
"UGX": {
"display_name": "Ugandan shilling",
"symbol": "UGX"
},
"USD": {
"display_name": "United States (US) dollar",
"symbol": "$"
},
"UYU": {
"display_name": "Uruguayan peso",
"symbol": "$"
},
"UZS": {
"display_name": "Uzbekistani som",
"symbol": "UZS"
},
"VEF": {
"display_name": "Venezuelan bolívar",
"symbol": "Bs F"
},
"VES": {
"display_name": "Bolívar soberano",
"symbol": "Bs.S"
},
"VND": {
"display_name": "Vietnamese đồng",
"symbol": "₫"
},
"VUV": {
"display_name": "Vanuatu vatu",
"symbol": "Vt"
},
"WST": {
"display_name": "Samoan tālā",
"symbol": "T"
},
"XAF": {
"display_name": "Central African CFA franc",
"symbol": "CFA"
},
"XCD": {
"display_name": "East Caribbean dollar",
"symbol": "$"
},
"XOF": {
"display_name": "West African CFA franc",
"symbol": "CFA"
},
"XPF": {
"display_name": "CFP franc",
"symbol": "Fr"
},
"YER": {
"display_name": "Yemeni rial",
"symbol": "﷼"
},
"ZAR": {
"display_name": "South African rand",
"symbol": "R"
},
"ZMW": {
"display_name": "Zambian kwacha",
"symbol": "ZK"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve General Ecommerce Settings
Retrieves the details of the general ecommerce settings. Helps in fetching items of the ecommerce settings, like country, city, address, location, etc(See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"addressLine1": "1234 Lorem Ipsum Drive",
"addressLine2": "",
"country": "US",
"state": "",
"city": "New Jersey",
"zipcode": "08053",
"selling_location": "all_countries",
"some_countries_excluded": "",
"some_countries": "",
"enableTaxes": "no",
"enableCoupons": "no",
"currency": "USD"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set General Ecommerce Settings
To save the general Ecommerce settings with updated values, you need to use this request. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"addressLine1\": \"1234 Lorem Ipsum Drive\",
\"addressLine2\": \"aut\",
\"city\": \"New Jersey\",
\"state\": \"aut\",
\"country\": \"country\",
\"currency\": \"USD\",
\"enableCoupons\": \"no\",
\"enableTaxes\": \"no\",
\"zipcode\": \"08053\",
\"selling_location\": \"all_countries\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"addressLine1": "1234 Lorem Ipsum Drive",
"addressLine2": "aut",
"city": "New Jersey",
"state": "aut",
"country": "country",
"currency": "USD",
"enableCoupons": "no",
"enableTaxes": "no",
"zipcode": "08053",
"selling_location": "all_countries"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/settings/ecommerce/isProductionModeEnabled
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/isProductionModeEnabled" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/isProductionModeEnabled"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 268
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/settings/ecommerce/invoice
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/ecommerce/invoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/invoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 267
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/settings/ecommerce/invoice
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/invoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/invoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Updates General Ecommerce Global Product Settings
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/ecommerce/global" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"freeProductCta\": \"Enroll Now\",
\"simpleProductCta\": \"Add to Cart\",
\"subscriptionProductCta\": \"Subscribe\",
\"productPriceColor[content][linkUrl]\": \"\\\"https:\\/\\/example.com\\\"\",
\"productPriceColor[content][linkOpen]\": \"\\\"_blank\\\"\",
\"productPriceColor[content][backgroundColor]\": \"\\\"#469F13\\\"\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/ecommerce/global"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"freeProductCta": "Enroll Now",
"simpleProductCta": "Add to Cart",
"subscriptionProductCta": "Subscribe",
"productPriceColor[content][linkUrl]": "\"https:\/\/example.com\"",
"productPriceColor[content][linkOpen]": "\"_blank\"",
"productPriceColor[content][backgroundColor]": "\"#469F13\""
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves Shop Base Currency
Retrieves the currency set in the Ecommerce settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/get-shop-base-currency" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/get-shop-base-currency"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"display_name": "United States (US) dollar",
"symbol": "$"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ECommerce Orders
An ECommerce Order is made by the students when they purchase a product hence course. It helps in managing orders and performing CRUD operation on orders.
Order Tabular List
Returns all the orders in a tabular list format in paginated mode. You can apply filter using search_param via user(purchased by) and status(status of the order).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/orders/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22user%22%3A%5B%5D%2C%22status%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/orders/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"user":[],"status":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"currencySymbol": "$",
"records": [
{
"id": 1,
"status": "PENDING_PAYMENT",
"total": "3001.00",
"isTestOrder": false,
"customer": "Demo Student",
"created_at": "Aug 25, 2020 12:00 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve/Download Order Invoice
Retrieves the details of a specified order and returns as downloaded pdf file.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/download?orderId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/download"
);
const params = {
"orderId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
"pdf file"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export Order
Retrieves all the orders made till date and exports it to excel format for letting users download it as excel file. You can use the response for plotting graphs
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/export?filters=%7B%22dateRange%22%3A%5B%222020-07-31T18%3A30%3A00.000Z%22%2C%222020-08-30T18%3A30%3A00.000Z%22%5D%2C%22users%22%3A%5B3%5D%2C%22coupons%22%3A%5B%5D%2C%22products%22%3A%5B1%5D%2C%22status%22%3A%5B%22PENDING_PAYMENT%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/export"
);
const params = {
"filters": "{"dateRange":["2020-07-31T18:30:00.000Z","2020-08-30T18:30:00.000Z"],"users":[3],"coupons":[],"products":[1],"status":["PENDING_PAYMENT"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
"orders-text.xlsx"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Yearly Sales
Retrieves the details of yearly based order sales made from students and returns in tabular form. You can use the response for plotting graphs
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/reports/yearsales?year=2019" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/reports/yearsales"
);
const params = {
"year": "2019",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"labels": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"totalIncome": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"totalOrders": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"currency": {
"display_name": "United States (US) dollar",
"symbol": "$"
},
"sumIncome": 0,
"sumTotalOrder": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Monthly Sales
Retrieves the details of monthly based order sales for this year made from students and returns in tabular form. You can use the response for plotting graphs
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/reports/monthlysales?selectedMonth=8-2020" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/reports/monthlysales"
);
const params = {
"selectedMonth": "8-2020",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"labels": [
"Aug-01",
"Aug-02",
"Aug-03",
"Aug-04",
"Aug-05",
"Aug-06",
"Aug-07",
"Aug-08",
"Aug-09",
"Aug-10",
"Aug-11",
"Aug-12",
"Aug-13",
"Aug-14",
"Aug-15",
"Aug-16",
"Aug-17",
"Aug-18",
"Aug-19",
"Aug-20",
"Aug-21",
"Aug-22",
"Aug-23",
"Aug-24",
"Aug-25",
"Aug-26",
"Aug-27",
"Aug-28",
"Aug-29",
"Aug-30",
"Aug-31"
],
"totalIncome": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"totalOrders": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"currency": {
"display_name": "United States (US) dollar",
"symbol": "$"
},
"sumIncome": 0,
"sumTotalOrder": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Product Breakdown Sales
Retrieves the details of product break-down based order sales for this year made from students and returns in tabular form. You can use the response for plotting graphs
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/reports/productbreakdown?selectedDateRange=2022-08-21" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/reports/productbreakdown"
);
const params = {
"selectedDateRange": "2022-08-21",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"labels": [
"Product-1"
],
"totalIncome": [
0
],
"totalOrders": [
0
],
"currency": {
"display_name": "United States (US) dollar",
"symbol": "$"
},
"sumIncome": 0,
"sumTotalOrder": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Order Status Lookup
Retrieves all the statuses of the order the platform offers completed, cancelled, failed, etc. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/status/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/status/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "PENDING_PAYMENT",
"display_value": "Payment Pending"
},
{
"db_value": "COMPLETED",
"display_value": "Completed"
},
{
"db_value": "CANCELLED",
"display_value": "Cancelled"
},
{
"db_value": "REFUNDED",
"display_value": "Refunded"
},
{
"db_value": "FAILED",
"display_value": "Failed"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Order
To delete a order, you need to use this request. Returns number of orders deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/order/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
5
]
}"
const url = new URL(
"https://demo.aomlms.com/api/order/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
5
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 order(s) deleted"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Order
To create a order, you need to use this request. (See parameters) Created order can be used as purchasing product by students.
Returns : id of the order created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/order/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"orderDate\": \"2020-08-25 0:00:00\",
\"status\": \"PENDING_PAYMENT\",
\"customerId\": 3,
\"billingAddressId\": 3500,
\"orderItems\": [
\"amet\"
],
\"orderNotes\": [
\"dicta\"
],
\"taxAmount\": \"null\",
\"otherFee\": \"null\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"orderDate": "2020-08-25 0:00:00",
"status": "PENDING_PAYMENT",
"customerId": 3,
"billingAddressId": 3500,
"orderItems": [
"amet"
],
"orderNotes": [
"dicta"
],
"taxAmount": "null",
"otherFee": "null"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Order created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Order
Retrieves the details of the specified order. Helps in fetching order using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"orderDate": "Aug 25, 2020 12:00 AM",
"status": "PENDING_PAYMENT",
"customerId": 3,
"billingAddressId": null,
"taxAmount": "0.00",
"otherFee": "0.00",
"isTestOrder": false,
"total": "3001.00",
"sub_total": "3001.00",
"currency": {
"display_name": "United States (US) dollar",
"symbol": "$"
},
"shopAddress": {
"shop_address_1": "1234 Lorem Ipsum Drive",
"shop_address_2": "",
"shop_city": "New Jersey",
"shop_country": "US",
"shop_state": "",
"shop_zipcode": "08053",
"shop_name": "Academy of mine",
"shop_logo": "http://localhost:8000/images/aom-logo.svg"
},
"billingAddress": {
"id": -1,
"isDefault": false,
"fullName": "",
"addressLine1": "",
"addressLine2": "",
"zipcode": "",
"city": "",
"state": "",
"country": ""
},
"orderNotes": [
{
"id": 1,
"data": "note-1",
"type": "PRIVATE",
"created_on": "Aug 11, 2020 05:36 PM"
}
],
"orderItems": [
{
"product_id": 1,
"product_title": "Product-1",
"price": "3001.00",
"quantity": 1,
"total": "3001.00"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Order
Updates the details of a specified order. (See parameters) Orders can be used as purchasing products by students.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/order/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"orderDate\": \"2020-08-25 0:00:00\",
\"status\": \"COMPLETED\",
\"customerId\": 3,
\"billingAddressId\": 3500,
\"orderItems\": [
\"minus\"
],
\"orderNotes\": [
\"et\"
],
\"taxAmount\": \"null\",
\"otherFee\": \"null\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"orderDate": "2020-08-25 0:00:00",
"status": "COMPLETED",
"customerId": 3,
"billingAddressId": 3500,
"orderItems": [
"minus"
],
"orderNotes": [
"et"
],
"taxAmount": "null",
"otherFee": "null"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Order updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Status of Order
Updates the status of a specified order. (See parameters) Orders can be used as purchasing products by students.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/order/1/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"status\": \"COMPLETED\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order/1/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"status": "COMPLETED"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Order updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Order Notes
To create a order note, you need to use this request. (See parameters) Created order notes can be used as remebering assets for Instructor while creating/editing order.
Returns : id, type and data of the order notes created. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/order-note/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"data\": \"This order is just for testing purpose\",
\"orderId\": 1,
\"type\": \"PRIVATE\"
}"
const url = new URL(
"https://demo.aomlms.com/api/order-note/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"data": "This order is just for testing purpose",
"orderId": 1,
"type": "PRIVATE"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"data": "note-1",
"type": "PRIVATE",
"created_on": "Aug 11, 2020 05:36 PM"
},
{
"id": 2,
"data": "New notes",
"type": "PRIVATE",
"created_on": "Aug 11, 2020 06:04 PM"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Order Note
To delete a order note, you need to use this request. Returns all order notes left after this note gets deleted. (See Response)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/order-note/delete/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order-note/delete/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"data": "note-1",
"type": "PRIVATE",
"created_on": "Aug 11, 2020 05:36 PM"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/order/refund/lookup
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/refund/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/refund/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 266
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/order/note/type/lookup
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/note/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/note/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 265
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/order/refund/type/lookup
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/refund/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/refund/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 264
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/order/refund
Example request:
curl --request POST \
"https://demo.aomlms.com/api/order/refund" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/refund"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/order/refund/{id}
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/order/refund/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/order/refund/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 263
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ECommerce Payments
Endpoints for managing ecommerce Payment Gateways. Payment gateways will be used when your users are purchasing products.
Retrieve Payment gateways
Retrieves all payment gateways details supported by the platform. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/payment-gateway" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/payment-gateway"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"id": 1,
"name": "Stripe",
"logo_url": "/images/stripe-logo.svg",
"is_enabled": true,
"support_recurring_payments": false
},
{
"id": 2,
"name": "Authorize .NET CIM",
"logo_url": "/images/anet-logo.svg",
"is_enabled": false,
"support_recurring_payments": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Gateway Status
Updates the payment gateway status(enabled or disabled) to receive payment from students/users.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/paymentmethod/updateStatus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 1,
\"status\": false
}"
const url = new URL(
"https://demo.aomlms.com/api/paymentmethod/updateStatus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 1,
"status": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Stripe Settings
Updates the settings for Stripe payment gateway. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/stripe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"gatewayEnabled\": true,
\"paymentTitle\": \"Pay by Credit or Debit Card\",
\"livePublishableKey\": \"animi\",
\"liveSecretKey\": \"reiciendis\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/stripe"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"gatewayEnabled": true,
"paymentTitle": "Pay by Credit or Debit Card",
"livePublishableKey": "animi",
"liveSecretKey": "reiciendis"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Stripe Settings
Retrieves all the settings for Stripe payment gateway. Helps in mainting the data and enable status of the stripe settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/stripe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/stripe"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Pay by Credit or Debit Card",
"livePublishableKey": "",
"liveSecretKey": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update AuthorizeNet Settings
Updates the settings for AuthorizeNet payment gateway. Setting needs to be updated is mentioned in parameter. (See Parameter)
Retrieve AuthorizeNet Settings
Retrieves all the settings for AuthorizeNet payment gateway. Helps in maintaining the data and enable status of the AuthorizeNet settings.
Update BrainTree Settings
Updates the settings for BrainTree payment gateway. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/braintree" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"gatewayEnabled\": true,
\"paymentTitle\": \"Pay by Credit or Debit Card\",
\"merchantId\": \"alias\",
\"publicKey\": \"reprehenderit\",
\"privateKey\": \"vel\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/braintree"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"gatewayEnabled": true,
"paymentTitle": "Pay by Credit or Debit Card",
"merchantId": "alias",
"publicKey": "reprehenderit",
"privateKey": "vel"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Braintree Settings
Retrieves all the settings for Braintree payment gateway. Helps in mainting the data and enable status of the Braintree settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/braintree" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/braintree"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Pay by Credit or Debit Card",
"merchantId": "",
"publicKey": "",
"privateKey": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Paypal Settings
Retrieves all the settings for Paypal payment gateway. Helps in mainting the data and enable status of the PAypal settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/paypal" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/paypal"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Pay by PayPal",
"notificationUrl": "https://staging.aomlms.com/api/webhook/paypal",
"clientId": "",
"secretKey": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Paypal
Updates the settings for Paypal payment gateway. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/paypal" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"clientId\": \"abc1234\",
\"gatewayEnabled\": false,
\"notificationUrl\": \"https:\\/\\/staging.aomlms.com\\/api\\/webhook\\/paypal\",
\"paymentTitle\": \"3500\",
\"secretKey\": \"abc123\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/paypal"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"clientId": "abc1234",
"gatewayEnabled": false,
"notificationUrl": "https:\/\/staging.aomlms.com\/api\/webhook\/paypal",
"paymentTitle": "3500",
"secretKey": "abc123"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Invoice Settings
Updates the settings for Invoice payment gateway.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/invoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"gatewayEnabled\": true,
\"paymentTitle\": \"Pay by Invoice\",
\"paymentInstuctions\": \"We will invoice you.\",
\"paymentRestrictToGroups\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/invoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"gatewayEnabled": true,
"paymentTitle": "Pay by Invoice",
"paymentInstuctions": "We will invoice you.",
"paymentRestrictToGroups": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Invoice Settings
Retrieves all the settings for Invoice payment gateway. Helps in maintaining the data and enable status of the invoice settings.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/invoice" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/invoice"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"gatewayEnabled": false,
"paymentTitle": "Pay by Invoice",
"paymentInstructions": "We will send an invoice.",
"paymentRestrictToGroups": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ECommerce Products
A Product will be reached to your students. Course has to be attached to products so that students can purchase your courses. Helps in performing CRUD operations for and to products.
Retrieve Product Catalog
Retrieves the details for the product catalogs in paginated form to show this to students as course catalog so that they can purchase the product hence course. (See Parameters) You can apply filter using search_param via title(product title) and categories.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/catalog?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22title%22%3A%22%22%2C%22categories%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/catalog"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"title":"","categories":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"title": "Product-1",
"slug": "product-1",
"featuredImage": null,
"displayPrice": "<del>$3500 </del><span>$3001</span>",
"status": "IN-STOCK",
"label": "SALE",
"canBePurchased": true,
"seo_description": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Calender
Retrieve classes with specified search parameters.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/calendar-catalog" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"startDate\": \"\\\"2023-12-31T18:30:00.000Z\\\"\",
\"endDate\": \"\\\"2024-01-30T18:30:00.000Z\\\"\",
\"search_param\": \"dolor\",
\"search_param[title]\": \"\\\"Professional Development\\\"\",
\"search_param[ids]\": \"aut\",
\"search_param[selectedPrice]\": [
\"unde\"
],
\"search_param[productCategories]\": [
\"officiis\"
],
\"search_param[selectedProductCategories]\": \"\\\"include\\\"\",
\"search_param[layout]\": \"\\\"card\\\"\",
\"search_param[sort_order]\": \"\\\"created_at\\\"\",
\"search_param[sort_direction]\": \"\\\"desc\\\"\",
\"search_param[categoriesName]\": \"\\\"Category Name\\\"\",
\"search_param[location]\": \"\\\"Cherry Hill\\\"\",
\"search_param[date]\": \"\\\"2024-01-15\\\"\",
\"search_param[position]\": \"\\\"top\\\"\",
\"search_param[selectedProducts]\": \"\\\"include\\\"\",
\"search_param[showFilter]\": \"\\\"yes\\\"\",
\"search_param[showFilterType]\": [
\"Price\",
\"Name\",
\"Category\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/products/calendar-catalog"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"startDate": "\"2023-12-31T18:30:00.000Z\"",
"endDate": "\"2024-01-30T18:30:00.000Z\"",
"search_param": "dolor",
"search_param[title]": "\"Professional Development\"",
"search_param[ids]": "aut",
"search_param[selectedPrice]": [
"unde"
],
"search_param[productCategories]": [
"officiis"
],
"search_param[selectedProductCategories]": "\"include\"",
"search_param[layout]": "\"card\"",
"search_param[sort_order]": "\"created_at\"",
"search_param[sort_direction]": "\"desc\"",
"search_param[categoriesName]": "\"Category Name\"",
"search_param[location]": "\"Cherry Hill\"",
"search_param[date]": "\"2024-01-15\"",
"search_param[position]": "\"top\"",
"search_param[selectedProducts]": "\"include\"",
"search_param[showFilter]": "\"yes\"",
"search_param[showFilterType]": [
"Price",
"Name",
"Category"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"records": [
{
"id": 11,
"courseId": 9,
"classId": 3,
"courseName": "Test ILT course",
"location": "Cherry Hill",
"locationId": 2,
"start": "2024-01-03 08:00:14",
"end": "2024-01-03 10:00:19",
"instructor": "Test Staff",
"class": "blue",
"price": 12,
"displayPrice": "$12",
"canBePurchased": true,
"status": "IN-STOCK",
"subscription_price": null,
"price_frequency": "MONTHLY",
"label": "",
"display_label": "",
"title": "Test LTI Course"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Product
Retrieves the details of the specified product. Helps in fetching product using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"title": "Product-1",
"slug": "product-1",
"description": "Course 1 product",
"featuredImageUrl": null,
"regular_price": 3500,
"type": "SIMPLE",
"sale_price": 3001,
"saleStartDate": null,
"saleEndDate": null,
"status": "IN-STOCK",
"expiry": "2020-10-29",
"taxIncluded": false,
"taxBasedOn": "CUSTOMER-BILLING-ADDR",
"seo_title": null,
"seo_description": null,
"displayPrice": "<del>$3500 </del><span>$3001</span>",
"canBePurchased": true,
"label": "SALE",
"categories": [],
"courses": [
{
"value": 1,
"label": "course 1"
}
],
"courseCategories": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Class Dates
Retrieves the details of a specified product. Helps in fetching a dates using its loaction ID and product ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/get-class-dates?location_id=1&product_id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/get-class-dates"
);
const params = {
"location_id": "1",
"product_id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"dates": [
{
"id": 57,
"courseId": 34,
"locationName": "Cherry Hill",
"locationId": 2,
"startDate": "2024-01-12T04:00:00.000000Z",
"startDateTime": "2024-01-12T04:00:00.000000Z",
"enddDateTime": "2024-01-31T11:00:00.000000Z",
"dates": "11-Jan-2024 - 31-Jan-2024 (09:00 PM - 04:00 AM)"
},
{
"id": 58,
"courseId": 34,
"locationName": "Cherry Hill",
"locationId": 2,
"startDate": "2024-01-31T09:00:00.000000Z",
"startDateTime": "2024-01-31T09:00:00.000000Z",
"enddDateTime": "2024-02-07T18:09:00.000000Z",
"dates": "31-Jan-2024 - 07-Feb-2024 (02:00 AM - 11:09 AM)"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/get-search-product
Example request:
curl --request POST \
"https://demo.aomlms.com/api/get-search-product" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/get-search-product"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Products
Retrieves the details of all products. Helps in fetching entire products in the account. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "Product-1",
"slug": "product-1",
"description": "Course 1 product",
"featured_image_url": null,
"regular_price": 3500,
"sale_price": 3001,
"sale_price_from": null,
"sale_price_to": null,
"status": "IN-STOCK",
"type": "SIMPLE",
"price_frequency": null,
"site-wide-membership": null,
"expired_at": "2020-10-29 00:00:00",
"price_includes_tax": false,
"tax_rate_based_on": "CUSTOMER-BILLING-ADDR",
"seo_title": null,
"seo_description": null,
"created_by": 1,
"updated_by": null,
"deleted_by": null,
"created_at": "2020-08-11 14:12:27",
"updated_at": "2020-08-11 14:12:27",
"deleted_at": null
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Types Lookup
Retrieves all the types of the product the platform offers. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "SIMPLE",
"display_value": "Simple"
},
{
"db_value": "SUBSCRIPTION",
"display_value": "Subscription"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Slug
Updates the slug of the product. Example - old-awesome-product to new-awesome-product
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/products/update-slug/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"slug\": \"new-product-1\"
}"
const url = new URL(
"https://demo.aomlms.com/api/products/update-slug/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"slug": "new-product-1"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
"new-product-1"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Status Lookup
Retrieves all the statuses of the product the platform offers like in-stock, out-of-stock, coming-soon. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/status/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/status/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "COMING-SOON",
"display_value": "Coming Soon"
},
{
"db_value": "IN-STOCK",
"display_value": "In Stock"
},
{
"db_value": "OUT-OF-STOCK",
"display_value": "Out of Stock"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Tabular List
Returns all the products in a tabular list format in paginated mode. You can apply filter using search_param via title, productStatus(in-stock, out-of-stock, etc) and productCategoryIds.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22title%22%3A%22%22%2C%22productStatus%22%3A%5B%5D%2C%22productCategoryIds%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"title":"","productStatus":[],"productCategoryIds":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"title": "Product-1",
"regular_price": 3500,
"type": "SIMPLE",
"status": "IN-STOCK",
"created_at": "Aug 11, 2020 02:12 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Lookup
Retrieves all the products in list format. Helps while showing products in form elements like dropdown. You can apply filters using search_term parameter. (See Parameter)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/products/lookup?search_term=facilis" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/products/lookup"
);
const params = {
"search_term": "facilis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "Product-1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Product
To create a product, you need to use this request. (See parameters) Created product can be used while attaching course to product so that you can sell the course to students.
Returns : id of the product created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/product/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Product-1\",
\"description\": \"Course 1 product\",
\"featuredImageUrl\": \"https:\\/\\/www.aom-images.com\\/product.jpeg\",
\"regular_price\": \"3500\",
\"type\": \"SIMPLE\",
\"sale_price\": \"3001\",
\"saleStartDate\": \"null\",
\"saleEndDate\": \"null\",
\"status\": \"IN-STOCK\",
\"expiry_date\": \"2020-10-29 0:00:00\",
\"categories\": [],
\"courses\": [
\"atque\"
],
\"courseCategories\": [],
\"seo_title\": \"awesome-product\",
\"seo_description\": \"includes many good courses\",
\"subscription_price\": \"3500\",
\"price_frequency\": \"WEEKLY\",
\"free_trial_value\": \"5\",
\"free_trial_frequency\": \"Months\",
\"catalog_rank\": \"5\",
\"subscription_expire_after\": \"null\"
}"
const url = new URL(
"https://demo.aomlms.com/api/product/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Product-1",
"description": "Course 1 product",
"featuredImageUrl": "https:\/\/www.aom-images.com\/product.jpeg",
"regular_price": "3500",
"type": "SIMPLE",
"sale_price": "3001",
"saleStartDate": "null",
"saleEndDate": "null",
"status": "IN-STOCK",
"expiry_date": "2020-10-29 0:00:00",
"categories": [],
"courses": [
"atque"
],
"courseCategories": [],
"seo_title": "awesome-product",
"seo_description": "includes many good courses",
"subscription_price": "3500",
"price_frequency": "WEEKLY",
"free_trial_value": "5",
"free_trial_frequency": "Months",
"catalog_rank": "5",
"subscription_expire_after": "null"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Product created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Product
Updates the details of a specified product. (See parameters) Product can be used while attaching course to product so that you can sell the course to students.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/product/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Product-1\",
\"description\": \"Course 1 product\",
\"featuredImageUrl\": \"https:\\/\\/www.aom-images.com\\/product.jpeg\",
\"regular_price\": \"3500\",
\"type\": \"SIMPLE\",
\"sale_price\": \"3001\",
\"saleStartDate\": \"null\",
\"saleEndDate\": \"null\",
\"status\": \"IN-STOCK\",
\"expiry\": \"2020-10-29 0:00:00\",
\"categories\": [],
\"courses\": [
\"quod\"
],
\"courseCategories\": [],
\"seo_title\": \"awesome-product\",
\"seo_description\": \"includes many good courses\",
\"subscription_price\": \"3500\",
\"price_frequency\": \"WEEKLY\",
\"free_trial_value\": \"5\",
\"free_trial_frequency\": \"Months\",
\"catalog_rank\": \"5\",
\"subscription_expire_after\": \"null\"
}"
const url = new URL(
"https://demo.aomlms.com/api/product/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Product-1",
"description": "Course 1 product",
"featuredImageUrl": "https:\/\/www.aom-images.com\/product.jpeg",
"regular_price": "3500",
"type": "SIMPLE",
"sale_price": "3001",
"saleStartDate": "null",
"saleEndDate": "null",
"status": "IN-STOCK",
"expiry": "2020-10-29 0:00:00",
"categories": [],
"courses": [
"quod"
],
"courseCategories": [],
"seo_title": "awesome-product",
"seo_description": "includes many good courses",
"subscription_price": "3500",
"price_frequency": "WEEKLY",
"free_trial_value": "5",
"free_trial_frequency": "Months",
"catalog_rank": "5",
"subscription_expire_after": "null"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Product updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Product
To delete a product, you need to use this request. Returns number of products deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/product/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
5
]
}"
const url = new URL(
"https://demo.aomlms.com/api/product/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
5
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 product(s) deleted"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Product Price
Retrieves the price of the specified product. Helps in fetching product price using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/price/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/price/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"price": 3001
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified product. Parameters is provided which needs to be updated. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/product/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"product_ids\": [
3,
2
],
\"outofstock\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/product/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"product_ids": [
3,
2
],
"outofstock": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Questions updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Free Trial Interval Lookup For Products
Retrieves how often the amount will be deducted in subscription of the product, the platform offers. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/freeTrial/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/freeTrial/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "DAYS",
"display_value": "Days"
},
{
"db_value": "WEEKS",
"display_value": "Weeks"
},
{
"db_value": "MONTHS",
"display_value": "Months"
},
{
"db_value": "YEARS",
"display_value": "Years"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Price Frequency Lookup for Subscriptions
Retrieves how often the amount will be deducted in subscription of the product, the platform offers. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/product/subscription-price-frequency/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/product/subscription-price-frequency/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "DAILY",
"display_value": "Per day"
},
{
"db_value": "WEEKLY",
"display_value": "Per week"
},
{
"db_value": "MONTHLY",
"display_value": "Per month"
},
{
"db_value": "YEARLY",
"display_value": "Per year"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
Tabular List
Returns all the courses in a tabular list format in paginated mode. You can apply filter using search_param via courseName(for specific course) and status(course status)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22courseCategoryIds%22%3A%5B%5D%2C%22courseName%22%3A%22course+1%22%2C%22status%22%3A%22In+Progress%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"courseCategoryIds":[],"courseName":"course 1","status":"In Progress"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "course 1",
"slug": "course-1",
"status": "publish",
"categories": "",
"author": "Aom Staff",
"created_at": "03 Aug 2020 09:08 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dropdown List
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/dropdownlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/dropdownlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "course 1",
"used_seats": null,
"total_seats": null
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled Students
Retrieves all the student details enrolled in a course. You can use search_param filter using nameOrEmail(student name or email) and status(course status)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/enrolled-students?course_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22status%22%3A%5B%22In+Progress%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/enrolled-students"
);
const params = {
"course_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"nameOrEmail":"","status":["In Progress"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course 1",
"featuredImage": null,
"recordsTotal": 2,
"totalNotStarted": 1,
"totalInProgress": 0,
"totalCompleted": 1,
"recordsFiltered": 2,
"records": [
{
"id": 6,
"user_id": 4,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"status": "Not Started",
"percentComplete": 0,
"access_status": "Allowed",
"registered_on": "09-Aug-2020",
"started_on": "",
"completed_on": "",
"expire_on": "Never",
"last_accessed_on": "Never"
},
{
"id": 1,
"user_id": 3,
"first_name": "Demo",
"last_name": "Student",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#4CAF50\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">DS</text></svg>",
"status": "Completed",
"percentComplete": 100,
"access_status": "Allowed",
"registered_on": "03-Aug-2020",
"started_on": "03-Aug-2020",
"completed_on": "03-Aug-2020",
"expire_on": "Never",
"last_accessed_on": "6 days ago"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Location
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/locations/lookup?course_id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/locations/lookup"
);
const params = {
"course_id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"0": {
"id": 2,
"name": "Cherry Hill",
"courseId": "34",
"classId": 57
},
"2": {
"id": 1,
"name": "Virtual",
"courseId": "34",
"classId": 59
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Submissions
Retrieves all the submissions for a course in pagination mode. You can apply filter on data returned using search_param via nameOrEmail(student name or email) and type(submission type - assignment or discussion)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/submissions?course_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22updated_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22type%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/submissions"
);
const params = {
"course_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"updated_at","direction":"desc"}",
"search_param": "{"nameOrEmail":"","type":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course 1",
"featuredImage": null,
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"status_row_id": 2,
"module_id": 4,
"module_name": "assign",
"module_type": "assignment",
"first_name": "Aom",
"last_name": "Staff",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"submission_id": 1,
"submitted_on": "10-Aug-2020"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
All Courses Submissions
Retrieves all the submissions for all the courses in pagination mode. You can apply filter on data returned using search_param via nameOrEmail(student name or email) and type(submission type - assignment or discussion)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/all-submissions?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22updated_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22type%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/all-submissions"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"updated_at","direction":"desc"}",
"search_param": "{"nameOrEmail":"","type":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"course_name": "Professional Development and Training",
"status_row_id": 2,
"module_id": 4,
"module_name": "assign",
"module_type": "assignment",
"first_name": "Aom",
"last_name": "Staff",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"submission_id": 1,
"submitted_on": "10-Aug-2020"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
LMS Overview Report
Retrieves the overview report for all courses. Returned data contains information like total number of modules and number of courses in different status(In Progress, Not Started and Completed). Example - [1,0]. You can use these data for graphs representation as well.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/reports/overview" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/reports/overview"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"labels": [
"course 1",
"Awesome Course"
],
"totalNotStarted": [
1,
0
],
"totalInProgress": [
1,
0
],
"totalCompleted": [
1,
0
],
"sumNotStarted": 1,
"sumInProgress": 1,
"sumCompleted": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Report
Retrieves the detailed report for all courses. Returned data contains information like total number of modules and number of courses in different status(In Progress, Not Started and Completed). Example - [1,0]. You can use these data for graphs representation as well.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/reports/course-detailed?course_id=3&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22status%22%3A%5B%5D%7D&userCategoryId=%7B%22nameOrEmail%22%3A%22%22%2C%22status%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/reports/course-detailed"
);
const params = {
"course_id": "3",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"nameOrEmail":"","status":[]}",
"userCategoryId": "{"nameOrEmail":"","status":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course 1",
"featuredImage": null,
"recordsTotal": 3,
"totalNotStarted": 1,
"totalInProgress": 1,
"totalCompleted": 1,
"recordsFiltered": 3,
"records": [
{
"first_name": "Aom",
"last_name": "Staff",
"email": "[email protected]",
"status": "In Progress",
"percent_complete": 45,
"access_status": "Allowed",
"registered_on": "10-Aug-2020",
"started_on": "10-Aug-2020",
"completed_on": "",
"expire_on": "Never",
"last_accessed_on": "1 hour ago",
"percent_achieved": null,
"total_time_spent": "0h 20m",
"certifcate_issued": "No"
},
{
"first_name": "Client",
"last_name": "Admin",
"email": "[email protected]",
"status": "Not Started",
"percent_complete": 0,
"access_status": "Allowed",
"registered_on": "09-Aug-2020",
"started_on": "",
"completed_on": "",
"expire_on": "12-Aug-2023",
"last_accessed_on": "Never",
"percent_achieved": null,
"total_time_spent": "0h 0m",
"certifcate_issued": "Yes"
},
{
"first_name": "Demo",
"last_name": "Student",
"email": "[email protected]",
"status": "Completed",
"percent_complete": 50,
"access_status": "Allowed",
"registered_on": "03-Aug-2020",
"started_on": "03-Aug-2020",
"completed_on": "03-Aug-2020",
"expire_on": "Never",
"last_accessed_on": "6 days ago",
"percent_achieved": 0,
"total_time_spent": "0h 0m",
"certifcate_issued": "Yes"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get custom Headers for Export of Course Insight report
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/reports/course-detailed-custom-headers?course_id=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22status%22%3A%5B%5D%2C%22userIdActual%22%3A%22%22%2C%22started_on%22%3A%5B%5D%2C%22completed_on%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/reports/course-detailed-custom-headers"
);
const params = {
"course_id": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"nameOrEmail":"","status":[],"userIdActual":"","started_on":[],"completed_on":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{[{"id":1,"name":"Virtual","courseId":"1","classId":1}]}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Course
Retrieves the course details based on the course ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "course 1",
"slug": "course-1",
"featuredImageUrl": null,
"instructions": null,
"credits": null,
"minPassingPercentage": null,
"gradingRule": "no_grading",
"durationRule": "unlimited",
"durationSpecificDate": null,
"durationDays": null,
"status": "publish",
"certificateTemplates": [
1
],
"associatedProduct": [],
"hasAssociatedProduct": false,
"modules": [
{
"module_id": 1,
"name": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"drip_rules": "immediately",
"drip_fixed_date": null,
"drip_interval": null,
"drip_interval_unit": "day",
"drip_calculation_reference": "registration_date",
"minSpentHour": 0,
"minSpentMinutes": 0
}
],
"categories": [],
"gradeModules": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Course
To create a course, you need to use this request with provided parameters.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Course 1\",
\"instructions\": \"Some Instruction\",
\"slug\": \"course-1\",
\"featuredImageUrl\": \"img_path\",
\"completionRedirectionUrl\": \"redirection_path\",
\"credits\": 70,
\"minPassingPercentage\": 75,
\"gradingRule\": \"no_grading\",
\"durationRule\": \"unlimited\",
\"status\": \"publish\",
\"certificateTemplates\": [
1
],
\"modules\": [
{
\"module_id\": 1,
\"name\": \"test\",
\"type\": \"text\",
\"icon\": \"<i class=\\\"el-icon-tickets\\\"><\\/i>\",
\"is_locked\": false,
\"drip_rules\": \"immediately\",
\"drip_fixed_date\": null,
\"drip_interval\": null,
\"drip_interval_unit\": \"day\",
\"drip_calculation_reference\": \"registration_date\",
\"minSpentHour\": 0,
\"minSpentMinutes\": 0
}
],
\"certificateExpiresAfter\": 3,
\"certificateExpiresAfterGracePeriod\": 30,
\"categories\": [
1,
2
],
\"gradeModules\": []
}"
const url = new URL(
"https://demo.aomlms.com/api/course"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Course 1",
"instructions": "Some Instruction",
"slug": "course-1",
"featuredImageUrl": "img_path",
"completionRedirectionUrl": "redirection_path",
"credits": 70,
"minPassingPercentage": 75,
"gradingRule": "no_grading",
"durationRule": "unlimited",
"status": "publish",
"certificateTemplates": [
1
],
"modules": [
{
"module_id": 1,
"name": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"><\/i>",
"is_locked": false,
"drip_rules": "immediately",
"drip_fixed_date": null,
"drip_interval": null,
"drip_interval_unit": "day",
"drip_calculation_reference": "registration_date",
"minSpentHour": 0,
"minSpentMinutes": 0
}
],
"certificateExpiresAfter": 3,
"certificateExpiresAfterGracePeriod": 30,
"categories": [
1,
2
],
"gradeModules": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Course saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Course
Updates course details using provided parameters.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Course 1\",
\"slug\": \"course-1\",
\"featuredImageUrl\": \"img_path\",
\"completionRedirectionUrl\": \"redirection_path\",
\"credits\": 70,
\"minPassingPercentage\": 75,
\"gradingRule\": \"no_grading\",
\"durationRule\": \"unlimited\",
\"status\": \"publish\",
\"certificateTemplates\": [
1
],
\"modules\": [
{
\"module_id\": 1,
\"name\": \"test\",
\"type\": \"text\",
\"icon\": \"<i class=\\\"el-icon-tickets\\\"><\\/i>\",
\"is_locked\": false,
\"drip_rules\": \"immediately\",
\"drip_fixed_date\": null,
\"drip_interval\": null,
\"drip_interval_unit\": \"day\",
\"drip_calculation_reference\": \"registration_date\",
\"minSpentHour\": 0,
\"minSpentMinutes\": 0
}
],
\"certificateExpiresAfter\": 3,
\"certificateExpiresAfterGracePeriod\": 30,
\"categories\": [
1,
2
],
\"gradeModules\": []
}"
const url = new URL(
"https://demo.aomlms.com/api/course/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Course 1",
"slug": "course-1",
"featuredImageUrl": "img_path",
"completionRedirectionUrl": "redirection_path",
"credits": 70,
"minPassingPercentage": 75,
"gradingRule": "no_grading",
"durationRule": "unlimited",
"status": "publish",
"certificateTemplates": [
1
],
"modules": [
{
"module_id": 1,
"name": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"><\/i>",
"is_locked": false,
"drip_rules": "immediately",
"drip_fixed_date": null,
"drip_interval": null,
"drip_interval_unit": "day",
"drip_calculation_reference": "registration_date",
"minSpentHour": 0,
"minSpentMinutes": 0
}
],
"certificateExpiresAfter": 3,
"certificateExpiresAfterGracePeriod": 30,
"categories": [
1,
2
],
"gradeModules": []
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Course updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Slug
Updates the slug of the course. Example - old-awesome-course to new-awesome-course
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/update-slug/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"slug\": \"Awesome-course\"
}"
const url = new URL(
"https://demo.aomlms.com/api/course/update-slug/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"slug": "Awesome-course"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
"Awesome-course"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Lookup
Retrieves all the course details. Helps while showing course names in dropdown elements. You can apply filters using search_term parameter.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/lookup?search_term=quia" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/lookup"
);
const params = {
"search_term": "quia",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "course 1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Course
To delete a course, you need to use this request. Returns number of course deleted(if multiple selected) and number of not-deleted due to existing enrollment of students
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 course(s) deleted 1 course(s) not deleted as it has enrollments. Please remove the students from the course and try again."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified course. Parameters is provided which needs to be updated.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"course_ids\": [
1,
2
],
\"author_id\": 1,
\"categories_id\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"course_ids": [
1,
2
],
"author_id": 1,
"categories_id": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Courses updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Drip Option Lookup
Retrieves all the drip options for the courses. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/drip/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/drip/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"options": [
{
"db_value": "immediately",
"display_value": "Immediately"
},
{
"db_value": "fixed_date",
"display_value": "On a Fixed Date"
},
{
"db_value": "specific_interval",
"display_value": "At Fixed Intervals"
}
],
"intervals": [
{
"db_value": "day",
"display_value": "Day(s)"
},
{
"db_value": "week",
"display_value": "Week(s)"
},
{
"db_value": "month",
"display_value": "Month(s)"
}
],
"calculation_ref": [
{
"db_value": "registration_date",
"display_value": "Enrollment Date"
},
{
"db_value": "started_date",
"display_value": "Course Start Date"
}
]
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Status Lookup
Retrieves all the status options for the courses. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/status/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/status/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "Not Started",
"display_value": "Not Started"
},
{
"db_value": "In Progress",
"display_value": "In Progress"
},
{
"db_value": "Completed",
"display_value": "Completed"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Grading Rules Lookup
Retrieves all the grading rules for the courses. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/grading-rules/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/grading-rules/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "no_grading",
"display_value": "No Grading"
},
{
"db_value": "avg_all_modules",
"display_value": "Average of all Quiz/Assignment/Discussions/Scorm"
},
{
"db_value": "avg_specific_modules",
"display_value": "Average of specific Quiz/Assignment/Discussions/Scorm"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Duration Rules Lookup
Retrieves all the duration rules for the courses. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/duration-rules/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/duration-rules/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "unlimited",
"display_value": "Unlimited"
},
{
"db_value": "on_specific_date",
"display_value": "Till Specific Date"
},
{
"db_value": "x_days_after_start",
"display_value": "Till X day(s) after a student start the course"
},
{
"db_value": "x_days_after_enrollment",
"display_value": "Till X day(s) after a student is registered to the course"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Activities
Retrieves all the activities performed by the students on the course. Details will be returned in paginated mode. You can apply filters also using search_params parameter.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course-activities?course_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22user_id%22%3A3%2C%22activityName%22%3A%22%22%2C%22dates%22%3A%5B%5D%7D&context=admin" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course-activities"
);
const params = {
"course_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"user_id":3,"activityName":"","dates":[]}",
"context": "admin",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course 1",
"featuredImage": null,
"recordsTotal": 40,
"recordsFiltered": 10,
"records": [
{
"id": 10,
"verb": "ACCESSED",
"created_at": "Aug 03, 2020 10:07 AM",
"message": "Demo Student has accessed course 1",
"student": "Demo Student"
},
{
"id": 9,
"verb": "ACHIEVED CERTIFICATE",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has achieved certificate for course 1",
"student": "Demo Student"
},
{
"id": 8,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 7,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 6,
"verb": "ACHIEVED CERTIFICATE",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has achieved certificate for course 1",
"student": "Demo Student"
},
{
"id": 5,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 4,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 3,
"verb": "STARTED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has started test",
"student": "Demo Student"
},
{
"id": 2,
"verb": "STARTED",
"created_at": "Aug 03, 2020 10:01 AM",
"message": "Demo Student has started course 1",
"student": "Demo Student"
},
{
"id": 1,
"verb": "ENROLLED",
"created_at": "Aug 03, 2020 10:00 AM",
"message": "Demo Student is enrolled to course 1",
"student": "Demo Student"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Students Progress
Retrieves the progress of the course. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course-progress/edit/6?userId=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course-progress/edit/6"
);
const params = {
"userId": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"modules": [
{
"module_id": 16,
"name": "test",
"slug": "test",
"type": "pdf",
"icon": "<i class=\"el-icon-document\"></i>",
"status_row_id": -1,
"status": "Not Started",
"display_status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": 0
},
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0,
"is_collapsed": true
}
],
"id": 105,
"course_id": 35,
"userId": 7,
"userName": "Test Staff",
"email": "[email protected]",
"featuredImageUrl": null,
"status": "Not Started",
"completionPercentage": 0,
"enrollmentDate": "2024-01-07 07:49:38",
"expiryDate": "",
"completionDate": "",
"startDate": "",
"lastAccessed": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/course-progress/update/{id}
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course-progress/update/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course-progress/update/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Name
Retrieves the course name.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/course/name/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/course/name/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"course_name": "course 1"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enroll Students
To enroll students in a course, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/enroll/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"studentIds\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/enroll/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"studentIds": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) enrolled successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Students
To removes users from a course, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/remove/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
8,
7
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/remove/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
8,
7
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) removed successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reset Progress
To reset the progress of students for course, you need to use this request
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/reset/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
9,
6
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/reset/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
9,
6
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) progress is reset successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Revoke Access
To revokes the access of course from students, you need to use this request.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/revoke/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
9,
6
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/revoke/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
9,
6
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) access has been revoked successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Grant Access
To grants the access of course to students, you need to use this request.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/grant/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
9,
6
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/grant/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
9,
6
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) access has been granted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Expiry
To update the expiry date for the students of a course, you need to use this request.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/course/setExpiry/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
9,
6
],
\"expiryDate\": \"[9, 6]\"
}"
const url = new URL(
"https://demo.aomlms.com/api/course/setExpiry/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
9,
6
],
"expiryDate": "[9, 6]"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Expiration date is sucessfully updated for 2 student(s) "
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign Certificate
To assign certificate to the user for the course, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/assignCertificate/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
9,
6
]
}"
const url = new URL(
"https://demo.aomlms.com/api/course/assignCertificate/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
9,
6
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"isSucess": true,
"message": "Certificate assigned sucessfully to 2 student(s)"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Activities Lookup
Retrieves all the activities/events name performed by students in a course. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/activities/verb/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/activities/verb/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "ENROLLED",
"display_value": "ENROLLED"
},
{
"db_value": "STARTED",
"display_value": "STARTED"
},
{
"db_value": "ACCESSED",
"display_value": "ACCESSED"
},
{
"db_value": "COMPLETED",
"display_value": "COMPLETED"
},
{
"db_value": "SUBMITTED",
"display_value": "SUBMITTED"
},
{
"db_value": "EVALUATED",
"display_value": "EVALUATED"
},
{
"db_value": "REJECTED",
"display_value": "REJECTED"
},
{
"db_value": "RETAKE",
"display_value": "RETAKE"
},
{
"db_value": "ACHIEVED CERTIFICATE",
"display_value": "ACHIEVED CERTIFICATE"
},
{
"db_value": "RESET",
"display_value": "RESET"
},
{
"db_value": "REMOVED",
"display_value": "REMOVED"
},
{
"db_value": "REVOKED",
"display_value": "REVOKED"
},
{
"db_value": "GRANTED",
"display_value": "GRANTED"
},
{
"db_value": "UPDATED EXPIRY DATE",
"display_value": "UPDATED EXPIRY DATE"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gradebook Data
Retrieves all the progress achieved by a student on the course. Details will be returned in paginated mode. You can use the userId parameter to get details for different students.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/progress/course/1?userId=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/progress/course/1"
);
const params = {
"userId": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "course 1",
"modules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "6 days ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 1,
"totalMarks": null,
"obtainedMarks": null
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0,
"totalMarks": 50,
"obtainedMarks": null
}
],
"id": 1,
"userId": 3,
"permalink": "http://localhost:8000/course/course-1",
"featuredImageUrl": null,
"instructions": null,
"accessStatus": "Allowed",
"status": "Completed",
"completionPercentage": 50,
"timeSpent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"enrollmentDate": "03 Aug 2020",
"isExpired": false,
"daysToExpire": "Unlimited days",
"lastAccessed": "6 days ago",
"isCertificateAvailable": true,
"totalMarks": 50,
"obtainedMarks": 0,
"percentage": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled Users Lookup
Retrieves all the user details enrolled in a course.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/enrolled/course/1?search_term=aperiam" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/enrolled/course/1"
);
const params = {
"search_term": "aperiam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 3,
"full_name": "Demo Student",
"email": "[email protected]"
},
{
"id": 4,
"full_name": "John Doe",
"email": "[email protected]"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone
To clone a course, you create a cloned object for a specific course. The newly generated cloned course will help to let you change the content of the course with or without letting affect the real course.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/course/clone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"course_id\": 1,
\"course_name\": \"course 1\",
\"isDeepCopy\": false
}"
const url = new URL(
"https://demo.aomlms.com/api/course/clone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"course_id": 1,
"course_name": "course 1",
"isDeepCopy": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Course Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Course Type Lookup
Retrieves Course types.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "self_paced",
"display_value": "Self Paced"
},
{
"db_value": "instructor_led",
"display_value": "Instructor Led"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Auto Enroll Courses
Updates the details of auto enroll courses. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/courses/auto-enroll-courses/update" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": [
1
]
}"
const url = new URL(
"https://demo.aomlms.com/api/courses/auto-enroll-courses/update"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": [
1
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Course Updated Successfully",
"type": "success",
"title": "Success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Auto Enrolled Courses
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/auto-enroll-courses?order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/auto-enroll-courses"
);
const params = {
"order_by": "{"colName":"created_at","direction":"desc"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": "1",
"label": "Professional Development and Training"
},
{
"value": "2",
"label": "Training your Employees for the modern world"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/courses
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/courses" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/courses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 297
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/learningPaths
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/learningPaths" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/learningPaths"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 296
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal-permissions
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal-permissions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal-permissions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 295
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/users
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/users" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 293
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/membership/courses/{id}
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/membership/courses/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/membership/courses/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 292
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/membership/modules/{id}
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/membership/modules/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/membership/modules/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 291
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/page/{id}
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/page/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/page/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 290
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/portal/page/{id}
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/portal/page/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/page/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/pages/tabularlist
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/pages/tabularlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/pages/tabularlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 289
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/pages
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/pages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/pages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/page/delete
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/page/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/page/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/pages/harddelete
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/pages/harddelete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/pages/harddelete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/pages/restore
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/pages/restore" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/pages/restore"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/getPortalCourseCatalog
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/getPortalCourseCatalog" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/getPortalCourseCatalog"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 288
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/users/addPortalAdmins
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/addPortalAdmins" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/addPortalAdmins"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/users/addPortalLearners
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/addPortalLearners" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/addPortalLearners"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/users/updatePermissions
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/updatePermissions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/updatePermissions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/users/remove
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/remove" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/remove"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/users/update-status
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/update-status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/update-status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portal/{portalId}
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portal/{portalId}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/{portalId}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 287
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/portal/{portalId}
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/portal/{portalId}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/{portalId}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/updateBranding
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/updateBranding" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/updateBranding"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/addSubPortals
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/addSubPortals" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/addSubPortals"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/delete
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/sub-portal-delete
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/sub-portal-delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/sub-portal-delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/menus
POST api/portal/users/addToLearner
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/addToLearner" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/addToLearner"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/users/updateToPortalAdmin
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/users/updateToPortalAdmin" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/updateToPortalAdmin"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/portal/updatePortalStatus
Example request:
curl --request POST \
"https://demo.aomlms.com/api/portal/updatePortalStatus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/updatePortalStatus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portals/tabularlist
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/tabularlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portals/tabularlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 286
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portals/lookup
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portals/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 285
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portals/menus/list
GET api/admin/permissions/{id}
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/admin/permissions/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/admin/permissions/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 283
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portals/pages/dropdownlist
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/pages/dropdownlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portals/pages/dropdownlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 282
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/portals/checkout
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/portals/checkout" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portals/checkout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 281
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/portal/users/updateCurrentPortal
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/portal/users/updateCurrentPortal" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/portal/users/updateCurrentPortal"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve List of classes
Return list of classes
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22location%22%3A%22%22%2C%22courseName%22%3A%22%22%2C%22dates%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"location":"","courseName":"","dates":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"recordsTotal": 56, "recordsFiltered": 56, "records": [{"id": 56, "course_name": "Professional Development", "start_time": "01-Jan-2024 02:00 AM", "end_time": "31-Jan-2024 14:00 PM", "location": "New Jersey", "courseEdit": "https:\/\/staging.aomlms.com\/dashboard\/course\/edit\/34?start=2024-01-01&end=2024-01-31", "isAbleToEdit": true }}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Schedules of a class
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/get-class-schedules?courseId=1&search_param=%7B%22location%22%3A1%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/get-class-schedules"
);
const params = {
"courseId": "1",
"search_param": "{"location":1}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"classes": [
{
"id": 56,
"startDate": "01-Jan-2024",
"endDate": "31-Jan-2024",
"startTime": "02:00 AM",
"endTime": "14:00 PM",
"location_id": 2,
"location": "New Jersey",
"instructor_id": 8,
"instructor": "John Doe",
"start_time": "2024-01-01T09:00:00.000000Z"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Class
To create class, you need to use this request. (See parameters)
Returns : id of the class created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/class/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"allowDownload\": false,
\"courseId\": 34,
\"disabled\": false,
\"endTime\": \"2024-01-1 10:00:00\",
\"instructor\": 2,
\"location\": 2,
\"recurrence\": \"ut\",
\"starttime\": \"2024-01-31 10:00:00\",
\"type\": \"onetime\",
\"webinarProvider\": \"voluptas\",
\"zoom_host_pwd\": \"optio\",
\"zoom_meeting_id\": \"tenetur\"
}"
const url = new URL(
"https://demo.aomlms.com/api/class/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"allowDownload": false,
"courseId": 34,
"disabled": false,
"endTime": "2024-01-1 10:00:00",
"instructor": 2,
"location": 2,
"recurrence": "ut",
"starttime": "2024-01-31 10:00:00",
"type": "onetime",
"webinarProvider": "voluptas",
"zoom_host_pwd": "optio",
"zoom_meeting_id": "tenetur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 62,
"message": "Class saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve class details
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/edit?classId=1&courseId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/edit"
);
const params = {
"classId": "1",
"courseId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"classDetails": {
"id": 56,
"courseId": "34",
"startTime": "2024-01-01 09:00:00",
"endTime": "2024-01-31 21:00:00",
"location": 2,
"instructor": 8,
"webinarProvider": "",
"allowDownload": false,
"zoom_meeting_id": null,
"zoom_host_pwd": null,
"studyMaterial": []
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update event details with specified parameters.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/class/update?allowDownload=&courseId=%2219%22&endTime=%222024-01-31+23%3A09%3A00%22&id=2&instructor=6&location=2&startTime=%222024-01-09+02%3A00%3A00%22&studyMaterial[]=culpa&studyMaterial%5B0%5D%5Bmedia_id%5D=2&studyMaterial%5B0%5D%5Bname%5D=%22elephantsdream-2-a0c4eea6d83f7d0141e36e30cc7b0369.mp4%22&studyMaterial%5B0%5D%5Btype%5D=%22Videos%22&webinarProvider=%22%22&zoom_host_pwd=null&zoom_meeting_id=null" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/update"
);
const params = {
"allowDownload": "0",
"courseId": ""19"",
"endTime": ""2024-01-31 23:09:00"",
"id": "2",
"instructor": "6",
"location": "2",
"startTime": ""2024-01-09 02:00:00"",
"studyMaterial[0]": "culpa",
"studyMaterial[0][media_id]": "2",
"studyMaterial[0][name]": ""elephantsdream-2-a0c4eea6d83f7d0141e36e30cc7b0369.mp4"",
"studyMaterial[0][type]": ""Videos"",
"webinarProvider": """",
"zoom_host_pwd": "null",
"zoom_meeting_id": "null",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Class updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve details of course and class associated with it
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/get-course-classes?course_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22location%22%3A%22%22%2C%22instructor%22%3A%22%22%2C%22dates%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/get-course-classes"
);
const params = {
"course_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"location":"","instructor":"","dates":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "Professional Development",
"instructions": null,
"featuredImage": null,
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 56,
"startDate": "01-Jan-2024",
"endDate": "31-Jan-2024",
"startTime": "09:00 AM",
"endTime": "21:00 PM",
"location": "New Jersey",
"instructor": "John",
"classSize": 0
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enroll
urlParam id The ID of the class. Example: 2
Example request:
curl --request POST \
"https://demo.aomlms.com/api/class/enroll/{id}?studentIds[]=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/enroll/{id}"
);
const params = {
"studentIds[0]": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "1 student(s) enrolled successfully",
"enrolledUsersCount": 1,
"notEnrolledUsers": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve details of course and class associated with it
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/enrolled-students?class_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22status%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/enrolled-students"
);
const params = {
"class_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"nameOrEmail":"","status":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseId": 34,
"locationId": 2,
"courseName": "Professional Development",
"featuredImage": null,
"recordsTotal": 0,
"startDate": "01-Jan-2024",
"endDate": "31-Jan-2024",
"startTime": "09:00 AM",
"endTime": "21:00 PM",
"totalAttended": 0,
"totalNoShow": 0,
"totalCancelled": 0,
"recordsFiltered": 0,
"records": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update class status of the student
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/update-class-status?id=3&status=Attended&classId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/update-class-status"
);
const params = {
"id": "3",
"status": "Attended",
"classId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Status Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Student from Class
Example request:
curl --request POST \
"https://demo.aomlms.com/api/class/remove/2?enrollmentIds[]=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/remove/2"
);
const params = {
"enrollmentIds[0]": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "1 student(s) removed successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign Certificate
Example request:
curl --request POST \
"https://demo.aomlms.com/api/class/assignCertificate/2?enrollmentIds[]=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/assignCertificate/2"
);
const params = {
"enrollmentIds[0]": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"isSucess": true,
"message": "Certificate assigned successfully to 1 student(s)"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrive Study material
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/study-material?registrationId=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/study-material"
);
const params = {
"registrationId": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Professional Development",
"instructions": null,
"featuredImageUrl": null,
"status": "Registered",
"display_status": "Registered",
"startDate": "09-Jan-2024",
"endDate": "31-Jan-2024",
"startTime": "02:00 AM",
"endTime": "23:09 PM",
"location": "New Jersey",
"start": "2024-01-09T02:00:00.000000Z",
"end": "2024-01-31T23:09:00.000000Z",
"instructor": "test ",
"classMaterial": [
{
"id": 2,
"file_name": "elephantsdream-2-a0c4eea6d83f7d0141e36e30cc7b0369.mp4",
"file_type": "Videos",
"status": "Completed",
"s3_url": "https://4bf2-103-163-65-26.ngrok-free.app/storage/videos/elephantsdream-2-a0c4eea6d83f7d0141e36e30cc7b0369.mp4",
"mux_url": "https://stream.mux.com/gwxGG01jAt024241hlvnE3Sh1oyclp6VXo.m3u8",
"mux_id": "243RSjx5V8tv4pr0201iAZwiCUAd019dKd5",
"mime_type": "video/mp4",
"created_at": "Dec 26, 2023 12:38 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Class
Returns success message on deleting class for specified ID
Example request:
curl --request POST \
"https://demo.aomlms.com/api/class/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"classId\": 57
}"
const url = new URL(
"https://demo.aomlms.com/api/class/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"classId": 57
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Permissions updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Class
Returns success message on deleting class
Example request:
curl --request POST \
"https://demo.aomlms.com/api/class/delete-course-classes" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"courseId\": 3
}"
const url = new URL(
"https://demo.aomlms.com/api/class/delete-course-classes"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"courseId": 3
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 Class(s) is successfully deleted and 4 Enrollment(s) is successfully removed"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Webinar Details
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/webinar/details?registrationId=11" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/webinar/details"
);
const params = {
"registrationId": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordings": [],
"name": "Professional Development",
"instructions": null,
"status": "Registered",
"display_status": "Registered",
"startTime": "Jan 06, 2024 02:00 AM",
"endTime": "Jan 06, 2024 07:00 AM",
"location": "Virtual",
"instructor": "test k ",
"serviceProvider": "zoom",
"meetingUrl": null,
"webinarTimezone": "MST",
"duration": "0 Day(s)",
"webinarStatus": "Upcoming",
"webinarDetails": {
"is_success": true,
"message": "Zoom meeting initialized",
"url": "https://staging.aomlms.com/dashboard/zoom-frame?meetingNumber=72624398242&password=7kTYJ5&signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJkV0wyQ08zNVJwSzBhUHZlUFJmM2lBIiwibW4iOjcyNjI0Mzk4MjQyLCJyb2xlIjowLCJpYXQiOjE3MDQ0NTYxMDYsImV4cCI6MTcwNDQ2MzMwNiwiYXBwS2V5IjoiZFdMMkNPMzVScEswYVB2ZVBSZjNpQSIsInRva2VuRXhwIjoxNzA0NDYzMzA2fQ.7NdLjPxSLqTyovXTYBkbw7I7SktHZSfsbAjbTDLqW0A&apiKey=dWL2CO35RpK0aPvePRf3iA&user_name=testk test&[email protected]"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update class status of the student
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/reports/class-detailed?class_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22status%22%3A%5B%5D%2C%22userIdActual%22%3A%22%22%2C%22started_on%22%3A%5B%5D%2C%22completed_on%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/reports/class-detailed"
);
const params = {
"class_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"nameOrEmail":"","status":[],"userIdActual":"","started_on":[],"completed_on":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "Test ILT course",
"recordsTotal": 0,
"totalAttended": 0,
"totalNoShow": 0,
"totalCancelled": 0,
"totalRegistered": 0,
"recordsFiltered": 0,
"records": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve LMS Overview Report
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/reports/overview?selectedMonth=1-2024" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/reports/overview"
);
const params = {
"selectedMonth": "1-2024",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"labels": ["Test ILT course (03-Jan-2024)", "Test ILT course (10-Jan-2024)" ], "totalRegistered": [0, 0], "totalAttended": [0, 0],"totalNoShow": [0,0], "totalCancelled": [0,0],"startDate": ["03-Jan-2024","10-Jan-2024"],"endDate": ["03-Jan-2024","10-Jan-2024","sumRegistered": 2,"sumAttended": 0,"sumNoShow": 0,"sumCancelled": 0}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Webinar Launch Details
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/class/webinar/launch?registrationId=11" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/class/webinar/launch"
);
const params = {
"registrationId": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"provider": "zoom",
"webinarDetails": {
"is_success": true,
"message": "Zoom meeting initialized",
"url": "https://staging.aomlms.com/dashboard/zoom-frame?meetingNumber=72624398242&password=7kTYJ5&signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJkV0wyQ08zNVJwSzBhUHZlUFJmM2lBIiwibW4iOjcyNjI0Mzk4MjQyLCJyb2xlIjoxLCJpYXQiOjE3MDQ0NTY3NTQsImV4cCI6MTcwNDQ2Mzk1NCwiYXBwS2V5IjoiZFdMMkNPMzVScEswYVB2ZVBSZjNpQSIsInRva2VuRXhwIjoxNzA0NDYzOTU0fQ.S8ttl5m7lLnJEL3GDdIzauyvNuVz1p8g9MXhCxsrzak&apiKey=dWL2CO35RpK0aPvePRf3iA&user_name=test k &[email protected]"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Launch
To launch the course, you need to use this request. It will set all the progress and status of the course modules.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/courses/launch?registrationId=12" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/courses/launch"
);
const params = {
"registrationId": "12",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "course 1",
"modules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"permalink": "http://localhost:8000/course/course-1",
"featuredImageUrl": null,
"instructions": null,
"accessStatus": "Allowed",
"status": "In Progress",
"completionPercentage": 0,
"timeSpent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": 0
},
"enrollmentDate": "10 Aug 2020",
"isExpired": false,
"daysToExpire": "Unlimited days",
"lastAccessed": "1 minute ago"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Announcement
To create announcement, you need to use this request. (See parameters) Created announcement can be used to send messages out to students.
Returns : id of the text module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/announcement" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"heading\": \"New Announcement\",
\"content\": \"This is for test purpose\",
\"expiry\": \"2020-08-05\",
\"sending_rules\": \"all\",
\"user_ids\": [],
\"course_ids\": []
}"
const url = new URL(
"https://demo.aomlms.com/api/announcement"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"heading": "New Announcement",
"content": "This is for test purpose",
"expiry": "2020-08-05",
"sending_rules": "all",
"user_ids": [],
"course_ids": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Announcement Created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Announcement Tabular List
Returns all the announcement in a tabular list format in paginated mode. You can apply filter using search_param via heading of the announcements.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/announcement/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22heading%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/announcement/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"heading":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"heading": "New Announcement",
"author": "Aom Staff",
"content": "This is for test purpose",
"created_at": "Aug 11, 2020 01:25 PM",
"sent_to": "All"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Announcement
Updates the details of a specified announcement. (See parameters) Announcement can be used to send out messages to students.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/announcement/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"heading\": \"New Announcement\",
\"content\": \"This is for test purpose\",
\"expiry\": \"2020-08-05\",
\"sending_rules\": \"all\",
\"user_ids\": [],
\"course_ids\": []
}"
const url = new URL(
"https://demo.aomlms.com/api/announcement/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"heading": "New Announcement",
"content": "This is for test purpose",
"expiry": "2020-08-05",
"sending_rules": "all",
"user_ids": [],
"course_ids": []
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Announcement Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Announcement
Retrieves the details of the specified announcement. Helps in fetching announcement using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/announcement/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/announcement/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"heading": "New Announcement",
"content": "This is for test purpose",
"sending_rules": "all",
"expiry": "2020-08-05"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Announcement
To delete an announcement, you need to use this request. Returns number of announcement deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/announcement/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/announcement/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "3 announcement(s) deleted "
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Student Announcement List
Returns all the announcement in list format in paginated mode. You can apply filter using search_param via heading of the announcements. These annoucement list will appear in student panel(dashboard) not admin panel.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/student/announcements?page_size=5&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22heading%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/student/announcements"
);
const params = {
"page_size": "5",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"heading":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#00BCD4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">AS</text></svg>",
"recordsTotal": 1,
"recordsFiltered": 0,
"records": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quickbooks log Tabular List
Returns all the Quickbooks log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quickbooks/logs?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quickbooks/logs"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 1,
"records": [
{
"id": 4,
"event": "New Order Placed",
"status": "success",
"created_at": "Aug 10, 2020 01:58 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Flash Cards Modules
A Flash Cards Module is a lesson module used as course content. Helps to perform CRUD operation to and for Flash Cards modules.
Flash Cards Modules Tabular List
Returns all the Flash Cards modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/flashcards?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/flashcards"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 09:56 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve FlashCards Module
Retrieves the details of the specified FlashCards module. Helps in fetching FlashCards module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/flashcards/67" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/flashcards/67"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>Content of the text lesson</p>",
"trackCompletion": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create FlashCard Module
To create a FlashCard module, you need to use this request. (See parameters) Created FlashCard modules can be used in the course as course content/lesson.
Returns : id of the FlashCard module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/flashcards" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"The Fundamentals of LMS\",
\"content\": \"<p>This is the short content here<\\/p>\",
\"trackCompletion\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/flashcards"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "The Fundamentals of LMS",
"content": "<p>This is the short content here<\/p>",
"trackCompletion": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 5,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update FlashCard Module
Updates the details of a specified FlashCard modules. (See parameters) FlashCard modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/flashcards/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"The Fundamentals of LMS\",
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"trackCompletion\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/flashcards/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "The Fundamentals of LMS",
"content": "<p>This is the updated short content here<\/p>",
"trackCompletion": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed FlashCard Module Info
Retrieves details of FlashCard module in depth as well as different modules details that are being used as course content for the same course the current text module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/flashcards/details?registrationId=1&moduleId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/flashcards/details"
);
const params = {
"registrationId": "1",
"moduleId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>afegrshtdh</p>",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"trackCompletion": true,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "1 week ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 1
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "",
"nextSlug": "assign",
"status": "Completed",
"timeSpent": 6,
"statusRowId": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed FlashCard module Info as Membership content
Retrieves details of FlashCard module in depth for the same membership the current FlashCard module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/flashcards/content-details?moduleId=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/flashcards/content-details"
);
const params = {
"moduleId": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>afegrshtdh</p>",
"trackCompletion": true,
"min_time_spent": 0,
"timeSpent": 6
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Front End Webhook API
Endpoints for Front end Marketing Pages. Send automated notifications to external system when some action happens.
Webhook Actions Lookup
Retrieves all the events for the webhook actions. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/webhook/eventLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/webhook/eventLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "new_account_created",
"display_value": "New Account Created"
},
{
"db_value": "course_enrolled",
"display_value": "Enrolled in a course"
},
{
"db_value": "quiz_submission",
"display_value": "Submitted a Quiz"
},
{
"db_value": "assigment_submission",
"display_value": "Submitted an assignment"
},
{
"db_value": "assigment_evaluation",
"display_value": "Evaluated an assignment"
},
{
"db_value": "assigment_rejection",
"display_value": "Rejected an assignment"
},
{
"db_value": "discussion_submission",
"display_value": "Submitted a discussion"
},
{
"db_value": "new_order",
"display_value": "New Order Placed"
},
{
"db_value": "failed_order",
"display_value": "Order Failed"
},
{
"db_value": "refunded_order",
"display_value": "Order Refunded"
},
{
"db_value": "pending_payment",
"display_value": "Payment Pending"
},
{
"db_value": "new_announcement",
"display_value": "New Announcement"
},
{
"db_value": "course_completed",
"display_value": "Course Completed"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Webhook
To create a Webhook, you need to use this request. Provide url and select event and it will be created. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/webhook/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"url\": \"https:\\/\\/example.aom\",
\"description\": \"It will use to collect new user data.\",
\"eventList\": \"New Account Created\"
}"
const url = new URL(
"https://demo.aomlms.com/api/webhook/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"url": "https:\/\/example.aom",
"description": "It will use to collect new user data.",
"eventList": "New Account Created"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "2",
"message": "Webhook saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webhook Actions Tabular List
Returns all the Webhook created in a tabular list format. You can apply filter using search_param.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/webhooks?order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/webhooks"
);
const params = {
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 3,
"records": [
{
"id": 3,
"url": "https://example.aom.com",
"events": "New Account Created",
"description": "User new account created",
"author": "Client Admin",
"created_at": "Aug 10, 2020 12:43 PM"
},
{
"id": 4,
"url": "https://example.aom.com",
"events": "Enrolled in a course",
"description": "User enrolled in a course",
"author": "Client Admin",
"created_at": "Aug 10, 2020 12:43 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Webhook
Updates a webhook using parameters mentioned. (See parameters) Updates the webhook details using webhook ID.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/webhook/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"url\": \"https:\\/\\/example.aom\",
\"description\": \"It will use to collect new user data.\",
\"eventList\": \"New Account Created\"
}"
const url = new URL(
"https://demo.aomlms.com/api/webhook/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"url": "https:\/\/example.aom",
"description": "It will use to collect new user data.",
"eventList": "New Account Created"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "4",
"message": "Webhook updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Webhook
To delete a webhook, you need to use this request.
Example request:
curl --request DELETE \
"https://demo.aomlms.com/api/webhook/delete/[1]" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/webhook/delete/[1]"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Webhook deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webhook log Tabular List
Returns all the webhook log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/webhook/logs/{id}?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/webhook/logs/{id}"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 1,
"records": [
{
"id": 4,
"event": "New Account Created",
"status": "success",
"created_at": "Aug 10, 2020 01:58 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gamification
Endpoints for managing Gamification settings.
Tabular List
Returns all the gamification events.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/gamification_events/tabularlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_events/tabularlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"records": [
{
"id": 1,
"name": "test",
"triggerValue": 2,
"badgeTitle": "1",
"type": "total_money_spent",
"display_type": "Total money spent"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Event Type Lookup
Retrieves Event types.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/gamification_events/eventTypeLookUp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_events/eventTypeLookUp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "total_money_spent",
"display_value": "Total money spent"
},
{
"db_value": "total_time_spent",
"display_value": "Total time spent learning(in hrs)"
},
{
"db_value": "total_module_completed",
"display_value": "No. of modules completed"
},
{
"db_value": "total_course_completed",
"display_value": "No. of courses completed"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Event
Example request:
curl --request POST \
"https://demo.aomlms.com/api/gamification_event/create?name=%22Event+1%22&eventType=%22total_module_completed%22&selectedBadgeId=123&triggerValue=5.6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_event/create"
);
const params = {
"name": ""Event 1"",
"eventType": ""total_module_completed"",
"selectedBadgeId": "123",
"triggerValue": "5.6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 2,
"message": "Event created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Event
Retrieves all the event details.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/gamification_event/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_event/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "test",
"eventType": "total_money_spent",
"selectedBadgeId": 1,
"triggerValue": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Event
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/gamification_event/1?name=%22Event+1%22&eventType=%22total_module_completed%22&selectedBadgeId=123&triggerValue=5.6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_event/1"
);
const params = {
"name": ""Event 1"",
"eventType": ""total_module_completed"",
"selectedBadgeId": "123",
"triggerValue": "5.6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Event updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete event
Delete a event by ID.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/gamification_event/delete/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/gamification_event/delete/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Event deleted Succesfullly."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
General Settings
General Settings helps in managing general platform settings like site name, timezone, emails etc
GET api/siteLanguages
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/siteLanguages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/siteLanguages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 276
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve General Email Settings
Retrieves the details of the general email items. Helps in fetching items of the email settings, items like header, sender name, sender email, etc(See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/emails/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/emails/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"fromName": "Academy of Mine",
"fromEmail": "[email protected]",
"replyToEmail": "[email protected]",
"templateDesign": "default",
"headerLogo": "Default",
"customHeaderLogoURL": "",
"headerBgColor": "#6b15b6",
"bgColor": "#ffffff",
"bodyBgColor": "#f6f9fc",
"bodyTextColor": "#1b1e24"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set General Email Settings
To save the general email settings with updated values, you need to use this request. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/emails/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"fromName\": \"Academy of Mine\",
\"fromEmail\": \"[email protected]\",
\"replyToEmail\": \"[email protected]\",
\"templateDesign\": \"default\",
\"headerLogo\": \"Default\",
\"customHeaderLogoURL\": \"null\",
\"headerBgColor\": \"#6b15b6\",
\"bgColor\": \"#ffffff\",
\"bodyBgColor\": \"#f6f9fc\",
\"bodyTextColor\": \"#1b1e24\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/emails/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"fromName": "Academy of Mine",
"fromEmail": "[email protected]",
"replyToEmail": "[email protected]",
"templateDesign": "default",
"headerLogo": "Default",
"customHeaderLogoURL": "null",
"headerBgColor": "#6b15b6",
"bgColor": "#ffffff",
"bodyBgColor": "#f6f9fc",
"bodyTextColor": "#1b1e24"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set General Email Settings
To save the general email settings with updated values, you need to use this request. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/edit-template" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"content\": \"Hi This email is from AOM.\",
\"enabled\": true,
\"subject\": \"This is subject\",
\"recipients\": \"null\",
\"heading\": \"New Account Created\",
\"type\": \"new_account_creation\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/edit-template"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"content": "Hi This email is from AOM.",
"enabled": true,
"subject": "This is subject",
"recipients": "null",
"heading": "New Account Created",
"type": "new_account_creation"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Template Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve General Email Format
Retrieves the details of the general email formats. Helps in fetching different types of the email format based on type of the email(See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/get-template" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/get-template"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"area": "account",
"type": "new_account_creation_others",
"subject": "A new account has been created on your site : [site_name]",
"recipients": null,
"heading": "New Account",
"content": "A new account has been created on your site : [site_name]",
"enabled": false
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve General Settings
Retrieves the details of the general items. Helps in fetching items of the settings, items like site title, admin email, date and time format(See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"siteTitle": "Academy of mine",
"adminEmail": "[email protected]",
"siteLanguage": "en",
"timeZone": "0",
"dateFormat": "M d, Y",
"timeFormat": "h:i A",
"privateSite": "no",
"customTimeZone": "",
"homePage": "1",
"productCatalogPage": "2",
"cartPage": "5",
"checkoutPage": "4",
"termConditionPage": "2",
"termConditionText": "I have read and agree to the website.",
"privacyPolicyPage": "3",
"privacyPolicyText": "Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our privacy policy."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve List of Custom Time Zones
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/customTimezone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/customTimezone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"0": "Africa/Abidjan",
"1": "Africa/Accra",
"2": "Africa/Addis_Ababa"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update General Settings
To update the general settings with updated values, you need to use this request. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/settings/general" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"siteTitle\": \"Academy of mine\",
\"adminEmail\": \"[email protected]\",
\"siteLanguage\": \"en\",
\"timeZone\": \"null\",
\"dateFormat\": \"M d, Y\",
\"timeFormat\": \"h:i A\",
\"privateSite\": \"no\",
\"customTimeZone\": \"America\\/Eirunepe\",
\"homePage\": \"1\",
\"productCatalogPage\": 2,
\"cartPage\": 5,
\"checkoutPage\": \"4\",
\"termConditionPage\": 3,
\"termConditionText\": \"I have read and agree to the website term.\",
\"privacyPolicyPage\": 2,
\"privacyPolicyText\": \"Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our privacy policy.\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/general"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"siteTitle": "Academy of mine",
"adminEmail": "[email protected]",
"siteLanguage": "en",
"timeZone": "null",
"dateFormat": "M d, Y",
"timeFormat": "h:i A",
"privateSite": "no",
"customTimeZone": "America\/Eirunepe",
"homePage": "1",
"productCatalogPage": 2,
"cartPage": 5,
"checkoutPage": "4",
"termConditionPage": 3,
"termConditionText": "I have read and agree to the website term.",
"privacyPolicyPage": 2,
"privacyPolicyText": "Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our privacy policy."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Branding Settings
Retrieves the details of the brand settings. Helps in fetching items of the brand settings, items like primary color, body color, logo footer text(See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/branding" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/branding"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"brandColors": {
"primaryColor": "#6b15b6",
"bodyBgColor": "#f6f9fc",
"bodyColor": "#1b1e24"
},
"logo": "",
"logoMini": "",
"topBarEmail": "[email protected]",
"topBarPhone": "+1-202-555-0189",
"footerText": "Copyright © Your Company Name - All rights reserved."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Branding Settings
To update the branding settings with updated values, you need to use this request. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/branding" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"brandColors\": [
\"vel\"
],
\"footerText\": \"Copyright © Your Company Name - All rights reserved.\",
\"logo\": \"nobis\",
\"logoMini\": \"eveniet\",
\"shouldCompileTheme\": false,
\"topBarEmail\": \"[email protected]\",
\"topBarPhone\": \"1234567890\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/branding"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"brandColors": [
"vel"
],
"footerText": "Copyright © Your Company Name - All rights reserved.",
"logo": "nobis",
"logoMini": "eveniet",
"shouldCompileTheme": false,
"topBarEmail": "[email protected]",
"topBarPhone": "1234567890"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Branding Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Custom Stylings
Retrieves the details of the custom styles being added in the platform.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/customstyle" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/customstyle"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"custom_css": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Custom Stylings
To set or update the custom stylings with updated values, you need to use this request. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/customstyle" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"custom_css\": \"body: {color: red;}\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/customstyle"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"custom_css": "body: {color: red;}"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Custom Styling Saved Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Email Status
Updates the status of the email if the selected area of the email format as enabled or not. If disabled, the students will not get any email from this platform for selected email format area(account, lms, ecommerce, etc) and type (account creation, enrollments, etc)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/update-state" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"area\": \"account\",
\"isEnabled\": false,
\"type\": \"new_account_creation\"
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/update-state"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"area": "account",
"isEnabled": false,
"type": "new_account_creation"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Course| Product| Users
Search bar in home page to show profession hint,industry hint and state hint as well. Retrieves all details regarding courses, product and users for homepage.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/generic-search" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/generic-search"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
[
{
"label": "Courses",
"options": [
{
"label": "Manage - course 1",
"value": "/dashboard/course/manage/1"
},
{
"label": "Manage - Awesome Course",
"value": "/dashboard/course/manage/2"
},
{
"label": "Manage - course 1_copy",
"value": "/dashboard/course/manage/3"
}
]
},
{
"label": "Users",
"options": [
{
"label": "Aom Staff([email protected])",
"value": "/dashboard/user/edit/1"
},
{
"label": "Client Admin([email protected])",
"value": "/dashboard/user/edit/2"
},
{
"label": "Demo Student([email protected])",
"value": "/dashboard/user/edit/3"
},
{
"label": "John Doe([email protected])",
"value": "/dashboard/user/edit/12"
},
{
"label": "Fake FName Fake LName([email protected])",
"value": "/dashboard/user/edit/13"
},
{
"label": "Fake FName 2 Fake LName 2([email protected])",
"value": "/dashboard/user/edit/14"
}
]
},
{
"label": "Courses",
"options": [
{
"label": "Edit - course 1",
"value": "/dashboard/course/edit/1"
},
{
"label": "Edit - Awesome Course",
"value": "/dashboard/course/edit/2"
},
{
"label": "Edit - course 1_copy",
"value": "/dashboard/course/edit/3"
}
]
},
{
"label": "Products",
"options": [
{
"label": "Product-1",
"value": "/dashboard/product/edit/1"
}
]
},
{
"label": "Modules",
"options": [
{
"label": "test",
"value": "/dashboard/modules/edit/1"
},
{
"label": "assignment 1",
"value": "/dashboard/modules/edit/2"
},
{
"label": "Video Module Name",
"value": "/dashboard/modules/edit/3"
},
{
"label": "assign",
"value": "/dashboard/modules/edit/4"
},
{
"label": "The Fundamentals of LMS",
"value": "/dashboard/modules/edit/5"
},
{
"label": "Getting Started",
"value": "/dashboard/modules/edit/6"
},
{
"label": "First-quiz",
"value": "/dashboard/modules/edit/7"
},
{
"label": "Quiz-2",
"value": "/dashboard/modules/edit/8"
},
{
"label": "My-video-lesson",
"value": "/dashboard/modules/edit/9"
},
{
"label": "Essay on LMS",
"value": "/dashboard/modules/edit/10"
},
{
"label": "File-based-Assignment",
"value": "/dashboard/modules/edit/11"
},
{
"label": "New-Webinar",
"value": "/dashboard/modules/edit/12"
},
{
"label": "First-discussion",
"value": "/dashboard/modules/edit/13"
},
{
"label": "Lesson-1",
"value": "/dashboard/modules/edit/14"
},
{
"label": "Feedback",
"value": "/dashboard/modules/edit/15"
}
]
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Gamification Settings
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/settings/gamification" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/settings/gamification"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"is_enable: true"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Gamification Settings
To Update the gamification settings
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/settings/gamification" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"is_enabled\": false
}"
const url = new URL(
"https://demo.aomlms.com/api/settings/gamification"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"is_enabled": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{"Settings Updated"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hubspot Integration
It allows you to track student activity and progress in the LMS, and trigger changes in HubSpot data accordingly.
Hubspot Event Lookup
Retrieves all the events for the hubspot actions. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/hubspot/eventLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/hubspot/eventLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "new_account_created",
"display_value": "New Account Created",
"crud_op": "Create",
"hubspot_crud": "[{'db_value' => 'hubspot_contact'},{'display_value'=> 'HubSpot Contact'}]"
},
{
"db_value": "Account Updated",
"display_value": "Account Updated",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'HubSpot Contact']]"
},
{
"db_value": "course_enrolled",
"display_value": "Enrolled in a course",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'HubSpot Contact']]"
},
{
"db_value": "course_completed",
"display_value": "Course Completed",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'HubSpot Contact']]"
},
{
"db_value": "course_started",
"display_value": "Course Started",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_contact', 'display_value'=> 'HubSpot Contact']]"
},
{
"db_value": "course_progress",
"display_value": "Course Progress Tracking",
"crud_op": "Update",
"hubspot_crud": "[['db_value' => 'hubspot_deal', 'display_value'=> 'HubSpot Deal']]"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hubspot Field Lookup
Retrieves all the fields for the hubspot. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/hubspot/fieldLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/hubspot/fieldLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "contact"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"lms_fields": [
{
"db_value": "email"
},
{
"db_value": "last_name"
},
{
"db_value": "first_name"
},
{
"db_value": "last_login_ip"
},
{
"db_value": "is_disabled"
}
]
},
{
"hubspot_fields": [
{
"db_value": "email"
},
{
"db_value": "last_name"
},
{
"db_value": "first_name"
}
]
},
{
"courses": []
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Hubspot Action
To create a Hubspot Action, you need to use this request. Provide event,action and object and it will be created. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/hubspot/action/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"event\": \"New Account Created\",
\"action\": \"create.\",
\"object\": \"Hubspot Deal\"
}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/action/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"event": "New Account Created",
"action": "create.",
"object": "Hubspot Deal"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Action created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Hubspot Mapping
To save a Hubspot Mapping, you need to use this request. Provide type and it will be created. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/hubspot/mapping/save" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"hubspot_contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/mapping/save"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "hubspot_contact"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"message": "Mapping saved Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Hubspot Mapping
Retrieves the details of the hubspot mapping. Helps in fetching hubspot mapping using its type. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/mappings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"hubspot_contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/mappings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "hubspot_contact"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"type": "hubspot_contact",
"userFieldProperties": [],
"courseFieldProperties": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hubspot Tabular List
Returns all the hubspot details in a tabular list. You can apply filter using search_param via events.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspots?order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22name%22%3A%22%22%2C%22scormTypes%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspots"
);
const params = {
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"name":"","scormTypes":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"event": "New Account Created",
"object": "",
"action": "",
"event_display_value": "",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 11:03 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Hubspot Action
To update a Hubspot Action, you need to use this request. Provide id, event, action and object and it will be updated. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/hubspot/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"event\": \"New Account Created\",
\"action\": \"create.\",
\"object\": \"Hubspot Deal\"
}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"event": "New Account Created",
"action": "create.",
"object": "Hubspot Deal"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Hubspot updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Hubspot
To delete a Hubspot, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/hubspot/action/delete/[1]" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/action/delete/[1]"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Hubspot deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hubspot Log Tabular List
Returns all the Hubspot log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/logs/50?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/logs/50"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"event": "new_account_created",
"data": [],
"status": "success",
"errorMessage": "",
"created_at": "Aug 03, 2020 09:56 AM",
"showData": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Conditions Lookup
Retrieves all the conditions for Hubspot.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/conditionLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/conditionLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "equal_to",
"display_value": "="
},
{
"db_value": "not_equal_to",
"display_value": "!="
},
{
"db_value": "greater_than",
"display_value": ">"
},
{
"db_value": "less_than",
"display_value": "<"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Operators Lookup
Retrieves all the operators for Hubspot.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/operatorsLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/operatorsLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "and",
"display_value": "And"
},
{
"db_value": "or",
"display_value": "Or"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hubspot Import User Status
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/import-user/status?importId=expedita" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/import-user/status"
);
const params = {
"importId": "expedita",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"lastImportedDate": "07-Jan-2024 10:08 AM",
"status": "queue"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hubspot Import User Logs
Returns all the Hubspot log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/hubspot/importUserlogs/{id}?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/hubspot/importUserlogs/{id}"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 0,
"recordsFiltered": 0,
"records": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Integrations
An integration can be used by admins to integrate this platform to other platforms. Endpoints helps in performing CRUD operation for and to integration.
System Integration Listing
Retrieves all the integrations in list format. Helps while showing integrations in tab formats.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/listing" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/listing"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Google Analytics",
"identifier": "google-analytics",
"description": "The tracking code area that google suit needs to collect data on page sessions and view.",
"logo_url": "/images/google-analytics.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 2,
"name": "Facebook Pixel",
"identifier": "fb-pixel",
"description": "The pixel code area provided in your Facebook Developer account meant for tracking the page view.",
"logo_url": "/images/Facebook.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 3,
"name": "Custom JavaScript",
"identifier": "custom-js",
"description": "The code area for some putting some tiny little piece of code for external applications.",
"logo_url": "/images/javascript.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 4,
"name": "Google Single Sign On",
"identifier": "google-sso",
"description": "Single sign-on (SSO) lets users sign in using their managed Google account credentials.",
"logo_url": "/images/google-logo.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 5,
"name": "Zoom Meetings",
"identifier": "zoom-meetings",
"description": "Zoom is a web-based video conferencing tool. Set the API details to use it in your webinars.",
"logo_url": "/images/zoom-logo.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 6,
"name": "Webhooks",
"identifier": "webhook",
"description": "Send automated notifications to external system when something happens.",
"logo_url": "/images/webhooks.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 7,
"name": "REST API Access",
"identifier": "rest-api-access",
"description": "Now you can leverage REST-Full services. Enable this feature to work with different apps.",
"logo_url": "/images/api.svg",
"is_enabled": true,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": "2022-05-09T08:32:34.000000Z"
},
{
"id": 8,
"name": "GoToWebinar",
"identifier": "goto-webinars",
"description": "GoTo is a web-based video conferencing tool. Set the API details to use it in your webinars.",
"logo_url": "/images/goto-webinar.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 9,
"name": "GoToTraining",
"identifier": "goto-trainings",
"description": "GoTo is a web-based video conferencing tool. Set the API details to use it in your webinars.",
"logo_url": "/images/goto-training.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 10,
"name": "Single Sign On (OAuth 2.0)",
"identifier": "generic-sso-oauth",
"description": "Single sign-on (SSO OAuth 2.0) is an authentication scheme that allows a user to log in with a single ID and password.",
"logo_url": "/images/sso-oauth.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 11,
"name": "Single Sign On (SAML 2.0)",
"identifier": "generic-sso-saml",
"description": "Single sign-on (SSO SAML 2.0) is an authentication scheme that allows a user to log in with a single ID and password.",
"logo_url": "/images/saml-logo.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 12,
"name": "HubSpot",
"identifier": "hubspot",
"description": "HubSpot is an inbound marketing and sales service. Use this integration to sync your hubspot with your LMS platform.",
"logo_url": "/images/hubspot.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 13,
"name": "MS Teams Meetings",
"identifier": "ms-team-meet",
"description": "Microsoft Teams is a collaboration app that helps your team stay organized and have conversations—all in one place.",
"logo_url": "/images/microsoft-teams.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 14,
"name": "Shopify",
"identifier": "shopify",
"description": "Shopify is used to hosts your online store. Use this integration to sync your LMS courses with your shopify products.",
"logo_url": "/images/shopify.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 15,
"name": "Salesforce",
"identifier": "salesforce",
"description": "Salesforce provides customer relationship management service. Use this integration to sync your salesforce with your LMS platform.",
"logo_url": "/images/salesforce.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
},
{
"id": 16,
"name": "Accredible",
"identifier": "accredible",
"description": "Accredible is one of the only platforms available that is a full service digital credentialing solution.",
"logo_url": "/images/accredible.svg",
"is_enabled": false,
"implementer_class": null,
"created_by": 1,
"updated_by": 1,
"created_at": null,
"updated_at": null
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Integration Settings
Updates the integration settings for a specified integration. Setting needs to be updated is mentioned in parameter. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/integrations/settings/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"is_enabled\": true,
\"settings\": [
\"rerum\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/settings/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"is_enabled": true,
"settings": [
"rerum"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Integration Settings
Retrieves all the integration settings for a specified integration. Helps in mainting the data and enable status of the integration.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/settings/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/settings/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Google Analytics",
"identifier": "google-analytics",
"is_enabled": false,
"settings": {
"ga_code": "<script type=\"text/javascript\"></script>"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Integration Status
Updates the integration status(enabled or disabled) for a specified integration.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/integrations/updateStatus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"id\": 4,
\"status\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/updateStatus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 4,
"status": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Settings Updated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Shopify Product List
Return all the Shopify Product, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/shopify/product/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/shopify/product/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "Introduction to Continuing Education"
},
{
"id": 2,
"title": "Professional Training And Education"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Shopify Product
To create a Shopify Product, you need to use this request. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/shopify/product/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Professional Training And Education\",
\"price\": \"3000\"
}"
const url = new URL(
"https://demo.aomlms.com/api/shopify/product/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Professional Training And Education",
"price": "3000"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"success": true,
"message": "Product created successfully",
"product_id": 1,
"product_title": "Professional Training And Education"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscribe Shopify Webhook
To subscribe a Shopify Webhook, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/shopify/webhook/subscribe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/shopify/webhook/subscribe"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
[
{
"success": true,
"message": "Webhook Subscription is successful"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Leaderboard
You can perform operations like create, edit, delete on Leaderboard Tiers.
Retrieve List of Leaderboard Tiers
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/leaderboard/tabularlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/tabularlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"records": [
{
"id": 1,
"name": "test",
"lowerLimit": 1,
"upperLimit": 2
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Leaderboard Tier
Example request:
curl --request POST \
"https://demo.aomlms.com/api/leaderboard/create?name=%22Level+1%22&lowerLimit=10&upperLimit=100.5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/create"
);
const params = {
"name": ""Level 1"",
"lowerLimit": "10",
"upperLimit": "100.5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Leaderboard Tiers
Retrieves the details of the specified Leadership Tier. Helps in fetching Leaderboard Tiers using ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/leaderboard/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Level 1",
"lowerLimit": 1,
"upperLimit": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Leaderboard Tier
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/leaderboard/1?name=%22Level+1%22&lowerLimit=10&upperLimit=100.5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/1"
);
const params = {
"name": ""Level 1"",
"lowerLimit": "10",
"upperLimit": "100.5",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Leadership Tier
Delete a Leadership tier by ID.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/leaderboard/delete/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/leaderboard/delete/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Tier deleted Succesfully.",
"success": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Paths
Learning Path Tabular List
Returns all the learning paths in a tabular list format in paginated mode. You can apply filter using search_param via name(for specific learning path)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-paths/tabularlist?page_size=9&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-paths/tabularlist"
);
const params = {
"page_size": "9",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "learning path 1",
"status": "publish",
"created_at": "03 Aug 2023 09:08 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Learning Path To create a course, you need to use this request with provided parameters.
Returns : id required ID of the learning path. Example: 1
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Learning Path 1\",
\"instructions\": \"Some Instruction\",
\"featuredImageUrl\": \"img_path\",
\"credits\": 70,
\"status\": \"publish\",
\"certificateTemplates\": [
1
],
\"courses\": [
1,
2,
3
],
\"categories\": [
1,
2
],
\"prerequisites\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Learning Path 1",
"instructions": "Some Instruction",
"featuredImageUrl": "img_path",
"credits": 70,
"status": "publish",
"certificateTemplates": [
1
],
"courses": [
1,
2,
3
],
"categories": [
1,
2
],
"prerequisites": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve the Learning Path details based on the learning path ID specified.
@urlParam id required The ID of the learning path. Example: 1
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"name":"learning path 1","featuredImageUrl":null,"instructions":null,"credits":null,"status":"publish","certificateTemplates":[1],"courses":[{"value":1,"label":"course 1", "value":1,"label":"course 1"}],"categories":[],}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Learning Path
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/learning-path/edit/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Learning Path 1\",
\"instructions\": \"Some Instruction\",
\"featuredImageUrl\": \"img_path\",
\"credits\": 70,
\"status\": \"publish\",
\"certificateTemplates\": [
1
],
\"courses\": [
1,
2,
3
],
\"categories\": [
1,
2
],
\"prerequisites\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/edit/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Learning Path 1",
"instructions": "Some Instruction",
"featuredImageUrl": "img_path",
"credits": 70,
"status": "publish",
"certificateTemplates": [
1
],
"courses": [
1,
2,
3
],
"categories": [
1,
2
],
"prerequisites": [
1,
2
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Learning Path
To delete a learning path, you need to use this request. Returns number of learning path deleted(if multiple selected) and number of not-deleted due to existing enrollment of students
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 learning path(s) deleted 1 learning path(s) not deleted as it has enrollments. Please remove the students from the learning path and try again."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Lookup
Retrieves all the learning path details. Helps while showing learning path names in dropdown elements. You can apply filters using search_term parameter.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/lookup?search_term=quas" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/lookup"
);
const params = {
"search_term": "quas",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "Learning Path 1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enrolled Students
Retrieves all the student details enrolled in a learning path. You can use search_param filter using nameOrEmail(student name or email) and status(learning path status)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/enrolled-users?learning_path_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22registered_on%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22nameOrEmail%22%3A%22%22%2C%22status%22%3A%5B%22In+Progress%22%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/enrolled-users"
);
const params = {
"learning_path_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"registered_on","direction":"desc"}",
"search_param": "{"nameOrEmail":"","status":["In Progress"]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"learningPathName": "course 1",
"featuredImage": null,
"recordsTotal": 2,
"totalNotStarted": 1,
"totalInProgress": 0,
"totalCompleted": 1,
"recordsFiltered": 2,
"records": [
{
"id": 6,
"user_id": 4,
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#03A9F4\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">JD</text></svg>",
"status": "Not Started",
"percentComplete": 0,
"access_status": "Allowed",
"registered_on": "09-Aug-2020",
"started_on": "",
"completed_on": "",
"expire_on": "Never",
"last_accessed_on": "Never"
},
{
"id": 1,
"user_id": 3,
"first_name": "Demo",
"last_name": "Student",
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"background\" stroke-width=\"0\" fill=\"#4CAF50\" /><text x=\"20\" y=\"20\" font-size=\"14\" fill=\"#FFFFFF\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">DS</text></svg>",
"status": "Completed",
"percentComplete": 100,
"access_status": "Allowed",
"registered_on": "03-Aug-2020",
"started_on": "03-Aug-2020",
"completed_on": "03-Aug-2020",
"expire_on": "Never",
"last_accessed_on": "6 days ago"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enroll Students
To enroll students in a learning path, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/enroll/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"studentIds\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/enroll/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"studentIds": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) enrolled successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Students
To removes users from a learning path, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/remove/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
8,
7
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/remove/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
8,
7
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 student(s) removed successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign Certificate
To assign certificate to the user for the learning oath, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/assignCertificate/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"enrollmentIds\": [
9,
6
]
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/assignCertificate/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"enrollmentIds": [
9,
6
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"isSucess": true,
"message": "Certificate assigned sucessfully to 2 student(s)"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Launch
To launch the learning path, you need to use this request.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/launch?registrationId=12" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/launch"
);
const params = {
"registrationId": "12",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 273
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dropdown List
Returns Learning path list.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-paths/dropdownlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-paths/dropdownlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[{"id":1,"name":"learning path 1"]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Report
Retrieves the detailed report for all learning path. Returned data contains information like total number of modules and number of courses in different status(In Progress, Not Started and Completed).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path/reports/learning-path-detailed" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/reports/learning-path-detailed"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 272
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/learning-path/reports/overview
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path/reports/overview" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/reports/overview"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 271
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone
To clone a learning path, you create a cloned object for a specific module. The newly generated cloned learning path will help to let you change the content of the learning path with or without letting affect the real module.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/learning-path/clone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"learning_path_id\": 1,
\"learning_path_name\": \"false\"
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/clone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"learning_path_id": 1,
"learning_path_name": "false"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Learning path Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Slug
Updates the slug of the learning path. Example - old-awesome-learning-path to new-awesome-learning-path
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/learning-path/update-slug/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"slug\": \"Awesome-learning path\"
}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path/update-slug/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"slug": "Awesome-learning path"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
"Awesome-learning-path"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Learning Path Activities
Retrieves all the activities performed by the students on the Learning Path. Details will be returned in paginated mode. You can apply filters also using search_params parameter.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path-activities?learning_path_id=1&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22user_id%22%3A3%2C%22activityName%22%3A%22%22%2C%22dates%22%3A%5B%5D%7D&context=admin" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path-activities"
);
const params = {
"learning_path_id": "1",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"user_id":3,"activityName":"","dates":[]}",
"context": "admin",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"courseName": "course 1",
"featuredImage": null,
"recordsTotal": 40,
"recordsFiltered": 10,
"records": [
{
"id": 10,
"verb": "ACCESSED",
"created_at": "Aug 03, 2020 10:07 AM",
"message": "Demo Student has accessed course 1",
"student": "Demo Student"
},
{
"id": 9,
"verb": "ACHIEVED CERTIFICATE",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has achieved certificate for course 1",
"student": "Demo Student"
},
{
"id": 8,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 7,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 6,
"verb": "ACHIEVED CERTIFICATE",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has achieved certificate for course 1",
"student": "Demo Student"
},
{
"id": 5,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 4,
"verb": "COMPLETED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "course 1 was completed",
"student": "Demo Student"
},
{
"id": 3,
"verb": "STARTED",
"created_at": "Aug 03, 2020 10:02 AM",
"message": "Demo Student has started test",
"student": "Demo Student"
},
{
"id": 2,
"verb": "STARTED",
"created_at": "Aug 03, 2020 10:01 AM",
"message": "Demo Student has started course 1",
"student": "Demo Student"
},
{
"id": 1,
"verb": "ENROLLED",
"created_at": "Aug 03, 2020 10:00 AM",
"message": "Demo Student is enrolled to course 1",
"student": "Demo Student"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Activities Lookup
Retrieves all the activities/events name performed by students in a learning path. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/learning-path-activities/verb/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/learning-path-activities/verb/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "ENROLLED",
"display_value": "ENROLLED"
},
{
"db_value": "STARTED",
"display_value": "STARTED"
},
{
"db_value": "ACCESSED",
"display_value": "ACCESSED"
},
{
"db_value": "COMPLETED",
"display_value": "COMPLETED"
},
{
"db_value": "ACHIEVED CERTIFICATE",
"display_value": "ACHIEVED CERTIFICATE"
},
{
"db_value": "REMOVED",
"display_value": "REMOVED"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Location
You can perform operations like create, edit, delete on locations for classes.
Location Lookup
Retrieve List of Location
Example request:
curl --request POST \
"https://demo.aomlms.com/api/locations/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/locations/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 2,
"label": "Cherry Hill"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Location
To create location, you need to use this request. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/location/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"address\": \"Cherry Hill\",
\"city\": \"New Jersey\",
\"country\": \"qui\",
\"location_name\": \"Kings Hwy\",
\"map_url\": \"https:\\/\\/example.com\\/maps\\/location123\",
\"zipcode\": 12345
}"
const url = new URL(
"https://demo.aomlms.com/api/location/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"address": "Cherry Hill",
"city": "New Jersey",
"country": "qui",
"location_name": "Kings Hwy",
"map_url": "https:\/\/example.com\/maps\/location123",
"zipcode": 12345
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Location Created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve List of Locations
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/location/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22locationName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/location/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"locationName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 2,
"recordsFiltered": 2,
"records": [
{
"id": 2,
"name": "Cherry Hill",
"address": "1060 Kings Hwy N Ste 310",
"city": "New Jersey",
"country": "US",
"zipcode": "08034",
"map_url": null,
"created_at": "Dec 07, 2023 11:37 PM"
},
{
"id": 1,
"name": "Virtual",
"address": null,
"city": null,
"country": null,
"zipcode": null,
"map_url": null,
"created_at": "Nov 29, 2023 08:07 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Location
Retrieves the location details based on the location ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/location/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/location/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 2,
"name": "Cherry Hill",
"address": "1060 Kings Hwy N Ste 310",
"city": "New Jersey",
"country": "US",
"zipcode": "08034",
"map_url": null,
"created_by": 1,
"updated_by": null,
"deleted_by": null,
"created_at": "2023-12-08T06:37:54.000000Z",
"updated_at": "2024-01-04T08:09:05.000000Z",
"deleted_at": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Location
Updates the existing location.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/location/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"address\": \"Cherry Hill\",
\"city\": \"New Jersey\",
\"country\": \"et\",
\"location_name\": \"Kings Hwy\",
\"map_url\": \"https:\\/\\/example.com\\/maps\\/location123\",
\"zipcode\": 12345
}"
const url = new URL(
"https://demo.aomlms.com/api/location/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"address": "Cherry Hill",
"city": "New Jersey",
"country": "et",
"location_name": "Kings Hwy",
"map_url": "https:\/\/example.com\/maps\/location123",
"zipcode": 12345
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Location Updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Location
Returns success message on deleting location
Example request:
curl --request POST \
"https://demo.aomlms.com/api/location/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_id\": [
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/location/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_id": [
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 location(s) deleted.0 location(s) not deleted as it is used in class(s). Please remove the location from the class(s) and try again.",
"deletedLocations": 1,
"notDeletedLocations": 0,
"usedInClass": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Media
Endpoints for handling and managing upload/downloads static files, assets and media
Upload Media
You can upload the files in the platform using this request. Uploaded media files can be used while submission, image display in pages, etc.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/media?resumableChunkNumber=1&resumableChunkSize=10485760&resumableCurrentChunkSize=79531&resumableTotalSize=79531&resumableType=image%2Fpng&resumableIdentifier=79531-default-certificatepng&resumableFilename=default-certificate.png&resumableRelativePath=default-certificate.png&resumableTotalChunks=1&file=%28binary%29" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media"
);
const params = {
"resumableChunkNumber": "1",
"resumableChunkSize": "10485760",
"resumableCurrentChunkSize": "79531",
"resumableTotalSize": "79531",
"resumableType": "image/png",
"resumableIdentifier": "79531-default-certificatepng",
"resumableFilename": "default-certificate.png",
"resumableRelativePath": "default-certificate.png",
"resumableTotalChunks": "1",
"file": "(binary)",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 2,
"file_name": "default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"file_type": "Images",
"status": "Completed",
"s3_url": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"mux_url": null,
"mime_type": "image/png",
"uploaded_by": "Aom Staff",
"created_at": "Aug 12, 2020 09:02 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload Media
You can upload the files in the platform using this request. Uploaded media files can be used while submission, image display in pages, etc.
Example request:
curl --request PATCH \
"https://demo.aomlms.com/api/media?resumableChunkNumber=1&resumableChunkSize=10485760&resumableCurrentChunkSize=79531&resumableTotalSize=79531&resumableType=image%2Fpng&resumableIdentifier=79531-default-certificatepng&resumableFilename=default-certificate.png&resumableRelativePath=default-certificate.png&resumableTotalChunks=1&file=%28binary%29" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media"
);
const params = {
"resumableChunkNumber": "1",
"resumableChunkSize": "10485760",
"resumableCurrentChunkSize": "79531",
"resumableTotalSize": "79531",
"resumableType": "image/png",
"resumableIdentifier": "79531-default-certificatepng",
"resumableFilename": "default-certificate.png",
"resumableRelativePath": "default-certificate.png",
"resumableTotalChunks": "1",
"file": "(binary)",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 2,
"file_name": "default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"file_type": "Images",
"status": "Completed",
"s3_url": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"mux_url": null,
"mime_type": "image/png",
"uploaded_by": "Aom Staff",
"created_at": "Aug 12, 2020 09:02 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload Media
You can upload the files in the platform using this request. Uploaded media files can be used while submission, image display in pages, etc.
Example request:
curl --request DELETE \
"https://demo.aomlms.com/api/media?resumableChunkNumber=1&resumableChunkSize=10485760&resumableCurrentChunkSize=79531&resumableTotalSize=79531&resumableType=image%2Fpng&resumableIdentifier=79531-default-certificatepng&resumableFilename=default-certificate.png&resumableRelativePath=default-certificate.png&resumableTotalChunks=1&file=%28binary%29" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media"
);
const params = {
"resumableChunkNumber": "1",
"resumableChunkSize": "10485760",
"resumableCurrentChunkSize": "79531",
"resumableTotalSize": "79531",
"resumableType": "image/png",
"resumableIdentifier": "79531-default-certificatepng",
"resumableFilename": "default-certificate.png",
"resumableRelativePath": "default-certificate.png",
"resumableTotalChunks": "1",
"file": "(binary)",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 2,
"file_name": "default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"file_type": "Images",
"status": "Completed",
"s3_url": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"mux_url": null,
"mime_type": "image/png",
"uploaded_by": "Aom Staff",
"created_at": "Aug 12, 2020 09:02 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Media Tabular List
Returns all the media in a tabular list format in paginated mode. You can apply filter using search_param via name(media name).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/media/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22name%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"name":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 2,
"file_name": "default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"file_type": "Images",
"status": "Completed",
"s3_url": "https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/default-certificate-8741bc53eb39d4154c232925c0f13088.png",
"mux_url": null,
"mime_type": "image/png",
"uploaded_by": "Aom Staff",
"created_at": "Aug 12, 2020 09:02 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Media
To delete a media, you need to use this request. Returns number of medias deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/media/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/media/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 media(s) deleted"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Media Status
To get media status, you need to use this request. Returns the status of the uploaded media. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/media/status?media_Id=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/status"
);
const params = {
"media_Id": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "Completed"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download Video
To download a video, you need to use this request. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/media/mux/download" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"mux_id\": 10
}"
const url = new URL(
"https://demo.aomlms.com/api/media/mux/download"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"mux_id": 10
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "2",
"downloadUrl": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Video
To save the video details, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/media/saveVideo?file_name=ElephandDream&mime_type=video%2Fmp4&bunny_video_id=c7706fe7-0860-4776-b0e0-7b77ed477ff4&s3_url=https%3A%2F%2Fvz-c7993f3a-28f.b-cdn.net%2Fc7706fe7-0860-4776-b0e0-7b77ed477ff4%2Fplaylist.m3u8&bunny_video_url=https%3A%2F%2Fvz-c7993f3a-28f.b-cdn.net%2Fc7706fe7-0860-4776-b0e0-7b77ed477ff4%2Fplaylist.m3u8&file_type=Videos&status=Completed" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/saveVideo"
);
const params = {
"file_name": "ElephandDream",
"mime_type": "video/mp4",
"bunny_video_id": "c7706fe7-0860-4776-b0e0-7b77ed477ff4",
"s3_url": "https://vz-c7993f3a-28f.b-cdn.net/c7706fe7-0860-4776-b0e0-7b77ed477ff4/playlist.m3u8",
"bunny_video_url": "https://vz-c7993f3a-28f.b-cdn.net/c7706fe7-0860-4776-b0e0-7b77ed477ff4/playlist.m3u8",
"file_type": "Videos",
"status": "Completed",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": "true"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/media/bunnyDetails
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/media/bunnyDetails" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/bunnyDetails"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 270
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/media/createBunnyVideoLibrary
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/media/createBunnyVideoLibrary" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/media/createBunnyVideoLibrary"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 269
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Memberships
Memberships are used to provide content access to users. Helps in providing course and standalone modules access to students
Lookup
Retrieves all the memberships. Helps in showing membership names in forms elements like dropdown.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/memberships/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/memberships/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"name": "Membership-plan-1"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tabular List
Retrieves all the memberships in a tabular list format with pagination mode. You can apply filter using search_param
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/memberships/tabularlist?page_size=10&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C%22direction%22%3A%22desc%22%7D&search_param=%7B%22name%22%3A%22My-First-Membership%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/memberships/tabularlist"
);
const params = {
"page_size": "10",
"page_number": "1",
"order_by": "{"colName":"created_at","direction":"desc"}",
"search_param": "{"name":"My-First-Membership"}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 4,
"recordsFiltered": 4,
"records": [
{
"id": 4,
"name": "My-First-Membership",
"expired_at": "2021-05-04 23:45:50"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Membership
Retrieves the details of the specified membership. Helps in fetching membership using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/membership/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/membership/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Gold-plan",
"courseAccess": "specific",
"moduleAccess": "all",
"expired_at": null,
"courseAccessCategories": [
1,
2
],
"moduleAccessCategories": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Membership
To create a membership, you need to use this request. (See parameters) Created membership is being used as to couple course and standalone modules for students to launch and view.
Returns : id of the membership created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/membership" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Gold-membership\",
\"expired_at\": \"\'2021-10-03 23:59:59\'\",
\"courseAccess\": \"all\",
\"moduleAccess\": \"all\",
\"courseAccessCategories\": [
1,
2
],
\"moduleAccessCategories\": [
5,
19
]
}"
const url = new URL(
"https://demo.aomlms.com/api/membership"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Gold-membership",
"expired_at": "'2021-10-03 23:59:59'",
"courseAccess": "all",
"moduleAccess": "all",
"courseAccessCategories": [
1,
2
],
"moduleAccessCategories": [
5,
19
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Membership created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Membership
Updates the details of a specified membership. (See parameters) Membership is being used as to couple courses and standalone modules for students to launch and view.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/membership/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Gold-membership\",
\"expired_at\": \"\'2021-10-03 23:59:59\'\",
\"courseAccess\": \"all\",
\"moduleAccess\": \"all\",
\"courseAccessCategories\": [
1,
2
],
\"moduleAccessCategories\": [
5,
19
]
}"
const url = new URL(
"https://demo.aomlms.com/api/membership/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Gold-membership",
"expired_at": "'2021-10-03 23:59:59'",
"courseAccess": "all",
"moduleAccess": "all",
"courseAccessCategories": [
1,
2
],
"moduleAccessCategories": [
5,
19
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Membership updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified membership. Parameters is provided which needs to be updated. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/membership/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"membership_ids\": [
3,
2
],
\"expired_at\": \"2021-01-11 23:45:00\"
}"
const url = new URL(
"https://demo.aomlms.com/api/membership/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"membership_ids": [
3,
2
],
"expired_at": "2021-01-11 23:45:00"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Memberships updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Menus
Menus are used as front end module for this platform. Endpoints for managing menus on marketing front end pages
Retrieve Menus
Retrieves all the menus in list format. Helps while showing menu in front end. (See Response)
Retrieve Menu Items
Retrieves all the items of a specified menu. Helps while showing menu items in front end. (See Response)
Save Menu
If admins want to add new menu , you can use this request to make one. Adds new items or updates existing items. (See Response)
Modules
A module is a lesson that you add as course content. Modules could be Text, Video, PDF, SCORM, Quiz, Assignments or Survey. Helps in performing CRUD operation to and for modules.
Create Blank Module
To create a blank module, you need to use this request. (See parameters) Created blank modules can be used while creating a course and adding different module in the same course. (See Parameters)
Returns : id of the module created and icon to for the module(text, video, pdf, scorm, discussion, etc)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/addBlank" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Lesson-1\",
\"type\": \"text\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/addBlank"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Lesson-1",
"type": "text"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 14,
"icon": "<i class=\"el-icon-tickets\"></i>"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Modules Lookup
Retrieves all the modules. Helps while showing modules names in form elements like dropdown. You can apply filters using search_term parameter. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/lookup?search_term=iste" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/lookup"
);
const params = {
"search_term": "iste",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 7,
"name": "First-quiz",
"type": "quiz",
"value": 7,
"label": "First-quiz",
"icon": "<i class=\"el-icon-discover\"></i>"
},
{
"id": 8,
"name": "Quiz-2",
"type": "quiz",
"value": 8,
"label": "Quiz-2",
"icon": "<i class=\"el-icon-discover\"></i>"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Pending Submissions
This is for admin panel. Returns all the submissions done by the students and haven't evaluated by the instructor. Returns list including total pending count of submissions(assignment, discussion) and details of pending submissions.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/pendingsubmissions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pendingsubmissions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalPending": 1,
"data": [
{
"id": 1,
"name": "course 1",
"featured_image_url": null,
"totalSubmission": 1
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Modules Type Lookup
Retrieves all the type of the module that platform supports. Helps while showing module types in form elements like dropdown. Returns a list of all module types. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "text",
"display_value": "Text"
},
{
"db_value": "video",
"display_value": "Video"
},
{
"db_value": "pdf",
"display_value": "PDF"
},
{
"db_value": "webinar",
"display_value": "Webinar"
},
{
"db_value": "scorm",
"display_value": "SCORM"
},
{
"db_value": "quiz",
"display_value": "Quiz"
},
{
"db_value": "assignment",
"display_value": "Assignment"
},
{
"db_value": "discussion",
"display_value": "Discussion"
},
{
"db_value": "survey",
"display_value": "Survey"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
FormField Types Lookup
Retrieves all the type of the form fields that platform supports for Survey module. Helps while showing form fields types in form elements like dropdown while creating survey form. Returns a list of all form field types. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/fieldtype/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/fieldtype/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "text",
"display_value": "Text"
},
{
"db_value": "textarea",
"display_value": "Text Area"
},
{
"db_value": "rating",
"display_value": "Rating"
},
{
"db_value": "radio",
"display_value": "Single Select"
},
{
"db_value": "checkbox",
"display_value": "Multiple Select"
},
{
"db_value": "dropdown",
"display_value": "Drop Down"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Modules Tabular List
Returns all the modules in a tabular list format in paginated mode. You can apply filter using search_param via moduleTypes(module type), associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22moduleTypes%22%3A+%5B%22text%22%5D%2CassociatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"moduleTypes": ["text"],associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 14,
"recordsFiltered": 3,
"records": [
{
"id": 14,
"name": "Lesson-1",
"slug": "lesson-1",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"author": "Aom Staff",
"created_at": "Aug 11, 2020 06:45 AM"
},
{
"id": 5,
"name": "The Fundamentals of LMS",
"slug": "the-fundamentals-of-lms",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 04:59 PM"
},
{
"id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 09:56 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Slug
Updates the slug of the course. Example - old-awesome-course to new-awesome-course
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/update-slug/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"slug\": \"new-lesson-1\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/update-slug/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"slug": "new-lesson-1"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
"lesson-1"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified module. Parameters is provided which needs to be updated. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"module_ids\": [
5,
14
],
\"author_id\": 1
}"
const url = new URL(
"https://demo.aomlms.com/api/module/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"module_ids": [
5,
14
],
"author_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Modules updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Module
To delete a module, you need to use this request. Returns number of module deleted(if multiple selected) and also not deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 modules(s) deleted 1 modules(s) not deleted as it is used in course(s). Please remove the modules from the course and try again."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clone
To clone a module, you create a cloned object for a specific module. The newly generated cloned module will help to let you change the content of the module with or without letting affect the real module.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/clone" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"module_id\": 1,
\"module_name\": \"false\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/clone"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"module_id": 1,
"module_name": "false"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "module Cloned Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quiz Lookup
Retrieves all the quizzes user has ever created. This request helps in showing all the quizzes in form elements like dropdown, etc. Returns list of ID and name of the quizzes. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "First-quiz"
},
{
"value": 2,
"label": "Quiz-2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PDFs
A PDF Module is a lesson module used as course content. Helps to perform CRUD operation to and for PDF modules.
PDF Modules Tabular List
Returns all the PDF modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/pdf?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pdf"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 6,
"name": "Getting Started",
"slug": "getting-started",
"type": "pdf",
"icon": "<i class=\"el-icon-document\"></i>",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 05:55 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create PDF Module
To create a pdf module, you need to use this request. (See parameters) Created pdf modules can be used in the course as course content/lesson.
Returns : id of the pdf module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/pdf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Getting Started\",
\"content\": \"architecto\",
\"instructions\": \"<p>This is the short description here<\\/p>\",
\"url\": \"https:\\/\\/drive.google.com\\/file\\/d\\/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw\\/view?usp=sharing\",
\"trackCompletion\": true,
\"allowDownload\": true,
\"defaultZoom\": \"75%\",
\"showSidebar\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pdf"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Getting Started",
"content": "architecto",
"instructions": "<p>This is the short description here<\/p>",
"url": "https:\/\/drive.google.com\/file\/d\/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw\/view?usp=sharing",
"trackCompletion": true,
"allowDownload": true,
"defaultZoom": "75%",
"showSidebar": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 6,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve PDF module
Retrieves the details of the specified pdf module. Helps in fetching pdf module using module ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/pdf/23" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pdf/23"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Getting Started",
"slug": "getting-started",
"content": null,
"url": "https://drive.google.com/file/d/0B5cbJMbHsJ1gc3RhcnRlcl9maWxlX2Rhc2hlclYw/view?usp=sharing",
"allowDownload": false,
"trackCompletion": true,
"defaultZoom": "page_width",
"showSidebar": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update PDF Module
Updates the details of a specified pdf module. (See parameters) PDF modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/pdf/6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Getting Started\",
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"url\": \"https:\\/\\/drive.google.com\\/file\\/d\\/0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw\\/view?usp=sharing\",
\"trackCompletion\": true,
\"allowDownload\": true,
\"defaultZoom\": \"75%\",
\"showSidebar\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/pdf/6"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Getting Started",
"content": "<p>This is the updated short content here<\/p>",
"url": "https:\/\/drive.google.com\/file\/d\/0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw\/view?usp=sharing",
"trackCompletion": true,
"allowDownload": true,
"defaultZoom": "75%",
"showSidebar": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed PDF Module Info
Retrieves details of pdf module in depth as well as different modules details that are being used as course content for the same course the current pdf module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/pdf/details?registrationId=1&moduleId=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/pdf/details"
);
const params = {
"registrationId": "1",
"moduleId": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>afegrshtdh</p>",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"trackCompletion": true,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "1 week ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 1
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "",
"nextSlug": "assign",
"status": "Completed",
"timeSpent": 6,
"statusRowId": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed PDF module Info as Membership content
Retrieves details of pdf module in depth for the same membership the current pdf module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/pdf/content-details?moduleId=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/pdf/content-details"
);
const params = {
"moduleId": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>afegrshtdh</p>",
"trackCompletion": true,
"min_time_spent": 0,
"timeSpent": 6
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Pages
Pages are Front end Marketing visuals. Page can be viewed by the different users to interact with this platform. Endpoint helps in managing pages.
Load Layouts
To load layout, you need to use this request. (See parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/layouts" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"context\": \"page\"
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/layouts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"context": "page"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "2",
"name": "Landing Page",
"thumbnail": "/images/thumbnails/landing-thumbnail.jpg",
"type": "saved",
"data": {}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Page Layout
Retrieves all code snippet name and the code that is being used for making that snippet that user has ever created in this platform. It is being used by platform core modules like video, pdf, cart component, etc. (See response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/snippets" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/snippets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"pageHeaderSimple": {
"name": "Simple Page Header",
"html": "<div class=\"header pt-4 mb-4\">\r\n <div class=\"container\">\r\n <h1>The Main Header</h1>\r\n <h4>The subheading that should be brief enough to describe the page.</h4>\r\n <p class=\"small-divider bg-primary my-4 el-divider\"> </p>\r\n </div>\r\n </div>"
},
"productListing": {
"name": "Product Listing",
"html": "<div class=\"product-listing\">\r\n <div class=\"noneditable bg-light d-flex align-items-center justify-content-center display-in-builder\">\r\n <h1 class=\"text-center\">## Product Listing Block ##</h1>\r\n </div>\r\n <product-listing-card></product-listing-card>\r\n </div>"
},
"cartComponent": {
"name": "Shopping Cart Component",
"html": "<div class=\"shopping-cart\">\r\n <div class=\"noneditable bg-light d-flex align-items-center justify-content-center display-in-builder\">\r\n <h1 class=\"text-center\">## Shopping Cart Block ##</h1>\r\n </div>\r\n <div class=\"container cart-container\">\r\n <shopping-cart :show-checkout-button=\"true\"></shopping-cart>\r\n </div>\r\n </div>"
},
"checkoutComponent": {
"name": "Checkout Component",
"html": "<div class=\"checkout\">\r\n <div class=\"noneditable bg-light d-flex align-items-center justify-content-center display-in-builder\">\r\n <h1 class=\"text-center\">## Checkout Block ##</h1></div>\r\n <div class=\"container checkout-container\">\r\n <checkout :user-id=\"[%userid%]\"></checkout>\r\n </div>\r\n </div>"
},
"ctafullwidth": {
"name": "Call To Action",
"html": "<div class=\"bg-primary text-white text-center p-4 mt-4\">\r\n <h1 class=\"text-center\"><b> The Title of the CTA ?</b></h1>\r\n <p class=\"lead text-white text-center mb-4\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\r\n <a href=\"/contact-us\" class=\"btn btn-light\">CTA Button</a>\r\n </div>"
},
"contactUs": {
"name": "Contact Us Form",
"html": "<div class=\"contact-form\">\r\n <div class=\"noneditable bg-light d-flex align-items-center justify-content-center display-in-builder\">\r\n <h1 class=\"text-center\">## Contact Us Form Block ##</h1>\r\n </div>\r\n <contact-us-form></contact-us-form>\r\n</div>"
},
"video": {
"name": "Video",
"html": "<div class=\"native-video\"><div class=\"noneditable bg-light d-flex align-items-center justify-content-center display-in-builder\">\r\n <h1 class=\"text-center\">## Video Block ##</h1></div>\r\n <native-hls-player url=\"https://stream.mux.com/sTiBBrOuCQlhXOnufEtUcf23kUxpQ00Xp.m3u8\" coverImage=\"https://aom-uploads-test.s3.us-west-2.amazonaws.com/public/democertificate2-035fe38fd060ed9befb82257cd4f96c2.jpg\"></native-hls-player>\r\n </div>"
},
"pdf": {
"name": "Pdf Document",
"html": "<div class=\"native-pdf\"> <div class=\"noneditable bg-light d-flex align-items-center justify-content-center display-in-builder\">\r\n <h1 class=\"text-center\">## Pdf Document Block ##</h1></div>\r\n <native-pdf url=\"https://aom-uploads-test.s3-us-west-2.amazonaws.com/assignments/Game_Theory_(Stanford_Encyclopedia_of_Philosophy)_1591614209.pdf\"></native-pdf>\r\n </div>"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Page
Retrieves the details of the specified page. Helps in fetching page using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/page/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/page/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"title": "About Us",
"slug": "about-us",
"content": "",
"layout": "full_width",
"seo_title": null,
"seo_description": null,
"seo_thumbnail_url": null,
"metas": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Send Contact form response
The request helps in sending contact form responses to the admins and instructors of the platform. Generally this form is filled and sent by the students to enquire something regarding your product, course or the platform.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/contact-form" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"firstName\": \"John\",
\"lastName\": \"Doe\",
\"email\": \"[email protected]\",
\"toEmail\": \"[email protected]\",
\"phoneNo\": \"1234567890\",
\"content\": \"A question about your course?\"
}"
const url = new URL(
"https://demo.aomlms.com/api/contact-form"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"toEmail": "[email protected]",
"phoneNo": "1234567890",
"content": "A question about your course?"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Page Tabular List
Returns all the pages in a tabular list format in paginated mode. You can apply filter using search_param via pageName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=0&type=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "0",
"type": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 6,
"recordsFiltered": 6,
"records": [
{
"id": 1,
"title": "Home Page",
"slug": "",
"author": "Aom Staff",
"identifier": "home",
"created_at": "Aug 03, 2020 09:31 AM"
},
{
"id": 2,
"title": "Product Listing",
"slug": "course-catalog",
"author": "Aom Staff",
"identifier": "catalog",
"created_at": "Aug 03, 2020 09:31 AM"
},
{
"id": 3,
"title": "About Us",
"slug": "about-us",
"author": "Aom Staff",
"identifier": "general",
"created_at": "Aug 03, 2020 09:31 AM"
},
{
"id": 4,
"title": "Checkout",
"slug": "checkout",
"author": "Aom Staff",
"identifier": "checkout",
"created_at": "Aug 03, 2020 09:31 AM"
},
{
"id": 5,
"title": "Cart",
"slug": "cart",
"author": "Aom Staff",
"identifier": "cart",
"created_at": "Aug 03, 2020 09:31 AM"
},
{
"id": 6,
"title": "Contact Us",
"slug": "contact-us",
"author": "Aom Staff",
"identifier": "general",
"created_at": "Aug 03, 2020 09:31 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Layouts
To save layout, you need to use this request. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages/layouts" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Homepage\",
\"context\": \"page\",
\"data\": \"<div class=\\\\\\\"header pt-4 mb-4\\\\\\\">\\\\\",
\"type\": \"saved\"
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/layouts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Homepage",
"context": "page",
"data": "<div class=\\\"header pt-4 mb-4\\\">\\",
"type": "saved"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": "2",
"message": "Layout saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Page Dropdown List
Returns page Id and name of the pages that user has ever created. Helps in showing the response in form elements like dropdown. (See response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/dropdownlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/dropdownlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"id": 1,
"title": "Home Page"
},
{
"id": 2,
"title": "Product Listing"
},
{
"id": 3,
"title": "About Us"
},
{
"id": 4,
"title": "Checkout"
},
{
"id": 5,
"title": "Cart"
},
{
"id": 6,
"title": "Contact Us"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Timezone Dropdown List
Returns all timezones supported by php. Helps in showing the response in form elements like dropdown. (See response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/timezoneList" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/timezoneList"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
"Africa/Abidjan",
"Africa/Accra",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
"..etc"
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Page Layout Lookup
Retrieves all the layout lookups in list format. Helps while showing layouts in form elements like dropdown. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/layout/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/layout/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "full_width",
"display_value": "Full Width"
},
{
"db_value": "fixed_width",
"display_value": "Fixed width with left/right margin gaps"
},
{
"db_value": "no_header",
"display_value": "No Header/Menus/Footer"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Page Restriction Lookup
Retrieves all the page restrictions.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/restriction/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/restriction/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "all",
"display_value": "No Restriction"
},
{
"db_value": "user_category",
"display_value": "Restrict by User Categories"
},
{
"db_value": "user_type",
"display_value": "Restrict by User Types"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/pages/categories/lookup
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/pages/categories/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/pages/categories/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 262
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Page
If admins want to add new page, you can use this request to make one. Created pages will be seen by your users/students to interact with your platform and products. (See Parameter)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"About Us\",
\"content\": \"null\",
\"layout\": \"full_width\",
\"seo_title\": \"null\",
\"seo_description\": \"null\",
\"seo_thumbnail_url\": \"null\",
\"restricted_to_login_user\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/pages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "About Us",
"content": "null",
"layout": "full_width",
"seo_title": "null",
"seo_description": "null",
"seo_thumbnail_url": "null",
"restricted_to_login_user": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Page saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Soft Delete Page
To delete a page, you need to use this request. The pages will not be deleted permanently, it will be in draft mode. You can restore the page later. Returns page drafted(if multiple selected). (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Page moved to draft successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Hard Delete Page
To delete a page, you need to use this request. The pages will be deleted permanently. In this case, you cannot restore the page after hard delete. Returns page drafted(if multiple selected). (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages/harddelete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/harddelete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Pages deleted permanently"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Restore Page
To restore a page, you need to use this request. The pages will be restored from draft mode to published mode. Returns page retored(if multiple selected). (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/pages/restore" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"page_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/pages/restore"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"page_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Page restored successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Slug
Updates the slug of the page. Example - old-awesome-page to new-awesome-page
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/page/update-slug/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"slug\": \"about-us\"
}"
const url = new URL(
"https://demo.aomlms.com/api/page/update-slug/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"slug": "about-us"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
"about-us"
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Page
If admins want to update an existing page, you can use this request to update one. Updates existing items of the page. Pages will be seen by your users/students to interact with your platform and products. (See Parameter)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/page/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"About Us\",
\"content\": \"null\",
\"layout\": \"full_width\",
\"seo_title\": \"null\",
\"seo_description\": \"null\",
\"seo_thumbnail_url\": \"null\",
\"restricted_to_login_user\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/page/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "About Us",
"content": "null",
"layout": "full_width",
"seo_title": "null",
"seo_description": "null",
"seo_thumbnail_url": "null",
"restricted_to_login_user": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 3,
"message": "Page updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Powerpoint
A Powerpoint Module is used as course content. Helps to perform CRUD operation to and for Powerpoint modules.
Powerpoint Modules Tabular List
Returns all the Powerpoint modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/powerpoint?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/powerpoint"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 6,
"name": "Getting Started",
"slug": "getting-started",
"type": "powerpoint",
"icon": "<i class=\"el-icon-document\"></i>",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 05:55 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Powerpoint Module
To create a Powerpoint module, you need to use this request. (See parameters) Created Powerpoint modules can be used in the course as course content/lesson.
Returns : id of the Powerpoint module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/powerpoint" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Getting Started\",
\"viewer\": \"google_viewer\",
\"content\": \"et\",
\"url\": \"https:\\/\\/drive.google.com\\/file\\/d\\/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw\\/view?usp=sharing\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/powerpoint"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Getting Started",
"viewer": "google_viewer",
"content": "et",
"url": "https:\/\/drive.google.com\/file\/d\/0B5cbJMbHsJ1gc3RhcnRlcl9maWX2Rhc2hlclYw\/view?usp=sharing"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 6,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Powerpoint module
Retrieves the details of the specified Powerpoint module. Helps in fetching Powerpoint module using module ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/powerpoint/23" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/powerpoint/23"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"name":"Getting Started","slug":"getting-started","viewer":google_viewer, "content":null,"url":"https:\/\/drive.google.com\/file\/d\/0B5cbJMbHsJ1gc3RhcnRlcl9maWxlX2Rhc2hlclYw\/view?usp=sharing"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Powerpoint Module
Updates the details of a specified Powerpoint module. (See parameters) Powerpoint modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/powerpoint/6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Getting Started\",
\"viewer\": true,
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"url\": \"https:\\/\\/drive.google.com\\/file\\/d\\/0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw\\/view?usp=sharing\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/powerpoint/6"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Getting Started",
"viewer": true,
"content": "<p>This is the updated short content here<\/p>",
"url": "https:\/\/drive.google.com\/file\/d\/0B5cbJMbHsJ1gc3RhcnRlcl9ma2Rhc2hlclYw\/view?usp=sharing"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Powerpoint Module Info
Retrieves details of Powerpoint module in depth as well as different modules details that are being used as course content for the same course the current Powerpoint module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/powerpoint/details?registrationId=1&moduleId=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/powerpoint/details"
);
const params = {
"registrationId": "1",
"moduleId": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>afegrshtdh</p>",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "1 week ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 1
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "",
"nextSlug": "assign",
"status": "Completed",
"timeSpent": 6,
"statusRowId": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Powerpoint module Info as Membership content
Retrieves details of Powerpoint module in depth for the same membership the current Powerpoint module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/powerpoint/content-details?moduleId=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/powerpoint/content-details"
);
const params = {
"moduleId": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{"name":"test","slug":"test","viewer":microsoft_office,"url":"","content":"<p>afegrshtdh<\/p>"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Questions
Manage Questions. Questions can be added in the Quiz module for students to answer. Helps to perform CRUD operations for and to questions.
Questions Tabular List
Returns all the questions in a tabular list format in paginated mode. You can apply filter using search_param via questionTypes, questionCategoryIds, questionName and quizModuleId(module ID the question belongs to).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/questions/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22questionTypes%22%3A%5B%5D%2C%22questionCategoryIds%22%3A%5B%5D%2C%22questionName%22%3A%22%22%2C%22quizModuleId%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/questions/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"questionTypes":[],"questionCategoryIds":[],"questionName":"","quizModuleId":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 3,
"recordsFiltered": 3,
"records": [
{
"id": 3,
"title": "Is red a color?",
"type": "multiple_choice",
"categories": "",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 06:34 PM"
},
{
"id": 2,
"title": "Is Newyork a city?",
"type": "multiple_choice",
"categories": "",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 06:33 PM"
},
{
"id": 1,
"title": "Is blue a color?",
"type": "multiple_choice",
"categories": "",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 06:33 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Question Type Lookups
Retrieves all types of the questions. Helps showing options in form elements like dropdowns.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/questions/type/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/questions/type/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "multiple_choice",
"display_value": "Multiple Choice"
},
{
"db_value": "multiple_correct",
"display_value": "Multiple Correct"
},
{
"db_value": "short_answers",
"display_value": "Short Answers"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Question Lookup
Retrieves all the questions. Helps while showing questions in form elements like dropdown. You can apply filters using search_term(question) parameter. (See Parameter)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/question/lookup?search_term=atque" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/question/lookup"
);
const params = {
"search_term": "atque",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 1,
"label": "Is blue a color?"
},
{
"value": 2,
"label": "Is Newyork a city?"
},
{
"value": 3,
"label": "Is red a color?"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified question. Parameters is provided which needs to be updated. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/questions/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"question_ids\": [
3,
2
],
\"author_id\": 1,
\"categories_id\": [
6
]
}"
const url = new URL(
"https://demo.aomlms.com/api/questions/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"question_ids": [
3,
2
],
"author_id": 1,
"categories_id": [
6
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Questions updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Question
To create a question, you need to use this request. (See parameters) Created questions can be used in the quizzes as quiz's content.
Returns : id of the question created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/questions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Q1\",
\"type\": \"multiple_choice\",
\"content\": \"<p>This is the short content here<\\/p>\",
\"hint\": \"SpaceX owner\",
\"explanation\": \"Elon owns Tesla car company\",
\"categories\": [
12,
16
],
\"options\": [
\"ab\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/questions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Q1",
"type": "multiple_choice",
"content": "<p>This is the short content here<\/p>",
"hint": "SpaceX owner",
"explanation": "Elon owns Tesla car company",
"categories": [
12,
16
],
"options": [
"ab"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 4,
"message": "Question saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Question
Retrieves the details of the specified question. Helps in fetching question using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/question/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/question/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"title": "Is red a color?",
"content": null,
"hint": null,
"explanation": null,
"type": "multiple_choice",
"categories": [],
"options": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Question
Updates the details of a specified question. (See parameters) Questions can be used in the quizzes as quiz's content.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/question/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"title\": \"Q1\",
\"type\": \"multiple_choice\",
\"content\": \"<p>This is the short content here<\\/p>\",
\"hint\": \"SpaceX owner\",
\"explanation\": \"Elon owns Tesla car company\",
\"categories\": [
12,
16
],
\"options\": [
\"et\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/question/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"title": "Q1",
"type": "multiple_choice",
"content": "<p>This is the short content here<\/p>",
"hint": "SpaceX owner",
"explanation": "Elon owns Tesla car company",
"categories": [
12,
16
],
"options": [
"et"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Question updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Question
To delete a question, you need to use this request. Returns number of question deleted(if multiple selected) and also not deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/question/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
1,
12,
15
]
}"
const url = new URL(
"https://demo.aomlms.com/api/question/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
1,
12,
15
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "2 question(s) deleted 1 question(s) not deleted as it is used in quiz. Please remove the question(s) from the quiz and try again."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bulk-Upload Questions
To add questions to existing/new quiz in bulk, you need to use this request. Returns number of question added and skipped and also any errors occurred while uploading. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/question/bulkUpload" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"questionList\": [
[
\"Question_Type\",
\"Question_Title\",
\"Question_Content\",
\"Question_Category\",
\"Answer_Hint\",
\"Answer_Explanation\",
\"Correct_Answer\",
\"Option_1\",
\"Option_2\",
\"Option_3\",
\"Option_4\"
],
[
\"multiple_choice\",
\"Question1\",
\"Test\",
null,
null,
null,
1,
\"choice1\",
\"choice2\",
\"choice3\",
\"choice4\"
],
[
\"multiple_correct\",
\"Question2\",
\"Test\",
null,
null,
null,
\"1,2\",
\"choice1\",
\"choice2\",
\"choice3\",
\"choice4\"
],
[
\"short_answers\",
\"Question3\",
\"Test\",
null,
null,
null,
null,
\"possible_answer1\",
\"possible_answer2\",
\"possible_answer3\",
\"possible_answer4\"
]
],
\"quizIds\": [
7
],
\"quiztype\": \"existing_quiz\",
\"newQuiz\": \"null\"
}"
const url = new URL(
"https://demo.aomlms.com/api/question/bulkUpload"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"questionList": [
[
"Question_Type",
"Question_Title",
"Question_Content",
"Question_Category",
"Answer_Hint",
"Answer_Explanation",
"Correct_Answer",
"Option_1",
"Option_2",
"Option_3",
"Option_4"
],
[
"multiple_choice",
"Question1",
"Test",
null,
null,
null,
1,
"choice1",
"choice2",
"choice3",
"choice4"
],
[
"multiple_correct",
"Question2",
"Test",
null,
null,
null,
"1,2",
"choice1",
"choice2",
"choice3",
"choice4"
],
[
"short_answers",
"Question3",
"Test",
null,
null,
null,
null,
"possible_answer1",
"possible_answer2",
"possible_answer3",
"possible_answer4"
]
],
"quizIds": [
7
],
"quiztype": "existing_quiz",
"newQuiz": "null"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Questions(s) uploaded successfully",
"errors": [],
"successfulRow": 3,
"skipped": 0,
"insertedQuestions": [
{
"id": 5,
"title": "Question1"
},
{
"id": 6,
"title": "Question2"
},
{
"id": 7,
"title": "Question3"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quizzes
A Quiz Module is a quiz used as course content. Helps to perform CRUD operation to and for quiz modules.
Quiz Modules Tabular List
Returns all the quiz modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/quiz?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 2,
"recordsFiltered": 2,
"records": [
{
"id": 8,
"name": "Quiz-2",
"slug": "quiz-2",
"type": "quiz",
"quizType": "static",
"totalQuestions": 1,
"icon": "<i class=\"el-icon-discover\"></i>",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 06:34 PM"
},
{
"id": 7,
"name": "First-quiz",
"slug": "first-quiz",
"type": "quiz",
"quizType": "static",
"totalQuestions": 2,
"icon": "<i class=\"el-icon-discover\"></i>",
"author": "Aom Staff",
"created_at": "Aug 10, 2020 06:34 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Quiz Module
To create a quiz module, you need to use this request. (See parameters) Created quiz modules can be used in the course as course content.
Returns : id of the quiz module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/quiz" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Quiz-2\",
\"content\": \"<p>Some content here<p>\",
\"type\": \"static\",
\"forceSequential\": false,
\"minimumPassingMarks\": 75,
\"noOfRetakesAllowed\": 3,
\"questionCategories\": [
3,
4
],
\"questions\": [
\"dolor\"
],
\"showCorrectAnswerOption\": \"always\",
\"shuffleQuestions\": false,
\"maxSpentHour\": \"1\",
\"maxSpentMinutes\": \"30\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Quiz-2",
"content": "<p>Some content here<p>",
"type": "static",
"forceSequential": false,
"minimumPassingMarks": 75,
"noOfRetakesAllowed": 3,
"questionCategories": [
3,
4
],
"questions": [
"dolor"
],
"showCorrectAnswerOption": "always",
"shuffleQuestions": false,
"maxSpentHour": "1",
"maxSpentMinutes": "30"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 8,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Quiz module
Retrieves the details of the specified quiz module. Helps in fetching quiz module using module ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/quiz/23" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz/23"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "First-quiz",
"slug": "first-quiz",
"content": null,
"type": "static",
"shuffleQuestions": false,
"forceSequential": false,
"showCorrectAnswerOption": "always",
"noOfRetakesAllowed": null,
"minimumPassingMarks": null,
"questions": [
{
"id": 1,
"title": "Is blue a color?"
},
{
"id": 2,
"title": "Is Newyork a city?"
}
],
"questionCategories": [],
"maxSpentHour": 1,
"maxSpentMinutes": 30
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Quiz Module
Updates the details of a specified quiz module. (See parameters) Quiz modules can be used in the course as course content.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/quiz/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Quiz-2\",
\"content\": \"<p>Some content here<p>\",
\"type\": \"static\",
\"forceSequential\": false,
\"minimumPassingMarks\": 75,
\"noOfRetakesAllowed\": 3,
\"questionCategories\": [
3,
4
],
\"questions\": [
\"recusandae\"
],
\"showCorrectAnswerOption\": \"always\",
\"shuffleQuestions\": false,
\"maxSpentHour\": \"1\",
\"maxSpentMinutes\": \"30\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Quiz-2",
"content": "<p>Some content here<p>",
"type": "static",
"forceSequential": false,
"minimumPassingMarks": 75,
"noOfRetakesAllowed": 3,
"questionCategories": [
3,
4
],
"questions": [
"recusandae"
],
"showCorrectAnswerOption": "always",
"shuffleQuestions": false,
"maxSpentHour": "1",
"maxSpentMinutes": "30"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 8,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Quiz Module Info
Retrieves details of quiz module in depth as well as different modules details that are being used as course content for the same course the current quiz module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/quiz/details?registrationId=1&moduleId=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/quiz/details"
);
const params = {
"registrationId": "1",
"moduleId": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>afegrshtdh</p>",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"trackCompletion": true,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "1 week ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 1
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "",
"nextSlug": "assign",
"status": "Completed",
"timeSpent": 6,
"statusRowId": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Answer
Save answer that is being selected by the student while taking the quiz. (See Parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/quiz/7/saveAnswer?questionId=1&moduleStatusId=7&markedAnswer=yes&retakeCounter=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz/7/saveAnswer"
);
const params = {
"questionId": "1",
"moduleStatusId": "7",
"markedAnswer": "yes",
"retakeCounter": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 7,
"message": "Answer saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Submit Quiz
Submits the quiz after attempting all the questions of the quiz. Updates the status of quiz to completed if student is finished the quiz and submits. (See Parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/quiz/7/submitQuiz" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"questions\": \"[]\",
\"statusRowId\": \"7\",
\"retakeCounter\": \"2\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/quiz/7/submitQuiz"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"questions": "[]",
"statusRowId": "7",
"retakeCounter": "2"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Quiz Submitted Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Quiz Results
Retrieves the result of the quiz the student have taken. Helping to decide whether to assign certificate to a student. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/quiz/results?statusRowId=7" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/quiz/results"
);
const params = {
"statusRowId": "7",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "First-quiz",
"slug": "first-quiz",
"status": "In Progress",
"isRetakeAllowed": false,
"totalRetakeallowed": 1,
"attemptCount": 1,
"timeSpent": {
"hours": 0,
"minutes": 0,
"seconds": 16,
"totalSeconds": 16
},
"questions": [
{
"id": 1,
"title": "Is blue a color?",
"content": null,
"explanation": null,
"is_correct": false,
"marked_answer": [],
"correct_answer": []
},
{
"id": 2,
"title": "Is Newyork a city?",
"content": null,
"explanation": null,
"is_correct": false,
"marked_answer": [],
"correct_answer": []
}
],
"showCorrectAnswerOption": true,
"minimumPassingMarks": null,
"totalQuestions": 2,
"totalCorrect": 0,
"totalInCorrect": 2,
"minimumPassingAchieved": false
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Static Quiz Lookup
Retrieves all the static quiz user has ever created. This request helps in showing all static quiz in form elements like dropdown, etc. Returns ID and name of the static quiz.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/dropdownlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/dropdownlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": 7,
"label": "First-quiz"
},
{
"value": 8,
"label": "Quiz-2"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Quiz Analysis Details
Retrieves the quiz details based on the quiz ID specified.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/quizAnalysis?quiz_id=10&page_size=50&page_number=1&search_param=%7B%22title%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/quizAnalysis"
);
const params = {
"quiz_id": "10",
"page_size": "50",
"page_number": "1",
"search_param": "{"title":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"quizName": "Final Quiz",
"totalSubmissions": 2,
"questionDetails": [
{
"id": 1,
"name": "Which of the following is a correct answer?",
"questionType": "Multiple Choice",
"correctOption": [
3
],
"optionsWithPercentage": {
"This is not a correct choice": 0,
"This is the only correct choice": 100
},
"optionName_1": "This is not a correct choice",
"markedPercentageOfOption_1": 0,
"optionName_2": "This is not a correct choice",
"markedPercentageOfOption_2": 0,
"optionName_3": "This is the only correct choice",
"markedPercentageOfOption_3": 100,
"optionName_4": "This is not a correct choice",
"markedPercentageOfOption_4": 0,
"answeredIncorrectly": 0,
"answeredCorrectly": 100,
"notAttempted": 0
},
{
"id": 2,
"name": "Choose 1 or more correct responses from the below choices",
"questionType": "Multiple Correct",
"correctOption": [
1,
3
],
"optionsWithPercentage": {
"This is correct choice": 100,
"This is not Correct": 0,
"This is also a correct choice": 100,
"This is not a correct choice": 0
},
"optionName_1": "This is correct choice",
"markedPercentageOfOption_1": 100,
"optionName_2": "This is not Correct",
"markedPercentageOfOption_2": 0,
"optionName_3": "This is also a correct choice",
"markedPercentageOfOption_3": 100,
"optionName_4": "This is not a correct choice",
"markedPercentageOfOption_4": 0,
"answeredIncorrectly": 0,
"answeredCorrectly": 100,
"notAttempted": 0
},
{
"id": 3,
"name": "Type academy of mine below to register a correct response",
"questionType": "Short Answers",
"correctOption": [
1,
2
],
"optionsWithPercentage": {
"academy of mine": 0,
"aom": 100
},
"optionName_1": "academy of mine",
"markedPercentageOfOption_1": 0,
"optionName_2": "aom",
"markedPercentageOfOption_2": 100,
"answeredIncorrectly": 0,
"answeredCorrectly": 100,
"notAttempted": 0
}
],
"totalQuestions": 3,
"recordsFiltered": 3,
"quizStatistics": {
"minimumPassingMarks": 90,
"maxMarksAchieved": 3,
"minMarksAchieved": 3,
"highPercentage": 100,
"mediumPercentage": 0,
"lowPercentage": 0,
"passedPercentage": 100,
"failedPercentage": 0,
"correctPercentage": 0
},
"averageTimeSpent": "1s",
"totalAttempts": 4,
"headers": [
"optionName_1",
"markedPercentageOfOption_1",
"optionName_2",
"markedPercentageOfOption_2",
"optionName_3",
"markedPercentageOfOption_3",
"optionName_4",
"markedPercentageOfOption_4"
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Question Submission Details
Retrieves the Submission details of a Question.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/getQuestionSubmissionDetails?quiz_id=10&question_id=1&page_size=50&page_number=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/getQuestionSubmissionDetails"
);
const params = {
"quiz_id": "10",
"question_id": "1",
"page_size": "50",
"page_number": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"totalRecords": 3,
"records": [
{
"courseName": "Professional Development Toolkit",
"firstName": "Aom",
"lastName": "Staff",
"email": "[email protected]",
"questionType": "multiple_choice",
"markedAnswer": "This is the only correct choice",
"isCorrectResponse": "Yes"
},
{
"courseName": "Training your Employees for the modern world",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"questionType": "multiple_choice",
"markedAnswer": "This is the only correct choice",
"isCorrectResponse": "Yes"
},
{
"courseName": "Advanced Professional Development",
"firstName": "Demo",
"lastName": "Student",
"email": "[email protected]",
"questionType": "multiple_choice",
"markedAnswer": "This is the only correct choice",
"isCorrectResponse": "Yes"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/quiz/pdf/{id}
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/quiz/pdf/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/quiz/pdf/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 280
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Question Content Details
Retrieves the Content details of a Quiz.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/quiz/content-details?id=voluptatem&name=ut&slug=distinctio&content=ut&type=ea&shuffleQuestions=quos&forceSequential=voluptatem&realTimeGrading=harum&showCorrectAnswerOption=optio&noOfRetakesAllowed=consequuntur&minimumPassingMarks=deserunt&questions=occaecati&maxSpentMinutes=quia&maxSpentHour=qui&courses=aut" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/quiz/content-details"
);
const params = {
"id": "voluptatem",
"name": "ut",
"slug": "distinctio",
"content": "ut",
"type": "ea",
"shuffleQuestions": "quos",
"forceSequential": "voluptatem",
"realTimeGrading": "harum",
"showCorrectAnswerOption": "optio",
"noOfRetakesAllowed": "consequuntur",
"minimumPassingMarks": "deserunt",
"questions": "occaecati",
"maxSpentMinutes": "quia",
"maxSpentHour": "qui",
"courses": "aut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": "10",
"name": "Final Quiz",
"content": "<p>Lorem ipsum dolor sit amet.</p>",
"type": "static",
"status": "In Progress",
"shuffleQuestions": true,
"forceSequential": false,
"realTimeGrading": false,
"slug": "final-quiz",
"showCorrectAnswerOption": false,
"showCorrectAnswer": "never",
"noOfRetakesAllowed": "5",
"questionCategories": null,
"questions": [
{
"id": 2,
"title": "Choose 1 or more correct responses from the below choices",
"content": "<h3><strong>Choose 1 or more correct responses from the below choices</strong></h3>",
"type": "multiple_correct",
"hint": null,
"explanation": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"isAnswerSubmitted": false,
"isCorrect": false,
"isMarked": false,
"correct_answer": "",
"options": [
"This is correct choice",
"This is not Correct",
"This is also a correct choice",
"This is not a correct choice"
],
"markedMultipleCorrect": [],
"correctAnswers": [
"1",
"3"
]
}
],
"maxTimer": 0,
"timeSpent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": 0
},
"isRetakeAllowed": true,
"showInstructionButton": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SCORM Packages
SCORM packages can be used in course as course scorm module. Endpoints for managing SCORM Packages.
Create SCORM Package
You can create/upload the scorm package in the platform using this request. Uploaded scorm package files can be used as scorm modules in course.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/scormpackage?resumableChunkNumber=1&resumableChunkSize=10485760&resumableCurrentChunkSize=79531&resumableTotalSize=79531&resumableType=image%2Fpng&resumableIdentifier=79531-Chanoo-Theory-of-Change-Sublevel-1zip&resumableFilename=Chanoo-Theory-of-Change-Sublevel-1.zip&resumableRelativePath=Chanoo-Theory-of-Change-Sublevel-1.zip&resumableTotalChunks=1&file=%28binary%29" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage"
);
const params = {
"resumableChunkNumber": "1",
"resumableChunkSize": "10485760",
"resumableCurrentChunkSize": "79531",
"resumableTotalSize": "79531",
"resumableType": "image/png",
"resumableIdentifier": "79531-Chanoo-Theory-of-Change-Sublevel-1zip",
"resumableFilename": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"resumableRelativePath": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"resumableTotalChunks": "1",
"file": "(binary)",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"code": 200,
"errorMessage": "Unable to upload the package. Please contact admin",
"uploadedPackage": {
"name": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"url": "/scorm/Chanoo-Theory-of-Change-Sublevel-1-e9408a656ce2655b828622a09e66a46d",
"launch_file": "index_lms.html",
"version": "1.2",
"created_by": 1,
"updated_at": "2020-08-12 09:58:22",
"created_at": "2020-08-12 09:58:22",
"id": 3,
"full_url": "https://staging.aomlms.com/storage/scorm/Chanoo-Theory-of-Change-Sublevel-1-e9408a656ce2655b828622a09e66a46d/index_lms.html"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create SCORM Package
You can create/upload the scorm package in the platform using this request. Uploaded scorm package files can be used as scorm modules in course.
Example request:
curl --request PATCH \
"https://demo.aomlms.com/api/scormpackage?resumableChunkNumber=1&resumableChunkSize=10485760&resumableCurrentChunkSize=79531&resumableTotalSize=79531&resumableType=image%2Fpng&resumableIdentifier=79531-Chanoo-Theory-of-Change-Sublevel-1zip&resumableFilename=Chanoo-Theory-of-Change-Sublevel-1.zip&resumableRelativePath=Chanoo-Theory-of-Change-Sublevel-1.zip&resumableTotalChunks=1&file=%28binary%29" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage"
);
const params = {
"resumableChunkNumber": "1",
"resumableChunkSize": "10485760",
"resumableCurrentChunkSize": "79531",
"resumableTotalSize": "79531",
"resumableType": "image/png",
"resumableIdentifier": "79531-Chanoo-Theory-of-Change-Sublevel-1zip",
"resumableFilename": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"resumableRelativePath": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"resumableTotalChunks": "1",
"file": "(binary)",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"code": 200,
"errorMessage": "Unable to upload the package. Please contact admin",
"uploadedPackage": {
"name": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"url": "/scorm/Chanoo-Theory-of-Change-Sublevel-1-e9408a656ce2655b828622a09e66a46d",
"launch_file": "index_lms.html",
"version": "1.2",
"created_by": 1,
"updated_at": "2020-08-12 09:58:22",
"created_at": "2020-08-12 09:58:22",
"id": 3,
"full_url": "https://staging.aomlms.com/storage/scorm/Chanoo-Theory-of-Change-Sublevel-1-e9408a656ce2655b828622a09e66a46d/index_lms.html"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create SCORM Package
You can create/upload the scorm package in the platform using this request. Uploaded scorm package files can be used as scorm modules in course.
Example request:
curl --request DELETE \
"https://demo.aomlms.com/api/scormpackage?resumableChunkNumber=1&resumableChunkSize=10485760&resumableCurrentChunkSize=79531&resumableTotalSize=79531&resumableType=image%2Fpng&resumableIdentifier=79531-Chanoo-Theory-of-Change-Sublevel-1zip&resumableFilename=Chanoo-Theory-of-Change-Sublevel-1.zip&resumableRelativePath=Chanoo-Theory-of-Change-Sublevel-1.zip&resumableTotalChunks=1&file=%28binary%29" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage"
);
const params = {
"resumableChunkNumber": "1",
"resumableChunkSize": "10485760",
"resumableCurrentChunkSize": "79531",
"resumableTotalSize": "79531",
"resumableType": "image/png",
"resumableIdentifier": "79531-Chanoo-Theory-of-Change-Sublevel-1zip",
"resumableFilename": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"resumableRelativePath": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"resumableTotalChunks": "1",
"file": "(binary)",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"code": 200,
"errorMessage": "Unable to upload the package. Please contact admin",
"uploadedPackage": {
"name": "Chanoo-Theory-of-Change-Sublevel-1.zip",
"url": "/scorm/Chanoo-Theory-of-Change-Sublevel-1-e9408a656ce2655b828622a09e66a46d",
"launch_file": "index_lms.html",
"version": "1.2",
"created_by": 1,
"updated_at": "2020-08-12 09:58:22",
"created_at": "2020-08-12 09:58:22",
"id": 3,
"full_url": "https://staging.aomlms.com/storage/scorm/Chanoo-Theory-of-Change-Sublevel-1-e9408a656ce2655b828622a09e66a46d/index_lms.html"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SCORM Tabular List
Returns all the scorm in a tabular list format in paginated mode. You can apply filter using search_param via name(scorm name) and scormTypes(different versions of SCORM).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scormpackages/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22name%22%3A%22%22%2C%22scormTypes%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackages/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"name":"","scormTypes":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "sample-course.zip",
"url": "/scorm/sample-course",
"full_url": "https://staging.aomlms.com/storage/scorm/sample-course/scormcontent/index.html",
"version": "1.2",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 11:03 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SCORM Types Lookup
Retrieves all types scorms in list format that this platform supports. Helps while showing scorms in form elements like dropdown.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scormpackages/scormTypeLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackages/scormTypeLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "SCORM 1.2",
"display_value": "Scorm version 1.2"
},
{
"db_value": "SCORM 2004",
"display_value": "Scorm version 2004"
},
{
"db_value": "xAPI",
"display_value": "xAPI"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve SCORM Packages
Retrieves the details of the specified SCORM package. Helps in fetching SCORM package using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scormpackage/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"title": "Product-1",
"slug": "product-1",
"description": "Course 1 product",
"featuredImageUrl": null,
"regular_price": 3500,
"type": "SIMPLE",
"sale_price": 3001,
"saleStartDate": null,
"saleEndDate": null,
"status": "IN-STOCK",
"expiry": "2020-10-29",
"taxIncluded": false,
"taxBasedOn": "CUSTOMER-BILLING-ADDR",
"seo_title": null,
"seo_description": null,
"displayPrice": "<del>$3500 </del><span>$3001</span>",
"canBePurchased": true,
"label": "SALE",
"categories": [],
"courses": [
{
"value": 1,
"label": "course 1"
}
],
"courseCategories": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete SCORM Package
To delete a scorm package, you need to use this request. Returns number of scorm package deleted as well as not deleted. (See Response)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/scormpackage/delete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"delete_ids\": [
3
]
}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/delete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"delete_ids": [
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "1 package(s) deleted 0 package(s) not deleted as it is used in Module. Please remove the scorm Package from the module and try again."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/scormpackage/download
Example request:
curl --request POST \
"https://demo.aomlms.com/api/scormpackage/download" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/download"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/scormpackage/export
Example request:
curl --request POST \
"https://demo.aomlms.com/api/scormpackage/export" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/export"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/scormpackage/getDownloadStatus/{id}
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scormpackage/getDownloadStatus/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scormpackage/getDownloadStatus/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 274
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SCORMs
An SCORM Module is used as course content. Helps to perform CRUD operation to and for SCORM modules.
GET api/aom-tincan-fake/v1/activities/state
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/aom-tincan-fake/v1/activities/state" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan-fake/v1/activities/state"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 299
vary: Origin
true
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/aom-tincan-fake/v1/activities/state
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/aom-tincan-fake/v1/activities/state" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan-fake/v1/activities/state"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/aom-tincan-fake/v1/statements
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/aom-tincan-fake/v1/statements" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan-fake/v1/statements"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/aom-tincan/v1/activities/state
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/aom-tincan/v1/activities/state" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan/v1/activities/state"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 298
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/aom-tincan/v1/activities/state
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/aom-tincan/v1/activities/state" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan/v1/activities/state"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/aom-tincan/v1/statements
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/aom-tincan/v1/statements" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/aom-tincan/v1/statements"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
SCORM Modules Tabular List
Returns all the scorm modules in a tabular list format in paginated mode. You can apply filter using search_param via name and scormType(version).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/scorm?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22name%22%3A%22%22%2C%22scormTypes%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/scorm"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"name":"","scormTypes":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "sample-course.zip",
"url": "/scorm/sample-course",
"full_url": "https://staging.aomlms.com/storage/scorm/sample-course/scormcontent/index.html",
"version": "1.2",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 11:03 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Scorm Module
To create a scorm module, you need to use this request. (See parameters) Created scorm modules can be used in the course as course content/lesson.
Returns : id of the scorm module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/scorm" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"New Scorm\",
\"content\": \"This is the short content here\",
\"scormPackageFullUrl\": \"https:\\/\\/aomlms.com\\/scorm\\/sample-course\\/scormcontent\\/index.html\",
\"scormPackageId\": 1,
\"trackCompletion\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/scorm"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "New Scorm",
"content": "This is the short content here",
"scormPackageFullUrl": "https:\/\/aomlms.com\/scorm\/sample-course\/scormcontent\/index.html",
"scormPackageId": 1,
"trackCompletion": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 11,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Scorm Module
Updates the details of a specified scorm module. (See parameters) Scorm modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/scorm/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"New Scorm\",
\"content\": \"This is the short content here\",
\"scormPackageFullUrl\": \"https:\\/\\/aomlms.com\\/scorm\\/sample-course\\/scormcontent\\/index.html\",
\"scormPackageId\": 1,
\"trackCompletion\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/scorm/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "New Scorm",
"content": "This is the short content here",
"scormPackageFullUrl": "https:\/\/aomlms.com\/scorm\/sample-course\/scormcontent\/index.html",
"scormPackageId": 1,
"trackCompletion": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Scorm Module
Retrieves the details of the specified scorm module. Helps in fetching scorm module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/scorm/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/scorm/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "An interactive Scorm Illustration",
"slug": "an-interactive-scorm-illustration",
"trackCompletion": true,
"scormPackageId": 1,
"scormPackageFullUrl": "https://staging.aomlms.com/storage/scorm/sample-course/scormcontent/index.html"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Scorm Module Info
Retrieves details of scorm module in depth as well as different modules details that are being used as course content for the same course the current scorm module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/scorm/details?registrationId=16&moduleId=11" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/scorm/details"
);
const params = {
"registrationId": "16",
"moduleId": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "New Scorm",
"slug": "new-scorm",
"content": null,
"courseName": "Testing",
"courseSlug": "https://staging.aomlms.com/course/testing",
"scormUrl": "https://staging.aomlms.com/storage/scorm/sample-course/scormcontent/index.html",
"version": "1.2",
"trackCompletion": true,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 11,
"name": "New Scorm",
"slug": "new-scorm",
"type": "scorm",
"icon": "<i class=\"el-icon-upload\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": 19,
"status": "In Progress",
"started_on": "2020-08-12T10:43:07.000000Z",
"completed_on": null,
"last_accessed_on": "15 seconds ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 13,
"totalSeconds": 13
},
"completion_percentage": 0,
"no_of_times_accessed": 1
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "",
"nextSlug": "",
"scormKeys": {
"cmi.suspend_data": "",
"cmi.core.lesson_mode": "normal",
"cmi.mode": "normal",
"cmi.core.lesson_status": "incomplete",
"cmi.success_status": "",
"cmi.completion_status": "incomplete",
"cmi.core.student_id": 1,
"cmi.core.student_name": "Aom Staff"
},
"status": "In Progress",
"statusRowId": 19,
"timeSpent": 13
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Scorm Responses
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scorm-report?modulesStatusId=8&studentId=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scorm-report"
);
const params = {
"modulesStatusId": "8",
"studentId": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"moduleName": "Sample Scorm",
"score": 50,
"studentName": "Aom Staff",
"interactions": [
{
"slide": "Q_8i27ew22n5kt-ekowv8qwotil",
"question": "Given the assembly below, why might the 4-hole pattern make a better datum choice for alignment of the radial hole vs another feature? Note that the center bore in this example is only for weight saving purposes.",
"questionType": "choice",
"studentResponse": "0_The_functional_intent_of_the_assembly_is_best_mimicked_by_using_the_four_hole_pattern_",
"correctResponse": "0_The_functional_intent_of_the_assembly_is_best_mimicked_by_using_the_four_hole_pattern_",
"result": "correct",
"time": "May 10, 2022 04:08 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/scorm-activity-report
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scorm-activity-report" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scorm-activity-report"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 279
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/scorm-report-pdf
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/scorm-report-pdf" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/scorm-report-pdf"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 300
x-ratelimit-remaining: 278
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Scorm Module Info For Membership Content
Retrieves details of scorm module in depth for the same membership the current scorm module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/scorm/content-details?moduleId=11" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/scorm/content-details"
);
const params = {
"moduleId": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "New Scorm",
"slug": "new-scorm",
"content": null,
"courseName": "Testing",
"courseSlug": "https://staging.aomlms.com/course/testing",
"scormUrl": "https://staging.aomlms.com/storage/scorm/sample-course/scormcontent/index.html",
"version": "1.2",
"trackCompletion": true,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 11,
"name": "New Scorm",
"slug": "new-scorm",
"type": "scorm",
"icon": "<i class=\"el-icon-upload\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": 19,
"status": "In Progress",
"started_on": "2020-08-12T10:43:07.000000Z",
"completed_on": null,
"last_accessed_on": "15 seconds ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 13,
"totalSeconds": 13
},
"completion_percentage": 0,
"no_of_times_accessed": 1
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "",
"nextSlug": "",
"scormKeys": {
"cmi.suspend_data": "",
"cmi.core.lesson_mode": "normal",
"cmi.mode": "normal",
"cmi.core.lesson_status": "incomplete",
"cmi.success_status": "",
"cmi.completion_status": "incomplete",
"cmi.core.student_id": 1,
"cmi.core.student_name": "Aom Staff"
},
"status": "In Progress",
"statusRowId": 19,
"timeSpent": 13
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Salesforce Integration
It allows you to track student activity and progress in the LMS, and trigger changes in Salesforce data accordingly.
Salesforce Event Lookup
Retrieves all the events for the salesforce actions. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/salesforce/eventLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/salesforce/eventLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "new_account_created",
"display_value": "New Account Created",
"crud_op": "Create",
"salesforce_crud": "[{'db_value' => 'salesforce_contact'},{'display_value'=> 'Salesforce Contacts'}]"
},
{
"db_value": "Account Updated",
"display_value": "Account Updated",
"crud_op": "Update",
"salesforce_crud": "[['db_value' => 'salesforce_contact', 'display_value'=> 'Salesforce Contacts']]"
},
{
"db_value": "course_enrolled",
"display_value": "Enrolled in a course",
"crud_op": "Update",
"salesforce_crud": "[['db_value' => 'salesforce_contact', 'display_value'=> 'Salesforce Contacts']]"
},
{
"db_value": "course_completed",
"display_value": "Course Completed",
"crud_op": "Update",
"salesforce_crud": "[['db_value' => 'salesforce_contact', 'display_value'=> 'Salesforce Contacts']]"
},
{
"db_value": "course_started",
"display_value": "Course Started",
"crud_op": "Update",
"salesforce_crud": "[['db_value' => 'salesforce_contact', 'display_value'=> 'Salesforce Contacts']]"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Salesforce Field Lookup
Retrieves all the fields for the salesforce. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/integrations/salesforce/fieldLookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/integrations/salesforce/fieldLookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "contact"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"lms_fields": [
{
"db_value": "email"
},
{
"db_value": "last_name"
},
{
"db_value": "first_name"
},
{
"db_value": "last_login_ip"
},
{
"db_value": "is_disabled"
}
]
},
{
"salesforce_fields": [
{
"db_value": "email"
},
{
"db_value": "last_name"
},
{
"db_value": "first_name"
}
]
},
{
"courses": []
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Salesforce Tabular List
Returns all the salesforce details in a tabular list. You can apply filter using search_param via events.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/salesforces?order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22name%22%3A%22%22%2C%22scormTypes%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/salesforces"
);
const params = {
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"name":"","scormTypes":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"event": "New Account Created",
"object": "",
"action": "",
"event_display_value": "",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 11:03 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Salesforce Action
To create a Salesforce Action, you need to use this request. Provide event,action and object and it will be created. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/salesforce/action/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"event\": \"New Account Created\",
\"action\": \"create.\",
\"object\": \"Salesforce Contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/action/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"event": "New Account Created",
"action": "create.",
"object": "Salesforce Contact"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Action created Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Salesforce Mapping
To save a Salesforce Mapping, you need to use this request. Provide type and it will be created. (See parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/salesforce/mapping/save" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"salesforce_contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/mapping/save"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "salesforce_contact"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"message": "Mapping saved Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Salesforce Mapping
Retrieves the details of the salesforce mapping. Helps in fetching salesforce mapping using its type. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/salesforce/mappings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"type\": \"salesforce_contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/mappings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"type": "salesforce_contact"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"type": "salesforce_contact",
"userFieldProperties": [],
"courseFieldProperties": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Salesforce Action
To update a Salesforce Action, you need to use this request. Provide id, event, action and object and it will be updated. (See parameters)
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/salesforce/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"event\": \"New Account Created\",
\"action\": \"create.\",
\"object\": \"Salesforce contact\"
}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"event": "New Account Created",
"action": "create.",
"object": "Salesforce contact"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Salesforce updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Salesforce
To delete a Salesforce, you need to use this request.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/salesforce/action/delete/[1]" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/action/delete/[1]"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Salesforce deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Salesforce Log Tabular List
Returns all the Salesforce log in a tabular list format in paginated mode.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/salesforce/logs/50?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/salesforce/logs/50"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"event": "new_account_created",
"data": [],
"status": "success",
"errorMessage": "",
"created_at": "Aug 03, 2020 09:56 AM",
"showData": false
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Staffs
You can perform staff management tasks like creating, deleting and updating staffs.
Retrieve List of Staff users
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/staffs/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D&search_param=%7B%22courseCategoryIds%22%3A%5B%5D%2C%22courseName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staffs/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"search_param": "{"courseCategoryIds":[],"courseName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 0,
"recordsFiltered": 1,
"records": [
{
"id": 2,
"first_name": "Client",
"last_name": "Admin",
"is_disabled": false,
"email": "[email protected]",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle cx=\"20\" cy=\"20\" r=\"20\" stroke=\"#673AB7\" stroke-width=\"0\" fill=\"#673AB7\" /><text font-size=\"14\" fill=\"#FFFFFF\" x=\"50%\" y=\"50%\" dy=\".1em\" style=\"line-height:1\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">CA</text></svg>",
"user_type": "owner",
"created_at": "Jan 03, 2024 03:59 PM",
"last_login": "Never",
"source": "admin"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve details of staff
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/staff/report?user_id=3&page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D®istered_between[]=sunt" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staff/report"
);
const params = {
"user_id": "3",
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}",
"registered_between[0]": "sunt",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"records": [
{
"first_name": "Client",
"last_name": "Admin",
"email": "[email protected]",
"user_type": "Owner",
"created_at": "Jan 03, 2024 03:59 PM",
"last_login": "Never"
}
],
"headers": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Staff
To create a staff, you need to use this request. (See parameters)
Returns : id of the staff created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/staff/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"email\": \"[email protected]\",
\"firstName\": \"John\",
\"lastName\": \"Doe\",
\"password\": \"abc123\",
\"password_confirmation\": \"abc123\",
\"staffPermissions\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/staff/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"password": "abc123",
"password_confirmation": "abc123",
"staffPermissions": [
1,
2
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 1,
"message": "Staff created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Staff
Retrieves the staff details of specified ID .
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/staff/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staff/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 2,
"firstName": "Client",
"lastName": "Admin",
"email": "[email protected]",
"points": 0,
"lastLoggedIn": "Never",
"avatar": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100\" height=\"100\" viewBox=\"0 0 100 100\"><circle cx=\"50\" cy=\"50\" r=\"50\" stroke=\"#673AB7\" stroke-width=\"0\" fill=\"#673AB7\" /><text font-size=\"40\" fill=\"#FFFFFF\" x=\"50%\" y=\"50%\" dy=\".1em\" style=\"line-height:1\" alignment-baseline=\"middle\" text-anchor=\"middle\" dominant-baseline=\"central\">CA</text></svg>",
"disabled": false,
"userType": "owner",
"isCurrentLoggedInUserGroupAdmin": false,
"currentLoggedUserType": "admin",
"groupName": null,
"membership": {
"id": null,
"name": null,
"expiryDate": null
},
"customUserMetas": [],
"internal_note": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Staff
Returns success message on updating the staff
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/staff/9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"avatar\": \"<svg xmlns=\\\\\\\"http:\\/\\/www.w3.org\\/2000\\/svg\\\\\\\" width=\\\\\\\"100\\\\\\\" height=\\\\\\\"100\\\\\\\" viewBox=\\\\\\\"0 0 100 100\\\\\\\"><circle cx=\\\\\\\"50\\\\\\\" cy=\\\\\\\"50\\\\\\\" r=\\\\\\\"50\\\\\\\" stroke=\\\\\\\"#CDDC39\\\\\\\" stroke-width=\\\\\\\"0\\\\\\\" fill=\\\\\\\"#CDDC39\\\\\\\" \\/><text font-size=\\\\\\\"40\\\\\\\" fill=\\\\\\\"#FFFFFF\\\\\\\" x=\\\\\\\"50%\\\\\\\" y=\\\\\\\"50%\\\\\\\" dy=\\\\\\\".1em\\\\\\\" style=\\\\\\\"line-height:1\\\\\\\" alignment-baseline=\\\\\\\"middle\\\\\\\" text-anchor=\\\\\\\"middle\\\\\\\" dominant-baseline=\\\\\\\"central\\\\\\\">J<\\/text><\\/svg>\",
\"currentLoggedUserType\": \"admin\",
\"disabled\": true,
\"internal_note\": \"sed\",
\"lastLoggedIn\": \"Never\",
\"points\": 60,
\"userType\": \"staff\",
\"membership\": \"{id: null, name: null, expiryDate: null}\",
\"email\": \"[email protected]\",
\"firstName\": \"John\",
\"lastName\": \"Doe\",
\"password\": \"abc123\",
\"password_confirmation\": \"abc123\",
\"staffPermissions\": [
1,
2
]
}"
const url = new URL(
"https://demo.aomlms.com/api/staff/9"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"avatar": "<svg xmlns=\\\"http:\/\/www.w3.org\/2000\/svg\\\" width=\\\"100\\\" height=\\\"100\\\" viewBox=\\\"0 0 100 100\\\"><circle cx=\\\"50\\\" cy=\\\"50\\\" r=\\\"50\\\" stroke=\\\"#CDDC39\\\" stroke-width=\\\"0\\\" fill=\\\"#CDDC39\\\" \/><text font-size=\\\"40\\\" fill=\\\"#FFFFFF\\\" x=\\\"50%\\\" y=\\\"50%\\\" dy=\\\".1em\\\" style=\\\"line-height:1\\\" alignment-baseline=\\\"middle\\\" text-anchor=\\\"middle\\\" dominant-baseline=\\\"central\\\">J<\/text><\/svg>",
"currentLoggedUserType": "admin",
"disabled": true,
"internal_note": "sed",
"lastLoggedIn": "Never",
"points": 60,
"userType": "staff",
"membership": "{id: null, name: null, expiryDate: null}",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"password": "abc123",
"password_confirmation": "abc123",
"staffPermissions": [
1,
2
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Staff updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the list Staff permissions
Retrieves the permissions list of specified ID .
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/staff/permissions/4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/staff/permissions/4"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"permissions": [
1,
4,
7
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Staff Permission
Returns sucess message on updated the permissions for specified ID
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/staff/updatePermission/5" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"permissions\": [
4,
5
]
}"
const url = new URL(
"https://demo.aomlms.com/api/staff/updatePermission/5"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"permissions": [
4,
5
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Permissions updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Products
A subscription product whose amount will be paid in subscriptions (in between intervals) by your students. Helps in performing CRUD operations for and to subscription products.
Retrieve Subscription
Retrieves the details of the subscription. Helps in fetching user subscription using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscription/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"status": "Active",
"endDate": "Aug 23th,2021",
"nextPaymentDate": "Jun 23th,2021",
"userName": "Aom Staff"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve All Subscription Products
Retrieves the details of the subscription products. Helps in fetching subscription product using its ID. (See Parameters)
Subscription Related Orders Tabular List
Returns all the orders in a tabular list format in paginated mode. You can apply filter using search_param via orderStatus.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscription/orders/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22name%22%3A%22%22%2C%22scormTypes%22%3A%5B%5D%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/orders/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"name":"","scormTypes":[]}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"total": "5",
"status": "ACTIVE",
"relationship": "Parent Order",
"created_at": "03 Aug 2020 09:08 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Subscription
To create a subscription, you need to use this request. (See parameters) Subscription can be only created by purchasing subscription product.
Returns : success status and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/subscription/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"orderId\": 1,
\"paymentToken\": \"XXXXXXXXXXXXXX\",
\"productQuantity\": 5
}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"orderId": 1,
"paymentToken": "XXXXXXXXXXXXXX",
"productQuantity": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"success": true,
"message": "Subscription has been created"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Tabular List
Returns all the subscription in a tabular list format in paginated mode. You can apply filter using search_param via product title, subscription status and user nameorEmail.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscriptions/tabularlist?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22productTitle%22%3A%22%22%2C%22subscriptionStatus%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscriptions/tabularlist"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"productTitle":"","subscriptionStatus":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"user_name": "Aom Staff",
"user_id": "2",
"product": "Professional Development and Training",
"product_id": "2",
"subscription_price": "100",
"next_payment_date": "Sept 03, 2020 11:03 AM",
"status": "Completed",
"created_at": "Aug 03, 2020 11:03 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Status Lookup
Retrieves all the status for the subscription. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscription/status/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/status/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "ACTIVE",
"display_value": "Active"
},
{
"db_value": "CANCELLED",
"display_value": "Cancelled"
},
{
"db_value": "EXPIRED",
"display_value": "Expired"
},
{
"db_value": "ON-HOLD",
"display_value": "On-Hold"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Subscription
To update a subscription, you need to use this request. (See parameters) Subscription can be only created by purchasing subscription product.
Returns : success status and successfull message
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/subscription/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"status\": \"ACTIVE\",
\"endDate\": \"Aug 23th, 2021\",
\"nextPaymentDate\": \"accusamus\"
}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"status": "ACTIVE",
"endDate": "Aug 23th, 2021",
"nextPaymentDate": "accusamus"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Subscription updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Quick Edit
Updates the details in bulk for a specified subscriptions. Parameters is provided which needs to be updated.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/subscription/quickEdit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"subscription_ids\": [
1,
2
],
\"status\": \"ACTIVE\"
}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/quickEdit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"subscription_ids": [
1,
2
],
"status": "ACTIVE"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Subscriptions updated Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Renewal
Renew the subscription of the products. Helps in fetching subscription product using its ID. (See Parameters)
Example request:
curl --request POST \
"https://demo.aomlms.com/api/subscription/process-subscription-action" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/process-subscription-action"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Example response (200):
{
"success": 1,
"message": "Process Renewal Successfully completed"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subscription Action Lookup
Retrieves all the action for the subscription. Helps showing options in dropdowns elements
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/subscription/action/lookup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/subscription/action/lookup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"db_value": "PROCESS_RENEWAL",
"display_value": "Process renewal"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Survey Modules
A survey module is a feedback module that you can add as course content to get students feedback about your course(How they felt about course, ratings, etc). Helps in performing CRUD operation to and for survey modules.
Survey Modules Tabular List
Returns all the survey modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/survey?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/survey"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 15,
"recordsFiltered": 1,
"records": [
{
"id": 15,
"name": "Feedback",
"slug": "feedback",
"type": "survey",
"icon": "<i class=\"el-icon-star-off\"></i>",
"author": "Aom Staff",
"created_at": "Aug 11, 2020 08:12 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Survey Module
To create a survey module, you need to use this request. (See parameters) Created survey modules can be used in the course as course content.
Returns : id of the survey module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/survey" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Feedback\",
\"content\": \"This is the short content here\",
\"submitButtonText\": \"Submit Survey\",
\"submitOption\": \"save_to_db\",
\"fields\": [
{
\"type\": \"text\",
\"label\": \"How you left\",
\"defaultValue\": \"\",
\"isRequired\": false,
\"optionLabel\": []
},
{
\"type\": \"rating\",
\"label\": \"How you rate us\",
\"defaultValue\": \"\",
\"isRequired\": false,
\"optionLabel\": []
}
],
\"redirect\": \"http:\\/\\/www.aom.test.com\",
\"trackCompletion\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/survey"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Feedback",
"content": "This is the short content here",
"submitButtonText": "Submit Survey",
"submitOption": "save_to_db",
"fields": [
{
"type": "text",
"label": "How you left",
"defaultValue": "",
"isRequired": false,
"optionLabel": []
},
{
"type": "rating",
"label": "How you rate us",
"defaultValue": "",
"isRequired": false,
"optionLabel": []
}
],
"redirect": "http:\/\/www.aom.test.com",
"trackCompletion": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 15,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Survey Module
Updates the details of a specified survey module. (See parameters) Survey modules can be used in the course as course content.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/survey/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Feedback\",
\"content\": \"This is the short content here\",
\"submitButtonText\": \"Submit Survey\",
\"submitOption\": \"save_to_db\",
\"fields\": [
{
\"type\": \"text\",
\"label\": \"How you left\",
\"defaultValue\": \"\",
\"isRequired\": false,
\"optionLabel\": []
},
{
\"type\": \"rating\",
\"label\": \"How you rate us\",
\"defaultValue\": \"\",
\"isRequired\": false,
\"optionLabel\": []
}
],
\"redirect\": \"http:\\/\\/www.aom.test.com\",
\"trackCompletion\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/survey/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Feedback",
"content": "This is the short content here",
"submitButtonText": "Submit Survey",
"submitOption": "save_to_db",
"fields": [
{
"type": "text",
"label": "How you left",
"defaultValue": "",
"isRequired": false,
"optionLabel": []
},
{
"type": "rating",
"label": "How you rate us",
"defaultValue": "",
"isRequired": false,
"optionLabel": []
}
],
"redirect": "http:\/\/www.aom.test.com",
"trackCompletion": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Survey module
Retrieves the details of the specified survey module. Helps in fetching survey module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/survey/15" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/survey/15"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Feedback",
"slug": "feedback",
"content": "A brief Description",
"redirect": null,
"trackCompletion": false,
"submitButtonText": "Submit Survey",
"submitOption": "save_to_db",
"fields": [
{
"id": 1,
"type": "text",
"label": "How you left",
"defaultValue": null,
"isRequired": false,
"optionLabel": []
},
{
"id": 2,
"type": "rating",
"label": "How you rate us",
"defaultValue": null,
"isRequired": false,
"optionLabel": []
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Survey Module Info
Retrieves details of survey module in depth as well as different modules details that are being used as course content for the same course the current survey module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/details?registrationId=1&moduleId=15" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/details"
);
const params = {
"registrationId": "1",
"moduleId": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Feedback",
"slug": "feedback",
"content": "A brief Description",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"trackCompletion": false,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "14 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 3
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 7,
"name": "First-quiz",
"slug": "first-quiz",
"type": "quiz",
"icon": "<i class=\"el-icon-discover\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 9,
"name": "My-video-lesson",
"slug": "my-video-lesson",
"type": "video",
"icon": "<i class=\"el-icon-video-play\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 4,
"status": "In Progress",
"started_on": "2020-08-10T20:04:14.000000Z",
"completed_on": null,
"last_accessed_on": "12 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 0,
"no_of_times_accessed": 1
},
{
"module_id": 10,
"name": "Essay on LMS",
"slug": "essay-on-lms",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 5,
"status": "Completed",
"started_on": "2020-08-11T02:47:32.000000Z",
"completed_on": "2020-08-11T02:47:32.000000Z",
"last_accessed_on": "5 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 100,
"no_of_times_accessed": 2
},
{
"module_id": 12,
"name": "New-Webinar",
"slug": "new-webinar",
"type": "webinar",
"icon": "<i class=\"el-icon-date\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 13,
"name": "First-discussion",
"slug": "first-discussion",
"type": "discussion",
"icon": "<i class=\"el-icon-chat-line-round\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 6,
"status": "In Progress",
"started_on": "2020-08-11T05:41:57.000000Z",
"completed_on": null,
"last_accessed_on": "2 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 0,
"no_of_times_accessed": 1
},
{
"module_id": 15,
"name": "Feedback",
"slug": "feedback",
"type": "survey",
"icon": "<i class=\"el-icon-star-off\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"errors": [],
"course_id": 1,
"prevSlug": "first-discussion",
"nextSlug": "",
"status": "In Progress",
"timeSpent": null,
"statusRowId": 8,
"form_id": 1,
"form_fields": {
"1": {
"type": "text",
"label": "How you left",
"submitted_value": "",
"options_label": [],
"options_value": [],
"is_required": false
},
"2": {
"type": "rating",
"label": "How you rate us",
"submitted_value": "",
"options_label": [],
"options_value": [],
"is_required": false
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Complete Survey Module
Updates the status of the survey module to completed. Changes the completion percentage to 100% and mark completed the survey module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/survey/markComplete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"form_id\": 1,
\"statusRowId\": 9,
\"timeSpent\": 101
}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/markComplete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"form_id": 1,
"statusRowId": 9,
"timeSpent": 101
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"is_success": true,
"message": "Module Completed Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Student Response
Retrieves all the response made by a specified student in a specified course. Mostly used while generating reports for Instructors to see how students are feeling regarding their courses. Retrieve Student response survey as question and answer. (See response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/student-details" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"statusRowId\": \"3\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/student-details"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"statusRowId": "3"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"question": [
"How you felt",
"How you rate us"
],
"answer": [
"Awesome course it was",
"5"
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Course Response
Retrieves all the response made by the all students in a specified course. Mostly used while generating reports for Instructors to see how students are feeling regarding their courses. Mostly used for reporting purpose course-wise. (See response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/course-details?course_id=1&page_size=9&page_number=commodi" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/course-details"
);
const params = {
"course_id": "1",
"page_size": "9",
"page_number": "commodi",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"form_data": {
"1": [
{
"student_id": 1,
"student_name": "Aom Staff",
"student_email": "[email protected]",
"course_name": "course 1",
"question": "How you left",
"answer": "Awesome course it was"
},
{
"student_id": 1,
"student_name": "Aom Staff",
"student_email": "[email protected]",
"course_name": "course 1",
"question": "How you rate us",
"answer": "5"
}
]
},
"form_id": [
1
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Course Max Form Submission Response Count
Retrieves the count of the maximum number of the form submissions in a single form in a specified course. Used to estimiate the number of seperate requests are needed to fetch all responses in chunks. (See response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/course-details-count?course_id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/course-details-count"
);
const params = {
"course_id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"max_form_data_count": 2
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Survey Modules Attached In Course Tabular List
Returns all the survey modules attached in a course in a tabular list format in paginated mode. You can apply filter using search_param via courseName and courseId.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/survey/survey-count?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22courseName%22%3A%22%22%2C%22courseId%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/survey-count"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"courseName":"","courseId":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"id": 1,
"name": "Feedback",
"slug": "feedback",
"content": "A brief Description",
"showModules": true,
"status": "",
"categories": "",
"author": "Aom Staff",
"created_at": "Aug 23th 2021",
"count": "2",
"survey": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Survey User Response
Returns all the survey modules user response of the course in a tabular list format in paginated mode. You can apply filter using search_param via name and scormType(version).
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/survey/survey-check?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22userName%22%3A%22%22%7D&course_id=4&module_id=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/survey/survey-check"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"userName":""}",
"course_id": "4",
"module_id": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"form_data": "Form Submission",
"courseName": "Professional Training and Education",
"moduleName": "Survey Module",
"recordsTotal": 1,
"recordsFiltered": 1,
"form_data_count": [
{
"submissions": [],
"name": "Aom Staff",
"email": "[email protected]"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save Survey Module Response
To save the response provided by the students using evaltion form, you need to use this request with provided parameters.
Example request:
curl --request POST \
"https://demo.aomlms.com/api/module/survey/save-response" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"Feedback\",
\"content\": \"A brief Description\",
\"courseName\": \"course 1\",
\"courseSlug\": \"http:\\/\\/localhost:8000\\/course\\/course-1\",
\"course_id\": 1,
\"form_id\": 1,
\"form_fields\": {
\"1\": {
\"type\": \"text\",
\"label\": \"How you left\",
\"submitted_value\": \"Awesome course it was\",
\"options_label\": [],
\"options_value\": [],
\"is_required\": false
},
\"2\": {
\"type\": \"rating\",
\"label\": \"How you rate us\",
\"submitted_value\": 5,
\"options_label\": [],
\"options_value\": [],
\"is_required\": false
}
}
}"
const url = new URL(
"https://demo.aomlms.com/api/module/survey/save-response"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Feedback",
"content": "A brief Description",
"courseName": "course 1",
"courseSlug": "http:\/\/localhost:8000\/course\/course-1",
"course_id": 1,
"form_id": 1,
"form_fields": {
"1": {
"type": "text",
"label": "How you left",
"submitted_value": "Awesome course it was",
"options_label": [],
"options_value": [],
"is_required": false
},
"2": {
"type": "rating",
"label": "How you rate us",
"submitted_value": 5,
"options_label": [],
"options_value": [],
"is_required": false
}
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 15,
"message": "Form saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Text Modules
A Text Module is a lesson module used as course content. Helps to perform CRUD operation to and for Text modules.
Text Modules Tabular List
Returns all the text modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/text?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/text"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"author": "Aom Staff",
"created_at": "Aug 03, 2020 09:56 AM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Text Module
Retrieves the details of the specified text module. Helps in fetching text module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/text/67" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/text/67"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>Content of the text lesson</p>",
"trackCompletion": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Text Module
To create a text module, you need to use this request. (See parameters) Created text modules can be used in the course as course content/lesson.
Returns : id of the text module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/text" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"The Fundamentals of LMS\",
\"content\": \"<p>This is the short content here<\\/p>\",
\"trackCompletion\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/text"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "The Fundamentals of LMS",
"content": "<p>This is the short content here<\/p>",
"trackCompletion": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 5,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Text Module
Updates the details of a specified text modules. (See parameters) Text modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/text/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"The Fundamentals of LMS\",
\"content\": \"<p>This is the updated short content here<\\/p>\",
\"trackCompletion\": true
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/text/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "The Fundamentals of LMS",
"content": "<p>This is the updated short content here<\/p>",
"trackCompletion": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Text Module Info
Retrieves details of text module in depth as well as different modules details that are being used as course content for the same course the current text module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/text/details?registrationId=1&moduleId=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/text/details"
);
const params = {
"registrationId": "1",
"moduleId": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "test",
"slug": "test",
"content": "<p>afegrshtdh</p>",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"trackCompletion": true,
"min_time_spent": 0,
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "1 week ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 1
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "",
"nextSlug": "assign",
"status": "Completed",
"timeSpent": 6,
"statusRowId": 1
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Complete Text Module
Updates the status of the text module to completed. Changes the completion percentage to 100% and mark completed the text module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/text/markComplete" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"statusRowId\": \"3\"
}"
const url = new URL(
"https://demo.aomlms.com/api/module/text/markComplete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"statusRowId": "3"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module Completed Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Text module Info for Membership content
Retrieves details of text module in depth for the same membership the current text module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/text/content-details?moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/text/content-details"
);
const params = {
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "My-video-lesson",
"slug": "my-video-lesson",
"content": "Brief Description",
"disableForwardSeek": false,
"trackCompletion": true,
"timeSpent": null,
"lastWatchedTime": 0,
"isReady": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Videos
A Video Module is a lesson module used as course content. Helps to perform CRUD operation to and for Video modules.
Video Modules Tabular List
Returns all the video modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/video?page_size=50&page_number=1&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/video"
);
const params = {
"page_size": "50",
"page_number": "1",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 1,
"recordsFiltered": 1,
"records": [
{
"id": 3,
"name": "Video Module Name",
"slug": "video-module-name",
"type": "video",
"provider": "vimeo",
"icon": "<i class=\"el-icon-video-play\"></i>",
"author": "Aom Staff",
"created_at": "Aug 09, 2020 06:20 PM"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Video Module
To create a video module, you need to use this request. (See parameters) Created video modules can be used in the course as course content/lesson.
Returns : id of the video module created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/video" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"My-video-lesson\",
\"content\": \"Brief Description\",
\"coverUrl\": \"https:\\/\\/johns.com\\/aperiam-qui-ipsa-commodi-sit-quia-nam.html\",
\"url\": \"https:\\/\\/player.vimeo.com\\/video\\/382947752\",
\"provider\": \"vimeo\",
\"trackCompletion\": true,
\"disableForwardSeek\": true,
\"categories\": \"Professional Training\",
\"subtitle\": \"maxime\",
\"subtitleType\": \"upload\",
\"interactions\": [
\"facere\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/video"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "My-video-lesson",
"content": "Brief Description",
"coverUrl": "https:\/\/johns.com\/aperiam-qui-ipsa-commodi-sit-quia-nam.html",
"url": "https:\/\/player.vimeo.com\/video\/382947752",
"provider": "vimeo",
"trackCompletion": true,
"disableForwardSeek": true,
"categories": "Professional Training",
"subtitle": "maxime",
"subtitleType": "upload",
"interactions": [
"facere"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 9,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Video Module
Retrieves the details of the specified video module. Helps in fetching video module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/video/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/video/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Video Module Name",
"slug": "video-module-name",
"content": null,
"provider": "vimeo",
"url": null,
"coverUrl": null,
"disableForwardSeek": true,
"trackCompletion": false,
"fileName": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Video Module
Updates the details of the specified video module. (See parameters) Video modules can be used in the course as course content/lesson.
Returns : id of the video module created and successfull message
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/video/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"My-video-lesson\",
\"content\": \"Updated Brief Description\",
\"coverUrl\": \"http:\\/\\/www.zieme.com\\/quisquam-eius-minus-eligendi-quod-quia-aliquid.html\",
\"url\": \"https:\\/\\/player.vimeo.com\\/video\\/382947752\",
\"provider\": \"vimeo\",
\"trackCompletion\": true,
\"disableForwardSeek\": true,
\"categories\": \"Professional Training\",
\"subtitle\": \"gfg\",
\"subtitleType\": \"upload\",
\"interactions\": [
\"est\"
]
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/video/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "My-video-lesson",
"content": "Updated Brief Description",
"coverUrl": "http:\/\/www.zieme.com\/quisquam-eius-minus-eligendi-quod-quia-aliquid.html",
"url": "https:\/\/player.vimeo.com\/video\/382947752",
"provider": "vimeo",
"trackCompletion": true,
"disableForwardSeek": true,
"categories": "Professional Training",
"subtitle": "gfg",
"subtitleType": "upload",
"interactions": [
"est"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Video Module Info
Retrieves details of video module in depth as well as different modules details that are being used as course content for the same course the current video module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/video/details?registrationId=1&moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/video/details"
);
const params = {
"registrationId": "1",
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "My-video-lesson",
"slug": "my-video-lesson",
"content": "Brief Description",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"min_time_spent": 0,
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "1 hour ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 3
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 7,
"name": "First-quiz",
"slug": "first-quiz",
"type": "quiz",
"icon": "<i class=\"el-icon-discover\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 9,
"name": "My-video-lesson",
"slug": "my-video-lesson",
"type": "video",
"icon": "<i class=\"el-icon-video-play\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "first-quiz",
"nextSlug": "",
"provider": "vimeo",
"coverUrl": null,
"url": "https://player.vimeo.com/video/382947752",
"disableForwardSeek": false,
"trackCompletion": true,
"status": "In Progress",
"statusRowId": 4,
"timeSpent": null,
"lastWatchedTime": 0,
"isReady": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Complete Video Module
Updates the status of the video module to completed. Changes the completion percentage to 100% and marks completed the video module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/video/markComplete?statusRowId=3&videoDuration=3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/video/markComplete"
);
const params = {
"statusRowId": "3",
"videoDuration": "3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Module Completed Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Video module Info for Membership content
Retrieves details of video module for the same membership the current video module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/video/content-details?moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/video/content-details"
);
const params = {
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "My-video-lesson",
"slug": "my-video-lesson",
"content": "Brief Description",
"disableForwardSeek": false,
"trackCompletion": true,
"timeSpent": null,
"lastWatchedTime": 0,
"isReady": true
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webinars
A Webinar Module is used as course content. Helps to perform CRUD operation to and for Webinar modules.
Webinar Modules Tabular List
Returns all the webinar modules in a tabular list format in paginated mode. You can apply filter using search_param via associatedCourse(modules used in course) and moduleName.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/webinar?page_size=50&page_number=laborum&order_by=%7B%22colName%22%3A%22created_at%22%2C+%22direction%22%3A+%22desc%22%7D%7D&search_param=%7B%22associatedCourse%22%3A%22%22%2C%22moduleName%22%3A%22%22%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/webinar"
);
const params = {
"page_size": "50",
"page_number": "laborum",
"order_by": "{"colName":"created_at", "direction": "desc"}}",
"search_param": "{"associatedCourse":"","moduleName":""}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"recordsTotal": 0,
"recordsFiltered": 0,
"records": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Webinar Module
To create a webinar module, you need to use this request. (See parameters) Created webinar modules can be used in the course as course content/lesson.
Returns : id of the webinar created and successfull message
Example request:
curl --request POST \
"https://demo.aomlms.com/api/modules/webinar" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"New-Webinar\",
\"content\": \"A brief description\",
\"service_provider\": \"vimeo_live_streaming\",
\"meeting_url\": \"https:\\/\\/vimeo.com\\/WGYWVjhvjvkgrbwekjrblwiebrjbXjytfjg\",
\"start_time\": \"2020-08-17 00:00:00\",
\"end_time\": \"2020-08-17 01:00:00\",
\"zoom_meeting_id\": \"83170896876\",
\"zoom_host_pwd\": \"83170896787\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/webinar"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "New-Webinar",
"content": "A brief description",
"service_provider": "vimeo_live_streaming",
"meeting_url": "https:\/\/vimeo.com\/WGYWVjhvjvkgrbwekjrblwiebrjbXjytfjg",
"start_time": "2020-08-17 00:00:00",
"end_time": "2020-08-17 01:00:00",
"zoom_meeting_id": "83170896876",
"zoom_host_pwd": "83170896787"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"id": 12,
"message": "Module saved successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Webinar Module
Update the details of specified webinar module. (See Response) Webinar modules can be used in the course as course content/lesson.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/modules/webinar/{id}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}" \
--data "{
\"name\": \"New-Webinar\",
\"content\": \"An updated brief description\",
\"service_provider\": \"vimeo_live_streaming\",
\"meeting_url\": \"https:\\/\\/vimeo.com\\/WGYWVjhvjvkgrbwekjrblwiebrjbXjytfjg\",
\"start_time\": \"2020-08-17 00:00:00\",
\"end_time\": \"2020-08-17 02:00:00\",
\"zoom_meeting_id\": \"83170896876\",
\"zoom_host_pwd\": \"83170896787\"
}"
const url = new URL(
"https://demo.aomlms.com/api/modules/webinar/{id}"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "New-Webinar",
"content": "An updated brief description",
"service_provider": "vimeo_live_streaming",
"meeting_url": "https:\/\/vimeo.com\/WGYWVjhvjvkgrbwekjrblwiebrjbXjytfjg",
"start_time": "2020-08-17 00:00:00",
"end_time": "2020-08-17 02:00:00",
"zoom_meeting_id": "83170896876",
"zoom_host_pwd": "83170896787"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"message": "Module updated successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Webinar Modules
Retrieves the details of the specified webinar module. Helps in fetching webinar module using its ID. (See Parameters)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/modules/webinar/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/modules/webinar/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "New-Webinar",
"slug": "new-webinar",
"content": "A Brief Description",
"service_provider": "vimeo_live_streaming",
"meeting_url": "https://zzom.com/WGYWVjhvjvkgrbwekjrblwiebrjbXjytfjg",
"start_time": "2020-08-17 00:00:00",
"end_time": "2020-08-17 01:00:00"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve Detailed Webinar Module Info
Retrieves details of webinar module in depth as well as different modules details that are being used as course content for the same course the current webinar module is attached to. Returns related fields value. (See Response)
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/webinar/details?registrationId=1&moduleId=9" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/webinar/details"
);
const params = {
"registrationId": "1",
"moduleId": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"name": "Essay on LMS",
"slug": "essay-on-lms",
"content": "A brief description",
"courseName": "course 1",
"courseSlug": "http://localhost:8000/course/course-1",
"totalPoints": 25,
"submissionType": "text",
"maxUploadSize": 5,
"min_time_spent": 0,
"allowedFileTypes": ".",
"otherModules": [
{
"module_id": 1,
"name": "test",
"slug": "test",
"type": "text",
"icon": "<i class=\"el-icon-tickets\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 1,
"status": "Completed",
"started_on": "2020-08-03T10:02:33.000000Z",
"completed_on": "2020-08-03T10:02:41.000000Z",
"last_accessed_on": "8 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 6,
"totalSeconds": 6
},
"completion_percentage": 100,
"no_of_times_accessed": 3
},
{
"module_id": 4,
"name": "assign",
"slug": "assign",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": true,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 7,
"name": "First-quiz",
"slug": "first-quiz",
"type": "quiz",
"icon": "<i class=\"el-icon-discover\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": -1,
"status": "Not Started",
"started_on": "",
"completed_on": "",
"last_accessed_on": "Never",
"total_time_spent": "",
"points_awarded": "",
"completion_percentage": 0,
"no_of_times_accessed": 0
},
{
"module_id": 9,
"name": "My-video-lesson",
"slug": "my-video-lesson",
"type": "video",
"icon": "<i class=\"el-icon-video-play\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 4,
"status": "In Progress",
"started_on": "2020-08-10T20:04:14.000000Z",
"completed_on": null,
"last_accessed_on": "6 hours ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 0,
"no_of_times_accessed": 1
},
{
"module_id": 10,
"name": "Essay on LMS",
"slug": "essay-on-lms",
"type": "assignment",
"icon": "<i class=\"el-icon-edit-outline\"></i>",
"is_locked": false,
"lock_reason": "",
"is_dripped": false,
"drip_message": "",
"is_current": false,
"status_row_id": 5,
"status": "Completed",
"started_on": "2020-08-11T02:47:32.000000Z",
"completed_on": "2020-08-11T02:47:32.000000Z",
"last_accessed_on": "46 seconds ago",
"total_time_spent": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"totalSeconds": null
},
"completion_percentage": 100,
"no_of_times_accessed": 1
}
],
"launchCheck": {
"canbeLaunched": true,
"errTitle": "",
"errDesc": ""
},
"prevSlug": "my-video-lesson",
"nextSlug": "",
"status": "Completed",
"statusRowId": 5,
"timeSpent": null,
"prevSubmission": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webinar Module Launch Details
Retrieves the launch details for the webinar modules. Returned data includes webinar provider name(like vimeo, zoom, big blue button, etc), whether webinar is created successfully or not, etc This information helps while launching the webinar for students.
Example request:
curl --request GET \
--get "https://demo.aomlms.com/api/module/webinar/launch?moduleId=12" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/webinar/launch"
);
const params = {
"moduleId": "12",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"provider": "vimeo_live_streaming",
"webinarDetails": {
"is_success": "false",
"message": "Something went wrong. Please contact admin"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Complete Webinar Module
Updates the status of the webinar module to completed. Changes the completion percentage to 100% and mark completed the webinar module.
Example request:
curl --request PUT \
"https://demo.aomlms.com/api/module/webinar/markComplete?statusRowId=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
const url = new URL(
"https://demo.aomlms.com/api/module/webinar/markComplete"
);
const params = {
"statusRowId": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Example response (200):
{
"message": "Module Completed Successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.