version 2.9.0

Dynamic REST API simulation and for application development & QA testing


sMockin is an API mocking tool used to dynamically simulate HTTP endpoints.

Featuring a rich UI and an inbuilt HTTP mock server, mocking your existing or new API model can be done quickly and without any coding or scripting.

Whether you are a developer who needs to simulate RESTFul endpoints or an engineer working with complex SOA / IoT / microservice infrastructure, sMockin can help by mimicking any services that are either unavailable or otherwise too difficult or time consuming to set up.

sMockin runs as a small web app which can be either installed locally onto a personal machine or hosted centrally and used by multiple users.


client call




Clone this repo:

git clone

Change the current directory to smockin and build the project:

cd smockin

mvn clean install

Run the install and start scripts (for windows, use the equivalent .bat files):



Finally from your browser open the dashboard:


(If running sMockin for the first time then please allow 20 - 30 secs for the app to fully start up.)

For further details, please consult the Installation and Getting Started guides in the Wiki.

You can also check out the latest help guide at


Please consult the Configuration & Troubleshooting guide.


sMockin is licensed in accordance with the terms of the Apache License, Version 2.0.

The full text of this license can be found at


sMockin is built upon the following open source frameworks:

    Spring Boot                 -
    Hibernate                   -
    Spark                       -
    Maven                       -
    AngularJS                   -
    UI Bootstrap                -
    vkBeautify                  -
    H2                          -
    HikariCP                    -
    Apache Commons              -
    Apache Http Components      -
    Apache Commons IO           -
    JUnit                       -
    Mockito                     -
    Apache ActiveMQ             -
    Apache FtpServer            -
    RAML Parser 2               -
    Jasypt                      -
    Java-JWT                    -
    JWT-Decode                  -
    JQuery                      -
    Code Mirror                 -


New in version 2.9

Option A sMockin will attempt to find a mock first and only forward the request to your server downstream if a mock could not be found.

Option B sMockin will forward the request to the server downstream first and then try to find a suitable mock if the downstream server returns a 404.

New in version 2.8

To add Key / Value data, click on the drop down box list from the top right hand corner of the UI and select Manage Key/Value Data.

To then reference your Key / Value data in your mock responses, this can be achieved as follows:

For Response Variables syntax:


Or if using a Custom JavaScript based mock:


For greater flexibility, you can also reference inbound request values as part of your lookup like so:

Response Variables syntax:


Custom JavaScript syntax:


For example:

${REQ_PARAM=firstName} is now be expressed as $requestParameter(firstName)
${REQ_HEAD=firstName} is expressed as $requestHeader(firstName)
${REQ_PARAM=firstName} is expressed as $requestParameter(firstName)
${PATH_VAR=firstName} is expressed as $pathVar(firstName)
${RANDOM_NUMBER=1 TO 10} is expressed as $randomNumber(1, 10) or $randomNumber(10)
${ISO_DATETIME} is expressed as $isoDatetime
${ISO_DATE} is expressed as $isoDate
${UUID} is expressed as $uuid

$requestBody has been added as a new option

More details to follow at

New in version 2.7

To give it a go, simply create a new mock (e.g /pets) selecting the 'Stateful REST' type and save.

Then run the following calls to see it immediately action:

curl -i -X GET http://localhost:8001/pets

curl -i -X POST http://localhost:8001/pets -d '{ "name" : "fido", "age" : 4, "type" : "DOG" }'

curl -i -X POST http://localhost:8001/pets -d '{ "name" : "minty", "age" : 6, "type" : "CAT" }'

Your next call to GET /pets should return the following:

curl -i -X GET http://localhost:8001/pets

    "name": "fido",
    "age": 4,
    "type": "DOG",
    "id": "223af502-ae81-4274-9101-4886821ea823"
    "name": "minty",
    "age": 6,
    "type": "CAT",
    "id": "0a1c837a-8cd5-4a3c-b2e8-a519933e99d5"

You can proceed to GET, PUT, PATCH and DELETE your mock using the generated id...

curl -i -X GET http://localhost:8001/pets/0a1c837a-8cd5-4a3c-b2e8-a519933e99d5

curl -i -X PUT http://localhost:8001/pets/0a1c837a-8cd5-4a3c-b2e8-a519933e99d5 -d '{ "id" : "0a1c837a-8cd5-4a3c-b2e8-a519933e99d5", "name" : "Minty", "age" : 7, "type" : "CAT" }'

curl -i -X PATCH http://localhost:8001/pets/0a1c837a-8cd5-4a3c-b2e8-a519933e99d5 - d '{ "op" : "REPLACE", "path" : "/name", "value" : "Minty Mi" }'

curl -i -X DELETE http://localhost:8001/pets/0a1c837a-8cd5-4a3c-b2e8-a519933e99d5


sMockin is designed and actively maintained by MG Tech Software Ltd.

Why the name sMockin? Whilst it may sound like an old english middle ages embroidery technique, the name actually came about more in relation to a classic Jim Carey movie quote 'Smokin'. We then added the extra letter to play on the concept of software mocking and there you have it.

Yes, way too much thought went into that...