Hey, all. For the OpenHMIS API [1] recently implemented by Dan Schultz, we decided to put the API version number in the services base in the URL -- see the "api/v3/" portion of these examples:
http://hmis.example.com/openhmis/api/v3/clients
http://hmis.example.com/openhmis/api/v3/clients/3637
http://hmis.example.com/openhmis/api/v3/enrollments
http://hmis.example.com/openhmis/api/v3/enrollments
http://hmis.example.com/openhmis/api/v3/enrollments/1729/contacts/35
etc. This way:
- "api/" makes it clear these URLs are RESTful API calls, and
- "v3/" makes it clear what version of the API is being called
We're planning something like the
http://semver.org/ scheme for deciding when the API version number must be incremented (basically, on backwards-incompatible changes), of course.
I'd like to get others' thoughts on this general practice. Putting the API version in the URL like this seems to be fairly standard nowadays, at least with other APIs I've seen, but if there are arguments for or against it, in an HMIS API, this seems like the right forum to discuss it.
Unrelatedly, in response to Eric Jahn's recent post:
>Yes, I'm all in for an Fall NHSDC pow wow to come to some further
>consensus with the other vendors on where API functionality should go
>for a next version. Improved auth, improved convenience methods and
>search, user administration, reporting, etc. seem like good
>candidates. Not that each vendor would be asked to implement each
>new method, but that those methods are there for them, if the need
>arises. Who else is in? -Eric
Would love to be there, yes, and will see if I can make it. If we can get Dan Schultz there, so much the better! But please note
https://twitter.com/slifty/status/631853747170357248 which may mean Dan has different plans in October, we'll just have to see :-). (Congratulations, Dan!)
Best regards,
-Karl Fogel
[1]
https://github.com/PCNI/OpenHMIS/blob/feature-compass_schema/docs/API.md