> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/more-products-apis/chaos-engineering.md).

# Chaos Engineering

Manage chaos experiments, faults, probes, actions, hubs, infrastructure, and recommendations with the Harness Chaos Engineering API.

Use the Harness Chaos Engineering API to create and run chaos experiments, manage chaos hubs and their fault, probe, and action templates, register chaos infrastructure, and review recommendations.

## Request basics

* **Authentication:** Send a Harness API key in the `x-api-key` header.
* **Scope:** Most endpoints require the `accountIdentifier`, `organizationIdentifier`, and `projectIdentifier` query parameters.
* **Base URL:** `https://app.harness.io/gateway/chaos/manager/api`
* **Paths:** Public endpoints use the `/rest/...` prefix. Endpoints under `/internal/` and `/internalv3/` are for Harness services and are not covered here.

## Example request

This request lists chaos experiments in a project.

```bash
curl --request GET \
  --url 'https://app.harness.io/gateway/chaos/manager/api/rest/v2/experiment?accountIdentifier=<ACCOUNT_ID>&organizationIdentifier=<ORG_ID>&projectIdentifier=<PROJECT_ID>&page=0&limit=10' \
  --header 'x-api-key: <API_KEY>'
```

## Find an endpoint

* **Experiments:** List, get, save, delete, run, and stop experiments, update cron experiments, view run timelines, run experiments in bulk, and bulk delete or tag experiments.
* **Experiment input sets:** List, get, create, update, and delete input sets, and get the runtime variables of an experiment.
* **Experiment templates:** List, get, create, update, and delete templates. Compare revisions, get variables and YAML, and create an experiment from a template.
* **Faults:** List, get, create, update, and delete faults, and get fault variables, YAML, and experiment runs.
* **Fault templates:** List, get, create, update, and delete fault templates. Compare revisions and get variables and YAML.
* **Probe templates:** List, get, create, update, and delete probe templates, and get probe template variables.
* **Action templates and actions:** List, get, create, update, delete, and import actions and action templates. Compare revisions and get variables.
* **Chaos hubs:** List, get, create, update, and delete chaos hubs, and list the faults in a hub.
* **Chaos infrastructure:** Register, list, get, update, and delete v2 Kubernetes, legacy Kubernetes, and machine infrastructure. Get tokens, manifests, health, and version details.
* **Application maps:** List and get target network maps and discovered services, delete maps, and retry experiment creation.
* **Chaos recommendations:** List, get, and delete recommendations. Update their status, then create, run, or add the recommended experiment to a pipeline.
* **Pipeline onboarding:** Onboard a pipeline to chaos and check its onboarding status.
* **Experiment reports and pipelines:** Download an experiment run report and get chaos pipeline execution details.
* **Usage:** Get resource usage, experiment run overview stats, and service usage reports.

## Known behavior

* **Pagination:** List endpoints use a zero-based `page` and a `limit`. The default `limit` is 10 or 15, depending on the endpoint, and some endpoints accept a maximum of 100.
* **List operations that use POST:** Some list endpoints, such as `/rest/v2/experiments`, `/rest/v2/infrastructures`, `/rest/v2/applicationmaps`, and `/rest/machine/infras`, take filters in a POST request body.
* **Experiment identity:** Some endpoints require `isIdentity`. Set it to `true` when you pass the human-readable experiment identity instead of the experiment ID.
* **Hub scope:** Template endpoints require `hubIdentity`. Set `includeAllScope` to include templates from the account, organization, and project scopes.
* **Machine infrastructure:** Machine infrastructure endpoints require `infraType`, for example `Windows`, `Linux`, `Container`, or `CloudFoundry`.
* **Forced deletion:** Delete endpoints for legacy Kubernetes and machine infrastructure accept `forceDelete` to remove infrastructure that is still connected.
* **Infrastructure versions:** Go to the legacy Kubernetes endpoints only when you manage existing legacy infrastructure. Use the v2 endpoints for new registrations.
