Get all authoring locales assigned

get

/km/api/v1/users/{id}/contentLocales

This method returns a list of Locale objects associated with the User object having the specified ID parameter.

This resource supports the orderBy request parameter. You can use this parameter along with the HTTP service request to sort the returned list.

You must get the schema and catalog of the resource for additional values that you can use with the orderBy parameter. To get the schema and catalog of the resource, you must use the GET method with the mediaType value as application/schema+json in the HTTP request.

The example URI to get schema and catalog of the resource is as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/locales

Example URIs:

The example URIs for this method are as follows:

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

    The method returns a list of Locale objects associated with the User object having the specified ID parameter sorted by locale code in ascending order.

  • http://<IM_REST_API_HOST>/km/api/latest/users/{id}/contentLocales?orderBy=localeCode:desc

    The method returns a list of Locale objects associated with the User object having the specified ID parameter sorted by locale code in descending order.

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResultList LocaleKey
Type: object
Title: ResultList LocaleKey
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : LocaleKey
Type: object
Title: LocaleKey
Show Source
Back to Top

Examples

The following example shows how to get a list of Locale objects associated with the User object having the specified ID parameter:

curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/users/{id}/contentLocales" -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:

{
  "items": [
    {
      "recordId": "en_GB",
      "links": [
        {
          "rel": "canonical",
          "href": "https://<IM_REST_API_HOST>/km/api/latest/locales/en_GB",
          "mediaType": "application/json, application/xml",
          "method": "GET"
        },
        {
          "rel": "collection",
          "href": "https://<IM_REST_API_HOST>/km/api/latest/locales",
          "mediaType": "application/json, application/xml",
          "method": "GET",
          "profile": "https://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/locales"
        }
      ]
    },
    {
      "recordId": "en_US",
      "links": [
        {
          "rel": "canonical",
          "href": "https://<IM_REST_API_HOST>/km/api/latest/locales/en_US",
          "mediaType": "application/json, application/xml",
          "method": "GET"
        },
        {
          "rel": "collection",
          "href": "https://<IM_REST_API_HOST>/km/api/latest/locales",
          "mediaType": "application/json, application/xml",
          "method": "GET",
          "profile": "https://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/locales"
        }
      ]
    }
  ],
  "hasMore": false,
  "limit": 20,
  "offset": 0,
  "links": [
    {
      "rel": "canonical",
      "href": "https://<IM_REST_API_HOST>/km/api/latest/users/2/contentLocales?limit=20&offset=0&_=1543231343448",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    }
  ],
  "count": 2
}
Back to Top