POST
/
v1
/
mock-apis
/
{mockApiId}
/
requests
/
remove
Remove requests by criteria
curl --request POST \
  --url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/requests/remove \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "method": "POST",
  "url": "/resource",
  "headers": {
    "Content-Type": {
      "matches": ".*/xml"
    }
  }
}'
{
  "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

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
scheme
enum<string>

The scheme (protocol) part of the request URL

Available options:
http,
https
host
string

The hostname part of the request URL

port
integer

The HTTP port number of the request URL

Required range: 1 <= x <= 65535
method
string

The HTTP request method e.g. GET

url
string

The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.

urlPath
string

The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.

urlPathPattern
string

The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.

urlPattern
string

The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.

pathParameters
object

Path parameter patterns to match against in the <key>: { "<predicate>": "<value>" } form. Can only be used when the urlPathPattern URL match type is in use and all keys must be present as variables in the path template.

queryParameters
object

Query parameter patterns to match against in the <key>: { "<predicate>": "<value>" } form

formParameters
object

application/x-www-form-urlencoded form parameter patterns to match against in the <key>: { "<predicate>": "<value>" } form

headers
object

Header patterns to match against in the <key>: { "<predicate>": "<value>" } form

basicAuthCredentials
object

Pre-emptive basic auth credentials to match against

cookies
object

Cookie patterns to match against in the <key>: { "<predicate>": "<value>" } form

bodyPatterns
(String equals · object | Binary equals · object | String contains · object | String does not contain · object | Regular expression match · object | Negative regular expression match · object | NOT modifier · object | Before datetime · object | JSON equals · object | JSONPath match · object | XML equality · object | XPath match · object | JSON Schema match · object | Absent matcher · object | Logical AND matcher · object | Has exactly multi value matcher · object)[]

Request body patterns to match against in the <key>: { "<predicate>": "<value>" } form

customMatcher
object

Require the state of the Mock API to match the provided patterns. More information on this feature can be found here.

multipartPatterns
object[]

Multipart patterns to match against headers and body.

Response

200 - application/json

Removed request details

The response is of type any.