04 Oct 2021 05:25 PM - last edited on 18 Nov 2021 10:32 AM by MaciejNeumann
Hi
Currently Problems can only be extracted in .json format via the API
When will Problem export from API to .csv be supported
Thanks
Alan
Solved! Go to Solution.
05 Oct 2021 03:53 PM
Hello,
did you try to perform the API call forcing the "Accept" header to csv?
text/csv; header=present
06 Oct 2021 04:36 AM
I did try that but header is npt supported:
I used the following: -H "accept: text/csv; header=present; charset=utf-8"
Gave this error: {"error":{"code":406,"message":"Unsupported/Missing 'Accept' header."}}
05 Oct 2021 09:35 PM - edited 05 Oct 2021 09:36 PM
Any chance your company has Excel (some do not). Excel Power Query is a built in feature and very very good at converting a JSON to a table. I actually find that it's better to receive JSON instead of CSV because some fields could contain multiple values (such as impacted and affected data).
With JSON you can choose if you want to expand out those data points or leave them compressed. If it output as CSV it would have to use a different delimiter between the commas to support that.
06 Oct 2021 04:44 AM
Yes I have used Power Query to convert to a table but you need to be M Code proficient to handle the next page loops and I have not mastered that yet - if you have some sample M Code that you are willing to share that handles the looping that would be great - thanks
06 Oct 2021 08:45 AM
Have you tried to use a converter JSON to CSV? Should do the trick. For instance: https://data.page/json/csv
06 Oct 2021 04:40 PM
Appreciate the reply but my requirement is to implement this in a batch process - It would be great if Monitored Entities could be extracted via API in the same way that Metrics are extracted - that would solve a lot of limitations with nextpage issues in json output - thanks