3.2 Hasura Data API + Postman collection

Radhika Sharma
2 min readJun 26, 2017

--

An application programming interface (API) is a particular set of rules (‘code’) and specifications that software programs can follow to communicate with each other.

API stands for Application Programming Interface through which software's can interact with each other.

Where it is used

An example, You are buying an item in online through your credit card. You will provide credit card details and press continue button. It will tell you whether your information is correct or not. To provide these results, there are lot of things in the background.

The application will send your credit card details to a remote application which will validate your information and send the result back your application. API is used in this scenario.

This is the link to the task 3.1.

Hasura data API

Hasura has their own Data API which . Through these API, we can access the database on Hasura platform and perform various operations on it using predefined JSON queries besides this Hasura also has an Auth API which we will discuss in our task 3.3.

Refer to its documentation here.

Postman

Postman is a Google Chrome app for interacting with HTTP APIs. It presents us with a friendly GUI for constructing requests and reading responses.

Getting started with postman

We can add postman simply as a chrome extension.The next thing we need to do is to set up the headers.

fig 1.1 Add a new header and just add the admin token in the bearer

Now, let’s make an API request to this using Hasura Data API. The URL endpoint should look like “data.<project-name>.hasura.me/v1/query”.

We have to put it into the enter request URL.
I have created 3 tables as per the need of the app for performing CRUD queries.

1.Reading data

2.Updating data

3.Deleting data

--

--