- 2 Minutes to read
- Print
- DarkLight
API: listSessions
- 2 Minutes to read
- Print
- DarkLight
- 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 listSessions method retrieves sessions for an instructor-led course.
Who Has Access
Administrators and owners have access to the listSessions method.
API Call XML Package
<SmarterU>
<AccountAPI><![CDATA[]]></AccountAPI>
<UserAPI><![CDATA[]]></UserAPI>
<Method>listSessions</Method>
<Parameters>
<LearningModule>
<LearningModuleID><![CDATA[]]></LearningModuleID>
</LearningModule>
</Parameters>
</SmarterU>
LearningModule Tag Group
The LearningModule tag group is a container for the courses.
<LearningModule>
<LearningModuleID><![CDATA[]]></LearningModuleID>
</LearningModule>
The LearningModule tag may contain the following.
LearningModuleID
The instructor-led course's system-generated identifier. This is the LearningModuleID returned by the listLearningModules method.
API Response XML Package
The API response XML package will always include a Result, Info, and Errors tag.
<SmarterU>
<Result></Result>
<Info>
<Sessions>
<Session>
<CourseSessionID>![CDATA[]]</CourseSessionID>
<Status>![CDATA[]]</Status>
<Type>![CDATA[]]</Type>
<GradeType>![CDATA[]]</GradeType>
<Dates>
<Date>
<StartDate>![CDATA[]]</StartDate>
<EndDate>![CDATA[]]</EndDate>
<StartDateConverted><![CDATA[]]></StartDateConverted>
<EndDateConverted><![CDATA[]]></EndDateConverted>
<URL><![CDATA[]]></URL>
<WebinarProvider>![CDATA[]]<WebinarProvider/>
<Other>![CDATA[]]<Other/>
<Venue>![CDATA[]]</Venue>
<Room>![CDATA[]]</Room>
<Location>![CDATA[]]<Location/>
<Capacity>![CDATA[]]<Capacity/>
</Date>
</Dates>
</Session>
</Sessions>
</Info>
<Errors>
<Error>
<ErrorID></ErrorID>
<ErrorMessage></ErrorMessage>
</Error>
</Errors>
</SmarterU>
The Sessions tag is a container for the sessions returned by the listSessions method. Each session is contained in a Session tag and may contain the following.
CourseSessionID
The session's system-generated identifier.
Status
The session's status (i.e., Active, Finalized, or Removed).
Type
The session type (i.e., Single or Multi).
GradeType
The session's grade type (i.e., None, Letter Grade, PassFail, or Percentage).
Dates
The Dates tag is a container for the session dates. Each session date is contained in a Date tag and may contain following.
Tag | Description |
---|---|
StartDate | The session's start date in UTC. |
EndDate | The session's end date in UTC. |
StartDateConverted | The session's start date converted to the API user's timezone. |
EndDateConverted | The session's end date converted to the API user's timezone. |
URL | The session's URL. |
WebinarProvider | The session's webinar provider. |
Other | The value in the session's Other setting. |
Venue | The venue where the session will take place. |
Room | The room where the session will take place. |
Location | The room's location. |
Capacity | The maximum number of learners that can be enrolled in the session. |
Example API Response XML Package
Below is an example of an API response XML package.
<SmarterU>
<Result></Result>
<Info>
<Sessions>
<Session>
<CourseSessionID><![CDATA[42411]]></CourseSessionID>
<Status><![CDATA[Finalized]]></Status>
<Type><![CDATA[Single]]></Type>
<GradeType><![CDATA[PassFail]]></GradeType>
<Dates>
<Date>
<StartDate><![CDATA[2018-06-05 14:30:00.0]]></StartDate>
<EndDate><![CDATA[2018-06-05 22:30:00.0]]></EndDate>
<StartDateConverted><![CDATA[2018-06-05 08:30:00]]></StartDateConverted>
<EndDateConverted><![CDATA[2018-06-05 16:30:00]]></EndDateConverted>
<URL/>
<WebinarProvider/>
<Other/>
<Venue><![CDATA[Training Campus]]></Venue>
<Room><![CDATA[Training Boutique A]]></Room>
<Location/>
<Capacity>50</Capacity>
</Date>
</Dates>
</Session>
<Session>
<CourseSessionID><![CDATA[56667]]></CourseSessionID>
<Status><![CDATA[Removed]]></Status>
<Type><![CDATA[Single]]></Type>
<GradeType><![CDATA[PassFail]]></GradeType>
<Dates>
<Date>
<StartDate><![CDATA[2018-07-10 14:30:00.0]]></StartDate>
<EndDate><![CDATA[2018-07-10 23:30:00.0]]></EndDate>
<StartDateConverted><![CDATA[2018-07-10 08:30:00]]></StartDateConverted>
<EndDateConverted><![CDATA[2018-07-10 17:30:00]]></EndDateConverted>
<URL/>
<WebinarProvider/>
<Other/>
<Venue><![CDATA[Training Campus]]></Venue>
<Room><![CDATA[Training Boutique A]]></Room>
<Location/>
<Capacity>50</Capacity>
</Date>
</Dates>
</Session>
<Session>
<CourseSessionID><![CDATA[56669]]></CourseSessionID>
<Status><![CDATA[Active]]></Status>
<Type><![CDATA[Multi]]></Type>
<GradeType><![CDATA[PassFail]]></GradeType>
<Dates>
<Date>
<StartDate><![CDATA[2018-10-02 15:00:00.0]]></StartDate>
<EndDate><![CDATA[2018-10-02 23:30:00.0]]></EndDate>
<StartDateConverted><![CDATA[2018-10-02 09:00:00]]></StartDateConverted>
<EndDateConverted><![CDATA[2018-10-02 17:30:00]]></EndDateConverted>
<URL/>
<WebinarProvider/>
<Other/>
<Venue><![CDATA[Training Campus]]></Venue>
<Room><![CDATA[Training Boutique A]]></Room>
<Location/>
<Capacity>50</Capacity>
</Date>
<Date>
<StartDate><![CDATA[2019-06-03 15:00:00.0]]></StartDate>
<EndDate><![CDATA[2019-06-03 23:00:00.0]]></EndDate>
<StartDateConverted><![CDATA[2019-06-03 09:00:00]]></StartDateConverted>
<EndDateConverted><![CDATA[2019-06-03 17:00:00]]></EndDateConverted>
<URL/>
<WebinarProvider/>
<Other/>
<Venue><![CDATA[Training Campus]]></Venue>
<Room><![CDATA[Training Boutique A]]></Room>
<Location/>
<Capacity>50</Capacity>
</Date>
</Dates>
</Session>
</Sessions>
</Info>
<Errors>
<Error>
<ErrorID></ErrorID>
<ErrorMessage></ErrorMessage>
</Error>
</Errors>
</SmarterU>
Error Codes
Error Code | Message |
---|---|
LS:01 | The LearningModuleID provided is not valid. |