I hope that with your new founded skills in creating mock endpoints in postman. If your feeling lazy to play around with the mock endpoints, don't worry I won't tell anyone.Įxpanses Manager Postman Collection Conclusion I had included the Postman collection for the Expanses Manager. Now please create the remaining mock endpoints for the expenses manager project and test it out on your own. You will be displayed the example response that you had created earlier.Ĭongratulations, you had created your first mock endpoint!!! Now when you click on the send button on your Get List of Transactions request. The most common type of HTTP status code is 404 which displays when there is no webpage for a website.Īt the status dropdown box, you can select the status code for the example response which in this case is 200. The status code is used to identify that an HTTP request to a server is successful. Therefore it is useful to add it in to explain what does the API do. The description will become part of automatically created documentation. Let's add descriptions to the request, click on arrow icon and then edit icon as shown below. Once you had click on the button, a list of options is displayed then click on Add Request as shown in the picture below.įrom there enter the name of your new request called Get List of Transactions and save it to the expenses manager collection. Select your "Expenses Manager" collection and click on the "." button that is at the bottom of the arrow button. Now we shall proceed in setting your first request in postman. The variable allows you to create API points without the need to replace the URL of each request which saves you time. Select eye icon, it will show you the mock server's link under the local environment variable called url. To enable the Postman, go to your top right corner just beside the icon with an eye.Ĭlick a dropdown box with the name No Environment. With a mock server URL for your postman collection, you need to enable the Expenses Manager environment to use the mock server. Select the default settings and click create button as shown below. There will be a button that says create a mock server click on that button to create a mock server as shown in the picture below. Now in your newly created Postman collection, click on the ">" icon and select the mocks tab. A postman collection is a place to store your API request in postman. Once had created your new account, download the postman app in your os.Ĭreate a new postman collection called Expenses Manager. Creating a Postman Collectionīefore you start on creating mock endpoint you have to sign up for a postman account. There is always a problem in having the API endpoint to be operating 24/7 to test out your front-end's UI or the API you had built when you're moving at a fast pace.įortunately, with the creation of mock endpoints in Postman, it had made it easier to collaborate at a much faster pace. Through the creation of mock endpoints in postman, you break the inter-dependency issue that you might encounter with the front-end developers regarding on APIs. Breaking Dependence of Front-end & Back-end With the use of the prototypes, it allows you to communicate your understanding and get feedback to make changes before you start in developing the actual product. Using your Prototype to Gain Understanding & Common Ground The reason for it is to help in the prototyping process of developing the endpoints.īy creating prototypes, you gain the perspective on how to create the endpoints and see on how it will look like in the final product. Why Create Mock APIs Instead of Building the API?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |