Table of Contents
Introduction
Postman is a popular API client that makes it easy for developers to create, share, test, and document APIs. In this guide, you will learn about how to use Postman for making a request to REST API, GraphQL API, and Elasticsearch Query API. Before going any further, you should first have Postman installed on your computer by downloading Postman from https://www.postman.com/downloads/ and following the installation instructions.
Request to REST API
Follow these steps to make a request to REST API via Postman.
1. Open Postman on your computer.
2. Click on the Add icon button located at the top of UI.
3. Put the URL on the URL field and choose the GET method from the dropdown left to it. Below is an example to get the content list of a project.
4. Click on the Send button.
5. Click on the Body and Pretty tab. The result will be displayed on the panel.
6. You have successfully made a request to REST API.
Request to Elasticsearch Query API
Follow these steps to make a request to Elasticsearch Query API via Postman.
1. Open Postman on your computer.
2. Click on the Add icon button located at the top of UI.
3. Put the URL on the URL field and choose the POST method from the dropdown left to it. Select the raw radio button and choose JSON, then enter the query script on the Query panel. Below is an example to retrieve a specific query within the content list.
4. Click on the Send button.
5. Click on the Body and Pretty tab. The result will be displayed on the panel.
6. You have successfully made a request to Elasticsearch Query API.
Request to GrapQL API
Follow these steps to make a request to GraphQL API via Postman.
1. Open Postman on your computer.
2. Click on the Add icon button located at the top of UI.
3. Put the URL on the URL field and choose the POST method from the dropdown left to it. Select the GraphQL radio button, then enter the query script on the Query panel. Below is an example to retrieve content details.
4. Click on the Send button.
5. Click on the Body and Pretty tab. The result will be displayed on the panel.
6. You have successfully made a request to GraphQL API.
What is Next?
Congratulations! You have finished the guide. Keep exploring below:
- Project ID and Content ID
- Working with REST API
- Working with Elasticsearch Query API
- Working with GraphQL API
Comments
0 comments
Please sign in to leave a comment.