Skip to content

Instantly share code, notes, and snippets.

@toolboc
Last active November 20, 2015 14:18
Show Gist options
  • Save toolboc/f170e7e0a7723d4466f2 to your computer and use it in GitHub Desktop.
Save toolboc/f170e7e0a7723d4466f2 to your computer and use it in GitHub Desktop.
Particle WebHook for Azure Event Hubs
{
"event": "NAME_OF_YOUR_EVENT",
"url": "EVENT_HUB_URL",
"requestType": "POST",
"json": {
"subject": "{{subject}}", //will map to variable "subject" in your .ino
"data": "{{data}}", //json formatted payload mapped to variable "data" in your .ino
"timecreated": "{{SPARK_PUBLISHED_AT}}", //webhook template for current time, http://docs.particle.io/core/webhooks/#templates
},
"azure_sas_token": {
"key_name": "KEY_NAME_FROM_STEP_1",
"key": "KEY_FROM_STEP_1"
},
"mydevices": true
}
@tiagonmas
Copy link

Comments are not valid inside json so the user will have to take them out (http://stackoverflow.com/questions/244777/can-i-use-comments-inside-a-json-file)

@tiagonmas
Copy link

There is an error in current version. You need to take out the last "," after "timecreated": "{{SPARK_PUBLISHED_AT}}",

@tiagonmas
Copy link

Also, the NAME_OF_YOUR_EVENT should end with "/messages"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment