How do I get data from database and send it to postman using postman

I have recently started using Node-Red.
I want to understand how could I send data from my MySQL database to postman using Node-Red.
I was advised to use GET option in http in node to send data to postman.
I not sure how it works.

Thanks in advance

Perhaps I am missing something, but isn't postman just an API (dev/testing) client ? This is what the http request node can do as well.

The cookbook has some examples about get/post requests.

As Mr Backman says, Postman is simply a tool for issuing API calls and seeing the responses. I stopped using it in favour of an extension for VScode that lets me create a suitable file, click to issue commands and get responses back, all inside VScode which is very convenient.

The simplest way to create an API with Node-RED is to use a combination of the http-in and http-out nodes. The -in node defines the API endpoint (URL and Type - e.g. GET/PUT/...). The -out node provides the response back to the requestor. In between, you can add other nodes that formulate the required output.

So how can I get the URL for connecting my database??

Database connections go over tcp and ports, not over url's.

So if you know the host (ip/fqdn) your database is running on and it is mysql, it is port 3306. For this you will need to have something like the mysql node installed.

I think we are talking at cross-purposes.

Node-RED provides the URL - you define it when you use the http-in node.

You then need to write a flow that fits between the http-in and http-out nodes that queries your db, returning the results to the msg.payload that you then pass to the http-out node.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.