Embed a link to a lesson API
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"
- }
- ]
- }
Related Articles
List of all TrainerCentral APIs
Getting Started Get Oauth token API Course APIs Create chapter API Edit chapter API Create course API Edit course API Create lesson API Edit lesson API Create assignment API Delete lesson/live workshop/assignment API Delete chapter API Delete course ...
Edit lesson API
Description: To edit a lesson inside a course. Request URL: <domain>/api/v4/<orgId>/sessions/<sessionId>.json Method: PUT OAuth Scope: TrainerCentral.sessionapi.UPDATE Parameters: NA Request Body: { "session": { "name":"<lesson name>", ...
Create lesson API
Description: To create a lesson under a course in an academy. Request URL: /api/v4/<orgId>/sessions.json (How do I get my orgId?) Method: POST OAuth scope: TrainerCentral.sessionapi.CREATE Parameters for creating an on-demand lesson { "session":{ ...
Delete lesson/live workshop/assignment API
Description: To delete a lesson or live workshop or assignment in a course. Request URL: <domain>/api/v4/<orgId>/sessions/<sessionId>.json [where <sessionId> refers to lesson ID or live workshop ID or assignment ID] Method: DELETE OAuth Scope: ...
Upload lesson content in a course
In TrainerCentral, you can provide materials like texts, documents, audio, videos, PDFs, spreadsheets, images, and external links to learners. You can also offer downloadable handouts to enhance learners understanding. Configuring tests enable you to ...