LEAD LMS API
Headers
These headers should be included in all requests (with the exception of Authorization, which is only required for authenticated requests)
Content-Type
:application/json
Accept
:application/json
Authorization
:Bearer <JWT_token>
Authentication
Issuing an API token may be done by submitting a POST request to the /api/login
endpoint with the form-data parameters used to authenticate a user via the web interface. The response will be a JSON object containing the token, which should be stored and used for all subsequent requests.
POST /api/login
Parameters
email
:string
, required - The email address of the user.password
:string
, required - The password of the user.
Response
HTTP 200
{ "access_token": "4|xnx8AhAoRt1BgQOqYwaGjvHtyKo0WLe4ViHyHjUZ", "token_type": "Bearer" }
Errors
HTTP 401
{ "message": "Invalid login details" }
Revoking an API token may be done by submitting a GET request to the /api/revoke-tokens/{user_id}
endpoint with the token in the Authorization
header. The response will be a JSON object containing a success message.
GET /api/revoke-tokens{user_id}
Where
user_id
is the ID of the user whose token is being revoked.Response
HTTP 200
{ "message": "Tokens revoked" }
Users
GET api/users/email/lookup?email=[email]
Returns an existing User record with the given email or 404s
Note: email should be URL-encoded (or will have issues with certain characters)
Response
{ "user": { "id": 1, "email": "nathan@fivable.com", "role": "admin", "salutation": null, ... }, }
POST api/users
Returns a paginated list of users.
Response
{ "users": { "current_page": 1, "data": [ { "id": 1, "email": "nathan@fivable.com", "role": "admin", "salutation": null, "first_name": "Nathan", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 7824, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": "2023-08-28 19:08:08", "language": "en-US", "time_zone": "America/New_York", "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 1, "stripe_customer_id": "cus_123", "profile_picture": null, "email_verified_at": "2021-06-08T15:14:25.000000Z", "email_verification_redirect": null, "created_at": "2020-02-18T02:17:55.000000Z", "updated_at": "2023-08-28T19:08:08.000000Z", "deleted_at": null, "name": "Nathan Williams", "full_name": "Nathan Williams", "profile_picture_url": "<url>" }, ... ], "first_page_url": "<http://localhost:8060/api/users?page=1",> "from": 1, "last_page": 334, "last_page_url": "<http://localhost:8060/api/users?page=334",> "links": [ { "url": null, "label": "« Previous", "active": false }, ... ], "next_page_url": "<url>", "path": "<url>", "per_page": 25, "prev_page_url": null, "to": 25, "total": 8350 }
POST api/users
Stores a new User record.
Form-Data Parameters
email
:string
, required - The email address of the user.password
:string
, required - The password of the user.role
:string
, required - The role of the user. Must be one ofadmin
,global_leader
,learner
.salutation
:string
, optional - The salutation of the user.first_name
:string
, required - The first name of the user.last_name
:string
, required - The last name of the user.suffix
:string
, optional - The suffix of the user.stackable_person_id
:integer
, optional - The Stackable ID of the user.virtus_id
:integer
, optional - The Virtus ID of the user.phone
:string
, optional - The phone number of the user.language
:string
, required - The language of the user. Must be one ofen-US
,es-US
.time_zone
:string
, required - The time zone of the user. Must be a valid time zone string.enrolled_in_academy
:boolean
, optional - Whether or not the user is enrolled in the Academy.sms_opt_in
:boolean
, optional - Whether or not the user has opted in to receive SMS messages.disable_notifications
:boolean
, optional - Whether or not the user has opted out of receiving notifications.stripe_customer_id
:string
, optional - The Stripe Customer ID of the user.profile_picture_file
:file
, optional - The profile picture of the user.profile_picture
:string
, optional - The URL of the profile picture of the user.learner_place_ids
:array
, optional - The IDs of the places the user is enrolled in.local_leader_place_ids
:array
, optional - The IDs of the places the user is a local leader of.address
:JSON
, optional - The address of the user.street_1
:string
, optional - The first line of the address.street_2
:string
, optional - The second line of the address.city
:string
, optional - The city of the address.state
:string
, optional - The state of the address.zip
:string
, optional - The zip code of the address.
user_metas
:JSON
, optional - The meta data of the user.slug
:string
, The slug of the meta data.name
:string
, The key (name) of the meta data.value
:string
, The value of the meta data.
Response
HTTP 200
{ "status": 201, "message": "User successfully stored", "user": { "id": 8783, "email": "nathan+api@fivable.com", "role": "learner", "salutation": null, "first_name": "Nathan", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 144, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": null, "language": "en-US", "time_zone": null, "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 0, "stripe_customer_id": "cus_OfPpGfJGhyBitw", "profile_picture": null, "email_verified_at": null, "email_verification_redirect": null, "created_at": "2023-09-19T14:33:20.000000Z", "updated_at": "2023-09-19T14:33:20.000000Z", "deleted_at": null, "name": "Nathan Williams", "full_name": "Nathan Williams", "profile_picture_url": "<url>", "team_roles": [], "cohorts": [], "subscriptions": [], "groups": [], "learning_paths": [], "courses": [], "course_containers": [] } }
PUT api/users/{user}
Updates a specified User
URL Parameters
user
:int
, required - The ID of the User to update.
Form-Data Parameters
email
:string
, required - The email address of the user.password
:string
, required - The password of the user.role
:string
, required - The role of the user. Must be one ofadmin
,global_leader
,learner
.salutation
:string
, optional - The salutation of the user.first_name
:string
, required - The first name of the user.last_name
:string
, required - The last name of the user.suffix
:string
, optional - The suffix of the user.stackable_person_id
:integer
, optional - The Stackable ID of the user.virtus_id
:integer
, optional - The Virtus ID of the user.phone
:string
, optional - The phone number of the user.language
:string
, required - The language of the user. Must be one ofen-US
,es-US
.time_zone
:string
, required - The time zone of the user. Must be a valid time zone string.enrolled_in_academy
:boolean
, optional - Whether or not the user is enrolled in the Academy.sms_opt_in
:boolean
, optional - Whether or not the user has opted in to receive SMS messages.disable_notifications
:boolean
, optional - Whether or not the user has opted out of receiving notifications.stripe_customer_id
:string
, optional - The Stripe Customer ID of the user.profile_picture_file
:file
, optional - The profile picture of the user.profile_picture
:string
, optional - The URL of the profile picture of the user.learner_place_ids
:array
, optional - The IDs of the places the user is enrolled in.local_leader_place_ids
:array
, optional - The IDs of the places the user is a local leader of.address
:JSON
, optional - The address of the user.street_1
:string
, optional - The first line of the address.street_2
:string
, optional - The second line of the address.city
:string
, optional - The city of the address.state
:string
, optional - The state of the address.zip
:string
, optional - The zip code of the address.
user_metas
:JSON
, optional - The meta data of the user.slug
:string
, The slug of the meta data.name
:string
, The key (name) of the meta data.value
:string
, The value of the meta data.
Response
HTTP 200
{ "message": "User successfully updated", "user": { "id": 8784, "email": "nathan+api1@fivable.com", "role": "admin", "salutation": null, "first_name": "NathanUpdated", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 145, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": null, "language": "en-US", "time_zone": null, "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 0, "stripe_customer_id": "cus_OfQEUcoYax3A4g", "profile_picture": null, "email_verified_at": null, "email_verification_redirect": null, "created_at": "2023-09-19T14:58:26.000000Z", "updated_at": "2023-09-19T15:06:58.000000Z", "deleted_at": null, "name": "NathanUpdated Williams", "full_name": "NathanUpdated Williams", "profile_picture_url": "<url>", "user_metas": [ { "id": 32969, "user_id": 8784, "slug": "address-object", "name": "Address Object", "value": "{\"street_1\":null,\"street_2\":null,\"city\":null,\"state\":null,\"zip\":null}", "created_at": "2023-09-19T14:58:29.000000Z", "updated_at": "2023-09-19T14:58:29.000000Z" } ] } }
DELETE api/users/{user}
Soft-deletes a specified User
** URL Parameters**
user
:int
, required - The ID of the User to soft-delete.
Response
HTTP 200
{ "message": "User deleted" }
GET api/users/{user}/courses
List all of the specified User’s Courses
URL Parameters
user
:int
, required - The ID of the User to retrieve Courses for.
Response
HTTP 200
{ "courses": [ { "id": 1, "name": "The Extraordinary Minister of Holy Communion", "type": null, "description": "The Extraordinary Minister of Holy Communion (EMHC) is...", "status": "published", "featured_image_id": 131, "instructor_id": null, "objectives": null, "length": "00:45:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": null, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2020-02-19T17:09:39.000000Z", "updated_at": "2022-11-18T02:56:18.000000Z", "deleted_at": null, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "The Extraordinary Minister of Holy Communion (EMHC) is...", "is_actionable": true, "pivot": { "user_id": 1, "course_id": 1, "term_id": null, "credit_id": null, "status_mask": 2, "has_paid": 0, "rsvp_time": null, "rsvp_id": null, "completed_by": null, "completed_at": null, "bookmarked_at": null, "created_at": "2020-03-06T03:53:39.000000Z", "updated_at": "2020-03-06T03:59:43.000000Z", "is_bookmarked": false }, "featured_image": {} }, ... ] }
GET api/users/{user}/assignments
List all of the specified User’s Assignments
URL Parameters
user
:int
, required - The ID of the User to retrieve Assignments for.
Response
HTTP 200
{ "assignments": [ { "id": 3, "description": "<html>", "submission_option": "wysiwyg", "featured_image_id": 104, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2020-03-16T15:36:24.000000Z", "updated_at": "2022-11-21T19:05:05.000000Z", "deleted_at": null, "name": "Catechist's Reflection", "enable_grouping": 0, "due_date": null, "learning_path_id": 2, "learning_path_name": "Catechist Formation", "status_label": "Submitted", "completion_date": null, "view_url": "<url>", "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "Watch Bishop Frank's invitation...", "featured_image": {} }, ... ], }
GET api/users/{user}/course-containers
List all of the specified User’s Course Containers
URL Parameters
user
:int
, required - The ID of the User to retrieve Course Containers for.
Response
HTTP 200
{ "course_containers": [ { "id": 34, "name": "Nathan's Testing Course Container", "description": "<p>description</p>", "featured_image_id": 524, "instructor_id": 86, "objectives": [], "custom_completion_message": null, "credit_value": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "learners_receive_new_content": 0, "new_content_invalidates_completions": 0, "registration_fee": null, "stackable_place_ids": null, "created_at": "2023-06-06T01:38:26.000000Z", "updated_at": "2023-06-06T01:38:26.000000Z", "deleted_at": null, "class_name": "App\\Models\\CourseContainer", "excerpt": "description ", "image_url": "<url>", "featured_image": {} }, ... ] }
GET api/users/{user}/groups
List all of the specified User’s Groups
URL Parameters
user
:int
, required - The ID of the User to retrieve Groups for.
Response
HTTP 200
{ "groups": [ { "id": 56, "name": "Mentees", "featured_image_id": null, "parent_group_id": null, "inherit_parent_properties": 0, "group_type_id": 11, "user_can_view": 1, "user_can_assign": 0, "has_authorization_status": 1, "authorization_interval": null, "authorization_renewal_notice_days": 0, "compliance_expiry_interval": null, "uses_virtus": 0, "created_at": "2023-03-09T15:05:41.000000Z", "updated_at": "2023-03-09T15:05:41.000000Z", "deleted_at": null, "class_name": "App\\Models\\Group", "image_url": "<url>", "pivot": { "user_id": 1, "group_id": 56, "authorization_expires_at": null, "authorization_status": null, "authorization_status_override": null, "authorization_status_override_reason": null, "authorized_at": null, "id": 7168, "initial_learning_path_id": 49, "is_manager": 0, "is_member": 1, "created_at": "2023-08-11T18:24:14.000000Z", "updated_at": "2023-08-11T18:24:14.000000Z" }, "featured_image": null }, ... ] }
GET api/users/{user}/terms
List all of the specified User’s Terms
URL Parameters
user
:int
, required - The ID of the User to retrieve Terms for.
Response
HTTP 200
{ "groups": [ { "id": 2, "name": "EMHC Continuing Formation Part One", "description": "As an EMHC, we know you are committed to...", "include_users": "custom", "user_dependent_dates": 1, "start_date": null, "end_date": null, "minimum_start_date": "2022-06-02T00:00:00.000000Z", "length": 200, "learning_path_trigger_id": 1, "term_trigger_id": null, "override_credit_goal": 1, "credit_goal": 1, "featured_image_url": "terms/eucharist-g8193efb71_1280.jpg", "featured_image_id": 98, "language": null, "require_virtus": 1, "recognition_type": null, "recognition_template_id": null, "recognition_generation_type": null, "recognition_content": null, "allow_termable_addition_after_end_date": 1, "created_at": "2022-05-13T17:17:44.000000Z", "updated_at": "2023-01-17T20:20:59.000000Z", "deleted_at": null, "has_ended": false, "is_upcoming": false, "pivot": { "user_id": 115, "term_id": 2, "id": 1862, "term_start_date": "2022-06-02T00:00:00.000000Z", "term_end_date": "2022-11-29T00:00:00.000000Z", "created_at": "2022-05-31T19:25:56.000000Z", "updated_at": "2022-05-31T19:25:56.000000Z", "credits_goal": 1, "credits_added_completed_object": { "required_credits_added": 1, "required_credits_completed": 1, "total_credits_added": 1, "total_credits_completed": 1, "credits_added_percentage": 100, "credits_completed_percentage": 100 } } }, ... ] }
Learning Paths
GET api/learning-paths
Returns a list of Learning Paths.
Response
HTTP 200
{ "learning_paths": [ { "id": 1, "name": "Learning Path 1", "description": "Ut enim ad minima veniam, quis nostrum...", "featured_image_id": 42, "instructor_id": null, "objectives": [], "type": null, "recognition_type": null, "recognition_template_id": null, "visibility": "index", "language": null, "credit_value": 100, "required_electives": 0, "restrict_assignments": 0, "require_virtus": 0, "require_lor": 0, "is_featured": 0, "prereq_lp_id": null, "next_lp_id": null, "auto_enroll_in_academy": 0, "assigned_visibility": 0, "stackable_place_ids": null, "place_type": null, "mandate_team_role_id": null, "published_at": null, "created_at": "2021-04-01T00:14:28.000000Z", "updated_at": "2023-04-06T12:38:09.000000Z", "deleted_at": null, "certificate_content": null, "custom_completion_message": null, "group_size": 1, "premium": 1, "learners_receive_new_content": 1, "new_content_invalidates_completions": 0, "registration_fee": 0, "cpm_list_id": null, "hide_registration_ministries": 0, "class_name": "App\\Models\\LearningPath", "image_url": "<url>", "excerpt": "Ut enim ad minima veniam, quis...", "is_locked": false, "first_prereq": null, "featured_image": {}, "prereq_learning_path": null }, ... ] }
GET /api/learning-paths/{learningPath}
Returns a single Learning Path.
URL Parameters
learningPath
:int
, required - The ID of the Learning Path to retrieve.
Response
HTTP 200
{ "learning_path": { "id": 10, "name": "Learning Path 10 - Academy Auto-Enroll", "description": null, "featured_image_id": null, "instructor_id": null, "objectives": null, "type": null, "recognition_type": null, "recognition_template_id": null, "visibility": "index", "language": null, "credit_value": null, "required_electives": 0, "restrict_assignments": 0, "require_virtus": 0, "require_lor": 0, "is_featured": 0, "prereq_lp_id": null, "next_lp_id": null, "auto_enroll_in_academy": 1, "assigned_visibility": 0, "stackable_place_ids": null, "place_type": null, "mandate_team_role_id": null, "published_at": null, "created_at": "2021-05-05T19:06:07.000000Z", "updated_at": "2021-05-05T19:06:07.000000Z", "deleted_at": null, "certificate_content": null, "custom_completion_message": null, "group_size": 1, "premium": 0, "learners_receive_new_content": 0, "registration_fee": 0, "cpm_list_id": null, "hide_registration_ministries": 0, "class_name": "App\\Models\\LearningPath", "image_url": "<url>", "excerpt": "", "is_locked": false, "first_prereq": null, "featured_image": null, "prereq_learning_path": null } }
GET api/learning-paths/{learningPath}/pathables
Returns a list of Pathables for a specified Learning Path.
URL Parameters
learningPath
:int
, required - The ID of the Learning Path to retrieve Pathables for.
Response
HTTP 200
{ "pathables": [ { "id": 5, "name": "Course 5", "type": null, "description": "Lorem ipsum", "status": null, "featured_image_id": null, "instructor_id": null, "objectives": null, "length": "04:00:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": null, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2021-04-01T00:14:45.000000Z", "updated_at": "2021-07-16T06:48:55.000000Z", "deleted_at": null, "order": 1, "is_unlocked": false, "is_complete": false, "elective": false, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "Lorem ipsum", "is_actionable": true, "current_user_pivot": null, "is_live": false, "is_mentor_meeting": false, "mentee_user_pivots": null, "pivot": { "learning_path_id": 10, "learning_pathable_id": 5, "learning_pathable_type": "App\\Models\\Course", "order": "1", "prerequisite": 0, "elective": 0, "pathable_completion_url": null, "field_mapping": null, "created_at": "2021-06-21T13:15:03.000000Z", "updated_at": "2021-06-21T13:15:03.000000Z" }, "users": [], "featured_image": null } ] }
GET api/learning-paths/{learningPath}/assignments/{assignment}
Returns a single Assignment Pathable for a specified Learning Path.
URL Parameters
learningPath
:int
, required - The ID of the Learning Path to retrieve the Pathable for.assignment
:int
, required - The ID of the Assignment to retrieve.
Response
HTTP 200
{ "next_pathable": { "id": 9, "name": "Course 9 - YouTu.be", "type": null, "description": null, "status": null, "featured_image_id": null, "instructor_id": null, "objectives": null, "length": "02:00:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": 50, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2021-04-01T21:33:07.000000Z", "updated_at": "2021-11-19T17:32:06.000000Z", "deleted_at": null, "order": 2, "is_unlocked": false, "is_complete": false, "elective": false, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "", "is_actionable": true, "current_user_pivot": null, "is_live": false, "is_mentor_meeting": false, "mentee_user_pivots": null, "pivot": { "learning_path_id": 4, "learning_pathable_id": 9, "learning_pathable_type": "App\\Models\\Course", "order": "2", "prerequisite": 0, "elective": 0, "pathable_completion_url": null, "field_mapping": null, "created_at": "2021-04-05T18:14:00.000000Z", "updated_at": "2021-04-05T18:14:08.000000Z" }, "users": [], "featured_image": null }, "pathable": { "id": 1, "description": "<p>asdasdasdasdasdasa aaaaaaaaa</p>\n", "submission_option": "upload-wysiwyg", "featured_image_id": null, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2021-04-01T22:30:19.000000Z", "updated_at": "2023-02-09T00:58:33.000000Z", "deleted_at": null, "name": "Assignment 1 - OEmbed", "enable_grouping": 0, "due_date": null, "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "asdasdasdasdasdasa aaaaaaaaa ", "featured_image": null }, "polling_url": "<url>" }
GET api/learning-paths/{learningPath}/courses/{course}
Returns a single Course Pathable for a specified Learning Path.
URL Parameters
learningPath
:int
, required - The ID of the Learning Path to retrieve the Pathable for.course
:int
, required - The ID of the Course to retrieve.
Response
HTTP 200
{ "next_pathable": { "id": 3, "description": null, "submission_option": "wysiwyg", "featured_image_id": null, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2021-04-01T22:57:50.000000Z", "updated_at": "2021-04-08T18:42:23.000000Z", "deleted_at": null, "name": "Assignment 3 - Wistia", "enable_grouping": 0, "due_date": null, "order": 3, "is_unlocked": false, "displays_as_requirement": 0, "status": null, "is_complete": false, "elective": false, "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "", "pivot": { "learning_path_id": 4, "learning_pathable_id": 3, "learning_pathable_type": "App\\Models\\Assignment", "order": "3", "prerequisite": 0, "elective": 0, "pathable_completion_url": null, "field_mapping": null, "displays_as_requirement": 0, "created_at": "2021-04-05T18:14:19.000000Z", "updated_at": "2021-04-05T18:14:19.000000Z" }, "submissions": [], "featured_image": null }, "pathable": { "id": 9, "name": "Course 9 - YouTu.be", "type": null, "description": null, "status": "published", "featured_image_id": null, "instructor_id": null, "objectives": null, "length": "02:00:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": 50, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2021-04-01T21:33:07.000000Z", "updated_at": "2021-11-19T17:32:06.000000Z", "deleted_at": null, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "", "is_actionable": true, "featured_image": null }, "assets": [ { "id": 62, "type": "tincan", "url": "https://leadlms.com/asset-url", "rtmp_input_url": null, "rtmp_endpoint_url": null, "assetable_id": 19, "assetable_type": "App\\Models\\Course", "mentee_mentor_id": null, "date": null, "publicize_live_course": null, "rsvp_users_count": null, "created_at": "2020-05-15T19:35:17.000000Z", "updated_at": "2020-05-15T19:35:17.000000Z", "deleted_at": null, "meeting_calendar_link": null, "next_date_human_readable": null }, { "id": 63, "type": "image", "url": "images/LMS 2.jpg", "rtmp_input_url": null, "rtmp_endpoint_url": null, "assetable_id": 19, "assetable_type": "App\\Models\\Course", "mentee_mentor_id": null, "date": null, "publicize_live_course": null, "rsvp_users_count": null, "created_at": "2020-05-15T19:35:41.000000Z", "updated_at": "2020-05-15T19:35:41.000000Z", "deleted_at": null, "meeting_calendar_link": null, "next_date_human_readable": null } ], "polling_url": "<url>" }
GET api/learning-paths/{learningPath}/completion
Returns the currently authenticated User's Completion data for a specified Learning Path.
URL Parameters
learningPath
:int
, required - The ID of the Learning Path to retrieve the Completion data for.
Response
HTTP 200
{ "completion": { "id": 17, "user_id": 1, "learning_path_id": 2, "progress_percentage": 60, "status_mask": 2, "created_at": "2020-03-25T20:28:56.000000Z", "updated_at": "2020-03-26T22:28:19.000000Z", "deleted_at": null }, "pathables_completed": 1, "pathables_total": 5 }
GET api/learning-paths/{learningPath}/join
Joins the currently authenticated User to the specified Learning Path
URL Parameters
learningPath
:int
, required - The ID of the Learning Path to join.
Response
HTTP 200
{ "message": "You have joined the learning path." }
Courses
GET /api/courses
Returns a list of Courses.
Response
HTTP 200
{ "courses": [ { "id": 103, "name": "Course 103 - S3 Video", "type": null, "description": null, "status": "published", "featured_image_id": null, "instructor_id": null, "objectives": [], "length": "00:00:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": null, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2023-09-11T21:03:41.000000Z", "updated_at": "2023-09-11T21:03:41.000000Z", "deleted_at": null, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "", "is_actionable": true, "featured_image": null }, ... ] }
GET /api/courses/{course}
Returns a single Course.
Parameters
course
:int
, required - The ID of the Course.
Response
HTTP 200
{ "course": { "id": 103, "name": "Course 103 - S3 Video", "type": null, "description": null, "status": "published", "featured_image_id": null, "instructor_id": null, "objectives": [], "length": "00:00:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": null, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2023-09-11T21:03:41.000000Z", "updated_at": "2023-09-11T21:03:41.000000Z", "deleted_at": null, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "", "is_actionable": true, "featured_image": null, "assets": [ { "id": 1, "type": "tincan", "url": "<url>", "rtmp_input_url": null, "rtmp_endpoint_url": null, "assetable_id": 1, "assetable_type": "App\\Models\\Course", "mentee_mentor_id": null, "date": null, "publicize_live_course": null, "rsvp_users_count": null, "created_at": "2020-02-19T17:11:12.000000Z", "updated_at": "2021-03-18T17:16:23.000000Z", "deleted_at": null, "meeting_calendar_link": null, "next_date_human_readable": null }, { "id": 3, "type": "image", "url": "images/image.jpg", "rtmp_input_url": null, "rtmp_endpoint_url": null, "assetable_id": 103, "assetable_type": "App\\Models\\Course", "mentee_mentor_id": null, "date": null, "publicize_live_course": null, "rsvp_users_count": null, "created_at": "2020-02-19T17:17:19.000000Z", "updated_at": "2020-04-01T15:23:40.000000Z", "deleted_at": null, "meeting_calendar_link": null, "next_date_human_readable": null } ] } }
POST api/courses
Creates a new Course.
Headers
Content-Type
:multipart/form-data
Parameters
name
:string
, required - The name of the Course.description
:string
, nullable - The description of the Course.type
:string
, nullable - The type of the Course. Must be eithernull
or'experience'
.length
:string
, nullable - The length of the Course.objectives
:array
, nullable - An array of objectives (strings) for the Course.featured_image_id
:int
, nullable - The ID of the Featured Image for the Course.instructor_id
:int
, nullable - The ID of the Instructor for the Course.hidden
:boolean
, nullable - Whether or not the Course is hidden.premium
:boolean
, nullable - Whether or not the Course is premium.registration_fee
:float
, nullable - The registration fee for the Course.user_limit
:int
, nullable - The user limit for the Course.published_at
:string
, nullable - The date and time the Course was or will be published. Must be in the formatYYYY-MM-DD HH:MM:SS
.opens_at
:string
, nullable - The date and time the Course enrollment opens. Must be in the formatYYYY-MM-DD HH:MM:SS
.closes_at
:string
, nullable - The date and time the Course enrollment closes. Must be in the formatYYYY-MM-DD HH:MM:SS
.due_date
:string
, nullable - The date and time the Course is due. Must be in the formatYYYY-MM-DD HH:MM:SS
.event_dates
:array
, nullable - An array of event dates for the Course. Each event date must be an object with the following properties:date
:string
, required - The date and time of the event. Must be in the formatYYYY-MM-DD HH:MM:SS
.capacity
:int
, nullable - The capacity of the event.location
:string
, nullable - The location of the event.
event_dates_requirement
:string
, nullable - The requirement for event dates. Must be eithernull
,'all'
, or'one'
.feedback_url
:string
, nullable - The URL for the feedback form for the Course.feedback_label
:string
, nullable - The label for the feedback form for the Course.feedback_description
:string
, nullable - The description for the feedback form for the Course.credit_value
:int
, nullable - The number of credits the Course is worth.custom_completion_message
:string
, nullable - A custom completion message to include in the email notification to the User upon completion of the Course.language
:string
, nullable - The language of the Course.allow_local_leader_read_only
:boolean
, nullable - Whether or not to give Local Leaders read-only access to an otherwise global In-Person course. Only applicable whentype
is'experience'
.should_invite_users
:boolean
, nullable - Whether or not to send an invitation email to the User upon creation of the Course.formstack_url
:string
, nullable - The URL for the Formstack form for the Course.oembed_url
:string
, nullable - The URL for the oEmbed media for the Course.storyline
:file
, nullable - The Storyline file for the Course. Must be a .zip file.tincan
:file
, nullable - The TinCan file for the Course. Must be a .zip file.zoom_urls
:array
, nullable - An array of Zoom URL data objects for the Course.url
:string
, required - The URL for the Zoom meeting.date
:string
, required - The date and time of the Zoom meeting. Must be in the formatYYYY-MM-DD HH:MM:SS
.
cohort_ids
:array
, nullable - An array of Cohort IDs to associate with the Course.credit_ids
:array
, nullable - An array of Credit IDs to associate with the Course.group_ids_and_includes
:array
, nullable - An array of Group IDs to associate with the Course. Each item in the array must be an object with the following properties:id
:int
, required - The ID of the Group.include_descendants
:boolean
, required - Whether or not to include the Group's descendants in the Course's user scoping.
stackable_place_ids
:array
, nullable - An array of Place IDs to associate with the Course.
Response
HTTP 200
{ "course": { "description": "Description for API Test Course", "name": "API Test Course", "updated_at": "2023-09-19T00:32:14.000000Z", "created_at": "2023-09-19T00:32:14.000000Z", "id": 105, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "Description for API Test Course", "is_actionable": false, "featured_image": null }, "success": "Course created successfully." }
Errors
HTTP 422
- E.g., no "name" parameter specified
{ "errors": { "name": ["The name field is required."] }, "message": "The name field is required." }
POST api/courses/{course}
Updates an existing Course.
Headers
Content-Type
:multipart/form-data
Parameters
course
:int
, required - The ID of the Course to update._method
:string
, required - Must be'PUT'
.Additional parameters are the same as for POST creation, above.
Response
HTTP 200
{ "course": { "description": "Description for API Test Course", "name": "API Test Course", "updated_at": "2023-09-19T00:32:14.000000Z", "created_at": "2023-09-19T00:32:14.000000Z", "id": 105, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "Description for API Test Course", "is_actionable": false, "featured_image": null }, "success": "Course updated successfully." }
Errors
HTTP 422
- E.g., no "name" parameter specified
{ "errors": { "name": ["The name field is required."] }, "message": "The name field is required." }
DELETE api/courses/{course}
Deletes a Course.
Parameters
course
:int
, required - The ID of the Course to delete.
Response
HTTP 200
{ "success": "Course deleted successfully." }
POST api/courses/{course}/users/{user}
Attaches a User to a Course.
Parameters
course
:int
, required - The ID of the Course to attach the User to.user
:int
, required - The ID of the User to attach to the Course.status_mask
:int
, required - The status mask to apply to the User's enrollment in the Course. Must be one of the following:null
: not started1
: started2
: completed
Response
HTTP 200
{ "success": "User attached to course successfully." }
PUT api/courses/{course}/users/{user}
Updates a User's attachment to a Course.
Parameters
course
:int
, required - The ID of the Course to update the User's attachment to.user
:int
, required - The ID of the User to update the attachment to the Course for.status_mask
:int
, required - The status mask to apply to the User's enrollment in the Course. Must be one of the following:null
: not started1
: started2
: completed
Response
HTTP 200
{ "success": "User attachment to Course updated successfully." }
DELETE api/courses/{course}/users/{user}
Detaches a User from a Course.
Parameters
course
:int
, required - The ID of the Course to detach the User from.user
:int
, required - The ID of the User to detach from the Course.
Response
HTTP 200
{ "success": "User detached from course successfully." }
GET api/courses/{course}/check-completion
Checks completion of a course for a particular User. Response includes
result
(bool, whether or not course is completed),courseUser
(theCourseUser
object),course
(theCourse
itself), andsuccess
(signifies a successful request response).Parameters
course
:int
, required - The ID of the Course to check for a Completion
Response
HTTP 200
{ "success": "success", "course": { "id": 1, "name": "The Extraordinary Minister of Holy Communion", "type": null, "description": "The Extraordinary Minister of Holy Communion (EMHC) is one of many roles in which the laity can serve their parish community. This course is required for all those who serve in this role in the Diocese of Bridgeport.", "status": "published", "featured_image_id": 131, "instructor_id": null, "objectives": null, "length": "00:45:00", "completion_url": null, "experience_completion_urls": null, ... "is_actionable": true, "featured_image": { "id": 1, "name": "", "url": "", "original_filename": "", "is_placeholder": 0, "created_at": "2022-11-18T02:56:18.000000Z", "updated_at": "2022-11-18T02:56:18.000000Z", "deleted_at": null, "actual_url": "https://bridgeport-lms-testing.s3.amazonaws.com/images/EMHC-2.jpg" } }, "courseUser": { "id": 4, "course_id": 1, "user_id": 1, "term_id": null, "credit_id": null, "status_mask": 2, "has_paid": 0, "rsvp_time": null, "rsvp_id": null, "viewing_duration": null, "registered_event_dates": null, "completed_event_dates": null, "completed_by": null, "completed_at": null, "invited_at": null, "session_survey_completed_at": null, "bookmarked_at": null, "created_at": "2020-03-06T03:53:39.000000Z", "updated_at": "2020-03-06T03:59:43.000000Z", "is_bookmarked": false }, "result": false }
Assignments
GET /api/assignments
Returns a list of Assignments.
Response
HTTP 200
{ "assignments": [ { "id": 1, "description": "<p>asdasdasdasdasdasa aaaaaaaaa</p>\n", "submission_option": "upload-wysiwyg", "featured_image_id": null, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2021-04-01T22:30:19.000000Z", "updated_at": "2023-02-09T00:58:33.000000Z", "deleted_at": null, "name": "Assignment 1 - OEmbed", "enable_grouping": 0, "due_date": null, "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "asdasdasdasdasdasa aaaaaaaaa ", "featured_image": null }, ... ] }
GET /api/assignments/{assignment}
Returns a single Assignment.
Parameters
assignment
:int
, required - The ID of the Assignment.
Response
HTTP 200
{ "assignment": { "id": 1, "description": "<p>asdasdasdasdasdasa aaaaaaaaa</p>\n", "submission_option": "upload-wysiwyg", "featured_image_id": null, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2021-04-01T22:30:19.000000Z", "updated_at": "2023-02-09T00:58:33.000000Z", "deleted_at": null, "name": "Assignment 1 - OEmbed", "enable_grouping": 0, "due_date": null, "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "asdasdasdasdasdasa aaaaaaaaa ", "featured_image": null } }
POST api/assignments
Creates a new Assignment.
Parameters
name
:string
, required - The name of the Assignment.description
:string
, nullable - The description of the Assignment.submission_option
:string
, required - The Submission Option(s) available for the Assignment. Must be one of the following:upload - File upload
wysiwyg - WYSIWYG editor
learning - Additional Learning selection
upload-wysiwyg - File upload and WYSIWYG editor
upload-wysiwyg-learning - File upload, WYSIWYG editor, and Additional Learning selection
featured_image_id
:int
, nullable - The ID of the Featured Image for the Assignment.language
:string
, nullable - The language of the Assignment.stackable_place_ids
:array
, nullable - An array of Place IDs to associate with the Assignment.is_lor
:boolean
, nullable - Whether or not the Assignment is a Letter of Recommendation.enable_grouping
:boolean
, nullable - Whether or not to enable grouping for the Assignment.due_date
:string
, nullable - The date and time the Assignment is due. Must be in the formatYYYY-MM-DD HH:MM:SS
.oembed_url
:string
, nullable - The URL for the oEmbed media for the Assignment.
Response
HTTP 200
{ "assignment": { "name": "API Test Assignment", "description": "Description for API Test Assignment", "submission_option": "upload-wysiwyg-learning", "updated_at": "2023-09-19T03:34:15.000000Z", "created_at": "2023-09-19T03:34:15.000000Z", "id": 10, "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "Description for API Test Assignment", "featured_image": null }, "success": "Assignment created successfully." }
PUT api/assignments/{assignment}
Updates an existing Assignment.
Parameters
assignment
:int
, required - The ID of the Assignment to update.Additional parameters are the same as for POST creation, above.
Response
HTTP 200
{
"assignment": {
"name": "API Test Assignment - updated",
"description": "Description for API Test Assignment",
"submission_option": "upload-wysiwyg-learning",
"updated_at": "2023-09-19T03:34:15.000000Z",
"created_at": "2023-09-19T03:34:15.000000Z",
"id": 10,
"class_name": "App\\Models\\Assignment",
"image_url": "<url>",
"excerpt": "Description for API Test Assignment",
"featured_image": null
},
"success": "Assignment updated successfully."
}
DELETE - api/assignments/{assignment}
Deletes an Assignment.
Parameters
assignment
:int
, required - The ID of the Assignment to delete.
Response
HTTP 200
{ "success": "Assignment deleted successfully." }
Submissions
GET api/submissions
Returns a list of Submissions.
Response
HTTP 200
{ "submissions": [ { "id": 85, "learnerable_id": 10, "learnerable_type": "App\\Models\\User", "assignment_id": 8, "learning_path_id": 43, "term_id": null, "credit_id": null, "status_mask": 1, "needs_review": 0, "content": "<p>Stuff</p>", "files": [ { "url": "<url>", "name": "85__query_result.csv", "type": "text/csv", "signed_url": "<url>" } ], "submitted_at": "2023-07-18 06:35:54", "created_at": "2023-07-14T22:49:27.000000Z", "updated_at": "2023-07-18T06:35:54.000000Z", "deleted_at": null, "learnerable_name": "Urban Test 1", "learnerable_place_names": null, "name": "Assignment 8 - Upload, WYSIWYG, Learning in LP 43 - W/ Learning Assignments Displayed as Requirements", "term_credit": null, "oembed_html": null, "oembed_url": null, "formatted_submittables": { "App\\Models\\AdditionalLearningItem": [], "App\\Models\\Course": [], }, "formatted_submitted_at": "Jul 18", "signed_files": [ { "url": "<url>", "name": "85__query_result.csv", "type": "text/csv", "signed_url": "<url>" } ], "submitted_at_string": "Jul 18, 2023", "assignment": {}, "assignment_feedback": [ { "id": 23, "submission_id": 85, "user_id": 8, "feedback": "<p>A comment</p>", "created_at": "2023-08-10T00:00:57.000000Z", "updated_at": "2023-08-10T00:00:57.000000Z", "deleted_at": null, "created_ago": "1 month ago", "user": {} } ], "learnerable": {}, "learning_path": {}, "term": {}, "submittable_additional_learning_items": [], "submittable_courses": [], "submittable_course_containers": [], "submittable_learning_paths": [] }, ... ] }
Errors
HTTP 400
{ "error": "Your user role/lack of mentees does not permit you to perform this action" }
POST api/submissions/{submission}/approve
Approves a Submission.
Parameters
submission
:int
, required - The ID of the Submission to approve.
Response
HTTP 200
{ "success": "Submission was successfully approved" }
POST api/submission/{submission}/reject
Rejects a Submission.
Parameters
submission
:int
, required - The ID of the Submission to reject.feedback
:string
, nullable - The feedback to provide to the User.
Response
HTTP 200
{ "comment": { "feedback": "This is why I've rejected your submission", "user_id": 8, "submission_id": 16, "updated_at": "2023-09-19T04:22:18.000000Z", "created_at": "2023-09-19T04:22:18.000000Z", "id": 24, "created_ago": "2 seconds ago", "submission": { "id": 16, "learnerable_id": 30, "learnerable_type": "App\\Models\\User", "assignment_id": 1, "learning_path_id": 7, "term_id": null, "credit_id": null, "status_mask": 1, "needs_review": 0, "content": "<a href='howdy'>howdy</a>", "files": null, "submitted_at": "2021-08-10 16:45:08", "created_at": "2021-08-10T16:43:42.000000Z", "updated_at": "2023-09-19T04:19:51.000000Z", "deleted_at": null, "learning_path": {} }, "user": {} }, "success": "Submission was successfully rejected" }
POST api/submission/{submission}/comment
Adds a comment to a Submission.
Parameters
submission
:int
, required - The ID of the Submission to comment on.feedback
:string
, required - The feedback to provide to the User.
Response
HTTP 200
{ "comment": {...}, "success": "Submission feedback created successfully" }
Resources
These endpoints are used to retrieve Resources, access metadata, and store download records for a User/Resource. Some endpoints additionally include data on related entities.
GET api/resources/metadata
Returns metadata for Resources/Resource Packs, including featured Resources/Packs. This is an exception to the usual separation of the two.
Response
HTTP 200
{ "featured_resources": [], "categories": [ { "id": 5, "name": { "en": "EMHC" }, "slug": { "en": "emhc" }, "type": "resourceCategory", "order_column": 5, "created_at": "2021-05-14T16:44:11.000000Z", "updated_at": "2021-11-10T16:27:04.000000Z", "deleted_at": null }, ... ], "tags": [ { "id": 8, "name": { "en": "EMHC" }, "slug": { "en": "emhc" }, "type": "resourceTag", "order_column": 8, "created_at": "2021-05-14T16:44:11.000000Z", "updated_at": "2021-05-14T16:44:11.000000Z", "deleted_at": null }, ... ], "mime_types": [ "application/pdf" ], "seasons": [ "ordinary_time_summer_fall", "advent", "christmas", "ordinary_time_winter", "lent", "paschal_triduum", "easter" ], "types": [ "doc", "editable_doc", "link" ], "custom_tags_filters": null, "banner_customization": { "id": 2, "name": "Resource Library Banner", "type": "wysiwyg", "value": null, "created_at": "2021-10-15T16:14:14.000000Z", "updated_at": "2021-10-15T16:14:14.000000Z" } }
GET api/resources
Returns an index of all Resources the authenticated User is able to view.
Response
HTTP 200
{ "resources": [ { "id": 1, "name": "Suggested Readings for EMHCs", "description": "<html>", "type": "doc", "url": "<url>", "editable_content": null, "mime_type": "application/pdf", "author_name": "The Leadership Institute", "season": "ordinary_time_summer_fall", "featured_image_url": "images/dome-3404586_1280.jpg", "featured_image_id": 10, "language": null, "include_user_roles": null, "include_stackable_place_type_masks": null, "stackable_place_ids": null, "is_featured": 0, "is_hidden": 0, "creator_id": 3, "published_at": null, "editable_content_last_updated_at": null, "created_at": "2021-05-14T16:44:11.000000Z", "updated_at": "2022-11-18T02:56:17.000000Z", "deleted_at": null, "class_name": "App\\Models\\Resource", "publish_date": "2021-05-14T16:44:11.000000Z", "author": "The Leadership Institute", "image_url": "<url>", "excerpt": "Your role as an Extraordinary Minister...", "featured_image": {} }, ... ] }
GET api/resources/{resource}
Returns the full data for a given Resource, including some related objects or fields.
URL Parameters
resource
:int
, required - The ID of the Resource to fetch*
Response
HTTP 200
{ "resource": { "id": 3, "name": "Chapter 2: Revelation and Faith", "description": null, "type": "doc", "url": "<url>", "editable_content": null, "mime_type": "application/pdf", "author_name": null, "season": null, "featured_image_url": "images/CREDO-book.jpg", "featured_image_id": 12, "language": null, "include_user_roles": null, "include_stackable_place_type_masks": null, "stackable_place_ids": null, "is_featured": 0, "is_hidden": 0, "creator_id": 3, "published_at": null, "editable_content_last_updated_at": null, "created_at": "2021-10-06T16:29:45.000000Z", "updated_at": "2022-11-18T02:56:17.000000Z", "deleted_at": null, "class_name": "App\\Models\\Resource", "publish_date": "2021-10-06T16:29:45.000000Z", "author": "John Doe", "image_url": "<url>", "excerpt": "", "current_user_pivot": null, "recommended_resources": [], "learning_paths": [], "courses": [], "categories": [], "actual_tags": [], "creator": {}, "featured_image": {}, "tags": [] }, "resource_feedback_url": "<url>", "user_can_edit_resources": true }
POST api/resources/{resource}/download
Creates a record in the database representing a download of a Resource (also associated with the ResourcePack when applicable). Purely for tracking purposes.
URL Parameters
resource
:int
, required - The ID of the Resource downloaded.
Query Parameters
resource_pack_id
:int
- The ID of a Resource Pack the downloaded Resource was accessed through, when applicable.Response
HTTP 200
{ "success": "Resource Download tracked successfully"
}
Resource Packs
These endpoints are used to retrieve Resources, access metadata, and store download records for a User/Resource. Some endpoints additionally include data on related entities.
GET api/resource-packs
Returns an index of all the Resource Packs a User is able to view.
Response
HTTP 200
{ "resource_packs": [ { "id": 2, "name": "Preparing for Success Resources", "description": "<html>", "type": "resource_pack", "author_name": null, "season": null, "featured_image_url": "images/aaron-burden-9zsHNt5OpqE-unsplash (1).jpeg", "featured_image_id": 6, "language": null, "include_user_roles": null, "include_stackable_place_type_masks": null, "stackable_place_ids": null, "is_featured": 0, "is_hidden": 0, "creator_id": 3, "published_at": null, "created_at": "2021-11-18T21:27:21.000000Z", "updated_at": "2022-11-18T02:56:17.000000Z", "deleted_at": null, "class_name": "App\\Models\\ResourcePack", "publish_date": "2021-11-18T21:27:21.000000Z", "author": "John Doe", "image_url": "<url>", "excerpt": "This pack includes a phone script...", "creator": {}, "featured_image": {} }, ... ] }
GET api/resource-packs/{resource_pack}
Returns the full data for a given Resource, including some related objects or fields, most importantly, the associated Resources.
URL Parameters
resource_pack
:int
, required - The ID of the Resource Pack to fetch*
Response
HTTP 200
{ "resource": { "id": 4, "name": "Measuring and Celebrating Successes Resources", "description": "<html>", "type": "resource_pack", "author_name": null, "season": null, "featured_image_url": "images/timothy-eberly-ydxJsi9ouOk-unsplash.jpeg", "featured_image_id": 8, "language": null, "include_user_roles": null, "include_stackable_place_type_masks": null, "stackable_place_ids": null, "is_featured": 0, "is_hidden": 0, "creator_id": 3, "published_at": null, "created_at": "2021-11-18T21:32:35.000000Z", "updated_at": "2022-11-18T02:56:17.000000Z", "deleted_at": null, "class_name": "App\\Models\\ResourcePack", "publish_date": "2021-11-18T21:32:35.000000Z", "author": "John Doe", "image_url": "<url>", "excerpt": "There must be a measurement...", "recommended_resource_packs": [], "resources": [ { "id": 52, "name": "Whiteboard Video Worksheet 3", "description": null, "type": "doc", "url": "<url>", "editable_content": null, "mime_type": "application/pdf", "author_name": null, "season": null, "featured_image_url": "images/clay-banks-mgLX9vQhxc8-unsplash.jpeg", "featured_image_id": 54, "language": null, "include_user_roles": null, "include_stackable_place_type_masks": null, "stackable_place_ids": null, "is_featured": 0, "is_hidden": 0, "creator_id": 3, "published_at": null, "editable_content_last_updated_at": null, "created_at": "2021-11-18T19:44:26.000000Z", "updated_at": "2022-11-18T02:56:18.000000Z", "deleted_at": null, "class_name": "App\\Models\\Resource", "current_user_pivot": null, "pivot": { "resource_pack_id": 4, "resource_id": 52, "order": "1", "created_at": "2021-11-18T21:33:13.000000Z", "updated_at": "2021-11-18T21:33:13.000000Z" } } ], "learning_paths": [], "courses": [], "categories": [], "actual_tags": [], "creator": {}, "featured_image": {}, "tags": [] }, "resource_feedback_url": "<url>", "user_can_edit_resources": true }
LRS Results
These are the endpoints for interacting with LEAD's LRS Result object.
GET api/users/{user}/courses/{course}/lrs-results
Returns a list of all LRS Results for a User's Course.
Parameters
user
:int
, required - The ID of the User.course
:int
, required - The ID of the Course.
Response
HTTP 200
{ "success": "LRS Results Retrieved", "results": [ { "id": 3, "course_id": 472, "user_id": 1, "result": "0.6", "completed": 0, "created_at": "2023-06-02T13:03:58.000000Z", "updated_at": "2023-06-02T13:03:58.000000Z", "deleted_at": null }, ... ] }
GET api/users/{user}/learning-paths/{learningPath}/lrs-results
Returns a list of all LRS Results for a User's Learning Path, grouped by Course ID.
Parameters
user
:int
, required - The ID of the User.course
:int
, required - The ID of the Course.
Response
HTTP 200
{ "success": "LRS Results Retrieved", "results": { "472": [ { "id": 3, "course_id": 472, "user_id": 1, "result": "0.6", "completed": 0, "created_at": "2023-06-02T13:03:58.000000Z", "updated_at": "2023-06-02T13:03:58.000000Z", "deleted_at": null } ], ... } }
Badges
These endpoints retrieve information about Badges, and the Badges awarded to specific Users.
GET api/badges
Returns all of the Badges that the authenticated User has been awarded. If the authenticated User is an admin, all Badges are returned.
Response
HTTP 200
{ "badges": [ { "id": 1, "name": "Test Badge", "description": "<p>You earned this.</p>", "url": "badges/Groups - Cheat Sheet.jpg", "behavior": null, "created_at": "2023-01-25T14:52:39.000000Z", "updated_at": "2023-01-25T14:52:39.000000Z", "deleted_at": null, "actual_url": "<url>" } ... ] }
Featured Images
These endpoints are used to upload and retrieve images for use in the application. The images are stored in an S3 bucket and are retrieved via a CDN. The endpoints are used to upload images for Courses, Learning Paths, and other features.
GET api/featured-images
Returns a list of all Featured Images.
Response
HTTP 200
{ "success": true, "message": "Featured images retrieved successfully.", "data": [ { "id": 1, "url": "images/example.jpeg", "is_placeholder": 0, "created_at": "2022-11-18T02:56:17.000000Z", "updated_at": "2022-11-18T02:56:17.000000Z", "deleted_at": null, "actual_url": "<url>" }, ... ] }
GET api/featured-images/{featured_image}
URL Parameters
feature_image
:int
, required - The ID of the Feature Image to retrieve.
Returns the specified Featured Image.
Response
HTTP 200
{ "success": true, "message": "Featured image retrieved successfully.", "data": { "id": 610, "url": "images/example.jpg", "is_placeholder": 0, "created_at": "2023-09-19T18:27:43.000000Z", "updated_at": "2023-09-19T18:27:43.000000Z", "deleted_at": null, "actual_url": "<url>" } }
POST api/featured-images
Stores a new Featured Image record.
Response
HTTP 200
{ "success": true, "message": "Featured image created successfully.", "data": { "url": "images/php44jK5h.jpeg", "updated_at": "2023-09-19T18:28:37.000000Z", "created_at": "2023-09-19T18:28:37.000000Z", "id": 612, "actual_url": "<url>" } }
POST api/featured-images/{featured_image}
URL Parameters
feature_image
:int
, required - The ID of the Feature Image to update.
Updates a specified Featured Image record.
Response
HTTP 200
{ "success": true, "message": "Featured image updated successfully.", "data": { "id": 612, "url": "images/phpNC0tSl.jpeg", "is_placeholder": 1, "created_at": "2023-09-19T18:28:37.000000Z", "updated_at": "2023-09-19T18:34:46.000000Z", "deleted_at": null, "actual_url": "<url>" } }
DELETE api/featured-images/{featured_image}
URL Parameters
feature_image
:int
, required - The ID of the Feature Image to delete.
Deletes the specified Featured Image
Response
HTTP 200
{ "success": true, "message": "Featured image deleted successfully.", "data": { "id": 612, "url": "images/phpNC0tSl.jpeg", "is_placeholder": 1, "created_at": "2023-09-19T18:28:37.000000Z", "updated_at": "2023-09-19T18:34:46.000000Z", "deleted_at": null, "actual_url": "<url>" } }
Groups and Group Types
GET api/groups
Index Groups
Response
HTTP 200
{ "groups": [ { "id": 57, "name": "Accounting/Finance", "featured_image_id": null, "parent_group_id": null, "inherit_parent_properties": 0, "group_type_id": null, "user_can_view": 0, "user_can_assign": 0, "has_authorization_status": 0, "authorization_interval": null, "authorization_renewal_notice_days": 0, "compliance_expiry_interval": null, "uses_virtus": 0, "created_at": "2023-07-12T21:27:24.000000Z", "updated_at": "2023-07-12T21:27:24.000000Z", "deleted_at": null, "class_name": "App\\Models\\Group", "image_url": "<url>", "group_type": null, "parent_group": null, "featured_image": null }, ... ] }
GET api/groups/{group}
Retrieves the specified Featured Image
URL Parameters
group
:int
, required - The ID of the Group to retrieve.
Response
HTTP 200
{ "group": { "id": 57, "name": "Accounting/Finance", "featured_image_id": null, "parent_group_id": null, "inherit_parent_properties": 0, "group_type_id": null, "user_can_view": 0, "user_can_assign": 0, "has_authorization_status": 0, "authorization_interval": null, "authorization_renewal_notice_days": 0, "compliance_expiry_interval": null, "uses_virtus": 0, "created_at": "2023-07-12T21:27:24.000000Z", "updated_at": "2023-07-12T21:27:24.000000Z", "deleted_at": null, "class_name": "App\\Models\\Group", "image_url": "<url>", "featured_image": {} } }
POST api/groups/{group}/join
Attach the currently authenticated User to the specified Group
URL Parameters
group
:int
, required - The ID of the Group to join.
Response
HTTP 200
{ "success": "Current user has successfully joined provided group" }
GET api/group-types
Index Group Types
Response
HTTP 200
{ "group_types": [ { "id": 2, "name": "General Learner", "display_on_profile": 0, "user_profile_label_singular": null, "user_profile_label_plural": null, "display_beside_name": 0, "display_on_registration": 0, "registration_label": null, "is_matching": 0, "uses_virtus": 0, "created_at": "2023-01-17T20:47:36.000000Z", "updated_at": "2023-02-02T23:22:10.000000Z", "deleted_at": null }, ... ] }
GET api/group-types/{group_type}
Get specified Group Type
URL Parameters
group_type
:int
, required - The ID of the Group Type to retrieve.
Response
HTTP 200
{ "group_type": { "id": 2, "name": "General Learner", "display_on_profile": 0, "user_profile_label_singular": null, "user_profile_label_plural": null, "display_beside_name": 0, "display_on_registration": 0, "registration_label": null, "is_matching": 0, "uses_virtus": 0, "created_at": "2023-01-17T20:47:36.000000Z", "updated_at": "2023-02-02T23:22:10.000000Z", "deleted_at": null } }
GET api/groups/{group}/users
Get all Users in the specified Group
URL Parameters
group
:int
, required - The ID of the Group to retrieve.
Response
HTTP 200
{ "users": [ { "id": 125, "email": "testinvite11@email.com", "role": "learner", "salutation": null, "first_name": "Test", "last_name": "Invite 11", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 884, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": "2023-03-27 00:21:09", "language": "en-US", "time_zone": "America/Denver", "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 0, "stripe_customer_id": "cus_NEjYSUvowUAsuX", "profile_picture": null, "email_verified_at": "2023-01-25T21:01:12.000000Z", "email_verification_redirect": null, "created_at": "2023-01-25T21:00:41.000000Z", "updated_at": "2023-03-27T00:21:09.000000Z", "deleted_at": null, "combined_progress_percentage": 0, "name": "Test Invite 11", "full_name": "Test Invite 11", "profile_picture_url": "<url>", "pivot": { "group_id": 2, "user_id": 125, "authorization_expires_at": null, "authorization_status": null, "authorization_status_override": null, "authorization_status_override_reason": null, "authorized_at": null, "id": 1, "initial_learning_path_id": null, "is_manager": 0, "is_member": 1, "created_at": "2023-01-25T21:00:42.000000Z", "updated_at": "2023-01-25T21:00:42.000000Z" }, "learning_paths": [], "mentees": [], "mentors": [] }, ... ] }
GET api/groups/{group}/users/{user}
Get specified User in the specified Group
URL Parameters
group
:int
, required - The ID of the Group to retrieve.user
:int
, required - The ID of the User to retrieve.
Response
HTTP 200
{ "user": { "id": 125, "email": "testinvite11@email.com", "role": "learner", "salutation": null, "first_name": "Test", "last_name": "Invite 11", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 884, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": "2023-03-27 00:21:09", "language": "en-US", "time_zone": "America/Denver", "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 0, "stripe_customer_id": "cus_NEjYSUvowUAsuX", "profile_picture": null, "email_verified_at": "2023-01-25T21:01:12.000000Z", "email_verification_redirect": null, "created_at": "2023-01-25T21:00:41.000000Z", "updated_at": "2023-03-27T00:21:09.000000Z", "deleted_at": null, "combined_progress_percentage": 0, "name": "Test Invite 11", "full_name": "Test Invite 11", "profile_picture_url": "<url>", "pivot": { "group_id": 2, "user_id": 125, "authorization_expires_at": null, "authorization_status": null, "authorization_status_override": null, "authorization_status_override_reason": null, "authorized_at": null, "id": 1, "initial_learning_path_id": null, "is_manager": 0, "is_member": 1, "created_at": "2023-01-25T21:00:42.000000Z", "updated_at": "2023-01-25T21:00:42.000000Z" }, "learning_paths": [], "mentees": [], "mentors": [] } }
GET api/groups/{group}/users-progress
Get all Users belonging to the Group, sorted by progress. Optionally specify Learning Paths from the Group (default: all).
URL Parameters
group
:int
, required - The ID of the Group to retrieve.
Query Parameters
learning_paths
:array
- An array of Learning Path IDs to filter by.
Response
HTTP 200
{ "users": [ { "combined_progress_percentage": 100, "name": "Mentorrrr 1", "profile_picture_url": "<url>" }, { "combined_progress_percentage": 83, "name": "New User 1", "profile_picture_url": "<url>" }, ... ] }
DELETE api/groups/{group}/users/{user}
Remove specified User from the specified Group
URL Parameters
group
:int
, required - The ID of the Group.user
:int
, required - The ID of the User to remove.
Response
HTTP 200
{ "success": "User detached from group." }
GET api/groups/{group}/learning-paths
Get all Learning Paths in the specified Group
URL Parameters
group
:int
, required - The ID of the Group to retrieve.
Response
HTTP 200
{ "learning_paths": [ { "id": 33, "name": "LP 33 - With Mentor Meeting Course, Initializes Group 4 (w/ matching)", "description": null, "featured_image_id": null, "instructor_id": null, "objectives": [], "type": null, "recognition_type": null, "recognition_template_id": null, "visibility": "index", "language": null, "credit_value": null, "required_electives": 0, "restrict_assignments": 1, "require_virtus": 0, "require_lor": 0, "is_featured": 0, "prereq_lp_id": null, "next_lp_id": null, "auto_enroll_in_academy": 0, "assigned_visibility": 0, "stackable_place_ids": null, "place_type": null, "mandate_team_role_id": null, "published_at": null, "created_at": "2023-02-06T17:53:27.000000Z", "updated_at": "2023-02-09T00:58:05.000000Z", "deleted_at": null, "certificate_content": null, "custom_completion_message": null, "group_size": 1, "premium": 0, "learners_receive_new_content": 1, "new_content_invalidates_completions": 0, "registration_fee": 0, "cpm_list_id": null, "hide_registration_ministries": 0, "class_name": "App\\Models\\LearningPath", "image_url": "<url>", "excerpt": "", "is_locked": false, "first_prereq": null, "pivot": { "group_id": 4, "learning_path_id": 33, "type": "initial", "trigger_learning_path_id": null, "created_at": "2023-02-06T20:37:52.000000Z", "updated_at": "2023-02-06T20:37:52.000000Z" }, "featured_image": null, "prereq_learning_path": null } ] }
GET api/groups/{group}/learning-paths/{learningPath}/lrs-data
Get LRS Data for the specified Learning Path in the specified Group
URL Parameters
group
:int
, required - The ID of the Group to retrieve.learningPath
:int
, required - The ID of the Learning Path to retrieve.
Response
HTTP 200
{ "results": [] }
LRS
These are the endpoints exposed for xAPI statements. A properly formatted xAPI/TinCan URL from a Course Asset will already be structured to hit/authenticate to these endpoints. There are documented briefly here for reference. All endpoints record logs of the events, and PUT endpoints check for completion and trigger back-end updates.
GET api/lrs/activities/state
PUT api/lrs/activities/state
GET api/lrs/statements
PUT api/lrs/statements
Misc
Miscellaneous API endpoints.
GET api/whoami
Returns the currently authenticated user's information.
Response
HTTP 200
{ "actual_user": null, "user": { "id": 1704, "profile_picture_url": "<url>", "first_name": "David", "last_name": "Cooley", "full_name": "Mr. David Cooley", "email": "david@fivable.com", "role": "admin", "virtus_status": 0, "language": "en-US", "stackable_local_group_leader_place_ids": [], "stackable_local_leader_place_ids": [], "stackable_place_ids": [3], "stackable_parish_names": "Saint Margaret Mary Alacoque Parish (Shelton)", "subscriptions": [], "subscription_privileges": { "product_ids": [1, 2], "product_ids_expired": [], "product_ids_deleted": [], "resource_access": true, "resource_access_expired": false, "resource_access_deleted": false, "resource_can_edit": true, "course_ids": [], "course_container_ids": [], "learning_path_ids": [20] }, "has_all_product_access": true, "enrolled_in_academy": 1, "groups_with_statuses": [], "terms_with_stats": [ { "id": 7, "name": "test", "has_ended": false, "is_upcoming": true, "can_have_termables_added": false, "credits_added_completed": { "required_credits_added": 1, "required_credits_completed": 0, "credits_added_percentage": 100, "credits_completed_percentage": 0 }, "course_ids": [757] } ], "achievements": { "certificates": [], "mandates": [], "badges": [] }, "tsys_initiated_payments": [], "has_communities": true, "has_tasks": true, "groups_to_manage": [ { "id": 62, "name": "Adult Confirmation Candidate", "image_url": "<url>" } ] } }
Common Errors
These error responses may be returned from many different endpoints. Some endpoints may have differently phrased messages, but these status codes are common and can usually be handled in a generalized way.
HTTP 401
{
"message": "Unauthenticated"
}
HTTP 403
{
"message": "Unauthorized"
}
HTTP 404
{
"message": "Not found"
}