Mock APIs
Teams
Organisations
Data sources
Database connections
Usage
Access control
Stub Mappings
- GETGet all stub mappings
- POSTCreate a new stub mapping
- DELDelete all stub mappings
- POSTReset stub mappings
- POSTPersist stub mappings
- POSTImport stub mappings
- GETGet stub mapping by ID
- PUTUpdate a stub mapping
- DELDelete a stub mapping
- POSTFind stub mappings matching metadata
- POSTDelete stub mappings matching metadata
Requests
- GETGet all requests in journal
- DELDelete all requests in journal
- GETGet request by ID
- DELDelete request by ID
- POSTEmpty the request journaldeprecated
- POSTCount requests by criteria
- POSTRemove requests by criteria
- POSTDelete requests mappings matching metadata
- POSTFind requests by criteria
- GETFind unmatched requests
OpenAPI
Imports
Recordings
Take a snapshot recording
POST
/
v1
/
mock-apis
/
{mockApiId}
/
recordings
/
snapshot
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/recordings/snapshot \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"filters": {
"urlPathPattern": "/api/.*",
"method": "GET",
"ids": [
"40a93c4a-d378-4e07-8321-6158d5dbcb29"
]
},
"captureHeaders": {
"Accept": {},
"Content-Type": {
"caseInsensitive": true
}
},
"requestBodyPattern": {
"matcher": "equalToJson",
"ignoreArrayOrder": false,
"ignoreExtraElements": true
},
"extractBodyCriteria": {
"textSizeThreshold": "2 kb",
"binarySizeThreshold": "1 Mb"
},
"outputFormat": "FULL",
"persist": false,
"repeatsAsScenarios": false,
"transformers": [
"modify-response-header"
],
"transformerParameters": {
"headerValue": "123"
}
}'
{
"mappings": [
{
"id": "093f1027-e5e0-4921-9e6d-e619dfd5d2c7",
"name": "recordables_123",
"request": {
"url": "/recordables/123",
"method": "GET"
},
"response": {
"status": 200,
"body": "{\n \"message\": \"Congratulations on your first recording!\"\n}",
"headers": {
"Content-Type": "application/json"
}
},
"uuid": "093f1027-e5e0-4921-9e6d-e619dfd5d2c7",
"persistent": true
}
]
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
The ID of the Mock API
Required string length:
5 - 10
Example:
"jjl8y"
Body
application/json
Response
200 - application/json
Successfully took a snapshot recording
The response is of type object
.
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/recordings/snapshot \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"filters": {
"urlPathPattern": "/api/.*",
"method": "GET",
"ids": [
"40a93c4a-d378-4e07-8321-6158d5dbcb29"
]
},
"captureHeaders": {
"Accept": {},
"Content-Type": {
"caseInsensitive": true
}
},
"requestBodyPattern": {
"matcher": "equalToJson",
"ignoreArrayOrder": false,
"ignoreExtraElements": true
},
"extractBodyCriteria": {
"textSizeThreshold": "2 kb",
"binarySizeThreshold": "1 Mb"
},
"outputFormat": "FULL",
"persist": false,
"repeatsAsScenarios": false,
"transformers": [
"modify-response-header"
],
"transformerParameters": {
"headerValue": "123"
}
}'
{
"mappings": [
{
"id": "093f1027-e5e0-4921-9e6d-e619dfd5d2c7",
"name": "recordables_123",
"request": {
"url": "/recordables/123",
"method": "GET"
},
"response": {
"status": 200,
"body": "{\n \"message\": \"Congratulations on your first recording!\"\n}",
"headers": {
"Content-Type": "application/json"
}
},
"uuid": "093f1027-e5e0-4921-9e6d-e619dfd5d2c7",
"persistent": true
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.