What does it do to set a file (report) export file extension to "json" instead of "csv"?

Hello.
According to API docs, when you export a report it actually creates a file that is subsequently downloaded. When you create that file, you give it a file extension and you also provide a template. How do these interact? Presumably the template is the thing that causes the file to have it's ultimate content. So how does it help to set the file extension to "json" (say) instead of "csv"? It seems you need to write a template to make the file content be json if that is what you want. So is the file extension purely a thing that is part of naming a file completely independent of content? Which of course then begs the question of creating a file in (say) "xslx" format - are we expected to write a template that knows how to do that? Or "pdf"? That seems like an absurdly high learning curve.
So really just a conceptual frame of how file extensions, file types, and templates inter-relate with one another would be super-helpful.
Answers
-
@sgolux Depending on what you are looking to do with the downloaded file, you have the option to download it as a json file. It doesn't change the contents of the file and is primarily used if you are integrating it with another API. The report exporter API only exports your reports, so if you use it to export to a CSV, you can then upload that CSV into your accounting package.