curl -i -H "Accept: application/json" -X POST -d '"time":{"start":"1h-ago","end":"10m-ago","downsampler":{"interval":"15m","aggregator":"max"}}'
http://localhost:4242/api/query/exp
I get the follwoing error:
HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=UTF-8
Content-Length: 9337
{"error":{"code":500,"message":"com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class net.opentsdb.query.pojo.Query$Builder] from String value ('time'); no single-String constructor/factory method\n at [Source: \"time\":{\"start\":\"1h-ago\",\"end\":\"10m-ago\",\"downsampler\":{\"interval\":\"15m\",\"aggregator\":\"max\"}}; line: 1, column: 1]","trace":"java.lang.IllegalArgumentException: com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class net.opentsdb.query.pojo.Query$Builder] from String value ('time'); no single-String constructor/factory method\n at [Source: \"time\":{\"start\":\"1h-ago\",\"end\":\"10m-ago\",\"downsampler\":{\"interval\":\"15m\",\"aggregator\":\"max\"}}; line: 1, column: 1]\n
...
I have tried most combinations for the JSON string without any success. Where am I going wrong? Also I notice on the web page there is a missing } in the example:
"time":{ "start":"1h-ago", "end":"10m-ago", "downsampler":{"interval":"15m","aggregator":"max"}