Developer Platform (August 2017)

Locales and time zones

«  Configuration variables   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  scopes table   ]   ·  Permissions  »

Contents

The Locale and Time Zone actions let an organization manage the collection of locale and time zone properties available to users.

Attributes

Locales.Locale
{
    "LocaleId": <number:D2LID>,
    "LocaleName": <string>,
    "IsDefault": <boolean>,
    "CultureCode": <string>
}
TimeZones.TimeZone

Contains information about time zone.

{
   "Identifier": <string:TimeZone>,
   "SimpleName": <string>,
   "Name": <string>,
   "CurrentOffset": <string:TimeSpan>,
   "CurrentStandardOffset": <string:TimeSpan>
}
CurrentOffset
Currently observed offset from UTC (for example, “-04:00:00”).
CurrentStandardOffset
Offset from UTC used in this time zone when it observes standard time (for example, “-05:00:00”).
Identifier
Unique identifier for a given time zone. This identifier is the same value as the unique identifier name of the time zone in the tz database (for example “America/Toronto”).
Name
Full name for a given time zone (for example, “Canada - Toronto”).
SimpleName
Short name for a given time zone (for example, “Toronto”).

Actions

GET /d2l/api/lp/(version)/locales/

Retrieve the collection of all known locales.

Parameters:
Query Parameters:
 
  • bookmark (string) – Optional. Bookmark to use for fetching the next data set segment.
Status Codes:
API Versions:
  • unstable – Route first appears with LMS v10.4.7.

Input. You can use a bookmark query parameter as a paging offset, to indicate that the service should return the segment of results immediately following your bookmark.

Return. This action returns a paged result set containing the resulting Locale data blocks for the segment following your bookmark parameter (or the first segment, if the parameter is empty or missing).

GET /d2l/api/lp/(version)/locales/(localeId)

Retrieve the properties for a particular locale.

Parameters:
  • version (D2LVERSION) – API version.
  • localeId – Locale ID.
Status Codes:
API Versions:
  • unstable – Route first appears with LMS v10.4.7.

Return. This action returns a Locale JSON block, containing information about the provided locale.

GET /d2l/api/lp/(version)/timezones/

Retrieves a list of available time zones.

Parameters:
Query Parameters:
 
  • identifier (string) – Optional. Time zone identifier to get exact match against.
  • filter (string) – Optional. String to find inside time zone Identifier fields.
  • pageSize (number) – Optional. Number of entries to return in each data page.
Status Codes:
  • 200 OK – Action succeeded.
API Versions:
  • unstable – Route first appears in LMS v10.7.3.

Input. You can provide a filter string and this action will return time zones where the Identifier string contains your filter string.

Return. This action retrieves an ObjectListPage JSON block containing a list of TimeZone.

«  Configuration variables   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  scopes table   ]   ·  Permissions  »