Trello – How to construct URL of Trello JSON download from board URL (without using the API)

backuptrellotrello-boards

Background

Given a URL to a Trello board, as listed at the users main Trello page, it used to be possible to deduce the URL for the corresponding "Export JSON" link.

I wrote up the way I did this in this answer:

You can also just add .json (or /somename.json) to the end of a board or card URL, to get the prompt to save the downloaded file (e.g. https://trello.com/board/welcome-board/4e6a8095efa69909ba007382/somename.json)

One really nice thing about this was that the default name for the saved file was then somename.json, which was useful when you had lots of files to download.

I put all this together in a JavaScript bookmarklet, that allowed me to download all my Trello boards with just a few clicks (and the aid of a Browser add-on.) The README in that project has more info on how to use it.

Recent Change

However, some time since my last backup on 6th July 2013, the URLs on the Trello main page have changed, so now:

There is text in the Export link (4d5ea62fd76aa1136000000c) that is not present in the board link, meaning the above deduction no longer works.

Question

Without using the Trello API, given a link to board on Trello.com, how can I deduce a link to download the JSON export, ensuring that the output filename is of the same human-readable form as given in the url (hyphen-separated, lower case)

The reason I say "without using the Trello API" is that the API adds an extra step for users, namely the need to get a Developer Key, which seems to me to be an unnecessary hurdle, for just exporting data – and I'd like to avoid that, if at all possible.

Best Answer

First of all, fixing it so that just adding .json to the end of the url is on our to-do list, so you could just wait for that to be fixed. However...

If you take a url like

https://trello.com/b/<id>/<slug>

and turn it into a url like

https://trello.com/1/boards/<id>?fields=all&actions=all&action_fields=all&actions_limit=1000&cards=all&card_fields=all&card_attachments=true&lists=all&list_fields=all&members=all&member_fields=all&checklists=all&checklist_fields=all&organization=false

then you will get the same as adding .json used to do. This will make an api call, but GET api requests can be authenticated with just the cookie that is stored in your browser, so this will go through without a developer key.