API call with InfoTable input results in "Unable To Parse JSON Request"
I have a python script that's calling a ThingWorx Service. I'm calling a different service elsewhere in the script and it's working, but I'm not sure why this one isn't. The only difference is that this service has an InfoTable input.
Here's the relevant code.
propNames = {
"dataShape": {
"fieldDefinitions": {
"name": {
"name": "name",
"baseType": "STRING"
},
"description": {
"name": "description",
"baseType": "STRING"
}
}
},
"rows": [{"name": "Stat_DisplaySpeed1"}]
}
params = {
"maxItems": 500,
"propertyNames": propNames,
"startDate": startDate.replace(tzinfo=timezone.utc).isoformat(),
"endDate": endDate.replace(tzinfo=timezone.utc).isoformat(),
"query": ""
}
headers = {
"appKey": PROD_KEY,
"Accept": "application/json",
"Content-Type": "application/json"
}
r = requests.post(url, params=params, headers=headers)
(startDate and endDate are defined elsewhere in the code)
This results in a status code of 406 with the body "Unable To Parse JSON Request"
Am I somehow forming "propertyNames" incorrectly? I'm confused about what's going on here.

