Number of APIs: 5
GET {{baseUrl}}/mocks/{{mockId}}/server-responses/{{serverResponseId}}
Gets information about a server response.
GET {{baseUrl}}/mocks/{{mockId}}/server-responses
Gets all of a mock server's server responses.
POST {{baseUrl}}/mocks/{{mockId}}/server-responses
Creates a server response. Server responses let you simulate 5xx server-level responses, such as 500 or 503. Server-level responses are agnostic to application-level logic. Server responses let you simulate this behavior on a mock server. You do not need to define each error for all exposed paths on the mock server. If you set a server response as active, then all the calls to the mock server return with that active server response. Note: You can create multiple server responses for a mock server, but only one mock server can be set as active. You must include the following properties in the request body: You can also include the following optional properties:
name
— A string value that contains the server response's name.statusCode
— An integer value that contains the server stub's 5xx response code. This property only accepts 5xx values.
headers
— An array of objects that contains the server stub's headers:
key
— A string value that contains the header's key.value
— A string value that contains the header key's value. This value defines the corresponding value for the header key.body
— A string value that contains a response body that returns when you call the mock server.
PUT {{baseUrl}}/mocks/{{mockId}}/server-responses/{{serverResponseId}}
Updates a mock server's server response. Include at least one of the following properties in the request body:
name
— A string value that contains the server response's name.statusCode
— A string value that contains the server stub's response code. This property only accepts 5xx values.headers
— An array of objects that contains the server stub's headers:
key
— A string value that contains the header's key.value
— A string value that contains the header key's value. This value defines the corresponding value for the header key.body
— A string value that contains a response body that returns when you call the mock server.
DELETE {{baseUrl}}/mocks/{{mockId}}/server-responses/{{serverResponseId}}
Deletes a mock server's server response.
ENDPOINTS