No activity today, make something!
docs API

201402190000 cdent  

Tank is built on top of TiddlyWeb. This means that all the API features available in TiddlyWeb are available in Tank. Using the API you can:

You can visit entry points for the API at /bags and /recipes. All tanks are made up of one bag. All comps are made up of one recipe.

The reason for the different names is that not all bags are tanks and not all recipes are comps.

To learn more about the API endpoints see the official documentation.

Access Control

When instructions wrap a word or phrase in < and >, replace the entire phrase, including < and > with the chosen value. For example @<my tank> would become @cdent.

Access to the API is controlled by auth tokens in the form of API Keys. Tokens are created (or revoked/deleted) at /auth.

Use them in each request you make by adding an X-Tank-Key header:

X-Tank-Key: <your token>

An example using curl:

curl -v -H 'X-Tank-Key: 4cdff82f-2b8b-4a92-8c95-a7f2dfd95f7' \
    -H 'Accept: text/plain' \

You can also use the API keys as oauth2 bearer tokens. Use them by adding an Authorization header:

Authorization: Bearer <your token>

An example using curl:

curl -v -H 'Authorization: bearer 4cdff82f-2b8b-4a92-8c95-a7f2dfd95f7' \
    -H 'Accept: text/plain' \

Take care with your tokens to not expose them to prying eyes.

Requests to the API respect CORS.