List all valid language codes
get
/content/management/api/v1.1/l10n/languageCodes
List all supported language codes
Request
Query Parameters
-
lang(optional): string
Language value in which we can expect all locales informationDefault Value:
en-US
-
limit(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the size of the result.Default Value:
2000
-
links(optional): string
This parameter accepts a comma-separated list of link names. By default, this parameter gives all the links applicable. Possible values are: self, canonical, describedby
-
offset(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the start index of the result.Default Value:
0
-
q(optional): string
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.
-
totalResults(optional): boolean
This parameter accepts a boolean flag. If specified as true, then the returned result must include the total result count.Default Value:
false
Response
Supported Media Types
- application/json
200 Response
OK.
Root Schema : Languages
Type:
object
Languages
Show Source
-
aggregationResults(optional):
array aggregationResults
Aggregation results.
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Check whether there are more pages to fetch.
-
items(optional):
array items
Singular resources contained in the collection.
-
limit(optional):
integer(int32)
Actual page size used by the server. This might not be the same as what the client requests.
-
links(optional):
array links
Links of the resource.
-
offset(optional):
integer(int32)
The actual index from which the singular resources are returned.
-
pinned(optional):
array pinned
Pinned items. Shows items pinned at the top of search list
-
scrollId(optional):
string
scrollId if the search resolved to a scroll search.
-
totalResults(optional):
integer(int32)
Total number of rows that satisfy the client request (excluding the paging parameters.)
Nested Schema : links
Type:
array
Links of the resource.
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : pinned
Type:
array
Pinned items. Shows items pinned at the top of search list
Show Source
Nested Schema : LanguageBean
Type:
Show Source
object
-
code(optional):
string
locale code
-
createdBy(optional):
string
Created by.
-
createdDate(optional):
object date
date
-
description(optional):
string
Locale description
-
language(optional):
string
Locale language
-
languageType(optional):
string
lindicates if this is custom locale or default locale
-
links(optional):
array links
-
script(optional):
string
Script from language code
-
territory(optional):
string
Language code territory
-
updatedBy(optional):
string
Updated by.
-
updatedDate(optional):
object date
date
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
304 Response
Not modified.
400 Response
Bad request.
500 Response
Internal server error.
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
{ "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" } ] } } ]