Getting a List of Assigned Courses
You can get a list of all courses and quizzes assigned to a user with the getUserAssignedContent method.
Permission to run the request: Account Owner, Administrator, Organization Administrator, Publisher.
Parameters
Parameter | Type | Description |
---|---|---|
credentials (required) | credentials | Read the description of the Credentials object. |
userId (required) | string | ID of the user you want to get a list of assigned courses of. |
Return Value
After the request has been completed, the system returns an array with the following properties:
Parameter | Type | Description |
---|---|---|
contentItemId | string | ID of the content item. |
title | string | Title of the content item. |
description | string | Description of the content item. |
addedDate | dateTime | Date when the content item was added. |
dueDate | date | Date by which users need to get the content item completed. |
completionDate | date | Date when a user got the content item completed. |
viewUrl | string | Absolute URL of the content item. |
parentId | string | ID of the parent folder of the content item. |
viewStatus | string | Completion status in text format |
viewProgress | float | Progress of course completion |
type | string | Content type |
Possible Errors
Error | Description |
---|---|
Unknown user | User with the given ID hasn't been found. |
Permission denied | User can't perform the requested action (doesn't have enough permissions). |
Sample Call
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<GetUserAssignedContentRequest>
<credentials>
<accountUrl>http://myaccount.ispringlearn.com</accountUrl>
<email>email@email.com</email>
<password>password</password>
</credentials>
<userId>1234</userId>
</GetUserAssignedContentRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<ns1:GetUserAssignedContentResult>
<ns1:assignedContentInfo>
<ns1:contentItemId>11</ns1:contentItemId>
<ns1:title>Sample Course</ns1:title>
<ns1:addedDate>2017-07-21T06:28:55+00:00</ns1:addedDate>
<ns1:dueDate>2017-08-21</ns1:dueDate>
<ns1:viewUrl>http://myaccount.ispringlearn.com/view/11</ns1:viewUrl>
<ns1:parentId>1</ns1:parentId>
<ns1:viewStatus>Not Started</ns1:viewStatus>
<ns1:viewProgress>0</ns1:viewProgress>
<ns1:completionDate>2017-08-21</ns1:completionDate>
<ns1:type>Course</ns1:type>
</ns1:assignedContentInfo>
<ns1:assignedContentInfo>
<ns1:contentItemId>416</ns1:contentItemId>
<ns1:title>Sample Video</ns1:title>
<ns1:addedDate>2017-08-22T11:06:31+00:00</ns1:addedDate>
<ns1:dueDate>2017-08-22</ns1:dueDate>
<ns1:viewUrl>http://myaccount.ispringlearn.com/view/11</ns1:viewUrl>
<ns1:parentId>1</ns1:parentId>
<ns1:viewStatus>Complete</ns1:viewStatus>
<ns1:viewProgress>100</ns1:viewProgress>
<ns1:completionDate>2017-08-22</ns1:completionDate>
<ns1:type>Video</ns1:type>
</ns1:assignedContentInfo>
</ns1:GetUserAssignedContentResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML