Configuring get Webhook

curl -X GET
-H “Application-ID: 012345678901234567890123456789”
-H “API-Key: 012345678901234567890123456789”
-G
–data-urlencode ‘where={“ID”:“CORE ID”}’
http://myurl.com/mystuff

I am trying to query a database and have the results sent back to the Electron. Using the command line I can get the info that I want from the above GET command. I am trying to make a webhook that runs this query and replaces CORE ID with the Electron core ID that is publishing the event. I am having trouble formatting the webhook to do so. Any help is greatly appreciated!

Could you post what you have tried?

Ok never mind. I figured it out.

{
	"event": "EVENT_NAME",
	"url": "http://myurl.com/mystuff",
	"requestType": "GET",
	"mydevices": true,
	"headers": {
    "Application-ID": "XXXXXXXXXXXXXXXXXXXXXXXX",
    "Api-Key": "XXXXXXXXXXXXXXXXXXXXXXXX"
    },
	"noDefaults": true,
	"where": {
		"ID": "{{PARTICLE_DEVICE_ID}}"
	}' 
}
1 Like