Skip to main content
PUT
/
v1
/
mock-apis
/
{mockApiId}
/
settings
/
chaos
Update chaos settings
curl --request PUT \
  --url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/settings/chaos \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chaos": {
    "enabled": true,
    "percentageFailures": 13,
    "socketClose": {
      "enabled": true
    },
    "socketReset": {
      "enabled": true
    },
    "invalidHttp": {
      "enabled": false
    },
    "longDelay": {
      "enabled": true,
      "durationMillis": 555
    },
    "httpErrors": [
      {
        "status": 503
      }
    ]
  }
}
'
{
  "chaos": {
    "enabled": true,
    "percentageFailures": 50,
    "socketClose": {
      "enabled": true
    },
    "socketReset": {
      "enabled": true
    },
    "invalidHttp": {
      "enabled": true
    },
    "longDelay": {
      "enabled": true,
      "durationMillis": 123
    },
    "httpErrors": [
      {
        "status": 499
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.wiremock.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your API key prefixed by 'Token '

Path Parameters

mockApiId
string
required

The ID of the Mock API

Required string length: 5 - 10
Example:

"jjl8y"

Body

application/json
chaos
object
required

Chaos testing settings for introducing random failures into mock API responses.

Response

Settings successfully updated

chaos
object

Chaos testing settings for introducing random failures into mock API responses.