API Hooks - SteffenBlake/TaskBud GitHub Wiki
Task Bud also supports a basic API at the moment for use in Internet of Things applications.
A full display of your API can simply be found at the /api
endpoint of your local Taskbud location. For example if you have it hosted on http://localhost:8080
you can see the full list of your supported api at http://localhost:8080/api
By default your account does not have an API key unless you opt into it, for security purposes. Please ensure you store your API key somewhere secure once you generate it!
All actions performed on Taskbud via an API key are treated as if performed by that account, so it might be a good idea for the administrator to set up a new account specifically for API Hooks.
To generate an API key, simply click your profile button and select the "API Access" entry.
Then it's just a matter of hitting the Generate button to bind your account to an API key. Note an account at this time can only have a single API key, if you generate a new one the old key will stop working.
All API end points simply authorize via the bearer token as a query parameter, like so: ?bearer=<your-token>
To get the Id for a specific task group, simply open it up in the index page interface and take a look at your browsers url bar. You should see a query param ?taskGroupId=<some-Guid>
Great question. I started with going with a cookie based authentication, then a typical JWT bearer header.
Problem is, IFTTT and other such IoT style websites dont really support cookies or custom headers very easily! But a query param in the url? No problem. I envisioned that stuff like "I want to easily add tasks via my home assistant" would be the main appeal for the TaskBud API, so thats what I designed for.
Keep in mind if you serve TaskBud over HTTPS (which you should be doing! Certbot is free!) that query parameters in URLs are part of the encrypted payload, so your API key is not exposed.