Getting a List of Course Materials and Trainings
AVAILABLE WITH BUSINESS SUBSCRIPTION
Method: listCourseModules
Note:
- With this method, you can retrieve a list of modules (both materials and trainings) belonging to a single course.
Permissions to Run Request
The Account Owner, Account Administrators, Department Administrators, Course Authors, or custom roles.
Department Administrators, Course Authors, and users with a custom role can only retrieve info regarding users belonging to the departments they manage and their sub-departments.
Request Parameters
Parameter | Type | Description |
---|---|---|
token (required) | string | Access token. You can obtain a token by making a request. |
courseId (required) | string | The course ID. |
pageSize (optional) | string | The number of entries per page. If not indicated, equal to 1000. |
pageToken (optional) | string | The token needed to continue to the next page. |
Return Values
After the request is successfully processed, the system returns an object with the following properties:
Header | Type | Description |
---|---|---|
modules | array | An array containing a list of course modules. |
module | array | An array containing information about a course module. |
moduleId | string | The course module ID. |
itemId | string | The ID of the material or a training belonging to the course. This parameter indicates the ID of a material or a training assigned to it in the account, outside the course, and doesn't coincide with the moduleId parameter. |
courseId | string | The ID of the course to which the module belongs. |
title | string | The name of the course module. |
description | string | The description of the course module. |
authorId | string | The ID of the material’s author (appears in the response only if the type parameter = material). |
addedDate | dateTime | The creation date of a material or a training included in a course. |
viewUrl | string | The link to view a course material (appears in the response only if the type parameter = material). |
type | string | The course module type. The possible values are:
|
trainingType[trainingTypeId], trainingType[trainingTypeTitle] | string | The type of training that includes ID and title. |
nextPageToken | string | The key needed to continue to the next page. |
Possible Errors
Error | Description |
---|---|
Unknown content item | The course with the indicated ID was not found. |
Permission denied | The user doesn't have permission to complete the request. |
Sample Request
</SOAP-ENV:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
xmlns="https://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<Header/>
<Body>
<ListCourseModulesRequest>
<credentials>
<token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token>
</credentials>
<courseId>
<id>296773a6-4196-11ea-bc3a-0a580af40727</id>
</courseId>
<pageToken>YTQ3NmQ4ZTQtNDE5YS0xMWVhLTkwYmMtMGE1ODBhZjQwNzI3</pageToken>
<pageSize>5</pageSize>
</ListCourseModulesRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<ListCourseModulesResult>
<modules>
<module>
<moduleId>627313fa-4199-11ea-9802-0a580af40727</moduleId>
<itemId>c74a3bc3-f593-11e9-a66a-0a580af40186</itemId>
<courseId>296773a6-4196-11ea-bc3a-0a580af40727</courseId>
<title>The 15 Best Sales Books That All Salespeople Should Own</title>
<description/>
<authorId>79e44d4a-0799-11ea-bb8f-0a580af405bb</authorId>
<addedDate>2020-01-28T06:18:56+00:00</addedDate>
<viewUrl>https://myaccount.ispringlearn.com/view/12-LBnDw-JYb9W-7RZCU</viewUrl>
<type>material</type>
</module>
<module>
<moduleId>8d4a3c60-419a-11ea-8b48-0a580af40727</moduleId>
<itemId>f75a3bc3-f593-11e9-a66a-0a580af40197</itemId>
<courseId>296773a6-4196-11ea-bc3a-0a580af40727</courseId>
<title>The 4 Steps to SPIN Selling</title>
<description/>
<authorId>79e44d4a-0799-11ea-bb8f-0a580af405bb</authorId>
<addedDate>2020-01-28T06:51:05+00:00</addedDate>
<viewUrl>https://myaccount.ispringlearn.com/view/12-FHLn3-9VcLv-ML2gM</viewUrl>
<type>material</type>
</module>
<module>
<moduleId>9737a690-419a-11ea-89bd-0a580af40727</moduleId>
<itemId>f75a3bc3-f584-11e9-a66a-0a580a1bf40197</itemId>
<courseId>296773a6-4196-11ea-bc3a-0a580af40727</courseId>
<title>Selling a Car</title>
<description/>
<addedDate>2020-01-28T06:51:23+00:00</addedDate>
<type>training</type>
<trainingType>
<trainingTypeId>31ab90b9-1098-11ec-9c51-0242ac1d0008</trainingTypeId>
<trainingTypeTitle>meeting</trainingTypeTitle>
</trainingType>
</module>
....
</modules>
<nextPageToken>YTQ3NmQ4ZTQtNDE5YS0xMWVhLTkwYmMtMGE1ODBhZjQwNzI3</nextPageToken>
</ListCourseModulesResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>