StopExperimentRun
Stops a running experiment. Stopping an experiment run ends audience exposure and returns users to the currently deployed feature flag configuration.
Request Syntax
PATCH /applications/ApplicationIdentifier/experimentdefinitions/ExperimentDefinitionIdentifier/experimentruns/Run/stop HTTP/1.1
Content-type: application/json
{
"DeploymentParameters": {
"DynamicExtensionParameters": {
"string" : "string"
},
"Tags": {
"string" : "string"
}
},
"Result": {
"ExecutiveSummary": "string",
"ReasonsNotToLaunch": "string",
"ReasonsToLaunch": "string"
}
}
URI Request Parameters
The request uses the following URI parameters.
- ApplicationIdentifier
-
The application ID or name.
Length Constraints: Minimum length of 1. Maximum length of 2048.
Required: Yes
- ExperimentDefinitionIdentifier
-
The experiment definition ID or name.
Length Constraints: Minimum length of 1. Maximum length of 2048.
Required: Yes
- Run
-
The run number to stop.
Valid Range: Minimum value of 1.
Required: Yes
Request Body
The request accepts the following data in JSON format.
- DeploymentParameters
-
The deployment parameters for the stop operation.
Type: DeploymentParameters object
Required: No
- Result
-
The result of the experiment run, including an executive summary and reasons for or against launching.
Type: ExperimentRunResult object
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"ApplicationId": "string",
"Description": "string",
"EndedAt": "string",
"ExperimentDefinitionId": "string",
"ExperimentDefinitionSnapshot": {
"ApplicationId": "string",
"AudienceDescription": "string",
"AudienceRule": "string",
"ConfigurationProfileId": "string",
"Control": {
"Description": "string",
"FlagValue": {
"AttributeValues": {
"string" : { ... }
},
"Enabled": boolean
},
"Key": "string",
"Weight": number
},
"EnvironmentId": "string",
"FlagKey": "string",
"Hypothesis": "string",
"Id": "string",
"LaunchCriteria": "string",
"Name": "string",
"Treatments": [
{
"Description": "string",
"FlagValue": {
"AttributeValues": {
"string" : { ... }
},
"Enabled": boolean
},
"Key": "string",
"Weight": number
}
]
},
"ExposurePercentage": number,
"Result": {
"ExecutiveSummary": "string",
"ReasonsNotToLaunch": "string",
"ReasonsToLaunch": "string"
},
"Run": number,
"StartedAt": "string",
"Status": "string",
"TreatmentOverrides": { ... },
"UpdatedAt": "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.
- ApplicationId
-
The application ID.
Type: String
Pattern:
[a-z0-9]{4,7} - Description
-
A description of the experiment run.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 1024.
- EndedAt
-
The date and time the experiment run ended, in ISO 8601 format.
Type: Timestamp
- ExperimentDefinitionId
-
The experiment definition ID.
Type: String
Pattern:
[a-z0-9]{4,7} - ExperimentDefinitionSnapshot
-
A snapshot of the experiment definition at the time the run was started.
Type: ExperimentDefinitionSnapshot object
- ExposurePercentage
-
The percentage of the target audience exposed to treatments.
Type: Float
Valid Range: Minimum value of 0.0. Maximum value of 100.0.
- Result
-
The result of the experiment run, including the executive summary and launch decision rationale.
Type: ExperimentRunResult object
- Run
-
The experiment run number.
Type: Integer
- StartedAt
-
The date and time the experiment run started, in ISO 8601 format.
Type: Timestamp
- Status
-
The current status of the experiment run. Valid values:
RUNNING,DONE.Type: String
Valid Values:
RUNNING | DONE - TreatmentOverrides
-
Treatment assignment overrides that assign specific entity IDs to treatments.
Type: TreatmentOverrides object
Note: This object is a Union. Only one member of this object can be specified or returned.
- UpdatedAt
-
The date and time the experiment run was last updated, in ISO 8601 format.
Type: Timestamp
Errors
For information about the errors that are common to all actions, see Common Error Types.
- BadRequestException
-
The input fails to satisfy the constraints specified by an AWS service.
- Details
-
Detailed information about the input that failed to satisfy the constraints specified by a call.
HTTP Status Code: 400
- InternalServerException
-
There was an internal failure in the AWS AppConfig service.
HTTP Status Code: 500
- ResourceNotFoundException
-
The requested resource could not be found.
HTTP Status Code: 404
Examples
Example
This example illustrates one usage of StopExperimentRun.
Sample Request
PATCH /applications/abc1234/experimentdefinitions/bsxyd7k/experimentruns/1/stop HTTP/1.1
Host: appconfig.us-east-1.amazonaws.com
Content-Type: application/json
User-Agent: aws-cli
X-Amz-Date: 20210916T175455Z
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20210916/us-east-1/appconfig/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=39c3b3042cd2aEXAMPLE
Content-Length: 131
{
"Result": {
"ExecutiveSummary": "t1 wins with 16% lift in conversion",
"ReasonsToLaunch": "Significant improvement in key metric"
}
}
Sample Response
{
"ApplicationId": "abc1234",
"EndedAt": "2026-06-16T17:57:36.083Z",
"ExperimentDefinitionId": "bsxyd7k",
"ExperimentDefinitionSnapshot": {
"ApplicationId": "abc1234",
"AudienceRule": "(eq $country \"US\")",
"ConfigurationProfileId": "ur8hx2f",
"Control": {
"FlagValue": {
"Enabled": false
},
"Key": "c",
"Weight": 50.0
},
"EnvironmentId": "env1234",
"FlagKey": "my-feature-flag",
"Id": "bsxyd7k",
"Name": "Example-Experiment-Definition",
"Treatments": [
{
"FlagValue": {
"Enabled": true
},
"Key": "t1",
"Weight": 50.0
}
]
},
"ExposurePercentage": 50.0,
"Result": {
"ExecutiveSummary": "t1 wins with 16% lift in conversion",
"ReasonsToLaunch": "Significant improvement in key metric"
},
"Run": 1,
"StartedAt": "2026-06-16T17:57:10.046Z",
"Status": "DONE",
"UpdatedAt": "2026-06-16T17:57:36.083Z"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: