Requests
Delete requests mappings matching metadata
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
OpenAPI
Imports
Requests
Delete requests mappings matching metadata
POST
/
v1
/
mock-apis
/
{mockApiId}
/
requests
/
remove-by-metadata
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/requests/remove-by-metadata \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"matchesJsonPath": {
"expression": "$.outer",
"equalToJson": "{ \"inner\": 42 }"
}
}'
{
"requests": [
{
"url": "/my/url",
"absoluteUrl": "http://mydomain.com/my/url",
"method": "GET",
"headers": {
"Accept-Language": "en-us,en;q=0.5",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0",
"Accept": "image/png,image/*;q=0.8,*/*;q=0.5"
},
"body": "",
"browserProxyRequest": true,
"loggedDate": 1339083581823,
"loggedDateString": "2012-06-07 16:39:41"
},
{
"url": "/my/other/url",
"absoluteUrl": "http://my.other.domain.com/my/other/url",
"method": "POST",
"headers": {
"Accept": "text/plain",
"Content-Type": "text/plain"
},
"body": "My text",
"browserProxyRequest": false,
"loggedDate": 1339083581823,
"loggedDateString": "2012-06-07 16:39:41"
}
]
}
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
Response
200 - application/json
Removed request details
The response is of type any
.
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/requests/remove-by-metadata \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"matchesJsonPath": {
"expression": "$.outer",
"equalToJson": "{ \"inner\": 42 }"
}
}'
{
"requests": [
{
"url": "/my/url",
"absoluteUrl": "http://mydomain.com/my/url",
"method": "GET",
"headers": {
"Accept-Language": "en-us,en;q=0.5",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0",
"Accept": "image/png,image/*;q=0.8,*/*;q=0.5"
},
"body": "",
"browserProxyRequest": true,
"loggedDate": 1339083581823,
"loggedDateString": "2012-06-07 16:39:41"
},
{
"url": "/my/other/url",
"absoluteUrl": "http://my.other.domain.com/my/other/url",
"method": "POST",
"headers": {
"Accept": "text/plain",
"Content-Type": "text/plain"
},
"body": "My text",
"browserProxyRequest": false,
"loggedDate": 1339083581823,
"loggedDateString": "2012-06-07 16:39:41"
}
]
}