"Streaming" (or webhook) API


#1

Are there any plans for some sort of “streaming” or webhook-based API/integration options for Dynalist? I’d love to be able to somehow “subscribe” and be informed about changes to a list, so that I could then do something else with those changes.

In my specific case – when an item on a list is checked off, I want to receive a notification of that so that I can trigger another action in a completely different system.


#2

I want to do stuff like this too.

If we do it with what exists now, we could get the whole document every 61 seconds in json via POST https://dynalist.io/api/v1/doc/read
{“token”: “”,“file_id”: “”} and then diff and parse on our side all this type stuff:

{
  "_code": "OK",
  "_msg": "",
  "title": "Todo list",
  "nodes": [
    {
      "id": "<node #1 id>",
      "content": "Buy milk",
      "note": "2L whole milk",
      "checked": true,
      "collapsed": false,
      "parent": "root",
      "children": []
    },
    {
      "id": "<node #2 id>",
      "content": "Send Jason photos",
      "checked": false,
      "collapsed": false,
      "parent": "root",
      "children": [
        "<node #3 id>",
        "<node #4 id>"
      ]
    },
    {
      "id": "<node #3 id>",
      "content": "Picnic photos",
      "checked": false,
      "collapsed": false,
      "parent": "<node #2 id>",
      "children": []
    },
    {
      "id": "<node #4 id>",
      "content": "Cruise photos",
      "checked": true,
      "collapsed": false,
      "parent": "<node #2 id>",
      "children": []
    }
  ]
}

It seem too intimidating to me. It would probably require some AWS type service running a python.py file that does the diff/parse/send trickery. I’m a noob and it would take me forever to figure out.

But I do wish for it, mainly for geofence triggering to notify me the contents of a node, like the children of my “when i get home” node in my android notification right there to read without opening anything, that would be nice.


#3

I also have a similar need but a different use-case. I want to know when an item is added to a list (an inbox flag would also be great) to be able to manipulate it immediately afterwards (e.g. move it based on some criteria).


#4

I see, thanks for your input!

@Shida - How hard is setting up webhook API?


#5

There’s a high probability we can setup some kind of notification service for notifying documents being changed, without the changed content. Once someone receive this, they can fetch the document from our API and figure out if their items was changed.

I’m wondering if this will be sufficient to solve the use cases people have… Let me know!


#6

I think that would work, yes. I’d just need to grab/store a copy of the doc and compare it to figure out what changed each time. A little extra work on my side, but I think it’d work :slight_smile:

One note – you’ll probably want to “debounce” the frequency of the notifications a bit somehow, to avoid sending bursts of a bunch of notifications e.g. for typing (one per character?!) or even checking off a series of items (do I get one notification per check? one per 10 seconds?). Not sure how that should work.

Thanks for considering!