api: pretty print JSON responses