BatchEvaluateFeature - CloudWatch Evidently

BatchEvaluateFeature

This operation assigns feature variation to user sessions. For each user session, you pass in an entityID that represents the user. Evidently then checks the evaluation rules and assigns the variation.

The first rules that are evaluated are the override rules. If the user's entityID matches an override rule, the user is served the variation specified by that rule.

Next, if there is a launch of the feature, the user might be assigned to a variation in the launch. The chance of this depends on the percentage of users that are allocated to that launch. If the user is enrolled in the launch, the variation they are served depends on the allocation of the various feature variations used for the launch.

If the user is not assigned to a launch, and there is an ongoing experiment for this feature, the user might be assigned to a variation in the experiment. The chance of this depends on the percentage of users that are allocated to that experiment. If the user is enrolled in the experiment, the variation they are served depends on the allocation of the various feature variations used for the experiment.

If the user is not assigned to a launch or experiment, they are served the default variation.

Request Syntax

POST /projects/project/evaluations HTTP/1.1 Content-type: application/json { "requests": [ { "entityId": "string", "evaluationContext": "string", "feature": "string" } ] }

URI Request Parameters

The request uses the following URI parameters.

project

The name or ARN of the project that contains the feature being evaluated.

Length Constraints: Minimum length of 0. Maximum length of 2048.

Pattern: (^[a-zA-Z0-9._-]*$)|(arn:[^:]*:[^:]*:[^:]*:[^:]*:project/[a-zA-Z0-9._-]*)

Required: Yes

Request Body

The request accepts the following data in JSON format.

requests

An array of structures, where each structure assigns a feature variation to one user session.

Type: Array of EvaluationRequest objects

Array Members: Minimum number of 1 item. Maximum number of 20 items.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "results": [ { "details": "string", "entityId": "string", "feature": "string", "project": "string", "reason": "string", "value": { "boolValue": boolean, "doubleValue": number, "longValue": number, "stringValue": "string" }, "variation": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

results

An array of structures, where each structure displays the results of one feature evaluation assignment to one user session.

Type: Array of EvaluationResult objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient permissions to perform this action.

HTTP Status Code: 403

ResourceNotFoundException

The request references a resource that does not exist.

HTTP Status Code: 404

ThrottlingException

The request was denied because of request throttling. Retry the request.

HTTP Status Code: 429

ValidationException

The value of a parameter in the request caused an error.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: