Hey @Utopiah, welcome to the Glitch forum!
This is a really good question, and one I haven’t seen asked here. It’s not terribly complicated, but enough so that it’s probably not great to explain in 280 character bites.
The central API call you’ll need is a GET in this format
You can get your own “persistent” token by open up your browser’s developer tools from an Editor window and examining
localStorage.cachedUser. The property you want from there is
persistentToken. You should also make note of your user id (
To get your project list you can then call the users API with your user id and token:
That response will include all your undeleted projects. If you’re doing this in a console you can then pipe it to
jq -r '.projects.id' to get a list of all of your project ids.
From there you can loop over the results and call the download endpoint for each project to get its download. It might be useful to rename the archives as they’re downloaded, so you could use
jq -r '.projects| "\(.id) \(.domain)"' as the jq command to get a list of project ids and names, and the use the name for each as the output filename.
I hope this helps, and let me know if i need to clarify anything.