Create Dashboards from WebHooks

From wikipedia:

Webhooks are "user-defined HTTP callbacks".

They are usually triggered by some event, such as pushing code to a repository or a comment being posted to a blog.

When that event occurs, the source site makes an HTTP request to the URL configured for the webhook.

Users can configure them to cause events on one site to invoke behaviour on another.

You can configure a Webhook at instadeq as a target for any other tool that supports them.

To use them:

  • Log in
  • Expand the menu on the top left corner of the screen
  • Select the "Shared Resources" entry
  • Select the "Web Hooks" tab
  • Select the "Create new hook" button (a green plus sign at the top right)
  • Enter the following fields:
    • Alias Name: This is just a descriptive name to find it in the Web Hook list
    • Target Topic: The target topic where this hook will publish the data it receives
    • Alias: By default a random string, you should keep it hard to guess and secret unless you want anyone to push data to it if they guess it
    • Permissions:
      • Write: allows only publishing data to it but not reading
      • Read: allows only reading data from it but not publishing
      • Read & Write: Allow both
  • Select the "Create new hook" button on the bottom left

Now you can publish data to the target topic by doing an HTTP POST to<username>/<alias-id> where username is the username that owns this alias and alias-id is the value from the Alias field.

For example if your username is bob and the alias-id is alias-1234 and you want to publish {"answer": 42} to it you can do it like this:

curl -X POST -d '{"answer": 42}'

The response will look something like this:

        "data": {
                "key": null,
                "sn": 2,
                "ts": 1536236550626
        "ok": true,
        "query": {
                "group": "@bob",
                "key": null,
                "topic": "my-topic",
                "username": "anonymous"

Now you can create a visualization using the target topic from the alias as the source and build a visualization with the data that is sent to it.