curl --request PUT \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/mappings/{stubMappingId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"method": "GET",
"url": "/some/thing"
},
"response": {
"body": "Hello world!",
"headers": {
"Content-Type": "text/plain"
},
"status": 200
}
}
'{
"id": "76ada7b0-49ae-4229-91c4-396a36f18e09",
"priority": 3,
"request": {
"headers": {
"Accept": {
"equalTo": "text/plain"
}
},
"method": "GET",
"url": "/some/thing"
},
"response": {
"body": "Hello world!",
"headers": {
"Content-Type": "text/plain"
},
"status": 200
}
}Stub Mappings
Update a stub mapping
Update an existing stub mapping.
PUT
/
v1
/
mock-apis
/
{mockApiId}
/
mappings
/
{stubMappingId}
curl --request PUT \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/mappings/{stubMappingId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"method": "GET",
"url": "/some/thing"
},
"response": {
"body": "Hello world!",
"headers": {
"Content-Type": "text/plain"
},
"status": 200
}
}
'{
"id": "76ada7b0-49ae-4229-91c4-396a36f18e09",
"priority": 3,
"request": {
"headers": {
"Accept": {
"equalTo": "text/plain"
}
},
"method": "GET",
"url": "/some/thing"
},
"response": {
"body": "Hello world!",
"headers": {
"Content-Type": "text/plain"
},
"status": 200
}
}Authorizations
Your API key prefixed by 'Token '
Path Parameters
Body
application/json
Response
The stub mapping