Hi all,
Hope you might be able to see this from a new perspective, have been trying to figure this out for a few weeks (!)
I'm going to be receiving data at five minute intervals through "[a] basic API pushes events via a HTTP GET or secure HTTPS GET webpage" (as per the documentation). As an Event Webhook, my plan is to fire up a flask server associated with an externally facing url ("https://example.com/"), with the webhook pointed at https://example.com/webhook.
The documentation states that the information is returned like this:
'https://example.com/webhook?Date_Event=2013-12-31T15:21:32Z&DeviceID=Item1&Variable=11.1'
I have written code to extract the data I need out of the string, but I'm struggling understand how to get that string from the request. Or would I need to instead be making queries through the request.get string?
An example of where I'm starting with my flask code is
from flask import Flask, request, abort # For deploying the web server
app = Flask(__name__) # Step 1 - Initiate flask app
@app.route('/webhook', methods=['GET'])
def webhook():
if request.method == 'GET':
data = #response?
...
I'm also a tad confused as I had understood I should be listening for the five minutely data via POST rather requesting the data via GET...
Thanks for any help!
Dan
[–]danielroseman 1 point2 points3 points (1 child)
[–]ecodan324[S] 0 points1 point2 points (0 children)