I am in the process of creating a Python script that will make a call to an API and take that data and import it to Domo. I've been able to authenticate with the Domo API and make a new dataset in Domo and grab the dataset ID but when I'm trying to import data into the dataset I'm running into issues.
The documentation only gives the example of Content-Type: text/csv.
- Are there any other methods of importing data (json or xml)?
- If not then what are the csv requirements that are accepted?
- Do we need to wrap each value in quotes or does that only depend on the datatype?
- What if my data has commas or quotes built into the data itself, how can I escape those characters?
- How can I distinguish a new line?
I've tried playing around with requests and I found I couldn't import with JSON or XML but wasn't sure if there were other workarounds
{"status":400,"statusReason":"Bad Request","message":"Content type \'application/xml\' not supported","toe":"DULVTGRT2R-1QKE9-6ABP9"}
{"status":400,"statusReason":"Bad Request","message":"Content type \'application/json\' not supported","toe":"8Q8KM5BPBV-641HK-KC40T"}
When I tried putting in a sample CSV it gave me the following so it failed too but my dataset in Domo shows that it is now stuck on the "Storing" phase and has been for an hour.
{"status":400,"statusReason":"Bad Request","message":"Underlying service error: Internal Server Error","toe":"43KJK4JK97-GJ665-PLNQ1"}
Any advice or examples would be great!
Resource:
https://developer.domo.com/docs/domo-apis/data#API%20-%20Import%20Data