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.

Request

Supported Media Types
Path Parameters
Query Parameters
  • 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.

  • 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.
  • 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.exif
    Default Value: name,description
  • 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 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")
  • 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
Body ()
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.
Root Schema : RecommendationTest
Type: object
Recommendation Test
Show Source
  • 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
    Additional Properties Allowed: additionalProperties
    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:
    "\.\" : ["\", "\" ... ]
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:
"\.\" : ["\", "\" ... ]
Nested Schema : additionalProperties
Type: array
Show Source
Back to Top

Response

Supported Media Types

201 Response

Created.
Body ()
Root Schema : RecommendationTestResults
Type: object
Recommendation Test Results
Show Source
Nested Schema : CollectionItemMap
Type: object
Collection
Show Source
Nested Schema : RecommendationTestResultsDetails
Type: object
Recommendation Test Results Details
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 : items
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: object
Nested Schema : queryStatuses
Type: array
Recommendation query statuses describing outcome of each reccomendation query.
Show Source
Nested Schema : RecommendationTestQueryStatus
Type: object
Recommendation test query status.
Show Source

400 Response

Bad request.

403 Response

Forbidden.

500 Response

Internal server error.
Back to Top