Activities API

The ExceedLMS UI term is “Activity”, but for historical reason it is “Course” in our data and API.

 

All Course records are stored in the courses table, the type column stores the type of the activity:

 

Activity type name in the UI

type attribute value

Path

CourseCurriculum

Link

CourseUrl

File

CourseFile

SCORM

CourseScorm

AICC

CourseAicc

Assessment

CourseAssessment

Post

CourseSelfPost

Collection

CourseCollection

 

List

Resource: /api/v2/courses

HTTPS Request Method: GET

Description: The full list of activities associated with the account.

Activity list results are limited to 50 records and can be paginated.

Required Parameters:

  • api_key

Optional Parameters:

  • * page - (integer). The page you want to request. Every page is 50 records long at most. If not present, page 1 is assumed.
  • course[id] - (integer)
  • course[code] - (string)
  • course[is_active] - (boolean)
  • course[type] - (string)
  • course[name] - (string)
  • * course[author] - (string)
  • course[custom_a] - (string)
  • ...
  • course[custom_j] - (string)
  • course[in_catalog] - (boolean)
  • course[is_public] - (boolean)
  • course[is_featured] - (Boolean)
  • course[requires_authorization] - (boolean)
  • course[has_waitlist] - (boolean)
  • course[is_restricted] - (boolean)
  • course[completion_type] - (string)
  • course[invitation_email] - (Boolean)
  • course[interactions_is_active] - (boolean)
  • course[created_on] - (datetime)
  • course[updated_on] - (datetime)
  • * course[tribe_id] - (integer)
  • picture - (boolean) ; include course picture URL if true


Example Request:

curl -X GET -d '{"api_key": "123456", "course": {"created_on": "2010-04-19 00:00:00,2015-04-19 23:59:59", "code": "abc123"}}' -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/courses

 

Example Response:

[
{
"access_until_due_date": false,
"account_id": 2,
"active_enrollment_count": 0,
"aicc_course_id": null,
"aicc_course_system": null,
"aliased_id": null,
"attendance_max": null,
"attendance_min": null,
"author": "foo",
"blog_id": null,
"catalog_weight": null,
"certificate_id": null,
"charge_student": false,
"code": "qwe",
"completion_type": null,
"course_package_id": null,
"course_root": null,
"created_on": "2015-03-12T14:50:31-05:00",
"credit_units": "2.0",
"custom_a": null,
"custom_b": null,
"custom_c": null,
"custom_d": null,
"custom_e": null,
"custom_f": null,
"custom_g": null,
"custom_h": null,
"custom_i": null,
"custom_j": null,
"due_within": null,
"duration": null,
"forum_id": null,
"has_waitlist": false,
"hero_picture_id": null,
"hide_until": null,
"id": 134,
"in_catalog": false,
"interactions_is_active": null,
"invitation_email": null,
"is_active": true,
"is_featured": false,
"is_public": false,
"is_restricted": false,
"keywords": null,
"last_error": null,
"launch_courseware_or_assessment_directly_from_lp": null,
"launch_window_height": 600,
"launch_window_width": 800,
"mastery_score": null,
"mobile_content_supported": null,
"name": "testie LP",
"picture_id": null,
"prevent_history_launch": false,
"price": null,
"recommended_picture_id": null,
"reply_to_address": null,
"requires_authorization": false,
"resource_id": null,
"retrospect_range": null,
"review_average": 0.0,
"show_disclaimer": false,
"summary": null,
"token": null,
"tribe_social_stream_id": null,
"tribe_social_stream_name": null,
"tribe_social_stream_share_link": null,
"updated_by": "demo Demo",
"updated_on": "2015-03-18T02:04:08-05:00",
"vectors": null,
"vendor_id": null,
"waitlist_items_count": 0,
"waitlist_max": null
}
]

 

Read

Resource: /api/v2/courses/{id}

HTTPS Request Method: GET

Description: Lookup an activity based on the activity id.

Example Request:

curl -i -X GET -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/courses/1?api_key=123456


Optional Parameters:

  • course[code] - lookup the activity using the code. When this param is used the id parameter is ignored.


Example Response:

<?xml version="1.0" encoding="UTF-8"?>
<object>
<access-until-due-date type="boolean">false</access-until-due-date>
<account-id type="integer">1234</account-id>
<active-enrollment-count type="integer">0</active-enrollment-count>
<aicc-course-id nil="true"/>
<aicc-course-system nil="true"/>
<aliased-id type="integer" nil="true"/>
<attendance-max type="integer" nil="true"/>
<attendance-min type="integer" nil="true"/>
<author>Jane Doe</author>
<blog-id type="integer" nil="true"/>
<catalog_weight type="integer" nil="true"/>
<certificate-id type="integer" nil="true"/>
<charge-student type="boolean">false</charge-student>
<code>12345A</code>
<completion-type nil="true"/>
<course-package-id type="integer" nil="true"/>
<course-root nil="true"/>
<created-on type="datetime">2014-05-21T16:20:51-04:00</created-on>
<credit-units type="decimal" nil="true"/>
<custom-a>0</custom-a>
<custom-b></custom-b>
<custom-c>Jane Doe</custom-c>
<custom-d nil="true"/>
<custom-e nil="true"/>
<custom-f nil="true"/>
<custom-g nil="true"/>
<custom-h nil="true"/>
<custom-i nil="true"/>
<custom-j nil="true"/>
<due-within type="integer" nil="true"/>
<duration type="integer">0</duration>
<forum-id type="integer" nil="true"/>
<has-waitlist type="boolean">false</has-waitlist>
<hide-until type="integer" nil="true"/>
<id type="integer">1234</id>
<in-catalog type="boolean">false</in-catalog>
<interactions-is-active type="boolean" nil="true"/>
<invitation-email type="boolean" nil="true"/>
<is-active type="boolean">true</is-active>
<is-featured type="boolean">false</is-featured>
<is-public type="boolean">false</is-public>
<is-restricted type="boolean">false</is-restricted>
<last-error nil="true"/>
<launch-window-height type="integer">600</launch-window-height>
<launch-window-width type="integer">800</launch-window-width>
<mastery-score type="integer" nil="true"/>
<mobile-content-supported type="boolean" nil="true"/>
<name>Hello World</name>
<picture-id type="integer" nil="true"/>
<prevent-history-launch type="boolean">false</prevent-history-launch>
<price type="decimal" nil="true"/>
<reply-to-address nil="true"/>
<requires-authorization type="boolean">false</requires-authorization>
<resource-id type="integer" nil="true"/>
<retrospect-range type="integer" nil="true"/>
<review-average type="float">0.0</review-average>
<show-disclaimer type="boolean">false</show-disclaimer>
<summary></summary>
<token nil="true"/>
<tribe-social-stream-id nil="true"/>
<tribe-social-stream-name nil="true"/>
<tribe-social-stream-share-link nil="true"/>
<updated-by>Jane Doe</updated-by>
<updated-on type="datetime">2014-07-22T18:55:07-04:00</updated-on>
<vectors type="tsvector" nil="true"/>
<vendor-id type="integer" nil="true"/>
<waitlist-items-count type="integer">0</waitlist-items-count>
<waitlist-max type="integer" nil="true"/>
</object>

 

Delete

Resource: /api/v2/courses/{id}

HTTP Request Method: DELETE

Description: Delete an activity based on the activity id.

Example Request:

curl -i -X DELETE -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/courses/5?api_key=12345


Optional Parameters:

  • course[code] - lookup the activity using the code. When this param is used the id parameter is ignored

Response:

  • On successful deletion returns a 200 HTTP response code with an empty body

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.