Thursday, 29 August 2013

Is there standard format for represent date/time in URIs?

Is there standard format for represent date/time in URIs?

I am building an API endpoint that accepts DateTime as a parameter.
So far I have considered two formats:
A) Exclamation mark as minute delimiter:
http://api.example.com/resource/2013-08-29T12!15
Looks unnatural and even with clear documentation, API consumers are bound
to make mistakes.
B) URI segment per DateTime part:
http://api.example.com/resource/2013/08/29/12/15
Looks unreadable. Also, once I add further numeric parameters - it will
become incomprehensible!
Is there standard/convention for for representing date/time in URIs?

No comments:

Post a Comment