cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API v2 results returned in JSON format. Are there options for CSV?

runatyr
Organizer

Hello:

Is it possible to get API results in the API v2 returned as CSV results?

At the end of the day. I am trying to find a way to take the data returned in a file and import it into 

a MSSQL database. 

I could go down the path of figuring out how to import JSON into MSSQL, but if CSV/txt files are an option then 

this may expedite the learning time.

 

Thanks!

-runatyr 

2 REPLIES 2

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

It depends, for example, you can get CSV value if your metric is in Data Explorer.

AntonPineiro_0-1724073347470.pngAntonPineiro_1-1724073360222.png

I think this depends of API as well. Some of them are only available in JSON format.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

paulo_calaxa
Helper

Hi @runatyr 
You might check each endpoint definition... For instance, it's a yes for the Metrics data

paulo_calaxa_0-1724074593450.png

paulo_calaxa_1-1724074747148.png

So, if in your call you change/add the Accept header parameter to "text/csv..."

paulo_calaxa_2-1724074837250.png

you'll get the requested data in a csv format.

Kind regards,
Paulo

Featured Posts