Multiple DateTime within Dataset not working


#1

I want to add a dataset with 2 dates (using python) and I keep getting Error 400. The request works with each date individually.

issuesDataDefinition = {
“fields”: {
“issue”: {
“type”: “string”,
“name”: “Issue”,
},
“starttime”: {
“type”: “datetime”,
“name”: “Start Time”
},
“endtime”: {
“type”: “datetime”,
“name”: “End Time”
}
},
“unique_by”: [“issue”]
}

Is this a known issue?

Thank You!


#2

Hi there @spgecko,

I ran a quick test with this code and it looks like there might be a stray comma causing it to be rejected as invalid.

When I tried to create a dataset using cURL and your code, I couldn’t get it to work either but I could get it to work if I took out the comma after "name": "Issue",

Here’s what worked for me:

"fields": {
"issue": {
"type": "string",
"name": "Issue"
},
"starttime": {
"type": "datetime",
"name": "Start Time"
},
"endtime": {
"type": "datetime",
"name": "End Time"
}
},
"unique_by": ["issue"]
}

Please do let me know if you do run into any further problems and I’ll see what I can do to troubleshoot for you! :slight_smile:

Cheers!

Lisa