---
title: "update an existing service-scoped HTTP chaos profile (JSON Merge Patch)"
method: PATCH
path: "/mockserver/serviceChaos"
tags: ["chaos"]
---

# update an existing service-scoped HTTP chaos profile (JSON Merge Patch)

`PATCH /mockserver/serviceChaos`

## Request

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

Applies a JSON Merge Patch to an already-registered service-scoped chaos profile for a host, updating only the supplied fields and leaving the rest unchanged.

## Request body

- ServiceChaosRequest: service-scoped HTTP chaos registration, removal or clear instruction
  - `host` string: downstream host the chaos profile applies to (mutually exclusive with clear)
  - `chaos` object: HTTP chaos profile (fault types, probabilities, error status, etc.); omit (or set remove:true) to remove the host's profile
  - `remove` boolean: when true, removes the named host's chaos profile
  - `clear` boolean: when true, clears all service-scoped chaos (mutually exclusive with host)
  - `ttlMillis` integer: optional time-to-live in milliseconds after which the registration auto-reverts

## Response `200`

chaos profile patched

- object

## Other responses

- `400`: invalid request body, unknown host, 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)
