Get a language

get

/km/api/v1/languages/{id}

This method returns the Language object having the specified ID parameter.

Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/languages/{id}

    The request returns the Language object having the specified ID parameter in FULL mode.

  • http://<IM_REST_API_HOST>/km/api/latest/languages/{id}?mode=KEY

    The request returns the Language object having the specified ID parameter in KEY mode.

Request

Path Parameters
  • The unique identifier of the object to be retrieved.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Language
Type: object
Title: Language
Show Source
Nested Schema : locales
Type: array

The list of Locale objects associated with the Language object.

Show Source
Nested Schema : LocaleKey
Type: object
Title: LocaleKey
Show Source
Back to Top

Examples

The following example shows how to find the Language object that has the specified ID parameter by submitting a get request on the REST resource using cURL.

curl -X "GET" "http://IM_REST_API_HOST/km/api/latest/languages/{id}"

Example of Request Header

The following shows an example of the request header.

curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/languages/{id}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
    "recordId": "af",
    "links": [
        {
            "rel": "canonical",
            "href": "https://<IM_REST_API_HOST>/km/api/v1/languages/af",
            "mediaType": "application/json, application/xml",
            "method": "GET"
        },
        {
            "rel": "collection",
            "href": "https://<IM_REST_API_HOST>/km/api/v1/languages",
            "mediaType": "application/json, application/xml",
            "method": "GET",
            "profile": "https://<IM_REST_API_HOST>/km/api/v1/metadata-catalog/languages"
        }
    ],
    "dateAdded": "1970-01-01T23:11:11+0000",
    "dateModified": "1970-01-01T23:11:11+0000",
    "languageCode": "af",
    "languageDesc": "Afrikaans",
    "locales": []
}
Back to Top