{"openapi":"3.0.0","servers":[{"url":"/"}],"info":{"title":"WireMock","version":"2.35.0","x-apisguru-categories":["developer_tools"],"x-origin":[{"format":"openapi","url":"http://wiremock.org/assets/js/wiremock-admin-api.json","version":"3.0"}],"x-providerName":"wiremock.org","x-serviceName":"admin"},"externalDocs":{"description":"WireMock user documentation","url":"http://wiremock.org/docs/"},"tags":[{"description":"Operations on stub mappings","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/stubbing/"},"name":"Stub Mappings"},{"description":"Logged requests and responses received by the mock service","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/verifying/"},"name":"Requests"},{"description":"Near misses allow querying of received requests or request patterns according to similarity","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/verifying/#near-misses"},"name":"Near Misses"},{"description":"Stub mapping record and snapshot functions","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/record-playback/"},"name":"Recordings"},{"description":"Scenarios support modelling of stateful behaviour","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/stateful-behaviour/"},"name":"Scenarios"},{"description":"Global operations","name":"System"}],"paths":{"/__admin/mappings":{"delete":{"responses":{"200":{"description":"Successfully deleted"}},"summary":"Delete all stub mappings","tags":["Stub Mappings"]},"get":{"parameters":[{"description":"The maximum number of results to return","example":10,"in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"The start index of the results to return","example":0,"in":"query","name":"offset","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"mappings":[{"id":"76ada7b0-49ae-4229-91c4-396a36f18e09","request":{"headers":{"Accept":{"equalTo":"application/json"}},"method":"GET","url":"/search?q=things"},"response":{"headers":{"Content-Type":"application/json"},"jsonBody":["thing1","thing2"],"status":200},"uuid":"76ada7b0-49ae-4229-91c4-396a36f18e09"},{"request":{"bodyPatterns":[{"equalToXml":"<stuff />"}],"method":"POST","urlPath":"/some/things"},"response":{"status":201}}],"meta":{"total":2}},"schema":{"additionalProperties":false,"properties":{"mappings":{"items":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"},"type":"array"},"meta":{"properties":{"total":{"example":4,"type":"integer"}},"required":["total"],"type":"object"}},"type":"object"}}},"description":"All stub mappings"}},"summary":"Get all stub mappings","tags":["Stub Mappings"]},"post":{"requestBody":{"content":{"application/json":{"example":{"request":{"method":"GET","url":"/some/thing"},"response":{"body":"Hello world!","headers":{"Content-Type":"text/plain"},"status":200}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"example":{"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}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}},"description":"The stub mapping"}},"summary":"Create a new stub mapping","tags":["Stub Mappings"]}},"/__admin/mappings/find-by-metadata":{"post":{"description":"Find stubs by matching on their metadata","requestBody":{"content":{"application/json":{"example":{"matchesJsonPath":{"equalToJson":"{ \"inner\": 42 }","expression":"$.outer"}},"schema":{"oneOf":[{"properties":{"caseInsensitive":{"type":"boolean"},"equalTo":{"type":"boolean"}},"required":["equalTo"],"title":"String equals","type":"object"},{"properties":{"contains":{"type":"string"}},"required":["contains"],"title":"String contains","type":"object"},{"properties":{"matches":{"type":"string"}},"required":["matches"],"title":"Regular expression match","type":"object"},{"properties":{"doesNotMatch":{"type":"string"}},"required":["doesNotMatch"],"title":"Negative regular expression match","type":"object"},{"properties":{"equalToJson":{"type":"string"}},"required":["equalToJson"],"title":"JSON equals","type":"object"},{"properties":{"ignoreArrayOrder":{"type":"boolean"},"ignoreExtraElements":{"type":"boolean"},"matchesJsonPath":{"type":"string"}},"required":["matchesJsonPath"],"title":"JSONPath match","type":"object"},{"properties":{"equalToXml":{"type":"string"}},"required":["equalToXml"],"title":"XML equality","type":"object"},{"properties":{"matchesXpath":{"type":"string"},"namespaces":{"type":"object"},"valuePattern":{"type":"object"}},"required":["matchesXpath"],"title":"XPath match","type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"mappings":[{"id":"76ada7b0-49ae-4229-91c4-396a36f18e09","request":{"headers":{"Accept":{"equalTo":"application/json"}},"method":"GET","url":"/search?q=things"},"response":{"headers":{"Content-Type":"application/json"},"jsonBody":["thing1","thing2"],"status":200},"uuid":"76ada7b0-49ae-4229-91c4-396a36f18e09"},{"request":{"bodyPatterns":[{"equalToXml":"<stuff />"}],"method":"POST","urlPath":"/some/things"},"response":{"status":201}}],"meta":{"total":2}},"schema":{"additionalProperties":false,"properties":{"mappings":{"items":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"},"type":"array"},"meta":{"properties":{"total":{"example":4,"type":"integer"}},"required":["total"],"type":"object"}},"type":"object"}}},"description":"Matched stub mappings"}},"tags":["Stub Mappings"]}},"/__admin/mappings/import":{"post":{"description":"Import given stub mappings to the backing store","responses":{"200":{"description":"Successfully imported"}},"summary":"Import stub mappings","tags":["Stub Mappings"]}},"/__admin/mappings/remove-by-metadata":{"post":{"requestBody":{"content":{"application/json":{"example":{"matchesJsonPath":{"equalToJson":"{ \"inner\": 42 }","expression":"$.outer"}},"schema":{"oneOf":[{"properties":{"caseInsensitive":{"type":"boolean"},"equalTo":{"type":"boolean"}},"required":["equalTo"],"title":"String equals","type":"object"},{"properties":{"contains":{"type":"string"}},"required":["contains"],"title":"String contains","type":"object"},{"properties":{"matches":{"type":"string"}},"required":["matches"],"title":"Regular expression match","type":"object"},{"properties":{"doesNotMatch":{"type":"string"}},"required":["doesNotMatch"],"title":"Negative regular expression match","type":"object"},{"properties":{"equalToJson":{"type":"string"}},"required":["equalToJson"],"title":"JSON equals","type":"object"},{"properties":{"ignoreArrayOrder":{"type":"boolean"},"ignoreExtraElements":{"type":"boolean"},"matchesJsonPath":{"type":"string"}},"required":["matchesJsonPath"],"title":"JSONPath match","type":"object"},{"properties":{"equalToXml":{"type":"string"}},"required":["equalToXml"],"title":"XML equality","type":"object"},{"properties":{"matchesXpath":{"type":"string"},"namespaces":{"type":"object"},"valuePattern":{"type":"object"}},"required":["matchesXpath"],"title":"XPath match","type":"object"}]}}}},"responses":{"200":{"description":"The stub mappings were successfully removed"}},"summary":"Delete stub mappings matching metadata","tags":["Stub Mappings"]}},"/__admin/mappings/reset":{"post":{"description":"Restores stub mappings to the defaults defined back in the backing store","responses":{"200":{"description":"Successfully reset"}},"summary":"Reset stub mappings","tags":["Stub Mappings"]}},"/__admin/mappings/save":{"post":{"description":"Save all persistent stub mappings to the backing store","responses":{"200":{"description":"Successfully saved"}},"summary":"Persist stub mappings","tags":["Stub Mappings"]}},"/__admin/mappings/{stubMappingId}":{"delete":{"responses":{"200":{"description":"OK"},"404":{"description":"Stub mapping not found"}},"summary":"Delete a stub mapping","tags":["Stub Mappings"]},"get":{"responses":{"200":{"content":{"application/json":{"example":{"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}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}},"description":"The stub mapping"},"404":{"description":"Stub mapping not found"}},"summary":"Get stub mapping by ID","tags":["Stub Mappings"]},"parameters":[{"description":"The UUID of stub mapping","example":"730d3e32-d098-4169-a20c-554c3bedce58","in":"path","name":"stubMappingId","required":true,"schema":{"type":"string"}}],"put":{"requestBody":{"content":{"application/json":{"example":{"request":{"method":"GET","url":"/some/thing"},"response":{"body":"Hello world!","headers":{"Content-Type":"text/plain"},"status":200}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"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}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}},"description":"The stub mapping"},"404":{"description":"Stub mapping not found"}},"summary":"Update a stub mapping","tags":["Stub Mappings"]}},"/__admin/near-misses/request":{"post":{"description":"Find at most 3 near misses for closest stub mappings to the specified request","requestBody":{"content":{"application/json":{"example":{"absoluteUrl":"http://localhost:8080/actual","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"0:0:0:0:0:0:0:1","cookies":{},"headers":{"Accept":"*/*","Host":"localhost:8080","User-Agent":"curl/7.30.0"},"loggedDate":1467402464520,"loggedDateString":"2025-06-15T13:48:49.549Z","method":"GET","url":"/actual"},"schema":{"properties":{"absoluteUrl":{"description":"The full URL to match against","example":"http://localhost:56738/received-request/2","type":"string"},"body":{"description":"Body string to match against","example":"Hello world","type":"string"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{},"type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{"Connection":"keep-alive","Host":"localhost:56738","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"type":"object"},"method":{"description":"The HTTP request method","example":"GET","type":"string"},"url":{"description":"The path and query to match exactly against","example":"/received-request/2","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"nearMisses":[{"matchResult":{"distance":0.06944444444444445},"request":{"absoluteUrl":"http://localhost:8080/nomatch","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"0:0:0:0:0:0:0:1","cookies":{},"headers":{"Accept":"*/*","Host":"localhost:8080","User-Agent":"curl/7.30.0"},"loggedDate":1467402464520,"loggedDateString":"2025-06-15T13:48:49.549Z","method":"GET","url":"/nomatch"},"requestPattern":{"method":"GET","url":"/almostmatch"}}]},"schema":{"properties":{"nearMisses":{"items":{"properties":{"absoluteUrl":{"description":"The full URL to match against","example":"http://localhost:56738/received-request/2","type":"string"},"body":{"description":"Body string to match against","example":"Hello world","type":"string"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{},"type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{"Connection":"keep-alive","Host":"localhost:56738","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"type":"object"},"method":{"description":"The HTTP request method","example":"GET","type":"string"},"url":{"description":"The path and query to match exactly against","example":"/received-request/2","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Near misses matching criteria"}},"summary":"Find near misses matching specific request","tags":["Near Misses"]}},"/__admin/near-misses/request-pattern":{"post":{"description":"Find at most 3 near misses for closest logged requests to the specified request pattern","requestBody":{"content":{"application/json":{"example":{"headers":{"Content-Type":{"matches":".*/xml"}},"method":"POST","url":"/resource"},"schema":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"nearMisses":[{"matchResult":{"distance":0.06944444444444445},"request":{"absoluteUrl":"http://localhost:8080/nomatch","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"0:0:0:0:0:0:0:1","cookies":{},"headers":{"Accept":"*/*","Host":"localhost:8080","User-Agent":"curl/7.30.0"},"loggedDate":1467402464520,"loggedDateString":"2025-06-15T13:48:49.549Z","method":"GET","url":"/nomatch"},"requestPattern":{"method":"GET","url":"/almostmatch"}}]},"schema":{"properties":{"nearMisses":{"items":{"properties":{"absoluteUrl":{"description":"The full URL to match against","example":"http://localhost:56738/received-request/2","type":"string"},"body":{"description":"Body string to match against","example":"Hello world","type":"string"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{},"type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{"Connection":"keep-alive","Host":"localhost:56738","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"type":"object"},"method":{"description":"The HTTP request method","example":"GET","type":"string"},"url":{"description":"The path and query to match exactly against","example":"/received-request/2","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Near misses matching criteria"}},"summary":"Find near misses matching request pattern","tags":["Near Misses"]}},"/__admin/recordings/snapshot":{"post":{"requestBody":{"content":{"application/json":{"example":{"captureHeaders":{"Accept":{},"Content-Type":{"caseInsensitive":true}},"extractBodyCriteria":{"binarySizeThreshold":"1 Mb","textSizeThreshold":"2 kb"},"filters":{"ids":["40a93c4a-d378-4e07-8321-6158d5dbcb29"],"method":"GET","urlPathPattern":"/api/.*"},"outputFormat":"FULL","persist":false,"repeatsAsScenarios":false,"requestBodyPattern":{"ignoreArrayOrder":false,"ignoreExtraElements":true,"matcher":"equalToJson"},"transformerParameters":{"headerValue":"123"},"transformers":["modify-response-header"]},"schema":{"allOf":[{"properties":{"captureHeaders":{"additionalProperties":{"additionalProperties":false,"properties":{"caseInsensitive":{"type":"boolean"}},"type":"object"},"description":"Headers from the request to include in the generated stub mappings, mapped to parameter objects. The only parameter available is \"caseInsensitive\", which defaults to false","example":{"Accept":{},"Content-Type":{"caseInsensitive":true}},"type":"object"},"extractBodyCriteria":{"description":"Criteria for extracting response bodies to a separate file instead of including it in the stub mapping","example":[{"binarySizeThreshold":"1 Mb","textSizeThreshold":"2 kb"}],"properties":{"binarySizeThreshold":{"default":"0","description":"Size threshold for extracting binary response bodies. Supports humanized size strings, e.g. \"56 Mb\". Default unit is bytes.","example":"18.2 GB","type":"string"},"textSizeThreshold":{"default":"0","description":"Size threshold for extracting binary response bodies. Supports humanized size strings, e.g. \"56 Mb\". Default unit is bytes.","example":"18.2 GB","type":"string"}},"type":"object"},"persist":{"default":true,"description":"Whether to save stub mappings to the file system or just return them","type":"boolean"},"repeatsAsScenarios":{"default":true,"description":"When true, duplicate requests will be added to a Scenario. When false, duplicates are discarded","type":"boolean"},"requestBodyPattern":{"description":"Control the request body matcher used in generated stub mappings","oneOf":[{"description":"Automatically determine matcher based on content type (the default)","properties":{"caseInsensitive":{"default":false,"description":"If equalTo is used, match body use case-insensitive string comparison","type":"boolean"},"ignoreArrayOrder":{"default":true,"description":"If equalToJson is used, ignore order of array elements","type":"boolean"},"ignoreExtraElements":{"default":true,"description":"If equalToJson is used, matcher ignores extra elements in objects","type":"boolean"},"matcher":{"enum":["auto"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalTo","properties":{"caseInsensitive":{"default":false,"description":"Match body using case-insensitive string comparison","type":"boolean"},"matcher":{"enum":["equalTo"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalToJson","properties":{"ignoreArrayOrder":{"default":true,"description":"Ignore order of array elements","type":"boolean"},"ignoreExtraElements":{"default":true,"description":"Ignore extra elements in objects","type":"boolean"},"matcher":{"enum":["equalToJson"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalToXml","properties":{"matcher":{"enum":["equalToXml"],"type":"string"}},"type":"object"}],"type":"object"},"transformerParameters":{"description":"List of names of stub mappings transformers to apply to generated stubs","type":"object"},"transformers":{"description":"Parameters to pass to stub mapping transformers","items":{"type":"string"},"type":"array"}},"type":"object"},{"properties":{"filters":{"allOf":[{"description":"Filter requests for which to create stub mapping","properties":{"ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"}],"type":"object"}}}],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"mappings":[{"id":"093f1027-e5e0-4921-9e6d-e619dfd5d2c7","name":"recordables_123","persistent":true,"request":{"method":"GET","url":"/recordables/123"},"response":{"body":"{\n  \"message\": \"Congratulations on your first recording!\"\n}","headers":{"Content-Type":"application/json"},"status":200},"uuid":"093f1027-e5e0-4921-9e6d-e619dfd5d2c7"}]},"schema":{"additionalProperties":false,"properties":{"mappings":{"items":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"},"type":"array"},"meta":{"properties":{"total":{"example":4,"type":"integer"}},"required":["total"],"type":"object"}},"type":"object"}}},"description":"Successfully took a snapshot recording"}},"summary":"Take a snapshot recording","tags":["Recordings"]}},"/__admin/recordings/start":{"post":{"description":"Begin recording stub mappings","requestBody":{"content":{"application/json":{"example":{"captureHeaders":{"Accept":{},"Content-Type":{"caseInsensitive":true}},"extractBodyCriteria":{"binarySizeThreshold":"10240","textSizeThreshold":"2048"},"filters":{"method":"GET","urlPathPattern":"/api/.*"},"persist":false,"repeatsAsScenarios":false,"requestBodyPattern":{"ignoreArrayOrder":false,"ignoreExtraElements":true,"matcher":"equalToJson"},"targetBaseUrl":"http://example.mocklab.io","transformerParameters":{"headerValue":"123"},"transformers":["modify-response-header"]},"schema":{"allOf":[{"properties":{"captureHeaders":{"additionalProperties":{"additionalProperties":false,"properties":{"caseInsensitive":{"type":"boolean"}},"type":"object"},"description":"Headers from the request to include in the generated stub mappings, mapped to parameter objects. The only parameter available is \"caseInsensitive\", which defaults to false","example":{"Accept":{},"Content-Type":{"caseInsensitive":true}},"type":"object"},"extractBodyCriteria":{"description":"Criteria for extracting response bodies to a separate file instead of including it in the stub mapping","example":[{"binarySizeThreshold":"1 Mb","textSizeThreshold":"2 kb"}],"properties":{"binarySizeThreshold":{"default":"0","description":"Size threshold for extracting binary response bodies. Supports humanized size strings, e.g. \"56 Mb\". Default unit is bytes.","example":"18.2 GB","type":"string"},"textSizeThreshold":{"default":"0","description":"Size threshold for extracting binary response bodies. Supports humanized size strings, e.g. \"56 Mb\". Default unit is bytes.","example":"18.2 GB","type":"string"}},"type":"object"},"persist":{"default":true,"description":"Whether to save stub mappings to the file system or just return them","type":"boolean"},"repeatsAsScenarios":{"default":true,"description":"When true, duplicate requests will be added to a Scenario. When false, duplicates are discarded","type":"boolean"},"requestBodyPattern":{"description":"Control the request body matcher used in generated stub mappings","oneOf":[{"description":"Automatically determine matcher based on content type (the default)","properties":{"caseInsensitive":{"default":false,"description":"If equalTo is used, match body use case-insensitive string comparison","type":"boolean"},"ignoreArrayOrder":{"default":true,"description":"If equalToJson is used, ignore order of array elements","type":"boolean"},"ignoreExtraElements":{"default":true,"description":"If equalToJson is used, matcher ignores extra elements in objects","type":"boolean"},"matcher":{"enum":["auto"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalTo","properties":{"caseInsensitive":{"default":false,"description":"Match body using case-insensitive string comparison","type":"boolean"},"matcher":{"enum":["equalTo"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalToJson","properties":{"ignoreArrayOrder":{"default":true,"description":"Ignore order of array elements","type":"boolean"},"ignoreExtraElements":{"default":true,"description":"Ignore extra elements in objects","type":"boolean"},"matcher":{"enum":["equalToJson"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalToXml","properties":{"matcher":{"enum":["equalToXml"],"type":"string"}},"type":"object"}],"type":"object"},"transformerParameters":{"description":"List of names of stub mappings transformers to apply to generated stubs","type":"object"},"transformers":{"description":"Parameters to pass to stub mapping transformers","items":{"type":"string"},"type":"array"}},"type":"object"},{"properties":{"filters":{"allOf":[{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},{"description":"Filter requests for which to create stub mapping"}]},"targetBaseUrl":{"description":"Target URL when using the record and playback API","example":"http://example.mocklab.io","type":"string"}}}]}}},"required":true},"responses":{"200":{"description":"Successfully started recording"}},"summary":"Start recording","tags":["Recordings"]}},"/__admin/recordings/status":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"enum":["NeverStarted","Recording","Stopped"],"example":"Stopped","type":"string"}},"type":"object"}}},"description":"Successfully got the record status"}},"summary":"Get recording status","tags":["Recordings"]}},"/__admin/recordings/stop":{"post":{"description":"End recording of stub mappings","responses":{"200":{"content":{"application/json":{"example":{"mappings":[{"id":"093f1027-e5e0-4921-9e6d-e619dfd5d2c7","name":"recordables_123","persistent":true,"request":{"method":"GET","url":"/recordables/123"},"response":{"body":"{\n  \"message\": \"Congratulations on your first recording!\"\n}","headers":{"Content-Type":"application/json"},"status":200},"uuid":"093f1027-e5e0-4921-9e6d-e619dfd5d2c7"}]},"schema":{"additionalProperties":false,"properties":{"mappings":{"items":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"},"type":"array"},"meta":{"properties":{"total":{"example":4,"type":"integer"}},"required":["total"],"type":"object"}},"type":"object"}}},"description":"Successfully stopped recording"}},"summary":"Stop recording","tags":["Recordings"]}},"/__admin/requests":{"delete":{"responses":{"200":{"description":"Successfully deleted"}},"summary":"Delete all requests in journal","tags":["Requests"]},"get":{"parameters":[{"description":"The maximum number of results to return","example":10,"in":"query","name":"limit","schema":{"type":"string"}},{"description":"Only return logged requests after this date","example":"2025-06-15T13:48:49.552Z","in":"query","name":"since","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"meta":{"total":9},"requestJournalDisabled":false,"requests":[{"id":"45760a03-eebb-4387-ad0d-bb89b5d3d662","request":{"absoluteUrl":"http://localhost:56715/received-request/9","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"127.0.0.1","cookies":{},"headers":{"Connection":"keep-alive","Host":"localhost:56715","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"loggedDate":1471442494809,"loggedDateString":"2025-06-15T13:48:49.552Z","method":"GET","url":"/received-request/9"},"responseDefinition":{"fromConfiguredStub":false,"status":404,"transformerParameters":{},"transformers":[]}},{"id":"6ae78311-0178-46c9-987a-fbfc528d54d8","request":{"absoluteUrl":"http://localhost:56715/received-request/8","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"127.0.0.1","cookies":{},"headers":{"Connection":"keep-alive","Host":"localhost:56715","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"loggedDate":1471442494802,"loggedDateString":"2025-06-15T13:48:49.552Z","method":"GET","url":"/received-request/8"},"responseDefinition":{"fromConfiguredStub":false,"status":404,"transformerParameters":{},"transformers":[]}},{"id":"aba8e4ad-1b5b-4518-8f05-b2170a24de35","request":{"absoluteUrl":"http://localhost:56715/received-request/7","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"127.0.0.1","cookies":{},"headers":{"Connection":"keep-alive","Host":"localhost:56715","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"loggedDate":1471442494795,"loggedDateString":"2025-06-15T13:48:49.552Z","method":"GET","url":"/received-request/7"},"responseDefinition":{"fromConfiguredStub":false,"status":404,"transformerParameters":{},"transformers":[]}}]}}},"description":"List of received requests"}},"summary":"Get all requests in journal","tags":["Requests"]}},"/__admin/requests/count":{"post":{"description":"Count requests logged in the journal matching the specified criteria","requestBody":{"content":{"application/json":{"example":{"headers":{"Content-Type":{"matches":".*/xml"}},"method":"POST","url":"/resource"},"schema":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"count":{"example":4,"type":"integer"}},"type":"object"}}},"description":"Number of matching requests"}},"summary":"Count requests by criteria","tags":["Requests"]}},"/__admin/requests/find":{"post":{"description":"Retrieve details of requests logged in the journal matching the specified criteria","requestBody":{"content":{"application/json":{"example":{"headers":{"Content-Type":{"matches":".*/xml"}},"method":"POST","url":"/resource"},"schema":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"requests":[{"absoluteUrl":"http://mydomain.com/my/url","body":"","browserProxyRequest":true,"headers":{"Accept":"image/png,image/*;q=0.8,*/*;q=0.5","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"},"loggedDate":1339083581823,"loggedDateString":"2025-06-15T13:48:49.552Z","method":"GET","url":"/my/url"},{"absoluteUrl":"http://my.other.domain.com/my/other/url","body":"My text","browserProxyRequest":false,"headers":{"Accept":"text/plain","Content-Type":"text/plain"},"loggedDate":1339083581823,"loggedDateString":"2025-06-15T13:48:49.552Z","method":"POST","url":"/my/other/url"}]}}},"description":"Matching request details"}},"summary":"Find requests by criteria","tags":["Requests"]}},"/__admin/requests/remove":{"post":{"description":"Removed requests logged in the journal matching the specified criteria","requestBody":{"content":{"application/json":{"example":{"headers":{"Content-Type":{"matches":".*/xml"}},"method":"POST","url":"/resource"},"schema":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"requests":[{"absoluteUrl":"http://mydomain.com/my/url","body":"","browserProxyRequest":true,"headers":{"Accept":"image/png,image/*;q=0.8,*/*;q=0.5","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"},"loggedDate":1339083581823,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"GET","url":"/my/url"},{"absoluteUrl":"http://my.other.domain.com/my/other/url","body":"My text","browserProxyRequest":false,"headers":{"Accept":"text/plain","Content-Type":"text/plain"},"loggedDate":1339083581823,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"POST","url":"/my/other/url"}]}}},"description":"Removed request details"}},"summary":"Remove requests by criteria","tags":["Requests"]}},"/__admin/requests/remove-by-metadata":{"post":{"requestBody":{"content":{"application/json":{"example":{"matchesJsonPath":{"equalToJson":"{ \"inner\": 42 }","expression":"$.outer"}},"schema":{"oneOf":[{"properties":{"caseInsensitive":{"type":"boolean"},"equalTo":{"type":"boolean"}},"required":["equalTo"],"title":"String equals","type":"object"},{"properties":{"contains":{"type":"string"}},"required":["contains"],"title":"String contains","type":"object"},{"properties":{"matches":{"type":"string"}},"required":["matches"],"title":"Regular expression match","type":"object"},{"properties":{"doesNotMatch":{"type":"string"}},"required":["doesNotMatch"],"title":"Negative regular expression match","type":"object"},{"properties":{"equalToJson":{"type":"string"}},"required":["equalToJson"],"title":"JSON equals","type":"object"},{"properties":{"ignoreArrayOrder":{"type":"boolean"},"ignoreExtraElements":{"type":"boolean"},"matchesJsonPath":{"type":"string"}},"required":["matchesJsonPath"],"title":"JSONPath match","type":"object"},{"properties":{"equalToXml":{"type":"string"}},"required":["equalToXml"],"title":"XML equality","type":"object"},{"properties":{"matchesXpath":{"type":"string"},"namespaces":{"type":"object"},"valuePattern":{"type":"object"}},"required":["matchesXpath"],"title":"XPath match","type":"object"}]}}}},"responses":{"200":{"content":{"application/json":{"example":{"requests":[{"absoluteUrl":"http://mydomain.com/my/url","body":"","browserProxyRequest":true,"headers":{"Accept":"image/png,image/*;q=0.8,*/*;q=0.5","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"},"loggedDate":1339083581823,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"GET","url":"/my/url"},{"absoluteUrl":"http://my.other.domain.com/my/other/url","body":"My text","browserProxyRequest":false,"headers":{"Accept":"text/plain","Content-Type":"text/plain"},"loggedDate":1339083581823,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"POST","url":"/my/other/url"}]}}},"description":"Removed request details"}},"summary":"Delete requests mappings matching metadata","tags":["Requests"]}},"/__admin/requests/reset":{"post":{"deprecated":true,"responses":{"200":{"description":"Successfully reset"}},"summary":"Empty the request journal","tags":["Requests"]}},"/__admin/requests/unmatched":{"get":{"description":"Get details of logged requests that weren't matched by any stub mapping","responses":{"200":{"content":{"application/json":{"example":{"requests":[{"absoluteUrl":"http://mydomain.com/my/url","body":"","browserProxyRequest":true,"headers":{"Accept":"image/png,image/*;q=0.8,*/*;q=0.5","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"},"loggedDate":1339083581823,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"GET","url":"/my/url"},{"absoluteUrl":"http://my.other.domain.com/my/other/url","body":"My text","browserProxyRequest":false,"headers":{"Accept":"text/plain","Content-Type":"text/plain"},"loggedDate":1339083581823,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"POST","url":"/my/other/url"}]}}},"description":"Unmatched request details"}},"summary":"Find unmatched requests","tags":["Requests"]}},"/__admin/requests/unmatched/near-misses":{"get":{"description":"Retrieve near-misses for all unmatched requests","responses":{"200":{"content":{"application/json":{"example":{"nearMisses":[{"matchResult":{"distance":0.06944444444444445},"request":{"absoluteUrl":"http://localhost:8080/nomatch","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"0:0:0:0:0:0:0:1","cookies":{},"headers":{"Accept":"*/*","Host":"localhost:8080","User-Agent":"curl/7.30.0"},"loggedDate":1467402464520,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"GET","url":"/nomatch"},"requestPattern":{"method":"GET","url":"/almostmatch"}}]},"schema":{"properties":{"nearMisses":{"items":{"properties":{"absoluteUrl":{"description":"The full URL to match against","example":"http://localhost:56738/received-request/2","type":"string"},"body":{"description":"Body string to match against","example":"Hello world","type":"string"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{},"type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{"Connection":"keep-alive","Host":"localhost:56738","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"type":"object"},"method":{"description":"The HTTP request method","example":"GET","type":"string"},"url":{"description":"The path and query to match exactly against","example":"/received-request/2","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Near misses matching criteria"}},"tags":["Near Misses"]}},"/__admin/requests/{requestId}":{"delete":{"parameters":[{"description":"The UUID of the logged request","example":"12fb14bb-600e-4bfa-bd8d-be7f12562c99","in":"path","name":"requestId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted"}},"summary":"Delete request by ID","tags":["Requests"]},"get":{"parameters":[{"description":"The UUID of the logged request","example":"12fb14bb-600e-4bfa-bd8d-be7f12562c99","in":"path","name":"requestId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"id":"12fb14bb-600e-4bfa-bd8d-be7f12562c99","request":{"absoluteUrl":"http://localhost:56738/received-request/2","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"127.0.0.1","cookies":{},"headers":{"Connection":"keep-alive","Host":"localhost:56738","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"loggedDate":1471442557047,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"GET","url":"/received-request/2"},"responseDefinition":{"fromConfiguredStub":false,"status":404,"transformerParameters":{},"transformers":[]}}}},"description":"OK"},"404":{"description":"Request not found"}},"summary":"Get request by ID","tags":["Requests"]}},"/__admin/reset":{"post":{"description":"Reset mappings to the default state and reset the request journal","responses":{"200":{"description":"Successfully reset"}},"summary":"Reset mappings and request journal","tags":["System"]}},"/__admin/scenarios":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"scenarios":{"items":{"properties":{"id":{"description":"The scenario ID","example":"c8d249ec-d86d-48b1-88a8-a660e6848042","type":"string"},"name":{"description":"The scenario name","example":"my_scenario","type":"string"},"possibleStates":{"example":["Started","state_1","state_2"],"items":{"default":"Started","description":"All the states this scenario can be in","type":"string"},"type":"array"},"state":{"default":"Started","description":"The current state of this scenario","example":"state_2","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"All scenarios"}},"summary":"Get all scenarios","tags":["Scenarios"]}},"/__admin/scenarios/reset":{"post":{"responses":{"200":{"description":"Successfully reset"}},"summary":"Reset the state of all scenarios","tags":["Scenarios"]}},"/__admin/settings":{"post":{"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},{"example":{"fixedDelay":500},"properties":{"fixedDelay":{"type":"number"}},"type":"object"}]}}},"required":true},"responses":{"200":{"description":"Settings successfully updated"}},"summary":"Update global settings","tags":["System"]}},"/__admin/shutdown":{"post":{"description":"Shutdown the WireMock server","responses":{"200":{"description":"Server will be shut down"}},"tags":["System"]}}},"components":{"requestBodies":{"requestPattern":{"content":{"application/json":{"example":{"headers":{"Content-Type":{"matches":".*/xml"}},"method":"POST","url":"/resource"},"schema":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"}}},"required":true},"snapshotRecording":{"content":{"application/json":{"example":{"captureHeaders":{"Accept":{},"Content-Type":{"caseInsensitive":true}},"extractBodyCriteria":{"binarySizeThreshold":"1 Mb","textSizeThreshold":"2 kb"},"filters":{"ids":["40a93c4a-d378-4e07-8321-6158d5dbcb29"],"method":"GET","urlPathPattern":"/api/.*"},"outputFormat":"FULL","persist":false,"repeatsAsScenarios":false,"requestBodyPattern":{"ignoreArrayOrder":false,"ignoreExtraElements":true,"matcher":"equalToJson"},"transformerParameters":{"headerValue":"123"},"transformers":["modify-response-header"]},"schema":{"allOf":[{"properties":{"captureHeaders":{"additionalProperties":{"additionalProperties":false,"properties":{"caseInsensitive":{"type":"boolean"}},"type":"object"},"description":"Headers from the request to include in the generated stub mappings, mapped to parameter objects. The only parameter available is \"caseInsensitive\", which defaults to false","example":{"Accept":{},"Content-Type":{"caseInsensitive":true}},"type":"object"},"extractBodyCriteria":{"description":"Criteria for extracting response bodies to a separate file instead of including it in the stub mapping","example":[{"binarySizeThreshold":"1 Mb","textSizeThreshold":"2 kb"}],"properties":{"binarySizeThreshold":{"default":"0","description":"Size threshold for extracting binary response bodies. Supports humanized size strings, e.g. \"56 Mb\". Default unit is bytes.","example":"18.2 GB","type":"string"},"textSizeThreshold":{"default":"0","description":"Size threshold for extracting binary response bodies. Supports humanized size strings, e.g. \"56 Mb\". Default unit is bytes.","example":"18.2 GB","type":"string"}},"type":"object"},"persist":{"default":true,"description":"Whether to save stub mappings to the file system or just return them","type":"boolean"},"repeatsAsScenarios":{"default":true,"description":"When true, duplicate requests will be added to a Scenario. When false, duplicates are discarded","type":"boolean"},"requestBodyPattern":{"description":"Control the request body matcher used in generated stub mappings","oneOf":[{"description":"Automatically determine matcher based on content type (the default)","properties":{"caseInsensitive":{"default":false,"description":"If equalTo is used, match body use case-insensitive string comparison","type":"boolean"},"ignoreArrayOrder":{"default":true,"description":"If equalToJson is used, ignore order of array elements","type":"boolean"},"ignoreExtraElements":{"default":true,"description":"If equalToJson is used, matcher ignores extra elements in objects","type":"boolean"},"matcher":{"enum":["auto"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalTo","properties":{"caseInsensitive":{"default":false,"description":"Match body using case-insensitive string comparison","type":"boolean"},"matcher":{"enum":["equalTo"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalToJson","properties":{"ignoreArrayOrder":{"default":true,"description":"Ignore order of array elements","type":"boolean"},"ignoreExtraElements":{"default":true,"description":"Ignore extra elements in objects","type":"boolean"},"matcher":{"enum":["equalToJson"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalToXml","properties":{"matcher":{"enum":["equalToXml"],"type":"string"}},"type":"object"}],"type":"object"},"transformerParameters":{"description":"List of names of stub mappings transformers to apply to generated stubs","type":"object"},"transformers":{"description":"Parameters to pass to stub mapping transformers","items":{"type":"string"},"type":"array"}},"type":"object"},{"properties":{"filters":{"allOf":[{"description":"Filter requests for which to create stub mapping","properties":{"ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"}],"type":"object"}}}],"type":"object"}}},"required":true},"startRecording":{"content":{"application/json":{"example":{"captureHeaders":{"Accept":{},"Content-Type":{"caseInsensitive":true}},"extractBodyCriteria":{"binarySizeThreshold":"10240","textSizeThreshold":"2048"},"filters":{"method":"GET","urlPathPattern":"/api/.*"},"persist":false,"repeatsAsScenarios":false,"requestBodyPattern":{"ignoreArrayOrder":false,"ignoreExtraElements":true,"matcher":"equalToJson"},"targetBaseUrl":"http://example.mocklab.io","transformerParameters":{"headerValue":"123"},"transformers":["modify-response-header"]},"schema":{"allOf":[{"properties":{"captureHeaders":{"additionalProperties":{"additionalProperties":false,"properties":{"caseInsensitive":{"type":"boolean"}},"type":"object"},"description":"Headers from the request to include in the generated stub mappings, mapped to parameter objects. The only parameter available is \"caseInsensitive\", which defaults to false","example":{"Accept":{},"Content-Type":{"caseInsensitive":true}},"type":"object"},"extractBodyCriteria":{"description":"Criteria for extracting response bodies to a separate file instead of including it in the stub mapping","example":[{"binarySizeThreshold":"1 Mb","textSizeThreshold":"2 kb"}],"properties":{"binarySizeThreshold":{"default":"0","description":"Size threshold for extracting binary response bodies. Supports humanized size strings, e.g. \"56 Mb\". Default unit is bytes.","example":"18.2 GB","type":"string"},"textSizeThreshold":{"default":"0","description":"Size threshold for extracting binary response bodies. Supports humanized size strings, e.g. \"56 Mb\". Default unit is bytes.","example":"18.2 GB","type":"string"}},"type":"object"},"persist":{"default":true,"description":"Whether to save stub mappings to the file system or just return them","type":"boolean"},"repeatsAsScenarios":{"default":true,"description":"When true, duplicate requests will be added to a Scenario. When false, duplicates are discarded","type":"boolean"},"requestBodyPattern":{"description":"Control the request body matcher used in generated stub mappings","oneOf":[{"description":"Automatically determine matcher based on content type (the default)","properties":{"caseInsensitive":{"default":false,"description":"If equalTo is used, match body use case-insensitive string comparison","type":"boolean"},"ignoreArrayOrder":{"default":true,"description":"If equalToJson is used, ignore order of array elements","type":"boolean"},"ignoreExtraElements":{"default":true,"description":"If equalToJson is used, matcher ignores extra elements in objects","type":"boolean"},"matcher":{"enum":["auto"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalTo","properties":{"caseInsensitive":{"default":false,"description":"Match body using case-insensitive string comparison","type":"boolean"},"matcher":{"enum":["equalTo"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalToJson","properties":{"ignoreArrayOrder":{"default":true,"description":"Ignore order of array elements","type":"boolean"},"ignoreExtraElements":{"default":true,"description":"Ignore extra elements in objects","type":"boolean"},"matcher":{"enum":["equalToJson"],"type":"string"}},"type":"object"},{"description":"Always match request bodies using equalToXml","properties":{"matcher":{"enum":["equalToXml"],"type":"string"}},"type":"object"}],"type":"object"},"transformerParameters":{"description":"List of names of stub mappings transformers to apply to generated stubs","type":"object"},"transformers":{"description":"Parameters to pass to stub mapping transformers","items":{"type":"string"},"type":"array"}},"type":"object"},{"properties":{"filters":{"allOf":[{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},{"description":"Filter requests for which to create stub mapping"}]},"targetBaseUrl":{"description":"Target URL when using the record and playback API","example":"http://example.mocklab.io","type":"string"}}}]}}},"required":true},"stubMapping":{"content":{"application/json":{"example":{"request":{"method":"GET","url":"/some/thing"},"response":{"body":"Hello world!","headers":{"Content-Type":"text/plain"},"status":200}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}}}},"responses":{"nearMisses":{"content":{"application/json":{"example":{"nearMisses":[{"matchResult":{"distance":0.06944444444444445},"request":{"absoluteUrl":"http://localhost:8080/nomatch","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"0:0:0:0:0:0:0:1","cookies":{},"headers":{"Accept":"*/*","Host":"localhost:8080","User-Agent":"curl/7.30.0"},"loggedDate":1467402464520,"loggedDateString":"2025-06-15T13:48:49.553Z","method":"GET","url":"/nomatch"},"requestPattern":{"method":"GET","url":"/almostmatch"}}]},"schema":{"properties":{"nearMisses":{"items":{"properties":{"absoluteUrl":{"description":"The full URL to match against","example":"http://localhost:56738/received-request/2","type":"string"},"body":{"description":"Body string to match against","example":"Hello world","type":"string"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{},"type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{"Connection":"keep-alive","Host":"localhost:56738","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"type":"object"},"method":{"description":"The HTTP request method","example":"GET","type":"string"},"url":{"description":"The path and query to match exactly against","example":"/received-request/2","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Near misses matching criteria"},"stubMapping":{"content":{"application/json":{"example":{"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}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}},"description":"The stub mapping"}}}}