List all recommendations
get
/content/management/api/v1.1/personalization/recommendations
This resource returns a list of available recommendations that can be filtered by the recommendation's name, apiName and updatedAt. You can control the number of items to be fetched, paginated, and sorted. Refer to the query syntax description to see the limitations.
Request
Query Parameters
-
default(optional): string
Default search query expression.
-
fields(optional): string
This parameter is used to control the returned fields for a recommendation. This parameter accepts a comma-separated list of field names or all. These fields will be returned for each recommendation in the list. As all the field names are case-sensitive, users must provide the correct field names in the query. Each recommendation has both standard fields (id, name, apiName, description, type, createdBy, createdAt, updatedBy, updatedAt, main and defaults. When fields is specified as all (case-insensitive), all the standard and additional fields are returned. The standard fields are always returned in the response and cannot be filtered out. Users can only filter out the additional fields. This parameter is optional in the query and by default result shows only standard fields in the response. Any incorrect or invalid field name given in the query will result in an error.
Example: ?fields=all
This will return all standard fields and all additional fields for each recommendation.
-
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
Order by results. Recommendations can currently only be ordered by name.Default Value:
name:asc -
q(optional): string
This parameter accepts a query expression condition that matches the field values. Query conditions can be joined using AND operators and grouped with parentheses. The value of a query condition follows the format of {fieldName} {operator} "{fieldValue}". The only field name allowed is repositoryId. The only value allowed in the operator is eq (Equals).
Example:
https://{cecsdomain}/content/management/api/v1.1/personalization/recommendations?q=(apiName eq "TestRecommendation")
Example:
https://{cecsdomain}/content/management/api/v1.1/personalization/recommendations?q=(repositoryId eq "EAQWER42DGKJ10PCNMGAE") -
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 : Recommendations
Type:
objectRecommendations
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:
arraySingular resources contained in the collection.
Show Source
-
Array of:
object Recommendation
Recommendation
Nested Schema : links
Type:
arrayLinks of the resource.
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : pinned
Type:
arrayPinned items. Shows items pinned at the top of search list
Show Source
Nested Schema : Recommendation
Type:
objectRecommendation
Show Source
-
apiName(optional):
string
The reference name of the Recommendation. If a refrence name is not provided, one will be generated by the server. Reference names must be unique among all recommendations. This is the name that is used in API calls that invoke the recommendation.
-
channels(optional):
array channels
-
contentTypes(optional):
array contentTypes
Content types the Recommenation will return. It is a required property in the get response and post/put request.
-
createdBy(optional):
string
The user who created the Recommendation.
-
createdDate(optional):
object date
date
-
defaults(optional):
array defaults
The default rule section.
-
description(optional):
string
The description of the Recommendation.
-
id:
string
The id of the Recommendation. This is a required propety in the get response and ignored in post/put requests.
-
isPublished(optional):
boolean
Whether the recommendation is ever published.
-
links(optional):
array links
Links
-
main(optional):
array main
The main rule section.
-
name:
string
The name of the Recommendation. It is a required property in the get response and cannot be empty in post/put request.
-
publishedChannels(optional):
array publishedChannels
-
publishInfo(optional):
object ItemSubResourceListPublishInfo
Item SubResource.
-
repositoryId:
string
Repositories of the Recommendation. It is a required property in the get response and post/put request.
-
status(optional):
string
Current status of the recommendation.
-
type(optional):
string
The type of the Recommendation as determined by the rule structure.
-
updatedBy(optional):
string
The user who last updated the Recommendation.
-
updatedDate(optional):
object date
date
-
version(optional):
string
The current revision version of this item.
Nested Schema : contentTypes
Type:
arrayContent types the Recommenation will return. It is a required property in the get response and post/put request.
Show Source
Nested Schema : defaults
Type:
arrayThe default rule section.
Show Source
-
Array of:
object DefaultSection
Default Section
Nested Schema : main
Type:
arrayThe main rule section.
Show Source
-
Array of:
object MainRulesSection
Main Rules Section
Nested Schema : ChannelId
Type:
objectChannelId
Show Source
-
id(optional):
string
-
isPrimaryChannel(optional):
boolean
Indicates if channel is primary for an asset.
-
links(optional):
array links
Links
-
name(optional):
string
Nested Schema : Link
Type:
objectLink 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.
Nested Schema : ContentTypeId
Type:
Show Source
object-
name(optional):
string
-
typeCategory(optional):
string
typeCategory of the asset type.
Nested Schema : DefaultSection
Type:
objectDefault Section
Show Source
-
items(optional):
array items
List of items. This is optional and can be empty.
-
sort(optional):
array sort
This is a very simple sort based of the normal quiery syntax.
Example: [systemField | userDefinedfield]<:>
Where:
standardAssetField - this is a predefined list of fields the user can choose to sort on. This can be given an ascneding and descending property by adding :asc or :desc
Examples:
publishedDate:asc - sort by published date ascneding
userAssetField - This refers to fields defined in the content type as created by the user.
field.myText or field.someThing:desc
If no systemField or userDefinedField is provided, :random and :relevance can be provided.
:relevance - Default. This will return assets ordered by their relevance.
:random - This will return assets in a random order irrespective of any rules or fields.
Nested Schema : sort
Type:
arrayThis is a very simple sort based of the normal quiery syntax.
Example: [systemField | userDefinedfield]<:>
Where:
standardAssetField - this is a predefined list of fields the user can choose to sort on. This can be given an ascneding and descending property by adding :asc or :desc
Examples:
publishedDate:asc - sort by published date ascneding
userAssetField - This refers to fields defined in the content type as created by the user.
field.myText or field.someThing:desc
If no systemField or userDefinedField is provided, :random and :relevance can be provided.
:relevance - Default. This will return assets ordered by their relevance.
:random - This will return assets in a random order irrespective of any rules or fields.
Show Source
Example: [systemField | userDefinedfield]<:
Where:
standardAssetField - this is a predefined list of fields the user can choose to sort on. This can be given an ascneding and descending property by adding :asc or :desc
Examples:
publishedDate:asc - sort by published date ascneding
userAssetField - This refers to fields defined in the content type as created by the user.
field.myText or field.someThing:desc
If no systemField or userDefinedField is provided, :random and :relevance can be provided.
:relevance - Default. This will return assets ordered by their relevance.
:random - This will return assets in a random order irrespective of any rules or fields.
Nested Schema : ItemId
Type:
Show Source
object-
id(optional):
string
id of the item.
-
links(optional):
array links
links of the item resource
-
name(optional):
string
name of the item.
Nested Schema : links
Type:
arraylinks of the item resource
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : MainRulesSection
Type:
objectMain Rules Section
Show Source
-
properties(optional):
object RulesProperties
RulesProperties
-
rules(optional):
array rules
Main list of Rules. This is optional and can be empty.
-
sort(optional):
array sort
This is a very simple sort based of the normal quiery syntax.
Example: [systemField | userDefinedfield]<:>
Where:
standardAssetField - this is a predefined list of fields the user can choose to sort on. This can be given an ascneding and descending property by adding :asc or :desc
Examples:
publishedDate:asc - sort by published date ascneding
userAssetField - This refers to fields defined in the content type as created by the user.
field.myText or field.someThing:desc
If no systemField or userDefinedField is provided, :random and :relevance can be provided.
:relevance - Default. This will return assets ordered by their relevance.
:random - This will return assets in a random order irrespective of any rules or fields.
Nested Schema : RulesProperties
Type:
objectRulesProperties
Show Source
-
operator(optional):
string
Allowed Values:
[ "ALL", "ANY" ]The operator that will be used to combine the rules in this group. This is optional and defaults to ALL if omitted.
Nested Schema : rules
Type:
arrayMain list of Rules. This is optional and can be empty.
Show Source
Nested Schema : sort
Type:
arrayThis is a very simple sort based of the normal quiery syntax.
Example: [systemField | userDefinedfield]<:>
Where:
standardAssetField - this is a predefined list of fields the user can choose to sort on. This can be given an ascneding and descending property by adding :asc or :desc
Examples:
publishedDate:asc - sort by published date ascneding
userAssetField - This refers to fields defined in the content type as created by the user.
field.myText or field.someThing:desc
If no systemField or userDefinedField is provided, :random and :relevance can be provided.
:relevance - Default. This will return assets ordered by their relevance.
:random - This will return assets in a random order irrespective of any rules or fields.
Show Source
Example: [systemField | userDefinedfield]<:
Where:
standardAssetField - this is a predefined list of fields the user can choose to sort on. This can be given an ascneding and descending property by adding :asc or :desc
Examples:
publishedDate:asc - sort by published date ascneding
userAssetField - This refers to fields defined in the content type as created by the user.
field.myText or field.someThing:desc
If no systemField or userDefinedField is provided, :random and :relevance can be provided.
:relevance - Default. This will return assets ordered by their relevance.
:random - This will return assets in a random order irrespective of any rules or fields.
Nested Schema : PublishInfo
Type:
objectPublishInfo
Show Source
-
channel(optional):
string
Target name
-
links(optional):
array links
Links
-
publishedBy(optional):
string
Published by
-
publishedDate(optional):
object date
date
-
slug(optional):
string
Published slug
-
version(optional):
string
Published version
400 Response
Bad request.
403 Response
Forbidden.
500 Response
Internal server error.