Update a Localization Policy
put
/content/management/api/v1.1/localizationPolicies/{id}
Updates a localization policy with the given payload.
The updated localization policy will ensureto deliver the item having the exact requested language, if published to deliver the item in defined default language, if published to deliver the item, if published, which referred to the unavailable translation. It will also ensure that a translation for every language specified in LocalizationPolicy.requiredValues must be published with a translation set that any translation with a language specified in the LocalizationPolicy.optionalValues may be published with a translation set.
The updated localization policy will ensure
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
Localization Policy id
Query Parameters
-
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
Header Parameters
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
Updates a localization policy with the given information in the payload. The fields createdBy, createdDate, updatedBy, updatedDate and links will be ignored even if given in the payload.
Root 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.
Response
Supported Media Types
- application/json
200 Response
OK.
Root 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.
400 Response
Bad request.
403 Response
Forbidden.
404 Response
Not found.
500 Response
Internal server error.
Examples
The following example shows how to update a localization policy by submitting a PUT request on the REST resource using cURL.
curl -X PUT -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/localizationPolicies/{id}'
Example:
This updates localization policy with id: 7BE0595E225430CCE0534DB0F70AB94C its required and optional languages.
/content/management/api/v1.1/localizationPolicies/7BE0595E225430CCE0534DB0F70AB94C
Request Body
{ "id": "7BE0595E225430CCE0534DB0F70AB94C", "name": "policyName2", "description": "update description", "defaultValue": null, "requiredValues": [ "en-AU", "en-US", "de" ], "optionalValues": [ "en-IN", "en-US", "en-AU" ] }