# Method: projects.locations.experiments.stopAll

- [HTTP request](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll#body.request_body)
- [Response body](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll#body.StopAllExperimentsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll#body.aspect_1)

Stops all running experiments in a given location for a given project. This method initiates the process of reverting any changes made by the experiments, returning the affected resources to their normal state. The `Experiment` states will transition to `REVERTING` and then to `COMPLETED`.

Returns an RPC error if it can't list experiments at all. Otherwise, it lists and stops all experiments it can, and returns a response including success count and a list of errors. If there are no experiments to stop, it returns successfully with an empty response message.

### HTTP request

`POST https://faulttesting.googleapis.com/v1alpha/{parent=projects/*/locations/*}/experiments:stopAll`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The project and location where all experiments will be stopped. Format: `projects/{projectId}/locations/{location}`. |

### Request body

The request body must be empty.

### Response body

Response message for `https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll#google.cloud.faulttesting.v1alpha.FaultTesting.StopAllExperiments`. Response is a complete success only if `errors` is empty.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "stoppedExperimentsCount": integer, "errors": [ { object (`https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/Status`) } ] } ``` |

| Fields ||
|---|---|
| `stoppedExperimentsCount` | `integer` The number of experiments that were stopped. These experiments are in reachable locations with statuses that allows them to be stopped, and did not get an error from `experiments.stop`. |
| `errors[]` | ``object (`https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/Status`)`` Errors that occurred while listing or stopping experiments. Each experiment that fails the internal `experiments.stop` call will have an entry in this list. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `faulttesting.experiments.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).