Obtain the results from the recommendation by id.
post
/content/management/api/v1.1/personalization/recommendationResults/.by.id/{id}
Obtain the results of the recommendation specified by the Recommendation id. This endpoint can be used to test the recommendation by specifying values for the audience attributes defined in the recommendation. Audience attributes can be specified in the query or the body with the following restrictions:
The end point accepts audience attributes as name value pairs prepended with the keyword attribute as follows: attribute.\.\=\
session and system categories cannot be given in the query as they can only be provided in the body of the request to simulate a session or system state.
Example: ?attribute.custom.myAttribute1=value1&attribute.custom.myAttribute2=value2
Where multivalued audience attributes are allowed, they should be provided in the query by repeating the name value pairs.
Example: ?attribute.custom.myMultiValue=value1&attribute.custom.myMultiValue=value2 etc.
Audience attributes specified in the query will override the same audience attribute if it is specified in the body.
The end point accepts audience attributes as name value pairs prepended with the keyword attribute as follows: attribute.\
session and system categories cannot be given in the query as they can only be provided in the body of the request to simulate a session or system state.
Example: ?attribute.custom.myAttribute1=value1&attribute.custom.myAttribute2=value2
Where multivalued audience attributes are allowed, they should be provided in the query by repeating the name value pairs.
Example: ?attribute.custom.myMultiValue=value1&attribute.custom.myMultiValue=value2 etc.
Audience attributes specified in the query will override the same audience attribute if it is specified in the body.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
Id of the Recommendation.
Query Parameters
-
attribute.category.attributeName(optional): array
Collection Format:
multi
List of audience attributes. Any special characters present must be encoded.The audience attributes should be prefixed with the keyword attribute:
attribute.\.\ =\
Example: ?attribute.custom.myAttribute1=value1&attribute.custom.myAttribute2=value2
Where multivalued audience attributes are allowed, they should be provided in the query by repeating the name value pairs.
Example: ?attribute.custom.myMultiValue=value1&attribute.custom.myMultiValue=value2 etc.
-
channelToken(optional): string
Channel token to use to test the recommendation against. If no channel is provided, the recommendation will run against all assets in the current repository and not only assets published to or targeted for a specific channel.
-
fields(optional): string
This parameter is used to control the returned fields in each item in the result. This parameter accepts a comma-separated list of field names or all. These fields will be returned for each items in the result. All the field names are case-sensitive, and users must provide the correct field name in the query. All the user-defined field names should be provided with prefix fields and followed by period (.). When fields is specified as all (case-insensitive), all the standard fields are returned in case of query across types and in case of type specific query, all standard and user fields are returned. This parameter is optional in the query, and by default the result shows only standard fields name, description. The standard fields id, type are always returned irrespective of any field asked. Any incorrect or invalid field name given in the query will throw an error.In the context of a brace style cross-type query, type specific fields may be specified using syntax name,{typename1:fields.userdefinedfieldname1,fields.userdefinedfieldname2},{typename2:fields.userdefinedfieldname1}. In the preceding example, all items of type typename1 will have fields - name, userdefinedfieldname1 and userdefinedfieldname2, while all items of type typename2 will have fields - name, userdefinedfieldname1. If the cross-type query does not resolve to types referenced in the typed fields clause(s), an error will be thrown.
It is also possible to return existing metadata for assets specifying fields as metadata or metadata.exif. Currently, only EXIF metadata is available for newly uploaded images.
Example: This returns standard fields name, user fields state and country of type Address in the search results.
https://{cecsdomain}/content/management/api/v1.1/items?q=type eq "Address"&fields=fields.state,fields.country
Example: This returns all the attributes for a specific type used in the search results.
https://{cecsdomain}/content/management/api/v1.1/items?q=type eq "Address"&fields=all
Example: This returns standard fields name, createdBy in the search results for all items across all the types.
https://{cecsdomain}/content/management/api/v1.1/items?fields=name,createdBy
Example: This returns all the standard fields in the search results for all items across all the types.
https://{cecsdomain}/content/management/api/v1.1/items?fields=all
Example: This returns the available metadata in the search results for all items across all the types.
https://{cecsdomain}/content/management/api/v1.1/items?fields=metadata
Example: This returns the available EXIF metadata in the search results for all items across all the types.
https://{cecsdomain}/content/management/api/v1.1/items?fields=metadata.exifDefault Value:name,description
-
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
-
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
-
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
Header Parameters
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
Array of audience attribute name value pairs. These will be used as input to the recommendation.
Attribute entries can be provided as a single value:
"\.\" : "\"
or as an array in the case of multi value attributes:
"\.\" : ["\", "\", ... ]
NOTE: Audience attributes specified in the query will override audience attriobutes specified in the body.
Attribute entries can be provided as a single value:
"\
or as an array in the case of multi value attributes:
"\
NOTE: Audience attributes specified in the query will override audience attriobutes specified in the body.
Root Schema : RecommendationTest
Type:
object
Recommendation Test
Show Source
-
assetState:
string
Allowed Values:
[ "PUBLISHED", "ALL", "PREVIEW" ]
A Enum that is used to determine if only published assets should be returned in the testing of the recommendation. Valida values are ALL and PUBLISHED. Default value is ALLe. -
audienceAttributes:
object audienceAttributes
Additional Properties Allowed: additionalPropertiesArray of audience attributes to be used in testing the recommendation. Each attribute can be proprovided as a single value:
"\.\ " : "\ "
or as an array for multi value attributes:
"\.\ " : ["\ ", "\ " ... ]
Nested Schema : audienceAttributes
Type:
object
Additional Properties Allowed
Show Source
Array of audience attributes to be used in testing the recommendation. Each attribute can be proprovided as a single value:
"\.\" : "\"
or as an array for multi value attributes:
"\.\" : ["\", "\" ... ]
"\
or as an array for multi value attributes:
"\
Response
Supported Media Types
- application/json
201 Response
Created.
Root Schema : RecommendationTestResults
Type:
object
Recommendation Test Results
Show Source
-
links(optional):
array links
Links
-
results:
object CollectionItemMap
Collection
-
resultsDetails(optional):
object RecommendationTestResultsDetails
Recommendation Test Results Details
Nested Schema : CollectionItemMap
Type:
object
Collection
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.
-
message(optional):
string
Search hint of the search.
-
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
- related(optional): object Related
-
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 : RecommendationTestResultsDetails
Type:
object
Recommendation Test Results Details
Show Source
-
defaultsUsed(optional):
boolean
Set to true if the results were created from the default items.
-
queryStatuses(optional):
array queryStatuses
Recommendation query statuses describing outcome of each reccomendation query.
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.
Nested Schema : items
Type:
array
Singular resources contained in the collection.
Show Source
-
Array of:
object items
Additional Properties Allowed: additionalProperties
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 : Related
Type:
object
related
Nested Schema : additionalProperties
Type:
object
Nested Schema : queryStatuses
Type:
array
Recommendation query statuses describing outcome of each reccomendation query.
Show Source
-
Array of:
object RecommendationTestQueryStatus
Recommendation test query status.
Nested Schema : RecommendationTestQueryStatus
Type:
object
Recommendation test query status.
Show Source
-
id(optional):
string
Unique query identifier.
-
status(optional):
string
Query execution status.
400 Response
Bad request.
403 Response
Forbidden.
500 Response
Internal server error.