{ "version":"2.0", "metadata":{ "apiVersion":"2018-05-22", "endpointPrefix":"personalize-runtime", "jsonVersion":"1.1", "protocol":"rest-json", "serviceFullName":"Amazon Personalize Runtime", "serviceId":"Personalize Runtime", "signatureVersion":"v4", "signingName":"personalize", "uid":"personalize-runtime-2018-05-22" }, "operations":{ "GetPersonalizedRanking":{ "name":"GetPersonalizedRanking", "http":{ "method":"POST", "requestUri":"/personalize-ranking" }, "input":{"shape":"GetPersonalizedRankingRequest"}, "output":{"shape":"GetPersonalizedRankingResponse"}, "errors":[ {"shape":"InvalidInputException"}, {"shape":"ResourceNotFoundException"} ], "documentation":"

Re-ranks a list of recommended items for the given user. The first item in the list is deemed the most likely item to be of interest to the user.

The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING.

", "idempotent":true }, "GetRecommendations":{ "name":"GetRecommendations", "http":{ "method":"POST", "requestUri":"/recommendations" }, "input":{"shape":"GetRecommendationsRequest"}, "output":{"shape":"GetRecommendationsResponse"}, "errors":[ {"shape":"InvalidInputException"}, {"shape":"ResourceNotFoundException"} ], "documentation":"

Returns a list of recommended items. The required input depends on the recipe type used to create the solution backing the campaign, as follows:

Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.

", "idempotent":true } }, "shapes":{ "Arn":{ "type":"string", "max":256, "pattern":"arn:([a-z\\d-]+):personalize:.*:.*:.+" }, "ErrorMessage":{"type":"string"}, "GetPersonalizedRankingRequest":{ "type":"structure", "required":[ "campaignArn", "inputList", "userId" ], "members":{ "campaignArn":{ "shape":"Arn", "documentation":"

The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking.

" }, "inputList":{ "shape":"InputList", "documentation":"

A list of items (itemId's) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list.

" }, "userId":{ "shape":"UserID", "documentation":"

The user for which you want the campaign to provide a personalized ranking.

" } } }, "GetPersonalizedRankingResponse":{ "type":"structure", "members":{ "personalizedRanking":{ "shape":"ItemList", "documentation":"

A list of items in order of most likely interest to the user.

" } } }, "GetRecommendationsRequest":{ "type":"structure", "required":["campaignArn"], "members":{ "campaignArn":{ "shape":"Arn", "documentation":"

The Amazon Resource Name (ARN) of the campaign to use for getting recommendations.

" }, "itemId":{ "shape":"ItemID", "documentation":"

The item ID to provide recommendations for.

Required for RELATED_ITEMS recipe type.

" }, "userId":{ "shape":"UserID", "documentation":"

The user ID to provide recommendations for.

Required for USER_PERSONALIZATION recipe type.

" }, "numResults":{ "shape":"NumResults", "documentation":"

The number of results to return. The default is 25. The maximum is 100.

" } } }, "GetRecommendationsResponse":{ "type":"structure", "members":{ "itemList":{ "shape":"ItemList", "documentation":"

A list of recommendations.

" } } }, "InputList":{ "type":"list", "member":{"shape":"ItemID"} }, "InvalidInputException":{ "type":"structure", "members":{ "message":{"shape":"ErrorMessage"} }, "documentation":"

Provide a valid value for the field or parameter.

", "error":{"httpStatusCode":400}, "exception":true }, "ItemID":{ "type":"string", "max":256 }, "ItemList":{ "type":"list", "member":{"shape":"PredictedItem"} }, "NumResults":{ "type":"integer", "min":0 }, "PredictedItem":{ "type":"structure", "members":{ "itemId":{ "shape":"ItemID", "documentation":"

The recommended item ID.

" } }, "documentation":"

An object that identifies an item.

The and APIs return a list of PredictedItems.

" }, "ResourceNotFoundException":{ "type":"structure", "members":{ "message":{"shape":"ErrorMessage"} }, "documentation":"

The specified resource does not exist.

", "error":{"httpStatusCode":404}, "exception":true }, "UserID":{ "type":"string", "max":256 } }, "documentation":"

" }