API: listLearningModules
  • 4 Minutes to read
  • Dark
    Light

API: listLearningModules

  • Dark
    Light

Article summary

  • Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.).
  • If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English.
  • Tags are required unless specified.

Description

The listLearningModules method retrieves courses that meet the specified filters. 

Who Has Access

Administrators and owners have access to the listLearningModules method.

API Call XML Package

<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>listLearningModules</Method>
   <Parameters>
      <LearningModule>
         <Filters>
            <Status><![CDATA[]]></Status>

            <Tags2>
               <Tag2>
                  <TagID></TagID>
                     - OR -
                  <TagName><![CDATA[]]></TagName>
                  <TagValues><![CDATA[]]></TagValues>
               </Tag2>
            </Tags2>

         </Filters>
      </LearningModule>
   </Parameters>
</SmarterU>

LearningModule Tag Group

The LearningModule tag group is a container for course filters.

<LearningModule>
   <Filters>
      <Status><![CDATA[]]></Status>

      <Tags2>
         <Tag2>
            <TagID></TagID>
               - OR -
            <TagName><![CDATA[]]></TagName>
            <TagValues><![CDATA[]]></TagValues>
         </Tag2>
      </Tags2>

   </Filters>
</LearningModule>

The LearningModule tag may contain the following.

Filters

The Filters tag is a container for course filters. Refer to Filters Tag Group.

Filters Tag Group

The Filters tag group is a container for course filters.

<Filters>
   <Status><![CDATA[]]></Status>

   <Tags2>
      <Tag2>
         <TagID></TagID>
            - OR -
         <TagName><![CDATA[]]></TagName>
         <TagValues><![CDATA[]]></TagValues>
      </Tag2>
   </Tags2>

</Filters>

The Filters tag may contain the following.

Status (optional)

The course's status. Acceptable values are Active, Inactive, or Archived

Tags2 (optional)

A container for filtering courses by their tags. Each tag is contained in a Tag2 tag and may contain the following.

TagDescription
TagIDThe system-generated identifier for the tag. This tag is mutually exclusive with the TagName tag.

To obtain a tag's ID:

  1. Navigate to the Tag Management Dashboard.
  2. Right click on a tag.
  3. Click Inspect (or Inspect Element, in some browsers). This displays the Developer Tools in your browser. The tag's ID will be located within the code. 

If you do not see the code, you may need to view a different tab within your Developer Tools.
TagNameThe tag's name. This tag is mutually exclusive with the TagID tag.
TagValuesA comma-separated list of the tag values to include.

API Response XML Package

The API response XML package will always include a Result, Info, and Errors tag.

<SmarterU>
   <Result></Result>
   <Info>
      <LearningModules>
         <LearningModule>
            <Name>![CDATA[]]</Name>
            <Identifier>![CDATA[]]</Identifier>
            <LearningModuleID>![CDATA[]]</LearningModuleID>
            <Type>![CDATA[]]</Type>
            <Description>![CDATA[]]</Description>
            <DescriptionHTML>![CDATA[]]</DescriptionHTML>
            <Status>![CDATA[]]</Status>
            <Tags>
               <Tag>
                  <Label><![CDATA[]]></Label>
                  <Values>
                     <Value><![CDATA[]]></Value>
                  </Values>
               </Tag>
            </Tags>

            <Tags2>
               <Tag2>
                  <TagID></TagID>
                  <TagName><![CDATA[]]></TagName>
                  <TagValues><![CDATA[]]></TagValues>
               </Tag2>
            </Tags2>

         </LearningModule>
      </LearningModules>
   </Info>

   <Errors>
      <Error>
         <ErrorID></ErrorID>
         <ErrorMessage></ErrorMessage>
      </Error>
   </Errors>
</SmarterU>

The LearningModules tag is a container for the courses returned by the listLearningModules method. Each course is contained in a LearningModule tag and may contain the following.

Name

The course's name.

Identifier

The course's user-specified identifier.  

LearningModuleID

The course's system-generated identifier. 

Type

The course type (i.e., online, SCORM, or ILT).

Description

The course's description.

DescriptionHTML

The course's description in HTML format.

  • This only returns the HTML and does not contain any internal SmarterU styles. 
  • If your description contains an image, the code for the image will only include the relative link. The code will not include the "app.smarteru.com" prefix that is included when the image is displayed from within SmarterU. Images may not display correctly if you attempt to use the code returned by the DescriptionHTML tag.

Status

The course's status (i.e., Active, Inactive, or Archive).

Tags

The Tags tag is a container for the course's tags. Each tag is contained in a Tag tag and contains the following.

TagDescription
LabelThe tag's label.
ValuesThe tag values.

Tags2

The Tags2 tag is a container for the course's tags. Each tag is contained in a Tag2 tag and contains the following.

TagDescription
TagIDThe tag's system-generated identifier.
TagNameThe tag's name.
TagValuesThe tag's value.

Example API Response XML Package

Below is an example of an API response XML package.

<SmarterU>
   <Result>Success</Result>
   <Info>
      <LearningModules>
         <LearningModule>
            <Name><![CDATA[Using Fina's Point-of-Sales System]]></Name>
            <Identifier><![CDATA[R-1010]]></Identifier>
            <LearningModuleID>122585</LearningModuleID>
            <Type>Online</Type>
            <Description>
               <![CDATA[This course was designed to provide Fina's retail employees with an in-depth understanding of the point-of-sales system that is used in all Fina boutiques.
               Topics include:
               Point-of-sales system hardware components
               Managing customer accounts
               Processing transactions
               Running reports
               ]]>
            </Description>
            <DescriptionHTML>
               <![CDATA[<p>This course was designed to provide Fina's retail employees with an in-depth understanding of the point-of-sales system that is used in all Fina boutiques.</p>
               <p>Topics include:</p>
               <ul>
               <li>Point-of-sales system hardware components</li>
               <li>Managing customer accounts</li>
               <li>Processing transactions</li>
               <li>Running reports</li>
               </ul>]]>
            </DescriptionHTML>
            <Status>Active</Status>
            <Tags>
               <Tag>
                  <Label><![CDATA[Customer Support]]></Label>
                  <Values>
                     <Value><![CDATA[Fina experience]]></Value>
                  </Values>
               </Tag>
               <Tag>
                  <Label><![CDATA[Location Type]]></Label>
                  <Values>
                     <Value><![CDATA[retail store]]></Value>
                  </Values>
               </Tag>
               <Tag>
                  <Label><![CDATA[Management]]></Label>
                  <Values>
                     <Value><![CDATA[inventory management]]></Value>
                     <Value><![CDATA[customer relations]]></Value>
                  </Values>
               </Tag>
            </Tags>

            <Tags2>
               <Tag2>
                  <TagID>1189</TagID>
                  <TagName><![CDATA[Customer Support]]></TagName>
                  <TagValues><![CDATA[Fina experience]]></TagValues> 
               </Tag2>
               <Tag2>
                  <TagID>1188</TagID>
                  <TagName><![CDATA[Location Type]]></TagName> 
                  <TagValues><![CDATA[retail store]]></TagValues> 
               </Tag2>
               <Tag2>
                  <TagID>1185</TagID>
                  <TagName><![CDATA[Management]]></TagName>
                  <TagValues><![CDATA[inventory management,customer relations]]></TagValues>
               </Tag2>
            </Tags2>
         </LearningModule>

         <LearningModule>
            <Name><![CDATA[Forklift Operation]]></Name>
            <Identifier><![CDATA[M-1230]]></Identifier>
            <LearningModuleID>3860</LearningModuleID>
            <Type>ILT</Type>
            <Description>
               <![CDATA[This course prepares learners to safely and efficiently operate a forklift. 
               Topics include:
               Moving with and without a load
               Picking up and stacking a load
               Working with trailers, ramps and elevators
               NOTE: To complete this course, learners must operate a forklift and demonstrate skills covered in the course. ]]>
            </Description>
            <DescriptionHTML>
               <![CDATA[<p>This course prepares learners to safely and efficiently operate a forklift. <p></p>
               <p>Topics include:</p>
               <ul>
               <li>Moving with and without a load</li>
               <li>Picking up and stacking a load</li>
               <li>Working with trailers, ramps and elevators</li>
               </ul>
               <p><strong>NOTE:</strong> To complete this course, learners must operate a forklift and demonstrate skills covered in the course. </p>]]>
            </DescriptionHTML> 
            <Status>Active</Status>
            <Tags></Tags>
            <Tags2></Tags2>
         </LearningModule>

         <LearningModule>
            <Name><![CDATA[Anatomy of a Shoe]]></Name>
            <Identifier><![CDATA[F-1001]]></Identifier>
            <LearningModuleID>3850</LearningModuleID>
            <Type>SCORM</Type>
            <Description>
               <![CDATA[In this SCORM course you will learn about the different parts of a shoe. Pay close attention to the terminology in this module as it will be used in all aspects of your job and throughout the rest of your training. ]]>
            </Description>
            <DescriptionHTML>
               <![CDATA[<p>In this SCORM course you will learn about the different parts of a shoe. Pay close attention to the terminology in this module as it will be used in all aspects of your job and throughout the rest of your training. <p></p>]]>
            </DescriptionHTML>
            <Status>Active</Status>
            <Tags>
               <Tag>
                  <Label><![CDATA[Products]]></Label>
                  <Values>
                     <Value><![CDATA[Footwear]]></Value>
                  </Values>
               </Tag>
            </Tags>
            <Tags2>
               <Tag2>
                  <TagID>1184</TagID>
                  <TagName><![CDATA[Products]]></TagName>
                  <TagValues><![CDATA[Footwear]]></TagValues> 
               </Tag2>
            </Tags2>
         </LearningModule>
      </LearningModules>
   </Info>

   <Errors></Errors>
</SmarterU>

Error Codes

Error CodeDescription
LLM:01The status provided is not valid. The allowed values are Active, Inactive, and Archived.
LLM:02The required permissions are not met to call the listLearningModules method.
LLM:03The Status provided is not valid. The allowed values are Active, Inactive and Archived.
LLM:04One or more tags do not exist in the provided account.

Was this article helpful?