Update a mock server
PUT https://api.getpostman.com/mocks/{{mockUid}}
Updates a mock server. Include the mock
object in the request body with one or more of the following properties:
name
— A string that contains the mock server's name.environment
— A string that contains the environment UID.private
— A boolean value that, if true, sets the mock server as private.versionTag
— A string that contains the API's version tag ID.config
— An object that contains the following properties:
serverResponseId
— A string that contains the server response ID. This sets the given server response as the default response for each request.
Body
PARAM
Key | Datatype | Required | Description |
HEADERS
Key | Datatype | Required | Description |
Content-Type
|
string |
RESPONSES
status OK
{
"mock": {
"id": "06040138-dd6b-4cce-9a02-7e1c1ab59723",
"owner": "11582779",
"uid": "11582779-06040138-dd6b-4cce-9a02-7e1c1ab59723",
"collection": "11582779-fd6797e2-de6b-4699-975c-85290e4c2499",
"mockUrl": "https://06040138-dd6b-4cce-9a02-7e1c1ab59723.mock.pstmn.io",
"name": "Test Mock Server",
"config": {
"headers": [],
"matchBody": false,
"matchQueryParams": true,
"matchWildcards": true,
"delay": null,
"serverResponseId": null
},
"createdAt": "2022-03-22T05:48:43.000Z",
"updatedAt": "2022-03-22T06:50:34.000Z",
"environment": "11582779-ac1b6608-deb7-4c05-9d48-ee775aabfc19"
}
} |
ENDPOINTS