How to create a fetch URL for my realtime data? URGENT

I created a flow to get real time data from a moving vehicle via a MQTT in. Then sorted the data in a protocol buffer format. I want to send this data to Google transit server but cannot send it via HTTP post without upgrading and paying extra for the google account.
Only way (free) is to generate a fetch URL and provide it to Google, according to Google support. Please tell me how to do this, its pretty urgent. Thanks in advance!

I believe you need to provide a little more information here. What is a fetch URL, how is it used, and what does it look like?

1 Like

Thanks for getting back to me.
They want the code with the appropriate details containing for that moment should be downloaded as a text file on entering the fetch URL in the browser.
This should be done by setting a Content-Disposition: attachment" in the header of the fetch URL according to Google support. Honestly im not 100% sure about this also. Maybe its a API to fetch data, but they always reject my request for the HTTP post and tell me to host the data in a server and provide them with a fetch URL. Since node-red is a server, i want to figure out how to generate this and finish my project. Please help me

I’m afraid to say that still doesn’t explain much of information on how I can help. A bit of searching however gave this page, which I think is what you are referring too:

It describes the push method, where you POST your data to the transit dashboard URL, and the fetch method where you create an endpoint on your own server where Google Transit fetches the data every 30 minutes.
For the push method you would use an http-request node, which you’re currently showing in your flow. The fetch method however requires the http-in/http-response pair. That flow would start at an incoming request to that endpoint on the http-in nodes, and ends in the request being answered in an http-response node. Somewhere in between you have to offer back your data in the expected format.

However, to do so you will have to expose your node-red server/instance to the internet, which you shouldn’t until you properly secure it first and make yourself familiar with the risks.

I understand you/your company are operating this bus service for free at the moment, but the maintenance of these new hydrogen buses plus salaries for drivers won’t be free either. If you can go for a paid setup with the push method, you’re likely way better off.

Recommended reading:
Creating endpoints:
Working with flow context, as you would need to save the data in between fetch requests:

Edit: furthermore, if your goal is to give travellers real-time information of where their bus is, giving them updates only every 30 minutes as you would with the fetch approach might not lead to overly enjoyed customers. If doing so, please advertise this to users that their bus location information might come with an up-to-30-minutes delay.

1 Like

Thank You so much for the information Lena. I will try the http-in/http-response pair. Please understand i started using node red 2 weeks ago, this my first project, first flow and first job. I have to finish this before Monday morning too. If i get stuck, hope you will be able to guide me again. God bless You!

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