REST API versioning suggestions for OpenSocial

Skip to first unread message

Niels van Dijk

Feb 2, 2012, 5:48:44 PM2/2/12
Hi all,

With the upcoming 2.0 implementation in Shindig 3, some of us may face
the need to have multiple API versions up and running (e.g. OpenSocial
1.0 and OpenSocial 2.0) as we want to make the move from Shindig 2 to 3
easy for our users. Currently -if I am correct - OpenSocial has nothing
on version the REST API, but the gadgets are able to explicitly request
a OS version. Is this by choice? Should the REST API also include some
sort of version? Do we as the spec community consider this an
implementation issue?


Matthew Marum

Feb 2, 2012, 8:05:37 PM2/2/12
There is an open spec specification issue for this.

If you have a proposal, feel free to share it.  

I recall a proposal to add a version segment into the path on URIs.
For example,

I was concerned with that because it would break any remotely stored links as versions changed.

I'd prefer to use HTTP Headers in requests/responses
OpenSocial-Version:  2.0.0

Optionally allow an OpenSocial version query parameter in requests.

Any thoughts?



You received this message because you are subscribed to the Google Groups "OpenSocial and Gadgets Specification Discussion" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Matthew Marum

Feb 3, 2012, 1:36:29 PM2/3/12
Capturing some discussion that happened in person this morning with Mark and later with James Snell.

There are merits to both approaches, so I think we're going look at supporting both.

James was going to post a specific proposal soon.


Niels van Dijk

Feb 4, 2012, 6:55:18 PM2/4/12

Thanks for you thoughts.

I think all examples are breaking stuff as we're moving from a situation with no version to one that includes a version :( The only option I see from an implementation standpoint is to make the 'v1' version also respond to an unversioned call and instruct remotes to implement a versioned call if they want new features included in 'v2'.

Given that, I agree that adding HTTP Headers would least bother remotes.

It would be nice if the container would also be able to respond if a version mismatch occurs, similar to what the container can do when gadget requests an unsupported version. However I must say I'm not realy in to http headers enough to suggest how that should work.


Bastian Hofmann

Feb 5, 2012, 6:17:47 AM2/5/12

+1 for versioning the api through HTTP headers, but instead of
creating our own custom header, we should just use the "Accept"
header, which was meant to be used for versioning :)

--- Bastian

On Sun, Feb 5, 2012 at 12:55 AM, Niels van Dijk

Reply all
Reply to author
0 new messages