Returns a list of recommended items
Returns a list of recommended items. The required input depends on the recipe type used to create the solution backing the campaign, as follows:
RELATED_ITEMS - itemId required, userId not used
USER_PERSONALIZATION - itemId optional, userId required
Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
personalizeruntime_get_recommendations(campaignArn, itemId, userId, numResults, context, filterArn, filterValues)
campaignArn |
[required] The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. |
itemId |
The item ID to provide recommendations for. Required for |
userId |
The user ID to provide recommendations for. Required for |
numResults |
The number of results to return. The default is 25. The maximum is 500. |
context |
The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user's recommendations, such as the user's current location or device type. |
filterArn |
The ARN of the filter to apply to the returned recommendations. For more information, see Filtering Recommendations. When using this parameter, be sure the filter resource is |
filterValues |
The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma. For filter expressions that use an For more information, see Filtering Recommendations. |
A list with the following syntax:
list(
itemList = list(
list(
itemId = "string",
score = 123.0
)
),
recommendationId = "string"
)svc$get_recommendations(
campaignArn = "string",
itemId = "string",
userId = "string",
numResults = 123,
context = list(
"string"
),
filterArn = "string",
filterValues = list(
"string"
)
)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.