Mock APIs
Teams
Organisations
Data sources
Database connections
Usage
Access control
Stub Mappings
- GETGet all stub mappings
- POSTCreate a new stub mapping
- DELDelete all stub mappings
- POSTReset stub mappings
- POSTPersist stub mappings
- POSTImport stub mappings
- GETGet stub mapping by ID
- PUTUpdate a stub mapping
- DELDelete a stub mapping
- POSTFind stub mappings matching metadata
- POSTDelete stub mappings matching metadata
Requests
- GETGet all requests in journal
- DELDelete all requests in journal
- GETGet request by ID
- DELDelete request by ID
- POSTEmpty the request journaldeprecated
- POSTCount requests by criteria
- POSTRemove requests by criteria
- POSTDelete requests mappings matching metadata
- POSTFind requests by criteria
- GETFind unmatched requests
OpenAPI
Imports
Stub Mappings
Update a 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: Basic <encoded-value>' \
--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
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
The ID of the Mock API
Required string length:
5 - 10
Example:
"jjl8y"
The UUID of stub mapping
Body
application/json
Response
200
application/json
The stub mapping
The response is of type object
.
curl --request PUT \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/mappings/{stubMappingId} \
--header 'Authorization: Basic <encoded-value>' \
--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
}
}
Assistant
Responses are generated using AI and may contain mistakes.