List all valid language codes

get

/content/management/api/v1.1/l10n/languageCodes

List all supported language codes

Request

Query Parameters
  • Language value in which we can expect all locales information
    Default Value: en-US
  • This parameter accepts a non negative integer and is used to control the size of the result.
    Default Value: 2000
  • This parameter accepts a non negative integer and is used to control the start index of the result.
    Default Value: 0
  • This parameter accepts a query expression condition that matches the field values. The value of query condition follows the format of {fieldName} {operator} "{fieldValue}". The only fieldName allowed for now is languageType and only allowed operator for now is eq. Allowed field values are default or custom. This query param is optional and defaults to empty, which returns all supported language codes.
  • This parameter accepts a boolean flag. If specified as true, then the returned result must include the total result count.
    Default Value: false
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Languages
Type: object
Languages
Show Source
Nested Schema : aggregationResults
Type: array
Aggregation results.
Show Source
Nested Schema : items
Type: array
Singular resources contained in the collection.
Show Source
Nested Schema : pinned
Type: array
Pinned items. Shows items pinned at the top of search list
Show Source
Nested Schema : AggregationResult
Type: object
Show Source
Nested Schema : LanguageBean
Type: object
Show Source
Nested Schema : date
Type: object
date
Show Source

304 Response

Not modified.

400 Response

Bad request.

500 Response

Internal server error.
Back to Top

Examples

The following example shows how to list all supported language codes by submission of a GET request on the REST resource using cURL:

curl -X GET -H 'Accept: application/json' 'https://host:port/content/management/api/v1.1/l10n/languageCodes'

Example 1:

This lists all valid languageCodes.

/content/management/api/v1.1/l10n/languageCodes

Response Body

{
        "hasMore": false,
        "offset": 0,
        "count": 2,
        "limit": 2,
        "items": [
          {
            "code": "en-x-my-custom-subtag",
            "language":"English",
            "description": "en-x-my-custom-subtag description",
            "territory": null,
            "script": null,
            "languageType": "custom",
            "links": [{
              "href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/en-x-my-custom-subtag",
              "rel": "self",
              "method": "GET",
              "mediaType": "application/json"
            }]
          },
          {
            "code": "ar",
            "language":"Arabic",
            "description": "",
            "territory": null,
            "script": null,
            "languageType": "default",
            "links": [{
              "href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/ar",
              "rel": "self",
              "method": "GET",
              "mediaType": "application/json"
            }]
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes",
            "rel": "canonical",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/metadata-catalog/languageCodes",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?offset=0",
            "rel": "first",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?offset=0",
            "rel": "last",
            "method": "GET",
            "mediaType": "application/json"
          }

Example 2:

This lists all the locales starts from index 1.

/content/management/api/v1.1/l10n/languageCodes?offset=1
Response Body
{
        "hasMore": false,
        "offset": 1,
        "count": 1,
        "limit": 2,
        "items": [
          {
            "code": "en-x-my-custom-subtag",
            "language":"English",
            "description": "en-x-my-custom-subtag description",
            "territory": null,
            "script": null,
            "languageType": "custom",
            "links": [{
              "href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/en-x-my-custom-subtag",
              "rel": "self",
              "method": "GET",
              "mediaType": "application/json"
            }]
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?offset=1",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?offset=1",
            "rel": "canonical",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/metadata-catalog/languageCodes",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?offset=0",
            "rel": "prev",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?offset=0",
            "rel": "first",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?offset=1",
            "rel": "last",
            "method": "GET",
            "mediaType": "application/json"
          }

Example 3:

This lists all locales in ar language.

/content/management/api/v1.1/l10n/languageCodes?lang=ar

Response Body

{
        "hasMore": true,
        "offset": 0,
        "count": 2,
        "limit": 2,
        "items": [
          {
            "code": "en-x-my-custom-subtag",
            "language":"English",
            "description": "en-x-my-custom-subtag description",
            "territory": null,
            "script": null,
            "languageType": "custom",
            "links": [{
              "href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/en-x-my-custom-subtag",
              "rel": "self",
              "method": "GET",
              "mediaType": "application/json"
            }]
          },
          {
            "code": "ar-x-my-custom-subtag",
            "language":"??????????????",
            "description": "ar-x-my-custom-subtag description",
            "territory": null,
            "script": null,
            "languageType": "custom",
            "links": [{
              "href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/en-x-my-custom-subtag",
              "rel": "self",
              "method": "GET",
              "mediaType": "application/json"
            }]
          }
        ],
        "links": [
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?lang=ar",
            "rel": "self",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?lang=ar",
            "rel": "canonical",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/metadata-catalog/languageCodes",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?lang=ar&limit=2&offset=0",
            "rel": "first",
            "method": "GET",
            "mediaType": "application/json"
          },
          {
            "href": "https://<hostname>/content/management/api/v1.1/l10n/languageCodes?lang=ar&limit=2&offset=0",
            "rel": "last",
            "method": "GET",
            "mediaType": "application/json"
          }
        ]
      }
    }
  ]
Back to Top