List All Localization Policies
get
/content/management/api/v1.1/localizationPolicies
List all localization policies.
Request
Query Parameters
-
limit(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the size of the result.Default Value:
100
-
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, first, last, prev, next
-
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
-
orderBy(optional): string
This parameter is used to control order of results. The value of this query parameter follow the format of fieldName:[asc/desc]. asc stands for ascending order desc stands for descending order, default order is asc. The only fields allowed in the field name are name and updatedDate.Default Value:
name:asc
-
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 fieldNames allowed for now are name and connectorType and only allowed operators for now are mt on name and eq on connectorType. This query param is optional with no default.
Example:
?q=(name mt "foo")
Example:
?q=(connectorType eq "translation")
Example:
?q=(connectorType eq "content") -
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 : LocalizationPolicies
Type:
object
LocalizationPolicies
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 : items
Type:
array
Singular resources contained in the collection.
Show Source
-
Array of:
object LocalizationPolicy
Localization Policy
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 : LocalizationPolicy
Type:
object
Localization Policy
Show Source
-
createdBy(optional):
string
created by user of the localization policy.
-
createdDate(optional):
object date
date
-
defaultValue(optional):
string
Fall back language in case if item of the given language not available. Value should be one of the required languages.
-
description(optional):
string
Description of the localization policy.
-
id(optional):
string
id of the localization policy. It is a required property in the get response and put request whereas it is not required in the post request.
-
links(optional):
array links
Links of the Localization Policy resource
-
name(optional):
string
Name of the localization policy. It is a required property in the get response and post/put request.
-
optionalValues(optional):
array optionalValues
Optional language values.
-
requiredValues(optional):
array requiredValues
Required language values.
-
updatedBy(optional):
string
updated by user of the Localization Policy
-
updatedDate(optional):
object date
date
Nested Schema : links
Type:
array
Links of the Localization Policy resource
Show Source
-
Array of:
object Link
Link of the resource.
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.
403 Response
Forbidden.
500 Response
Internal server error.
Examples
The following example shows how to get localization policy details by submission of a GET request on the REST resource using cURL:
curl -i -X GET -H 'Accept:application/json' 'http://host:port/content/management/api/v1.1/localizationPolicies'
Example 1:
This lists all the localization policies including totalResults value in the response.
/content/management/api/v1.1/localizationPolicies?totalResults=true
Response Body
{ "hasMore": false, "offset": 0, "count": 2, "limit": 2, "totalResults": 2, "items": [ { "id": "7CCD8228C1DF6488E0534DB0F70ABB84", "name": "policy1", "description": "", "createdBy": "marketing.user", "createdDate": { "value": "2018-12-10T12:49:35.740Z", "timezone": "UTC" }, "updatedBy": "marketing.user", "updatedDate": { "value": "2018-12-10T12:49:35.740Z", "timezone": "UTC" }, "defaultValue": null, "requiredValues": [ "en_US" ], "optionalValues": [ "ar-DZ", "ar-EG" ], "links": [ { "href": "https://host:port/content/management/api/v1.1/localizationPolicies/7CCD8228C1DF6488E0534DB0F70ABB84", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "7CAB65ADA5886541E0534DB0F70AE4A1", "name": "policy2", "description": "", "createdBy": "marketing.user", "createdDate": { "value": "2018-12-12T05:31:22.440Z", "timezone": "UTC" }, "updatedBy": "marketing.user", "updatedDate": { "value": "2018-12-12T05:31:22.440Z", "timezone": "UTC" }, "defaultValue": null, "requiredValues": [ "en-IN" ], "optionalValues": [ "en", "fr" ], "links": [ { "href": "https://host:port/content/management/api/v1.1/localizationPolicies/7CAB65ADA5886541E0534DB0F70AE4A1", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } ], "links": [ { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?totalResults=true", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?totalResults=true", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/metadata-catalog/localizationPolicies", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?offset=0&totalResults=true", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?offset=0&totalResults=true", "rel": "last", "method": "GET", "mediaType": "application/json" } ] }
Example 2:
This lists first 2 localization policies starting from index 1, includes totalResults value and field-name in descending order in the response.
/content/management/api/v1.1/localizationPolicies?limit=2&offset=1&totalResults=true&orderBy=name:desc
Response Body
{ "hasMore": false, "offset": 1, "count": 2, "limit": 3, "totalResults": 3, "items": [ { "id": "7CAB65ADA5886541E0534DB0F70AE4A1", "name": "policy2", "description": "", "createdBy": "marketing.user", "createdDate": { "value": "2018-12-10T12:49:35.740Z", "timezone": "UTC" }, "updatedBy": "marketing.user", "updatedDate": { "value": "2018-12-12T07:17:12.839Z", "timezone": "UTC" }, "defaultValue": null, "requiredValues": [ "en_US" ], "optionalValues": [ "ar-DZ", "ar-EG" ], "links": [ { "href": "https://host:port/content/management/api/v1.1/localizationPolicies/7CAB65ADA5886541E0534DB0F70AE4A1", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "7CCD8228C1DF6488E0534DB0F70ABB84", "name": "policy1", "description": "", "createdBy": "marketing.user", "createdDate": { "value": "2018-12-12T05:31:22.440Z", "timezone": "UTC" }, "updatedBy": "marketing.user", "updatedDate": { "value": "2018-12-12T05:31:22.440Z", "timezone": "UTC" }, "defaultValue": null, "requiredValues": [ "en-IN" ], "optionalValues": [ "en", "fr" ], "links": [ { "href": "https://host:port/content/management/api/v1.1/localizationPolicies/7CCD8228C1DF6488E0534DB0F70ABB84", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } ], "links": [ { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?limit=2&orderBy=name:desc&totalResults=true&offset=1", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?limit=2&orderBy=name:desc&totalResults=true&offset=1", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/metadata-catalog/localizationPolicies", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?limit=2&orderBy=name:desc&totalResults=true&offset=0", "rel": "prev", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?limit=2&orderBy=name:desc&totalResults=true&offset=0", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/localizationPolicies?limit=2&orderBy=name:desc&totalResults=true&offset=1", "rel": "last", "method": "GET", "mediaType": "application/json" } ] }