Description: To embed a link (a link to any content material) to any lesson hosted under a course
Request URL: /api/v4/<orgId>/sessionMaterials.json (How to get my OrgId?)
Method: POST
OAuth scope: TrainerCentral.sessionapi.CREATE
Params
- {
- "sessionMaterial":{
- "resourceType":7,
- "sessionId":"<sessionId>",
- "viewType":0,
- "linkTitle":"<title link>",
- "linkAddress":"<link>"
- }
- }
Parameterss - description:
1. sessionId - The Id of the lesson (hosted under a course) to which the link is to be embedded.
2. linkTitle - A title for the embedded link.
3. linkAddress - The link to be embedded.
4. resourceType - 7 for embed link.
Sample response for embed link
- {
- "sessionMaterialSettings":
- [
- {
- "sessionMaterialSettingsId”:<sessionMaterialSettingId>,
- "sessionMaterial”:<sessionMaterialId>,
- "createdTime":"1646217085987",
- "id”:<emberdLinkId>,
- "sessionId”:<sessionId>,
- "value":"https://trainercentral.com",
- "key":"LINK_ADDRESS",
- "sessionMaterialId”:<sessionMaterialId>
- },
- {
- "sessionMaterialSettingsId”:<sessionMaterialSettingId>,
- "sessionMaterial”:<sessionMaterialId>,
- "createdTime":"1646217085987",
- "id”:<emberdLinkId>,
- "sessionId”:<sessionId>,
- "value”:”Title”,
- "key":"LINK_TITLE",
- "sessionMaterialId”:<sessionMaterialId>
- }
- ],
- "sessionMaterials":
- [
- {
- "session”:<sessionId>,
- "viewType":"0",
- "topic":"title",
- "sessionMaterialIndex":"0",
- "time":"1646217085987",
- "id”:<sessionId>,
- "sessionMaterialId”:<sessionMaterialId>,
- "resourceType":"7"
- }
- ]
- }