I'm just starting out I'm running the following python script against the hsp service
import requests
jsonRequest = """{from_loc:"VIC",to_loc:"BTN",from_time:"0700",to_time:"0800",from_date:"2016-12-27",to_date:"2016-12-27",days:"WEEKDAY"}"""
resp = requests.post("https://hsp-prod.rockshore.net/api/v1/serviceMetrics/", auth=(<username removed>,<password removed>), json=jsonRequest)
print(resp._content)
but am getting the error
{"my_journey_errors":{"errors":["Could not read document: Can not instantiate value of type [simple type, class com.caci.hsp.myjourney.api.ServiceMetricsRequestSchema] from String value ('{from_loc:\"VIC\",to_loc:\"BTN\",from_time:\"0700\",to_time:\"0800\",from_date:\"2016-12-27\",to_date:\"2016-12-27\",days:\"WEEKDAY\"}'); no single-String constructor/factory method"]}}
Can anyone shed any light on what is wrong with my request.
Thanks,
Brian