Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

...

...

width25%

book

...

external_

...

credit

...

page

...

course

...

group

...

width25%

...

_event_series (Series)

product

course_imported

group_event_series_event (Sessions)

quiz

course_page

learning_group

slide

discussion

link_to_file

...

webform

...

enrollment_group

...

width25%

...

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)
Code Block
languagejstitleNode (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)
Code Block
languagejstitleNode (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
};

...