Conclusion for now: If it's something more involved, do it inside of the server. The API might be lacking functionalities, leading to roadblocks. Not something you'd want.
If you have a server with an API and you need to run a migration for parts of the data do you: - write a script and call the API of the server? - code the migration into the server so it runs e.g. on server start or on a specific API call?
Started to pay a lot more attention to how I log/print in my scripts recently. If I'm working on something for a while it might as well give me nicely printed results each time I run it :)
Why is a gist only 17 lines of code high and the height is not changeable?! Shouldn't that be a comment they've been receiving for years? Or am I missing something?