openapi: 3.0.0 info: version: '2018-05-22' x-release: v4 title: Amazon Personalize Runtime description:

x-logo: url: 'https://twitter.com/awscloud/profile_image?size=original' backgroundColor: '#FFFFFF' termsOfService: 'https://aws.amazon.com/service-terms/' contact: name: Mike Ralphson email: mike.ralphson@gmail.com url: 'https://github.com/mermade/aws2openapi' x-twitter: PermittedSoc license: name: Apache 2.0 License url: 'http://www.apache.org/licenses/' x-providerName: amazonaws.com x-serviceName: personalize-runtime x-aws-signingName: personalize x-origin: - contentType: application/json url: 'https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/personalize-runtime-2018-05-22.normal.json' converter: url: 'https://github.com/mermade/aws2openapi' version: 1.0.0 x-apisguru-driver: external x-apiClientRegistration: url: 'https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct' x-apisguru-categories: - cloud x-preferred: true externalDocs: description: Amazon Web Services documentation url: 'https://docs.aws.amazon.com/personalize-runtime/' servers: - url: 'http://personalize-runtime.{region}.amazonaws.com' variables: region: description: The AWS region enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - us-gov-west-1 - us-gov-east-1 - ca-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-south-1 - af-south-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-southeast-1 - ap-southeast-2 - ap-east-1 - ap-south-1 - sa-east-1 - me-south-1 default: us-east-1 description: The Amazon Personalize Runtime multi-region endpoint - url: 'https://personalize-runtime.{region}.amazonaws.com' variables: region: description: The AWS region enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - us-gov-west-1 - us-gov-east-1 - ca-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-south-1 - af-south-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-southeast-1 - ap-southeast-2 - ap-east-1 - ap-south-1 - sa-east-1 - me-south-1 default: us-east-1 description: The Amazon Personalize Runtime multi-region endpoint - url: 'http://personalize-runtime.{region}.amazonaws.com.cn' variables: region: description: The AWS region enum: - cn-north-1 - cn-northwest-1 default: cn-north-1 description: The Amazon Personalize Runtime endpoint for China (Beijing) and China (Ningxia) - url: 'https://personalize-runtime.{region}.amazonaws.com.cn' variables: region: description: The AWS region enum: - cn-north-1 - cn-northwest-1 default: cn-north-1 description: The Amazon Personalize Runtime endpoint for China (Beijing) and China (Ningxia) paths: /personalize-ranking: post: operationId: GetPersonalizedRanking description:

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.

responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GetPersonalizedRankingResponse' '480': description: InvalidInputException content: application/json: schema: $ref: '#/components/schemas/InvalidInputException' '481': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' parameters: [] requestBody: required: true content: application/json: schema: type: object required: - campaignArn - inputList - userId properties: campaignArn: description: The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. type: string pattern: 'arn:([a-z\d-]+):personalize:.*:.*:.+' maxLength: 256 inputList: description: 'A list of items (by itemId) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list. The maximum is 500.' type: array items: $ref: '#/components/schemas/ItemID' userId: description: The user for which you want the campaign to provide a personalized ranking. type: string maxLength: 256 context: description: '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.' type: object maxProperties: 150 additionalProperties: $ref: '#/components/schemas/AttributeValue' filterArn: description: 'The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for a given user. For more information, see Filtering Recommendations.' type: string pattern: 'arn:([a-z\d-]+):personalize:.*:.*:.+' maxLength: 256 filterValues: description: '

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 INCLUDE element to include items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an EXCLUDE element to exclude items, you can omit the filter-values.In this case, Amazon Personalize doesn''t use that portion of the expression to filter recommendations.

For more information, see Filtering Recommendations.

' type: object maxProperties: 25 additionalProperties: $ref: '#/components/schemas/FilterAttributeValue' parameters: - $ref: '#/components/parameters/X-Amz-Content-Sha256' - $ref: '#/components/parameters/X-Amz-Date' - $ref: '#/components/parameters/X-Amz-Algorithm' - $ref: '#/components/parameters/X-Amz-Credential' - $ref: '#/components/parameters/X-Amz-Security-Token' - $ref: '#/components/parameters/X-Amz-Signature' - $ref: '#/components/parameters/X-Amz-SignedHeaders' /recommendations: post: operationId: GetRecommendations description: '

Returns a list of recommended items. For campaigns, the campaign''s Amazon Resource Name (ARN) is required and the required user and item 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.

For recommenders, the recommender''s ARN is required and the required item and user input depends on the use case (domain-based recipe) backing the recommender. For information on use case requirements see Choosing recommender use cases.

' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GetRecommendationsResponse' '480': description: InvalidInputException content: application/json: schema: $ref: '#/components/schemas/InvalidInputException' '481': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' parameters: [] requestBody: required: true content: application/json: schema: type: object properties: campaignArn: description: The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. type: string pattern: 'arn:([a-z\d-]+):personalize:.*:.*:.+' maxLength: 256 itemId: description:

The item ID to provide recommendations for.

Required for RELATED_ITEMS recipe type.

type: string maxLength: 256 userId: description:

The user ID to provide recommendations for.

Required for USER_PERSONALIZATION recipe type.

type: string maxLength: 256 numResults: description: The number of results to return. The default is 25. The maximum is 500. type: integer minimum: 0 context: description: '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.' type: object maxProperties: 150 additionalProperties: $ref: '#/components/schemas/AttributeValue' filterArn: description: '

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 ACTIVE.

' type: string pattern: 'arn:([a-z\d-]+):personalize:.*:.*:.+' maxLength: 256 filterValues: description: '

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 INCLUDE element to include items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an EXCLUDE element to exclude items, you can omit the filter-values.In this case, Amazon Personalize doesn''t use that portion of the expression to filter recommendations.

For more information, see Filtering recommendations and user segments.

' type: object maxProperties: 25 additionalProperties: $ref: '#/components/schemas/FilterAttributeValue' recommenderArn: description: The Amazon Resource Name (ARN) of the recommender to use to get recommendations. Provide a recommender ARN if you created a Domain dataset group with a recommender for a domain use case. type: string pattern: 'arn:([a-z\d-]+):personalize:.*:.*:.+' maxLength: 256 promotions: description: The promotions to apply to the recommendation request. A promotion defines additional business rules that apply to a configurable subset of recommended items. type: array items: $ref: '#/components/schemas/Promotion' maxItems: 1 parameters: - $ref: '#/components/parameters/X-Amz-Content-Sha256' - $ref: '#/components/parameters/X-Amz-Date' - $ref: '#/components/parameters/X-Amz-Algorithm' - $ref: '#/components/parameters/X-Amz-Credential' - $ref: '#/components/parameters/X-Amz-Security-Token' - $ref: '#/components/parameters/X-Amz-Signature' - $ref: '#/components/parameters/X-Amz-SignedHeaders' components: parameters: X-Amz-Content-Sha256: name: X-Amz-Content-Sha256 in: header schema: type: string required: false X-Amz-Date: name: X-Amz-Date in: header schema: type: string required: false X-Amz-Algorithm: name: X-Amz-Algorithm in: header schema: type: string required: false X-Amz-Credential: name: X-Amz-Credential in: header schema: type: string required: false X-Amz-Security-Token: name: X-Amz-Security-Token in: header schema: type: string required: false X-Amz-Signature: name: X-Amz-Signature in: header schema: type: string required: false X-Amz-SignedHeaders: name: X-Amz-SignedHeaders in: header schema: type: string required: false securitySchemes: hmac: type: apiKey name: Authorization in: header description: Amazon Signature authorization v4 x-amazon-apigateway-authtype: awsSigv4 schemas: GetPersonalizedRankingResponse: type: object properties: personalizedRanking: allOf: - $ref: '#/components/schemas/ItemList' - description: A list of items in order of most likely interest to the user. The maximum is 500. recommendationId: allOf: - $ref: '#/components/schemas/RecommendationID' - description: The ID of the recommendation. ItemID: type: string maxLength: 256 AttributeValue: type: string maxLength: 1000 format: password FilterAttributeValue: type: string maxLength: 1000 format: password InvalidInputException: {} ResourceNotFoundException: {} GetRecommendationsResponse: type: object properties: itemList: allOf: - $ref: '#/components/schemas/ItemList' - description: A list of recommendations sorted in descending order by prediction score. There can be a maximum of 500 items in the list. recommendationId: allOf: - $ref: '#/components/schemas/RecommendationID' - description: The ID of the recommendation. Promotion: type: object properties: name: allOf: - $ref: '#/components/schemas/Name' - description: The name of the promotion. percentPromotedItems: allOf: - $ref: '#/components/schemas/PercentPromotedItems' - description: The percentage of recommended items to apply the promotion to. filterArn: allOf: - $ref: '#/components/schemas/Arn' - description: 'The Amazon Resource Name (ARN) of the filter used by the promotion. This filter defines the criteria for promoted items. For more information, see Promotion filters.' filterValues: allOf: - $ref: '#/components/schemas/FilterValues' - description: '

The values to use when promoting items. For each placeholder parameter in your promotion''s 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 INCLUDE element to include items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an EXCLUDE element to exclude items, you can omit the filter-values. In this case, Amazon Personalize doesn''t use that portion of the expression to filter recommendations.

For more information on creating filters, see Filtering recommendations and user segments.

' description: Contains information on a promotion. A promotion defines additional business rules that apply to a configurable subset of recommended items. Arn: type: string pattern: 'arn:([a-z\d-]+):personalize:.*:.*:.+' maxLength: 256 AttributeName: type: string pattern: '[A-Za-z\d_]+' maxLength: 150 Context: type: object maxProperties: 150 additionalProperties: $ref: '#/components/schemas/AttributeValue' FilterAttributeName: type: string pattern: '[A-Za-z0-9_]+' maxLength: 50 FilterValues: type: object maxProperties: 25 additionalProperties: $ref: '#/components/schemas/FilterAttributeValue' InputList: type: array items: $ref: '#/components/schemas/ItemID' UserID: type: string maxLength: 256 GetPersonalizedRankingRequest: type: object required: - campaignArn - inputList - userId title: GetPersonalizedRankingRequest properties: campaignArn: allOf: - $ref: '#/components/schemas/Arn' - description: The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. inputList: allOf: - $ref: '#/components/schemas/InputList' - description: 'A list of items (by itemId) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list. The maximum is 500.' userId: allOf: - $ref: '#/components/schemas/UserID' - description: The user for which you want the campaign to provide a personalized ranking. context: allOf: - $ref: '#/components/schemas/Context' - description: '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: allOf: - $ref: '#/components/schemas/Arn' - description: 'The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for a given user. For more information, see Filtering Recommendations.' filterValues: allOf: - $ref: '#/components/schemas/FilterValues' - description: '

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 INCLUDE element to include items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an EXCLUDE element to exclude items, you can omit the filter-values.In this case, Amazon Personalize doesn''t use that portion of the expression to filter recommendations.

For more information, see Filtering Recommendations.

' ItemList: type: array items: $ref: '#/components/schemas/PredictedItem' RecommendationID: type: string NumResults: type: integer minimum: 0 PromotionList: type: array items: $ref: '#/components/schemas/Promotion' maxItems: 1 GetRecommendationsRequest: type: object title: GetRecommendationsRequest properties: campaignArn: allOf: - $ref: '#/components/schemas/Arn' - description: The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. itemId: allOf: - $ref: '#/components/schemas/ItemID' - description:

The item ID to provide recommendations for.

Required for RELATED_ITEMS recipe type.

userId: allOf: - $ref: '#/components/schemas/UserID' - description:

The user ID to provide recommendations for.

Required for USER_PERSONALIZATION recipe type.

numResults: allOf: - $ref: '#/components/schemas/NumResults' - description: The number of results to return. The default is 25. The maximum is 500. context: allOf: - $ref: '#/components/schemas/Context' - description: '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: allOf: - $ref: '#/components/schemas/Arn' - description: '

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 ACTIVE.

' filterValues: allOf: - $ref: '#/components/schemas/FilterValues' - description: '

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 INCLUDE element to include items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an EXCLUDE element to exclude items, you can omit the filter-values.In this case, Amazon Personalize doesn''t use that portion of the expression to filter recommendations.

For more information, see Filtering recommendations and user segments.

' recommenderArn: allOf: - $ref: '#/components/schemas/Arn' - description: The Amazon Resource Name (ARN) of the recommender to use to get recommendations. Provide a recommender ARN if you created a Domain dataset group with a recommender for a domain use case. promotions: allOf: - $ref: '#/components/schemas/PromotionList' - description: The promotions to apply to the recommendation request. A promotion defines additional business rules that apply to a configurable subset of recommended items. PredictedItem: type: object properties: itemId: allOf: - $ref: '#/components/schemas/ItemID' - description: The recommended item ID. score: allOf: - $ref: '#/components/schemas/Score' - description: 'A numeric representation of the model''s certainty that the item will be the next user selection. For more information on scoring logic, see how-scores-work.' promotionName: allOf: - $ref: '#/components/schemas/Name' - description: The name of the promotion that included the predicted item. description:

An object that identifies an item.

The and APIs return a list of PredictedItems.

Name: type: string pattern: '^[a-zA-Z0-9][a-zA-Z0-9\-_]*' minLength: 1 maxLength: 63 PercentPromotedItems: type: integer minimum: 1 maximum: 100 Score: type: number format: double security: - hmac: []