APIs
You can modify the internal state of your server by using some of mockit's built-in APIs.
Last updated
You can modify the internal state of your server by using some of mockit's built-in APIs.
Last updated
GET
http://localhost:3000/mockit/api
Gets the internal state of your mock server.
PUT
http://localhost:3000/mockit/api
Makes updates to the internal state of the server
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
POST
http://localhost:3000/mockit/api/new
Creates a new fixture
PUT
http://localhost:3000/mockit/api/reset
Resets server state back to when it first started
Name | Type | Description |
---|---|---|
Content-Type
object
application/json
throttle
string
3G, 4G, WiFi, Disabled
latency
number
When it is set, it will set the server response time to the new latency value.
id
string
The id of a fixture. When it is set, it will set the fixture with that id as active.
data
object
The response data of the API
status
string
The status of the API
method
string
The method of the API
description
string
The description of the fixture
id
string
The id of the fixture
url
string
The endpoint of the API