List All Localization Policies

get

/content/management/api/v1.1/localizationPolicies

List all localization policies.

Request

Query Parameters
  • This parameter accepts a non negative integer and is used to control the size of the result.
    Default Value: 100
  • This parameter accepts a non negative integer and is used to control the start index of the result.
    Default Value: 0
  • 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
  • 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")
  • This parameter accepts a boolean flag. If specified as true, then the returned result must include the total result count.
    Default Value: false
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : LocalizationPolicies
Type: object
LocalizationPolicies
Show Source
Nested Schema : aggregationResults
Type: array
Aggregation results.
Show Source
Nested Schema : items
Type: array
Singular resources contained in the collection.
Show Source
Nested Schema : pinned
Type: array
Pinned items. Shows items pinned at the top of search list
Show Source
Nested Schema : AggregationResult
Type: object
Show Source
Nested 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

304 Response

Not modified.

400 Response

Bad request.

403 Response

Forbidden.

500 Response

Internal server error.
Back to Top

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