Getting a List of All Courses and Folders in the Account
You can get a complete list of folders and courses available in your account with the getCoursesTree 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. |
Return Value
Returns an array of objects with the following properties:
Parameter | Type | Description |
---|---|---|
contentItemId | string | ID of the content item. |
title | string | Title of the content item. |
type | string | Type of the content item. |
description | string | Description of the content item. |
addedDate | dateTime | Date when the content item was added. |
viewUrl | string | Absolute URL of the content item. |
parentId | string | Parent folder id for the content item. |
Possible Errors
Error | Description |
---|---|
Permission denied | User is not allowed to handle the requested action (does not have enough permissions). |
Authorization failed | Authorization failed. |
Sample Call
<?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:GetCoursesTreeRequest>
<ns1:credentials>
<ns1:accountUrl>http://myaccount.ispringlearn.com</ns1:accountUrl>
<ns1:email>email@email.com</ns1:email>
<ns1:password>password</ns1:password>
</ns1:credentials>
</ns1:GetCoursesTreeRequest>
</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:GetCoursesTreeResult>
<ns1:coursesTreeItem>
<ns1:contentItemId>1</ns1:contentItemId>
<ns1:title>Content List</ns1:title>
<ns1:type>Folder</ns1:type>
<ns1:addedDate>2017-02-22T19:52:31+03:00</ns1:addedDate>
<ns1:parentId/>
</ns1:coursesTreeItem>
<ns1:coursesTreeItem>
<ns1:contentItemId>5</ns1:contentItemId>
<ns1:title>My Documents</ns1:title>
<ns1:type>Folder</ns1:type>
<ns1:addedDate>2017-02-22T19:54:50+03:00</ns1:addedDate>
<ns1:viewUrl>http://myaccount.ispringlearn.com/view/4-p4MHJ-H7YQK-AUGBz</ns1:viewUrl>
<ns1:parentId>1</ns1:parentId>
</ns1:coursesTreeItem>
<ns1:coursesTreeItem>
<ns1:contentItemId>6</ns1:contentItemId>
<ns1:title>One Slide</ns1:title>
<ns1:type>Presentation</ns1:type>
<ns1:addedDate>2017-02-22T20:05:33+03:00</ns1:addedDate>
<ns1:viewUrl>http://myaccount.ispringlearn.com/view/4-9DQZp-vYojm-izSdp</ns1:viewUrl>
<ns1:parentId>5</ns1:parentId>
</ns1:coursesTreeItem>
</ns1:GetCoursesTreeResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML