Receiving 415 Error when Updating Dataset through API


I'm trying to upload some CSV data with Python and I feel like my data is formatted properly but I'm still getting a 415 error. This is what the data looks like and is set to a variable cvList.

"None","Auxiliary Copy","Running","92"
"soepdfs02","Synthetic Full Backup","Running","47"
"None","Auxiliary Copy","Running","13"
"s001apporap01","Synthetic Full Backup","Running","23"
"None","Auxiliary Copy","Running","81"
"None","Auxiliary Copy","Running","97"

I was able to successfully create the dataset in the same script so I know the access_token is correct. This is what I'm using for this section of the code.

def UpdateDataset():
# Put Dataset
print("Updating Domo Dataset")
response = requests.put(
url="{DATASET ID}/data",
"Authorization": access_token,
"Accept": "text/csv",
print('Response HTTP Status Code: {status_code}'.format(
print('Response HTTP Response Body: {content}'.format(
except requests.exceptions.RequestException:
print('HTTP Request failed')

Anyone know why I'm seeing this? This is the 2nd dataset with which I'm having this same issue.

Best Answer

  • jlazerus
    jlazerus 🟡
    Answer ✓

    Okay, I finally figured this out. I needed to add a "Content-Type": "text/csv" to my header because "Accept": "text/csv" was not enough.


  • Just as an update, I also tried sending a single line non-variable string "a,b,c,d" and am still getting that error. 

This discussion has been closed.