Ask HN: Tools to call REST API and export to CSV?
I've written my own in JavaScript, Python, PowerShell, and I've used Microsoft Power BI/Power Query, but they are slow, don't work well, require custom code, etc.
I need to:
1. call REST APIs (with Authorization HTTP header) and get JSON (arrays of objects), also parent-child endpoints (parent has IDs of child objects) -- nested loops
2. paginate using the Link HTTP response header, observe rate limits (HTTP response headers, to avoid 429 errors) and concurrency limits
3. (nice to have) select certain fields from the JSON object; also, data can be "L-shaped" (not every record has the same fields)
4. export to CSV
Open source, cross-platform would be good. Needs to be easy for not-very-technical end users to use.
6 comments
[ 3.8 ms ] story [ 26.5 ms ] threadI gave it a try, and got something really basic to work. It took me several hours (part of it was my fault, part of it was the documentation and its defaults that expect the data in a particular format, and the error messages that weren't very helpful).
It's a complex tool, and it does a lot, but not what I need.
The MS Power Query / BI tools come really close, but not quite.
As I like to say, they do the first 80%, but it's that last 80% that you still need :)
I guess I need to wrap my code with something easy. I was trying to avoid reinventing the wheel, but, so far, I haven't found a wheel.