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 ensure
  • to 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.
  • Request

    Supported Media Types
    Path Parameters
    Query Parameters
    Header Parameters
    Body ()
    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
    Nested Schema : date
    Type: object
    date
    Show Source
    Nested Schema : optionalValues
    Type: array
    Optional language values.
    Show Source
    Nested Schema : requiredValues
    Type: array
    Required language values.
    Show Source
    Back to Top

    Response

    Supported Media Types

    200 Response

    OK.
    Body ()
    Root Schema : LocalizationPolicy
    Type: object
    Localization Policy
    Show Source
    Nested Schema : date
    Type: object
    date
    Show Source
    Nested Schema : optionalValues
    Type: array
    Optional language values.
    Show Source
    Nested Schema : requiredValues
    Type: array
    Required language values.
    Show Source

    400 Response

    Bad request.

    403 Response

    Forbidden.

    404 Response

    Not found.

    500 Response

    Internal server error.
    Back to Top

    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"
        ]
        }
    Back to Top