Courses¶
Note: Every endpoint listed in this document is managing JSON objects, so the path structure shown for nested keys is represented in a JSON-style access pattern.
Root Path: /api/v1/courses/
Model¶
Key |
Type |
Default |
Description |
---|---|---|---|
title |
string |
<colander.required> |
|
course_type |
string |
||
description |
string |
||
active |
bool |
false |
|
requires_enrollment |
bool |
true |
|
enrolled_groups |
[]string |
[] |
|
enrolled_users |
[]string |
[] |
|
manual_ordering_index |
int |
0 |
|
due_type |
string |
||
due_exact_date |
datetime |
||
due_days_from_enrollment |
int |
0 |
|
display_options.show_navigation_panel |
bool |
true |
|
display_options.show_navigation_header |
bool |
true |
|
display_options.navigation_header_height |
int |
40 |
|
display_options.navigation_panel_width |
int |
200 |
|
display_options.player_launch_method |
int |
1 |
|
display_options.sco_launch_method |
int |
1 |
|
display_options.sco_window_size_type |
int |
1 |
|
display_options.sco_window_width |
int |
800 |
|
display_options.sco_window_height |
int |
600 |
|
display_options.player_window_size_type |
int |
1 |
|
display_options.player_window_width |
int |
1000 |
|
display_options.player_window_height |
int |
640 |
|
behavior.allow_score_to_decrease |
bool |
true |
|
behavior.allow_score_change_after_status_passed |
bool |
true |
|
behavior.allow_score_change_after_status_failed |
bool |
true |
|
behavior.allow_score_change_after_status_completed |
bool |
true |
|
behavior.allow_status_change_after_status_passed |
bool |
true |
|
behavior.allow_status_change_after_status_failed |
bool |
true |
|
behavior.allow_status_change_after_status_completed |
bool |
true |
List¶
Return a list of this collection’s items, matching the filter parameters if provided.
HTTP Verb: GET
Endpoint: /api/v1/courses/
Example Request (cURL):
curl -X GET -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
-H "Content-Type: application/json"
https://<yournamehere>.enfixlp.com/api/v1/courses/
Example Response:
[
{
"requires_enrollment": true,
"display_options": {
"player_launch_method": 1,
"sco_window_width": 800,
"sco_window_height": 600,
"navigation_header_height": 40,
"player_window_width": 1000,
"show_navigation_panel": true,
"navigation_panel_width": 200,
"show_navigation_header": true,
"sco_launch_method": 1,
"player_window_height": 640,
"player_window_size_type": 1,
"sco_window_size_type": 1
},
"enrolled_groups": [],
"title": "Business Management Skills",
"manual_ordering_index": 0,
"course_type": "",
"due_exact_date": "",
"enrolled_users": [],
"due_type": "",
"behavior": {
"allow_status_change_after_status_completed": true,
"allow_score_change_after_status_failed": true,
"allow_score_change_after_status_completed": true,
"allow_status_change_after_status_failed": true,
"allow_score_change_after_status_passed": true,
"allow_status_change_after_status_passed": true,
"allow_score_to_decrease": true
},
"active": false,
"due_days_from_enrollment": 0,
"metadata": {},
"description": ""
}
]
Get One¶
Return the specified collection item.
HTTP Verb: GET
Endpoint: /api/v1/courses/[id]
Example Request (cURL):
curl -X GET -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
-H "Content-Type: application/json"
https://<yournamehere>.enfixlp.com/api/v1/courses/[id]
Example Response:
{
"requires_enrollment": true,
"display_options": {
"player_launch_method": 1,
"sco_window_width": 800,
"sco_window_height": 600,
"navigation_header_height": 40,
"player_window_width": 1000,
"show_navigation_panel": true,
"navigation_panel_width": 200,
"show_navigation_header": true,
"sco_launch_method": 1,
"player_window_height": 640,
"player_window_size_type": 1,
"sco_window_size_type": 1
},
"enrolled_groups": [],
"title": "Business Management Skills",
"manual_ordering_index": 0,
"course_type": "",
"due_exact_date": "",
"enrolled_users": [],
"due_type": "",
"behavior": {
"allow_status_change_after_status_completed": true,
"allow_score_change_after_status_failed": true,
"allow_score_change_after_status_completed": true,
"allow_status_change_after_status_failed": true,
"allow_score_change_after_status_passed": true,
"allow_status_change_after_status_passed": true,
"allow_score_to_decrease": true
},
"active": false,
"due_days_from_enrollment": 0,
"metadata": {},
"description": ""
}
Create¶
Store a new instance of the object in the system. All required fields must be specified.
HTTP Verb: POST
Endpoint: /api/v1/courses/
Example Request (cURL):
curl -X POST -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
-H "Content-Type: application/json"
-d '{"requires_enrollment": true, "display_options": {"player_launch_method": 1, "sco_window_width": 800, "sco_window_height": 600, "navigation_header_height": 40, "player_window_width": 1000, "show_navigation_panel": true, "navigation_panel_width": 200, "show_navigation_header": true, "sco_launch_method": 1, "player_window_height": 640, "player_window_size_type": 1, "sco_window_size_type": 1}, "enrolled_groups": [], "title": "Business Management Skills", "manual_ordering_index": 0, "course_type": "", "due_exact_date": "", "enrolled_users": [], "due_type": "", "behavior": {"allow_status_change_after_status_completed": true, "allow_score_change_after_status_failed": true, "allow_score_change_after_status_completed": true, "allow_status_change_after_status_failed": true, "allow_score_change_after_status_passed": true, "allow_status_change_after_status_passed": true, "allow_score_to_decrease": true}, "active": false, "due_days_from_enrollment": 0, "metadata": {}, "description": ""}'
https://<yournamehere>.enfixlp.com/api/v1/courses/
Example Response:
{
"resource_url": "https://<yournamehere>.enfixlp.com/api/v1/courses/51b1e78dbd7a844089b652a9/",
"_id": "51b1e78dbd7a844089b652a9"
}
Replace¶
This is a full model replacement of the specified item, every required field must be specified.
HTTP Verb: PUT
Endpoint: /api/v1/courses/[id]
Example Request (cURL):
curl -X PUT -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
-H "Content-Type: application/json"
-d '{"requires_enrollment": true, "display_options": {"player_launch_method": 1, "sco_window_width": 800, "sco_window_height": 600, "navigation_header_height": 40, "player_window_width": 1000, "show_navigation_panel": true, "navigation_panel_width": 200, "show_navigation_header": true, "sco_launch_method": 1, "player_window_height": 640, "player_window_size_type": 1, "sco_window_size_type": 1}, "enrolled_groups": [], "title": "Business Management Skills", "manual_ordering_index": 0, "course_type": "", "due_exact_date": "", "enrolled_users": [], "due_type": "", "behavior": {"allow_status_change_after_status_completed": true, "allow_score_change_after_status_failed": true, "allow_score_change_after_status_completed": true, "allow_status_change_after_status_failed": true, "allow_score_change_after_status_passed": true, "allow_status_change_after_status_passed": true, "allow_score_to_decrease": true}, "active": false, "due_days_from_enrollment": 0, "metadata": {}, "description": ""}'
https://<yournamehere>.enfixlp.com/api/v1/courses/[id]
Example Response:
No body, Status Code 204.
Update¶
On an update, you may specify only the fields you wish to update. All other fields will be preserved as currently stored.
HTTP Verb: PATCH
Endpoint: /api/v1/courses/[id]
Example Request (cURL):
curl -X PUT -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
-H "Content-Type: application/json"
-d '{"requires_enrollment": true}'
https://<yournamehere>.enfixlp.com/api/v1/courses/[id]
Example Response:
No body, Status Code 204.
Delete¶
Permanently remove an item from the collection.
HTTP Verb: DELETE
Endpoint: /api/v1/courses/[id]
Example Request (cURL):
curl -X DELETE -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
-H "Content-Type: application/json"
https://<yournamehere>.enfixlp.com/api/v1/courses/[id]
Example Response:
No body, Status Code 200.
Upload¶
Upload a course package into a given course container.
HTTP Verb: POST
Endpoint: /api/v1/courses/[id]/upload/
Example Request (cURL):
curl -X POST -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
--data-binary @pif.zip
https://<yournamehere>.enfixlp.com/api/v1/courses/[id]/upload/
Example Response:
No body, Status Code 204.