GetExperimentResults
Important
End of support notice: On October 16, 2025, AWS will discontinue support for CloudWatch Evidently. After October 16, 2025, you will no longer be able to access the Evidently console or CloudWatch Evidently resources.
Retrieves the results of a running or completed experiment. No results are available until there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment. To increase the statistical power, Evidently performs an additional offline p-value analysis at the end of the experiment. Offline p-value analysis can detect statistical significance in some cases where the anytime p-values used during the experiment do not find statistical significance.
Experiment results are available up to 63 days after the start of the experiment. They are not available after that because of CloudWatch data retention policies.
Request Syntax
POST /projects/project
/experiments/experiment
/results HTTP/1.1
Content-type: application/json
{
"baseStat": "string
",
"endTime": number
,
"metricNames": [ "string
" ],
"period": number
,
"reportNames": [ "string
" ],
"resultStats": [ "string
" ],
"startTime": number
,
"treatmentNames": [ "string
" ]
}
URI Request Parameters
The request uses the following URI parameters.
- experiment
-
The name of the experiment to retrieve the results of.
Length Constraints: Minimum length of 1. Maximum length of 127.
Pattern:
^[-a-zA-Z0-9._]*$
Required: Yes
- project
-
The name or ARN of the project that contains the experiment that you want to see the results of.
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.
- baseStat
-
The statistic used to calculate experiment results. Currently the only valid value is
mean
, which uses the mean of the collected values as the statistic.Type: String
Valid Values:
Mean
Required: No
- endTime
-
The date and time that the experiment ended, if it is completed. This must be no longer than 30 days after the experiment start time.
Type: Timestamp
Required: No
- metricNames
-
The names of the experiment metrics that you want to see the results of.
Type: Array of strings
Array Members: Fixed number of 1 item.
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern:
^[\S]+$
Required: Yes
- period
-
In seconds, the amount of time to aggregate results together.
Type: Long
Valid Range: Minimum value of 300. Maximum value of 90000.
Required: No
- reportNames
-
The names of the report types that you want to see. Currently,
BayesianInference
is the only valid value.Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 5 items.
Valid Values:
BayesianInference
Required: No
- resultStats
-
The statistics that you want to see in the returned results.
-
PValue
specifies to use p-values for the results. A p-value is used in hypothesis testing to measure how often you are willing to make a mistake in rejecting the null hypothesis. A general practice is to reject the null hypothesis and declare that the results are statistically significant when the p-value is less than 0.05. -
ConfidenceInterval
specifies a confidence interval for the results. The confidence interval represents the range of values for the chosen metric that is likely to contain the true difference between thebaseStat
of a variation and the baseline. Evidently returns the 95% confidence interval. -
TreatmentEffect
is the difference in the statistic specified by thebaseStat
parameter between each variation and the default variation. -
BaseStat
returns the statistical values collected for the metric for each variation. The statistic uses the same statistic specified in thebaseStat
parameter. Therefore, ifbaseStat
ismean
, this returns the mean of the values collected for each variation.
Type: Array of strings
Array Members: Minimum number of 0 items. Maximum number of 5 items.
Valid Values:
BaseStat | TreatmentEffect | ConfidenceInterval | PValue
Required: No
-
- startTime
-
The date and time that the experiment started.
Type: Timestamp
Required: No
- treatmentNames
-
The names of the experiment treatments that you want to see the results for.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 5 items.
Length Constraints: Minimum length of 1. Maximum length of 127.
Pattern:
^[-a-zA-Z0-9._]*$
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"details": "string",
"reports": [
{
"content": "string",
"metricName": "string",
"reportName": "string",
"treatmentName": "string"
}
],
"resultsData": [
{
"metricName": "string",
"resultStat": "string",
"treatmentName": "string",
"values": [ number ]
}
],
"timestamps": [ number ]
}
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.
- details
-
If the experiment doesn't yet have enough events to provide valid results, this field is returned with the message
Not enough events to generate results
. If there are enough events to provide valid results, this field is not returned.Type: String
- reports
-
An array of structures that include the reports that you requested.
Type: Array of ExperimentReport objects
Array Members: Minimum number of 0 items. Maximum number of 1000 items.
- resultsData
-
An array of structures that include experiment results including metric names and values.
Type: Array of ExperimentResultsData objects
Array Members: Minimum number of 0 items. Maximum number of 1000 items.
- timestamps
-
The timestamps of each result returned.
Type: Array of timestamps
Array Members: Minimum number of 0 items. Maximum number of 100800 items.
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
- ConflictException
-
A resource was in an inconsistent state during an update or a deletion.
HTTP Status Code: 409
- 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: