RESTFul API - History endpoint - Answered

Any idea what I need to change to get the JSON back from this command from the RESTful API examples?

curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
       -H "Content-Type: application/json" \
       http://localhost:8123/api/history/period/2016-12-29T00:00:00+02:00

It gives me a message saying Invalid Datetime. Did the format change?

Version 0.38.1

Figured it out, the date time format needs to be: yyyy-mm-dd%20hh:mm:ss

Note that the %20, instead of a space, is required for curl. However, it may not be required in all languages. I’m using node.js to make a REST call, and the module I’m using lets me use a space.