Skip to main content
PUT
/
v1
/
mock-apis
/
{mockApiId}
/
settings
/
state
Update state settings
curl --request PUT \
  --url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/settings/state \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "state": {
    "defaultContextExpression": "{{request.headers.X-Session-Id}}"
  }
}
'
{
  "state": {
    "defaultContextExpression": "<string>"
  }
}

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
state
object
required

State management settings for the mock API.

Response

Settings successfully updated

state
object

State management settings for the mock API.