curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports \
--header 'Authorization: <api-key>' \
--header 'Content-Type: */*' \
--data '
{
"mappings": [
{
"id": "<string>",
"uuid": "<string>",
"name": "<string>",
"request": "{\n \"urlPath\" : \"/charges\",\n \"method\" : \"POST\",\n \"headers\" : {\n \"Content-Type\" : {\n \"equalTo\" : \"application/json\"\n }\n }\n",
"response": {
"status": 123,
"statusMessage": "<string>",
"headers": {},
"additionalProxyRequestHeaders": {},
"removeProxyRequestHeaders": [
"<string>"
],
"body": "<string>",
"base64Body": "<string>",
"jsonBody": "<unknown>",
"bodyFileName": "user-profile-responses/user1.json",
"fixedDelayMilliseconds": 123,
"delayDistribution": {
"median": 123,
"sigma": 123,
"maxValue": 123
},
"fromConfiguredStub": true,
"proxyBaseUrl": "<string>",
"proxyUrlPrefixToRemove": "<string>",
"transformerParameters": {},
"transformers": [
"<string>"
]
},
"persistent": true,
"priority": 2,
"scenarioName": "<string>",
"requiredScenarioState": "<string>",
"newScenarioState": "<string>",
"postServeActions": {},
"serveEventListeners": [
{}
],
"metadata": {}
}
]
}
'Import any supported format into your Mock API. The supplied data will be converted into stubs that your Mock API will be populated with. Supported formats include WireMock mappings JSON files, OpenAPI specifications, Postman collections, HAR (HTTP Archive) logs, WireMock request log JSON files and WireMock directories.
curl --request POST \
--url https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports \
--header 'Authorization: <api-key>' \
--header 'Content-Type: */*' \
--data '
{
"mappings": [
{
"id": "<string>",
"uuid": "<string>",
"name": "<string>",
"request": "{\n \"urlPath\" : \"/charges\",\n \"method\" : \"POST\",\n \"headers\" : {\n \"Content-Type\" : {\n \"equalTo\" : \"application/json\"\n }\n }\n",
"response": {
"status": 123,
"statusMessage": "<string>",
"headers": {},
"additionalProxyRequestHeaders": {},
"removeProxyRequestHeaders": [
"<string>"
],
"body": "<string>",
"base64Body": "<string>",
"jsonBody": "<unknown>",
"bodyFileName": "user-profile-responses/user1.json",
"fixedDelayMilliseconds": 123,
"delayDistribution": {
"median": 123,
"sigma": 123,
"maxValue": 123
},
"fromConfiguredStub": true,
"proxyBaseUrl": "<string>",
"proxyUrlPrefixToRemove": "<string>",
"transformerParameters": {},
"transformers": [
"<string>"
]
},
"persistent": true,
"priority": 2,
"scenarioName": "<string>",
"requiredScenarioState": "<string>",
"newScenarioState": "<string>",
"postServeActions": {},
"serveEventListeners": [
{}
],
"metadata": {}
}
]
}
'Documentation Index
Fetch the complete documentation index at: https://docs.wiremock.io/llms.txt
Use this file to discover all available pages before exploring further.
The ID of the Mock API
5 - 10"jjl8y"
A JSON file containing WireMock stub mappings.
Show child attributes
Successfully imported