Logo

Mastering EazyMock: Create your first mock API - Part 1

Use EazyMock to create your first mock API server in no time and generate fake realistic JSON body for your frontends.

avatar
Dat TranPublished on January 19, 2024
loading

EazyMock is a free cross-platform desktop application that takes API mocking to the next level. EazyMock offers a fast and easy-to-use interface and gives you complete control over your mock APIs with advanced functionality like Project Management, Rules Management and Mock Management & Multiple Responses

This tutorial will show you how to install the desktop mocking application and set up your first mock API.

Let’s watch EazyMock User Guide!
img

To learn more about APIs and API mocking in general, head over to our API guide or API mocking guide

Step 1. Install the application

EazyMock offers a powerful and accessible solution on our website platform, optimized for desktop usage. Explore our site today to access and experience the application firsthand.

img

After navigate to application site, login may be required. You can login with Google/Github or create account with our service. Then, go inside and start setting up your first mock API.

Step 2. Create your first mock API

Upon navigating to the application site, you may be prompted to log in. Enjoy the convenience of logging in with your Google or Github account, or seamlessly create a new account with our service.
img

Once logged in, delve into the platform and kickstart the process of setting up your very first mock API.
img

Step 3. Create your first API route

The newly created mock API does not include a route on. You can create a new endpoint by clicking on the orange + Create New Mock button at the top of the endpoint list:
img

Step 4. API endpoint configuration

You can further customize your endpoint by adding a custom header and the following sample body (which makes use of EazyMock's templating system):

// Sample body
  [
  {{# repeat 5}}
  {
    "description": "Tutorial {{faker.paragraph}}",
    "date": "{{faker.date_time}}"
  }
  {{/ repeat}}
  ]

You can create a more complex configuration by adding multiple responses triggered by rules. Which explained specifically here

img

Step 5. Save and call your mock API

After saving your mock API, the final step is to initiate it. Simply click the 'Create Mock' button, and you'll obtain a mock API endpoint in your list. Retrieve the URL and begin making calls using other tools such as Postman or Insomnia.
img

Step 6. Learn more

Now that you know how to create a basic mock API, you can head over to the official documentation to explore the other functionalities like requests logging, partial API mocking with rules or create a response with AI

0
1
308
share post

Comments

avatar