- [Resource: Experiment](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments#Experiment)
  - [JSON representation](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments#Experiment.SCHEMA_REPRESENTATION)
- [EndReason](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments#EndReason)
- [Methods](https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments#METHODS_SUMMARY)

## Resource: Experiment

Represents a single fault injection experiment where faults are deliberately introduced to your cloud resources to see how your application responds.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "experimentTemplate": string, "templateDisplayName": string, "templateDescription": string, "templateDuration": string, "effectiveAction": { object (`https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/Action`) }, "state": enum (`https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/State`), "endReason": enum (`https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments#EndReason`), "endNotes": string, "createTime": string, "startTime": string, "stateUpdateTime": string, "stopTime": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Unique identifier for the experiment. Format: `projects/{projectId}/locations/{location}/experiments/{experimentId}`. |
| `displayName` | `string` Optional. A human-readable name of the experiment. |
| `description` | `string` Optional. Notes or details to describe the purpose or context of the experiment. Minimum length is 0, maximum length is 2000. |
| `experimentTemplate` | `string` Required. The unique identifier of the reusable experiment template used to configure the experiment. This field determines the type of fault, target, and duration. Format: `projects/{projectId}/locations/{location}/experimentTemplates/{experimentTemplateId}`. |
| `templateDisplayName` | `string` Output only. The human-readable name of the experiment template used for the experiment. Minimum length is 0, maximum length is 1000. |
| `templateDescription` | `string` Output only. The description from the experiment template used for the experiment. Minimum length is 0, maximum length is 2000. |
| `templateDuration` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Output only. The planned duration of the experiment, as defined in the experiment template. Minimum duration is 1 minute, maximum is 10 days. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `effectiveAction` | ``object (`https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/Action`)`` Output only. The specific fault that was introduced during the experiment. Examples: Triggering a database failover, adding delays to web requests. This field comes from the experiment template. |
| `state` | ``enum (`https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/State`)`` Output only. The current state of the experiment. Example: `PREPARING`, `INJECTED`, `COMPLETED`. |
| `endReason` | ``enum (`https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments#EndReason`)`` Output only. Why the experiment stopped. Example: It finished normally, or was cancelled by a user. |
| `endNotes` | `string` Output only. Optional user-added notes explaining why the experiment was stopped, particularly if it was manually cancelled. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The date and time when the experiment record was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The date and time when the fault injection actually began. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `stateUpdateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The date and time when the experiment's state was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `stopTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The date and time when the experiment entered the REVERTING state. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## EndReason

The reason why an experiment concluded. String values are used in JSON.

| Enums ||
|---|---|
| `END_REASON_UNSPECIFIED` | The reason for stopping is not specified. |
| `CANCELLED` | A user manually stopped the experiment. |
| `COMPLETED` | The experiment finished normally after its duration. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/create` | Creates an `Experiment` and prepares it to run by identifying all cloud resources that will be affected. |
| ### `https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/delete` | Deletes an `Experiment` record. |
| ### `https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/get` | Returns a single `Experiment` resource, including its current state and configuration. |
| ### `https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/list` | Lists all experiments in a specified project and location. |
| ### `https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/start` | Starts an existing `Experiment`. |
| ### `https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stop` | Stops a running `Experiment`. |
| ### `https://docs.cloud.google.com/fault-injection-testing/reference/rest/v1alpha/projects.locations.experiments/stopAll` | Stops all running experiments in a given location for a given project. |