Import into a mock API
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,
"type": "lognormal"
},
"fromConfiguredStub": true,
"proxyBaseUrl": "<string>",
"proxyUrlPrefixToRemove": "<string>",
"transformerParameters": {},
"transformers": [
"<string>"
]
},
"persistent": true,
"priority": 2,
"scenarioName": "<string>",
"requiredScenarioState": "<string>",
"newScenarioState": "<string>",
"postServeActions": {},
"serveEventListeners": [
{
"name": "change-state"
}
],
"metadata": {}
}
]
}
'import requests
url = "https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports"
payload = { "mappings": [
{
"id": "<string>",
"uuid": "<string>",
"name": "<string>",
"request": "{
\"urlPath\" : \"/charges\",
\"method\" : \"POST\",
\"headers\" : {
\"Content-Type\" : {
\"equalTo\" : \"application/json\"
}
}
",
"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,
"type": "lognormal"
},
"fromConfiguredStub": True,
"proxyBaseUrl": "<string>",
"proxyUrlPrefixToRemove": "<string>",
"transformerParameters": {},
"transformers": ["<string>"]
},
"persistent": True,
"priority": 2,
"scenarioName": "<string>",
"requiredScenarioState": "<string>",
"newScenarioState": "<string>",
"postServeActions": {},
"serveEventListeners": [{ "name": "change-state" }],
"metadata": {}
}
] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': '*/*'},
body: JSON.stringify({
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: JSON.stringify('<string>'),
base64Body: '<string>',
jsonBody: '<unknown>',
bodyFileName: 'user-profile-responses/user1.json',
fixedDelayMilliseconds: 123,
delayDistribution: {median: 123, sigma: 123, maxValue: 123, type: 'lognormal'},
fromConfiguredStub: true,
proxyBaseUrl: '<string>',
proxyUrlPrefixToRemove: '<string>',
transformerParameters: {},
transformers: ['<string>']
},
persistent: true,
priority: 2,
scenarioName: '<string>',
requiredScenarioState: '<string>',
newScenarioState: '<string>',
postServeActions: {},
serveEventListeners: [{name: 'change-state'}],
metadata: {}
}
]
})
};
fetch('https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mappings' => [
[
'id' => '<string>',
'uuid' => '<string>',
'name' => '<string>',
'request' => '{
"urlPath" : "/charges",
"method" : "POST",
"headers" : {
"Content-Type" : {
"equalTo" : "application/json"
}
}
',
'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,
'type' => 'lognormal'
],
'fromConfiguredStub' => true,
'proxyBaseUrl' => '<string>',
'proxyUrlPrefixToRemove' => '<string>',
'transformerParameters' => [
],
'transformers' => [
'<string>'
]
],
'persistent' => true,
'priority' => 2,
'scenarioName' => '<string>',
'requiredScenarioState' => '<string>',
'newScenarioState' => '<string>',
'postServeActions' => [
],
'serveEventListeners' => [
[
'name' => 'change-state'
]
],
'metadata' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports"
payload := strings.NewReader("{\n \"mappings\": [\n {\n \"id\": \"<string>\",\n \"uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"request\": \"{\\n \\\"urlPath\\\" : \\\"/charges\\\",\\n \\\"method\\\" : \\\"POST\\\",\\n \\\"headers\\\" : {\\n \\\"Content-Type\\\" : {\\n \\\"equalTo\\\" : \\\"application/json\\\"\\n }\\n }\\n\",\n \"response\": {\n \"status\": 123,\n \"statusMessage\": \"<string>\",\n \"headers\": {},\n \"additionalProxyRequestHeaders\": {},\n \"removeProxyRequestHeaders\": [\n \"<string>\"\n ],\n \"body\": \"<string>\",\n \"base64Body\": \"<string>\",\n \"jsonBody\": \"<unknown>\",\n \"bodyFileName\": \"user-profile-responses/user1.json\",\n \"fixedDelayMilliseconds\": 123,\n \"delayDistribution\": {\n \"median\": 123,\n \"sigma\": 123,\n \"maxValue\": 123,\n \"type\": \"lognormal\"\n },\n \"fromConfiguredStub\": true,\n \"proxyBaseUrl\": \"<string>\",\n \"proxyUrlPrefixToRemove\": \"<string>\",\n \"transformerParameters\": {},\n \"transformers\": [\n \"<string>\"\n ]\n },\n \"persistent\": true,\n \"priority\": 2,\n \"scenarioName\": \"<string>\",\n \"requiredScenarioState\": \"<string>\",\n \"newScenarioState\": \"<string>\",\n \"postServeActions\": {},\n \"serveEventListeners\": [\n {\n \"name\": \"change-state\"\n }\n ],\n \"metadata\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports")
.header("Authorization", "<api-key>")
.header("Content-Type", "*/*")
.body("{\n \"mappings\": [\n {\n \"id\": \"<string>\",\n \"uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"request\": \"{\\n \\\"urlPath\\\" : \\\"/charges\\\",\\n \\\"method\\\" : \\\"POST\\\",\\n \\\"headers\\\" : {\\n \\\"Content-Type\\\" : {\\n \\\"equalTo\\\" : \\\"application/json\\\"\\n }\\n }\\n\",\n \"response\": {\n \"status\": 123,\n \"statusMessage\": \"<string>\",\n \"headers\": {},\n \"additionalProxyRequestHeaders\": {},\n \"removeProxyRequestHeaders\": [\n \"<string>\"\n ],\n \"body\": \"<string>\",\n \"base64Body\": \"<string>\",\n \"jsonBody\": \"<unknown>\",\n \"bodyFileName\": \"user-profile-responses/user1.json\",\n \"fixedDelayMilliseconds\": 123,\n \"delayDistribution\": {\n \"median\": 123,\n \"sigma\": 123,\n \"maxValue\": 123,\n \"type\": \"lognormal\"\n },\n \"fromConfiguredStub\": true,\n \"proxyBaseUrl\": \"<string>\",\n \"proxyUrlPrefixToRemove\": \"<string>\",\n \"transformerParameters\": {},\n \"transformers\": [\n \"<string>\"\n ]\n },\n \"persistent\": true,\n \"priority\": 2,\n \"scenarioName\": \"<string>\",\n \"requiredScenarioState\": \"<string>\",\n \"newScenarioState\": \"<string>\",\n \"postServeActions\": {},\n \"serveEventListeners\": [\n {\n \"name\": \"change-state\"\n }\n ],\n \"metadata\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = '*/*'
request.body = "{\n \"mappings\": [\n {\n \"id\": \"<string>\",\n \"uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"request\": \"{\\n \\\"urlPath\\\" : \\\"/charges\\\",\\n \\\"method\\\" : \\\"POST\\\",\\n \\\"headers\\\" : {\\n \\\"Content-Type\\\" : {\\n \\\"equalTo\\\" : \\\"application/json\\\"\\n }\\n }\\n\",\n \"response\": {\n \"status\": 123,\n \"statusMessage\": \"<string>\",\n \"headers\": {},\n \"additionalProxyRequestHeaders\": {},\n \"removeProxyRequestHeaders\": [\n \"<string>\"\n ],\n \"body\": \"<string>\",\n \"base64Body\": \"<string>\",\n \"jsonBody\": \"<unknown>\",\n \"bodyFileName\": \"user-profile-responses/user1.json\",\n \"fixedDelayMilliseconds\": 123,\n \"delayDistribution\": {\n \"median\": 123,\n \"sigma\": 123,\n \"maxValue\": 123,\n \"type\": \"lognormal\"\n },\n \"fromConfiguredStub\": true,\n \"proxyBaseUrl\": \"<string>\",\n \"proxyUrlPrefixToRemove\": \"<string>\",\n \"transformerParameters\": {},\n \"transformers\": [\n \"<string>\"\n ]\n },\n \"persistent\": true,\n \"priority\": 2,\n \"scenarioName\": \"<string>\",\n \"requiredScenarioState\": \"<string>\",\n \"newScenarioState\": \"<string>\",\n \"postServeActions\": {},\n \"serveEventListeners\": [\n {\n \"name\": \"change-state\"\n }\n ],\n \"metadata\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyImports
Import into a mock API
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.
POST
/
v1
/
mock-apis
/
{mockApiId}
/
imports
Import into a mock API
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,
"type": "lognormal"
},
"fromConfiguredStub": true,
"proxyBaseUrl": "<string>",
"proxyUrlPrefixToRemove": "<string>",
"transformerParameters": {},
"transformers": [
"<string>"
]
},
"persistent": true,
"priority": 2,
"scenarioName": "<string>",
"requiredScenarioState": "<string>",
"newScenarioState": "<string>",
"postServeActions": {},
"serveEventListeners": [
{
"name": "change-state"
}
],
"metadata": {}
}
]
}
'import requests
url = "https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports"
payload = { "mappings": [
{
"id": "<string>",
"uuid": "<string>",
"name": "<string>",
"request": "{
\"urlPath\" : \"/charges\",
\"method\" : \"POST\",
\"headers\" : {
\"Content-Type\" : {
\"equalTo\" : \"application/json\"
}
}
",
"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,
"type": "lognormal"
},
"fromConfiguredStub": True,
"proxyBaseUrl": "<string>",
"proxyUrlPrefixToRemove": "<string>",
"transformerParameters": {},
"transformers": ["<string>"]
},
"persistent": True,
"priority": 2,
"scenarioName": "<string>",
"requiredScenarioState": "<string>",
"newScenarioState": "<string>",
"postServeActions": {},
"serveEventListeners": [{ "name": "change-state" }],
"metadata": {}
}
] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': '*/*'},
body: JSON.stringify({
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: JSON.stringify('<string>'),
base64Body: '<string>',
jsonBody: '<unknown>',
bodyFileName: 'user-profile-responses/user1.json',
fixedDelayMilliseconds: 123,
delayDistribution: {median: 123, sigma: 123, maxValue: 123, type: 'lognormal'},
fromConfiguredStub: true,
proxyBaseUrl: '<string>',
proxyUrlPrefixToRemove: '<string>',
transformerParameters: {},
transformers: ['<string>']
},
persistent: true,
priority: 2,
scenarioName: '<string>',
requiredScenarioState: '<string>',
newScenarioState: '<string>',
postServeActions: {},
serveEventListeners: [{name: 'change-state'}],
metadata: {}
}
]
})
};
fetch('https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mappings' => [
[
'id' => '<string>',
'uuid' => '<string>',
'name' => '<string>',
'request' => '{
"urlPath" : "/charges",
"method" : "POST",
"headers" : {
"Content-Type" : {
"equalTo" : "application/json"
}
}
',
'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,
'type' => 'lognormal'
],
'fromConfiguredStub' => true,
'proxyBaseUrl' => '<string>',
'proxyUrlPrefixToRemove' => '<string>',
'transformerParameters' => [
],
'transformers' => [
'<string>'
]
],
'persistent' => true,
'priority' => 2,
'scenarioName' => '<string>',
'requiredScenarioState' => '<string>',
'newScenarioState' => '<string>',
'postServeActions' => [
],
'serveEventListeners' => [
[
'name' => 'change-state'
]
],
'metadata' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports"
payload := strings.NewReader("{\n \"mappings\": [\n {\n \"id\": \"<string>\",\n \"uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"request\": \"{\\n \\\"urlPath\\\" : \\\"/charges\\\",\\n \\\"method\\\" : \\\"POST\\\",\\n \\\"headers\\\" : {\\n \\\"Content-Type\\\" : {\\n \\\"equalTo\\\" : \\\"application/json\\\"\\n }\\n }\\n\",\n \"response\": {\n \"status\": 123,\n \"statusMessage\": \"<string>\",\n \"headers\": {},\n \"additionalProxyRequestHeaders\": {},\n \"removeProxyRequestHeaders\": [\n \"<string>\"\n ],\n \"body\": \"<string>\",\n \"base64Body\": \"<string>\",\n \"jsonBody\": \"<unknown>\",\n \"bodyFileName\": \"user-profile-responses/user1.json\",\n \"fixedDelayMilliseconds\": 123,\n \"delayDistribution\": {\n \"median\": 123,\n \"sigma\": 123,\n \"maxValue\": 123,\n \"type\": \"lognormal\"\n },\n \"fromConfiguredStub\": true,\n \"proxyBaseUrl\": \"<string>\",\n \"proxyUrlPrefixToRemove\": \"<string>\",\n \"transformerParameters\": {},\n \"transformers\": [\n \"<string>\"\n ]\n },\n \"persistent\": true,\n \"priority\": 2,\n \"scenarioName\": \"<string>\",\n \"requiredScenarioState\": \"<string>\",\n \"newScenarioState\": \"<string>\",\n \"postServeActions\": {},\n \"serveEventListeners\": [\n {\n \"name\": \"change-state\"\n }\n ],\n \"metadata\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports")
.header("Authorization", "<api-key>")
.header("Content-Type", "*/*")
.body("{\n \"mappings\": [\n {\n \"id\": \"<string>\",\n \"uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"request\": \"{\\n \\\"urlPath\\\" : \\\"/charges\\\",\\n \\\"method\\\" : \\\"POST\\\",\\n \\\"headers\\\" : {\\n \\\"Content-Type\\\" : {\\n \\\"equalTo\\\" : \\\"application/json\\\"\\n }\\n }\\n\",\n \"response\": {\n \"status\": 123,\n \"statusMessage\": \"<string>\",\n \"headers\": {},\n \"additionalProxyRequestHeaders\": {},\n \"removeProxyRequestHeaders\": [\n \"<string>\"\n ],\n \"body\": \"<string>\",\n \"base64Body\": \"<string>\",\n \"jsonBody\": \"<unknown>\",\n \"bodyFileName\": \"user-profile-responses/user1.json\",\n \"fixedDelayMilliseconds\": 123,\n \"delayDistribution\": {\n \"median\": 123,\n \"sigma\": 123,\n \"maxValue\": 123,\n \"type\": \"lognormal\"\n },\n \"fromConfiguredStub\": true,\n \"proxyBaseUrl\": \"<string>\",\n \"proxyUrlPrefixToRemove\": \"<string>\",\n \"transformerParameters\": {},\n \"transformers\": [\n \"<string>\"\n ]\n },\n \"persistent\": true,\n \"priority\": 2,\n \"scenarioName\": \"<string>\",\n \"requiredScenarioState\": \"<string>\",\n \"newScenarioState\": \"<string>\",\n \"postServeActions\": {},\n \"serveEventListeners\": [\n {\n \"name\": \"change-state\"\n }\n ],\n \"metadata\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://wmc.wiremockapi.cloud/v1/mock-apis/{mockApiId}/imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = '*/*'
request.body = "{\n \"mappings\": [\n {\n \"id\": \"<string>\",\n \"uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"request\": \"{\\n \\\"urlPath\\\" : \\\"/charges\\\",\\n \\\"method\\\" : \\\"POST\\\",\\n \\\"headers\\\" : {\\n \\\"Content-Type\\\" : {\\n \\\"equalTo\\\" : \\\"application/json\\\"\\n }\\n }\\n\",\n \"response\": {\n \"status\": 123,\n \"statusMessage\": \"<string>\",\n \"headers\": {},\n \"additionalProxyRequestHeaders\": {},\n \"removeProxyRequestHeaders\": [\n \"<string>\"\n ],\n \"body\": \"<string>\",\n \"base64Body\": \"<string>\",\n \"jsonBody\": \"<unknown>\",\n \"bodyFileName\": \"user-profile-responses/user1.json\",\n \"fixedDelayMilliseconds\": 123,\n \"delayDistribution\": {\n \"median\": 123,\n \"sigma\": 123,\n \"maxValue\": 123,\n \"type\": \"lognormal\"\n },\n \"fromConfiguredStub\": true,\n \"proxyBaseUrl\": \"<string>\",\n \"proxyUrlPrefixToRemove\": \"<string>\",\n \"transformerParameters\": {},\n \"transformers\": [\n \"<string>\"\n ]\n },\n \"persistent\": true,\n \"priority\": 2,\n \"scenarioName\": \"<string>\",\n \"requiredScenarioState\": \"<string>\",\n \"newScenarioState\": \"<string>\",\n \"postServeActions\": {},\n \"serveEventListeners\": [\n {\n \"name\": \"change-state\"\n }\n ],\n \"metadata\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
The ID of the Mock API
Required string length:
5 - 10Example:
"jjl8y"
Body
*/*multipart/form-data
A JSON file containing WireMock stub mappings.
Show child attributes
Show child attributes
Response
200
Successfully imported
⌘I