Developer Platform (October 2024)

Locales and time zones

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

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>,
    "LanguageId": <number:D2LID>
}
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”).

Language.Language

Contains information about a language.

{
   "LanguageId": <number:D2LID>,
   "Name": <string>,
   "LanguageTypeId": <number:D2LID>,
   "CultureClass": <string>,
   "OwnerOrgId": <number:D2LID>
}

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:
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.

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

Retrieve the collection of all D2L languages.

Parameters:
Query Parameters:
  • bookmark (string) – Optional. Bookmark to use for fetching the next data set segment.

Oauth2 Scopes:

languages:languages:read

Status Codes:
API Versions:
  • 1.43+ – Route first appears in LMS v20.23.5.

  • 1.35-1.42Deprecated as of LMS v20.24.1.

  • 1.34-Obsolete as of LMS v20.24.1.

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 Language data blocks for the segment following the provided bookmark parameter (or the first segment, if the parameter is empty or missing).

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