Simulation Mode

A simulated API, each request generates a new set of data but responses are processed by an API handler.

A simulated API, where each request is run against a new generated set of data but responses are processed by an API handler.

No data is stored on the server.

The simulator is designed to be used by following along with the instructions otherwise sequential requests will not make sense e.g. if you DELETE an item and then GET it, then it will be returned because the simulator expects you to DELETE a specific item.

Model

Things

entity

Fields:
Fieldname Type Description
idAUTO_INCREMENT
  • Field is an ID and should not be amended or set
Example: "40"
nameSTRING
  • Value is mandatory
  • Maximum length allowed is 50
Example: "unnamed"
descriptionSTRING
  • Maximum length allowed is 200
Example: ""

Example JSON Output from API calls


{
  "id": 40,
  "name": "unnamed",
  "description": ""
}

Example XML Output from API calls


<entity>
  <name>unnamed</name>
  <description/>
  <id>40</id>
</entity>

Example JSON Input to API calls


{
  "id": 1,
  "name": "unnamed",
  "description": ""
}

Example XML Input to API calls


<entity>
  <name>unnamed</name>
  <description/>
  <id>1</id>
</entity>

API

The API takes body with objects using the field definitions and examples shown in the model.

End Points

/sim/entities

e.g. /sim/entities

This endpoint can be filtered with fields as URL Query Parameters.

e.g. /sim/entities?name=unnamed

This endpoint can be sorted with the _sortBy URL Query Parameter. Use _sortBy=+field or _sortBy=field for ascending order, and _sortBy=-field for descending order. Multiple fields can be combined with commas, e.g. _sortBy=+field,-other.

e.g. /sim/entities?_sortBy=+id

QUERY content uses Content-Type: application/x-www-form-urlencoded with fields such as title=Task&_sortBy=-id.

/sim/entities/:id

e.g. /sim/entities/:id

Open Swagger UI