Content - Web Service Data Structures

Most course content in EthosCE is a node. Any calls to create or update content, such as a page, course, session, or even series goes through the node endpoint.

The type field indicates which content type you're creating.  Additionally, all fields, including core and custom, may be included in creation and update calls, or referenced via filters when querying. See the examples found under Web Services, for more detailed instructions on common calls.

Supported content type keys:

book

external_credit

page

course

group_event_series (Series)

product

course_imported

group_event_series_event (Sessions)

quiz

course_page

learning_group

slide

discussion

link_to_file

webform

enrollment_group

news

webform_template

The example structures below detail creating a page and a course. See  Creating and updating a course via web service, for more information.

Page node

Node (node)
// Page var page = { "title" : "My Page", "type" : "page", "body" : { "value" : "This is the <b>body field</b>.", // Basic HTML structure is supported "format" : "filtered_html" // Text format is required }, "author" : 1, // Author's UID "status" : 1, // Published };

Course node

Node (node)
var course = { "title" : "My New Course", "type" : "course", // Note the usage of the course specific body field, field_course_summary "field_course_summary" : { "value" : "This is the summary. <b>This is bold</b>.", // Basic HTML structure is supported "format" : "filtered_html" // Text format is required }, "field_course_date" : { "value" : "1462352400", // The course opening date. In Epoch format "value2" : "1462352400", // The course expiration date In Epoch format }, "model" : "SKU_1234", "author" : 1, // Author's UID "status" : 1, // Published };

Course endpoint

The course endpoint references the internal course object, associated to the course node. These are two separate data sets. Upon creation of a course node, the system automatically creates the course object, which stores course specific information pulled from the node, including outline type, external ID, and enrollment type. Creating or updating course object information via web service is not supported, however, this information is accessible via GET calls.

See Finding a course by external ID via web service, for more information on GET calls to the course endpoint.

Additional Data Structures