这是您应该发送的 JSON 结构示例(请注意,CourseTemplateId 和 SemesterId 属性指的是课程模板和新课程所派生的学期的 D2LID 值):
{"LocaleId": null,
"CourseTemplateId": 1234,
"Name": "Extensibility 105",
"ShowAddressBook": false,
"ForceLocale": false,
"StartDate": null,
"EndDate": null,
"Path": "",
"SemesterId": 5678,
"Code": "EXT-105"}
create 调用在成功创建后返回 JSON,如下所示:
{"Name": "Extensibility 105",
"StartDate": null,
"CourseTemplate": {"Name": "ExtensibilityTemplate",
"Code": "EXT-TMPL",
"Identifier": "1234"},
"EndDate": null,
"Path": "/content/enforced/7531-EXT-105/",
"IsActive": true,
"Semester": {"Name": "Spring 2013",
"Code": "S2013",
"Identifier": "5678"},
"Code": "EXT-105",
"Department": {"Name": "ExtensibilityDepartment",
"Code": "1",
"Identifier": "2468"},
"Identifier": "7531"}
请注意,该调用Identifier
为新课程分配了一个属性,然后将该身份合并到强制内容Path
中,正如人们所期望的那样。