API: getGroup
  • 2 Minutes to read
  • Dark
    Light

API: getGroup

  • 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 getGroup method retrieve's a group's details.

Who Has Access

The following users have access to the getGroup method:

API Call XML Package

<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>getGroup</Method>
   <Parameters>
      <Group>
         <Name><![CDATA[]]></Name>
            - OR -
         <GroupID><![CDATA[]]></GroupID>
      </Group>
    </Parameters>
</SmarterU>

Group Tag Group

The Group tag group is a container for the group filters.

<Group>
   <Name><![CDATA[]]></Name>
      - OR -
   <GroupID><![CDATA[]]></GroupID>
 </Group>

The Group tag contains one of the following.

Name

The group's name. This tag is mutually exclusive with the GroupID tag. This is the Name returned by the listGroups method. 

GroupID

The group's user-specified identifier. This is mutually exclusive with the Name tag. This is the GroupID returned by the listGroups method.

API Response XML Package

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

<SmarterU>
   <Result></Result>
   <Info>
      <Group>
         <Name><![CDATA[]]></Name>
         <GroupID><![CDATA[]]></GroupID>
         <CreatedDate><![CDATA[]]></CreatedDate>
         <ModifiedDate><![CDATA[]]></ModifiedDate>
         <Description><![CDATA[]]></Description>
         <HomeGroupMessage><![CDATA[]]></HomeGroupMessage>

         <NotificationEmails>
            <NotificationEmail><![CDATA[]]></NotificationEmail>
         </NotificationEmails>

         <UserCount></UserCount>
         <LearningModuleCount></LearningModuleCount>

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

         <Status><![CDATA[]]></Status>
      </Group>
   </Info>

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

The group is contained in a Group tag and may contain the following.

Name

The group's name.

GroupID

The group's user-specified identifier.

CreatedDate

The date the group was created.

ModifiedDate

The date the group was last modified.

Description

The group's description.

HomeGroupMessage

The group's home group message.

NotificationEmails

A container for the group's notification contacts. Each email address is contained in a NotificationEmail tag.

UserCount

The number of users assigned to the group.

LearningModuleCount

The number of courses assigned to the group.

Tags2

A container for the group's tags. Each tag is contained in a Tag2 tag and may contain the following.

TagDescription

TagID

The tag's system-generated identifier.
TagNameThe tag's name.
TagValuesA comma-separated list of tag values associated with the group.

Example API Response XML Package

Below is an example of an API response XML package.

<SmarterU>
   <Result>Success</Result>
   <Info>
      <Group>
         <Name><![CDATA[Retail]]></Name>
         <GroupID><![CDATA[G-3039]]></GroupID>
         <CreatedDate><![CDATA[1900-01-01 05:00:00.0]]></CreatedDate>
         <ModifiedDate><![CDATA[2018-06-04 20:09:55.293]]></ModifiedDate>
         <Description><![CDATA[<p>A group for all Fina retail employees and team members.</p>]]></Description>
         <HomeGroupMessage><![CDATA[<p><span style="color: #3366ff;"><strong>Welcome to the Retail group!</strong></span></p>
         <p>Spring is here and so are our latest styles. Learn more about Fina's Spring 2018 collection today!</p>]]></HomeGroupMessage>
         <NotificationEmails> 
            <NotificationEmail><![CDATA[marie.vasquez@finashoe.com]]></NotificationEmail>
         </NotificationEmails>
         <UserCount>36</UserCount>
         <LearningModuleCount>96</LearningModuleCount>
 
         <Tags2> 
            <Tag2>
               <TagID>670</TagID>
               <TagName><![CDATA[Group Tags]]></TagName> 
               <TagValues> 
                  <![CDATA[Europe,North America]]>
               </TagValues>
            </Tag2>
         </Tags2>
         <Status><![CDATA[Active]]></Status>
      </Group>
   </Info>
 
   <Errors>
 
   </Errors>
</SmarterU> 

Error Codes

Error CodeMessage
GG:01
The name provided is not valid.
GG:02
The required permissions are not met to call the getGroup method.
GG:03
The requested group does not exist.
GG:04
The group ID provided is not valid.

Was this article helpful?