---
title: "register, remove or clear TCP chaos"
method: PUT
path: "/mockserver/tcpChaos"
tags: ["chaos"]
---

# register, remove or clear TCP chaos

`PUT /mockserver/tcpChaos`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/tcpChaos`
- Auth: none declared

Registers a TCP-layer chaos / fault-injection profile for a downstream host, removes a host's profile, or clears all TCP chaos. Supply a 'host' with a 'chaos' object to register, 'host' with 'remove':true (or no 'chaos') to remove a single host, or 'clear':true to clear all.

## Request body

- object: TCP chaos registration, removal or clear instruction with 'host', optional 'chaos', 'remove', 'clear' and 'ttlMillis' fields

## Response `200`

chaos registered, removed, patched or cleared

- object

## Other responses

- `400`: invalid request body or invalid chaos profile

---

[API](https://skmtc.dev/mock-server/apis/mockserver-api.md) · [All operations](https://skmtc.dev/mock-server/apis/mockserver-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mock-server/apis/mockserver-api/revisions/9239b693996e?raw)
