ISO 8601 Format
I finally got a chance to start to play with the API and I have gotten some of the responses I expect. The one thing that I can not figure out is what format date/time needs to be in for pulling the water usage. I have tried several different version:
YYYYMMDD
YYYY-MM-DD
HH:MM:SS
HH:MM:ss.ffff
YYYYMMDDTHHMMSS
YYYY-MM-DDTHH:MM:SS
Those are just a few versions that I tried for a start time but all I ever get is:
{"code":400,"message":"Invalid ISO 8601 date time format.","errors":[]}
Can you give me actual examples that should work? How far can we go back? How granular can we get?
-
Official comment
Use
YYYY-MM-DDTHH:mm:ss.sssZ
What language is your client built in. we can provide specific examples.
Comment actions -
Moses, thanks for putting this up here. I had the same problem and your example helped. I highly recommend you guys update the API documentation with this info, as more people are going to run into this problem. ISO 8601 can take different forms and the more details and examples you provide in the documentation, the better!
Please sign in to leave a comment.
Comments
2 comments