vultr
vultr copied to clipboard
Add CLI flag for JSON output
I very much support this. I'm currently writing python scripts to automate setting up a machine to use with some other scripts I already wrote, and having JSON output would make this a lot easier.
I don't quite understand what for. 🤔 After all, the Vultr API is already responding with JSON. If you're writing python scripts to automate stuff, why not simply calling the API directly and parsing it's JSON output? The API is quite simple actually: https://www.vultr.com/api/ You'll have much more fine-grained control that way 😄 👍
I'll have a look at the API directly, but I still feel like it would be nice to get direct json output from the executable (like doctl).
Hey @JamesClonk 👋
For the simple reason that it would be used (probably a lot)! I would also argue that if an upstream API returns JSON then the downstream API (in this case your CLI) should have an option for returning JSON too. Just for debugging reasons at the very least.
Thanks in advance for your time and consideration! 👍
@JamesClonk I would also like json output. This allows users to pipe the output to jq (https://github.com/stedolan/jq) and filter things.
Yes we can just use the API directly using curl however the CLI makes it way easier to interact with the API.