How to set up mock API at mockapi.io

  1. sign up at mockapi.io
  2. Click on New project ( + ) and give it a name. You do not need to fill any optional fields.
  3. the name will appear on the Projects list. Click on the project
  4. You will now see your unique API endpoint

  1. Click on New Resource. Enter products the resource name, change the schema as follows, and click on the create button.

  1. After you create a Resource, you can add data set, simply by clicking the products area. Move your mouse points until you see 4 ( or any number of data sets you want ).

  1. If you want to read and/or update the data generated click on the Data button. To edit the schema, you can click on the Edit button.
  2. The endpoint of your REST API for the products page is https://62ff3bb034344b6431f4fb6d.mockapi.io/products
  3. If you click on the products link, it will show you the data generated on a new tab in JSON format. You can also notice that the URL is https://62ff3bb034344b6431f4fb6d.mockapi.io/products

Related Post

Leave a Reply

Your email address will not be published.