Exploring Things Cloud Sync API

As you may know, I am a big fan of Thomas A. Limoncellis „Time Management for System Administrators“. Having some simple techniques helping me getting my work done is just great. But knowing good strategies is not enough, you need the right tools for your daily planning/scheduling.

So I tested virtually any GTD-app out there. For years, I am pretty happy with Cultured Code Things sitting on my Mac/iOS-devices. Lately, after having some difficulties with the latest version, I started having a look at their undocumented Cloud Sync API. Here is what I found…

With mitmproxy installed you quickly get some results looking like this:

{
    "current-item-index": 292,
    "schema": 1,
    "items": [
        {
            "6862ED60-5C1B-48F4-81A0-425FA3AA0EC3": {
                "t": 0,
                "e": "Task2",
                "p": {
                    "ix": 41,
                    "tr": false,
                    "icp": false,
                    "do": 0,
                    "icc": 0,
                    "nt": null,
                    "tt": "Things rocks.",
                    "icsd": null,
                    "rr": null,
                    "sp": null,
                    "cd": 1382686359.3546559811,
                    "ar": [],
                    "rt": [],
                    "pr": [],
                    "tg": [],
                    "sr": null,
                    "acrd": null,
                    "tp": 0,
                    "ss": 0,
                    "dl": [],
                    "dd": null,
                    "md": 1382686359.3644590378,
                    "ti": 0,
                    "st": 0
                }
            }
        }
    ]
}

Things is using simple HTTP(S)-request (POST, GET, DELETE, PUT) for communication with their Cloud Sync-Servers. Basicly they are exchanging JSON-objects. Each transaction has some required and optional key/value parts, depending on what the action is.

Unfortunately the keys like ‘dd’, ‘nt’, ‘tt’ are not that self-describing. Looking around the Mac application-bundle, I found some file called SyncronyPropertiesMapping.plist. What’s in it?

It’s a conversion table and looks like this:

  • ‘dd’ : ‘dueDate’
  • ‘nt’ : ‘notes’
  • ‘tt’ : ‘title’

Ok, now you slowly get some insight of what is going on here. But wait, there is one more thing. What is this file called Things.sdef doing here? Yeah right, it is an AppleScript-Library and in case you were not aware of, this is well documented here: AppleScript Guide.

links

social