Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
API versioning
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 76 - 100 of 112 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Daniel Roop  
View profile  
 More options Aug 10 2012, 11:39 am
From: Daniel Roop <dan...@danielroop.com>
Date: Fri, 10 Aug 2012 11:39:29 -0400
Local: Fri, Aug 10 2012 11:39 am
Subject: Re: [api-craft] API versioning

Has anything I have said make you think that I disagree with either of
these statements?  I would stress the fact the words used here.  In the
first quote Roy states that you should have no "typed" RESOURCES not
"typed" REPRESENTATIONS.  I think this is significant, and completely
agree.  You shoudl not have "typed" resources.  I should be able to ask for
them in numerous representations (pdf, json, xml, collection+json,
hal+json, some custom representation specific to some need...)

I will also see your quotes from that page, and raise you a third

A REST API should spend almost all of its descriptive effort in defining

> the media type(s) used for representing resources and driving application
> state, or in defining extended relation names and/or hypertext-enabled
> mark-up for existing standard media types. Any effort spent describing what
> methods to use on what URIs of interest should be entirely defined within
> the scope of the processing rules for a media type (and, in most cases,
> already defined by existing media types). *[Failure here implies that
> out-of-band information is driving interaction instead of hypertext.]*

This to me means, you should define media types that are useful for driving
the application state on top of the resources that is meaningful to your
domain.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Roop  
View profile  
 More options Aug 10 2012, 11:43 am
From: Daniel Roop <dan...@danielroop.com>
Date: Fri, 10 Aug 2012 11:43:43 -0400
Local: Fri, Aug 10 2012 11:43 am
Subject: Re: [api-craft] API versioning

Kevin,

my big hangup on all of this, is how does a client express which version of
the representation they want.  I must admit I haven't read the siren stuff
you have sent as much as I want, but it seems that siren is a single media
type (correct?).  So if I call

GET /profile/1234
Accept: application/vnd.siren+json

I will always get back a representation with "type" information decided by
the server.  This means that I can not have one version ask for profilev1
and provilev2, even though the response representation includes the type
information.  Am I missing something?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Roop  
View profile  
 More options Aug 10 2012, 11:47 am
From: Daniel Roop <dan...@danielroop.com>
Date: Fri, 10 Aug 2012 11:47:20 -0400
Local: Fri, Aug 10 2012 11:47 am
Subject: Re: [api-craft] API versioning

So...this is the same thing as siren right?  including the "domain specific
information" inside the response.  It doesn't allow the client to express
which representation of the the domain specific information it desires.  If
I give up on this contraint being useful I completely agree with you guys.
 But I am not yet convinced that constraint isn't useful.

To attempt to be clear, the constraint I am describing...
"The client should be able to suggest the domain specific representation
they are capable of processing".


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mca  
View profile  
 More options Aug 10 2012, 11:53 am
From: mca <m...@amundsen.com>
Date: Fri, 10 Aug 2012 11:53:16 -0400
Local: Fri, Aug 10 2012 11:53 am
Subject: Re: [api-craft] API versioning

the example i linked to is not like siren, AFAIK since my example focuses
only on domain specifics, devoid of media-type.

in the example i linked, a profile for describing the problem domain of
microblogging is offerred and then applied to a *single* media type
(XHTML).  the point of the experiment is to explore the possibility of
consistently describing problem domains devoid of a single media type and
then applying that domain specific description consistently to more than
one media type (i haven't document my attempts on this last point yet).

FWIW, so far, the only tangible examples i have found like this (a single
problem domain expressed in multiple hypermedia types) is HAL. maybe i
misunderstand HAL on this point. maybe there are more examples of applying
the same problem domain semantics to multiple media types.

feel free to point them out to me.

mca
+1.859.757.1449
http://amundsen.com/blog/
http://twitter.com@mamund
http://mamund.com/foaf.rdf#me


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Swiber  
View profile  
 More options Aug 10 2012, 12:02 pm
From: Kevin Swiber <kswi...@gmail.com>
Date: Fri, 10 Aug 2012 12:02:56 -0400
Local: Fri, Aug 10 2012 12:02 pm
Subject: Re: [api-craft] API versioning

Just catching this now.  This thread is blowin' up!  It might be too late
to fork it into a new thread, so I'll just continue...

Bottom line is... significant message structure evolution will break
clients.  There's no getting around it (without adding tons of complexity).
 To put it in terms of HTML, think about an automated regression testing
tool that reads the Web page source and navigates through the site.  If the
HTML structure changes significantly, the regression script will break.

Before getting into this, I'd like to separate versioning a media type from
versioning an API.  I think we sometimes confuse these two concepts.  (In
the fine-grained media type world, they are closer together, but they are
still two different concepts.)

The question stands.  How do you create big changes to your API without
breaking a hypermedia client?

This assumes...  1) You are absolutely sure that you need this flexibility
at all.  2) You need to support new versions quickly.  3) You can't stand
leftover cruft in your messaging.  4) You are willing to push the
boundaries on comfort zones.  :)

My answer to this (right now, at this time of my life) is to build
versioning into your API.

One way to accomplish this is by building version selection into your
messaging.

GET /
{
  links: [
    { rel=["http://x.io/rels/version/1"], href="http://api.x.io/1" },
    { rel=["http://x.io/rels/version/2", "latest"], href="http://api.x.io/2"

}
  ]
}

A client knows it supports version 1, so it looks for the appropriate rel
value.  Again... this is a slippery slope.  Make sure it's absolutely
necessary.

I've also toyed around with using product tokens in the User-Agent and
Server headers.  My advice would be not to head down that path.  There are
too many unresolved issues.

I'm certainly open to feedback on this approach.  This is an open sore spot
in the hypermedia API universe.  I don't think we can get away without
providing guidance on how to resolve it.

Thanks.

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat Cappelaere  
View profile  
 More options Aug 10 2012, 12:31 pm
From: Pat Cappelaere <cappela...@gmail.com>
Date: Fri, 10 Aug 2012 12:31:32 -0400
Local: Fri, Aug 10 2012 12:31 pm
Subject: Re: [api-craft] API versioning
So from what I can glean, we seem to agree (or do we?) that:

1. We all need to provide semantic/contextual information to help clients understand the data structures that may be passed around.  There may be several ways of doing this based on your preferred API mime-type (html, json, xml).  That's a different thread to explore
2. That contextual information itself can be version-able so that the client can (potentially) evolve with the server
3. A change of version has to be immediately obvious to a client (rather than fall into it)
4. So far there is still no sign of real value added to custom mime types.  Early indications tend to show that:
        application/vnd.app+json  is really bad

        if push comes to shove, a better approach would be: application/json; profile="vnd.app"
        and you get brownie points if you specify version="1.0"
        and describedby="http://myapp.XYZ.com"
        for something like: application/json; profile="vnd.app"; version="1.0"; describedby="http://myapp.XYZ.com"

        but again, since the client has access to your context info (which may include version), this info is superfluous

is this a good summary?

Thanks,
Pat.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat Cappelaere  
View profile  
 More options Aug 10 2012, 12:35 pm
From: Pat Cappelaere <cappela...@gmail.com>
Date: Fri, 10 Aug 2012 12:35:31 -0400
Local: Fri, Aug 10 2012 12:35 pm
Subject: Re: [api-craft] API versioning

Kevin,

Have ever seen those custom media types:
        application/myapp+atom+xml
        or text/vnd.myapp+html for that matter

Just curious/
thanks,
Pat.

On Aug 10, 2012, at 11:17 AM, Kevin Swiber <kswi...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Williams  
View profile  
 More options Aug 10 2012, 12:43 pm
From: Peter Williams <pe...@barelyenough.org>
Date: Fri, 10 Aug 2012 10:43:59 -0600
Local: Fri, Aug 10 2012 12:43 pm
Subject: Re: [api-craft] API versioning

With this model how do you deal with the situation where client A
understands v1 captures the uri `http://api.x.io/1` and passes it to
client B which only understands v2?

The only approach i can think of is to provide a link to every
resource that is logically equivalent to the current resource (ie, one
link for each version) in every representation generated by the api.
That way client B could GET the v1 resource and see that it has a v2
equivalent and navigate to that supported version of the resource.
This is certainly possible but it is effectively a just an awkward
implementation of content negotiation. We are basically just saying
that each resource has exactly one representation and then using links
(and extra round trips) to find the representation we actually want.

Many incremental changes/improvement can be made to apis using the
addition of new link relations and properties. We should definitely
use that approach when possible. However, when you are introducing
representations that have a significantly different structure you need
content negotiation. You can either implement it yourself or you can
use http's built in (and fairly bad ass) content negotiation. Or you
could do both.

Peter
barelyenough.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
justin kruger  
View profile  
 More options Aug 10 2012, 12:56 pm
From: justin kruger <justin.kru...@gmail.com>
Date: Fri, 10 Aug 2012 09:56:06 -0700
Local: Fri, Aug 10 2012 12:56 pm
Subject: Re: [api-craft] API versioning
At a very basic idea an api is an Interface, and in software
Interfaces are contracts.

Another contract we have at the API level is an API token.

In some worlds like facebook, the product is in such evolution that it
would be hard for a facebook API engineer to enter into a 10 year
contract, or even a 2 year contract.  I bet facebook can only really
say that their API might be stable for about 3 months.

Netflix on the other hand has entered into contracts with TV
manufactures and in those cased the API needs to hold up for 5-7
years.  Versioning in the Netflix world allows them to hold true on
their contracts while innovating.

I think any API should default to the latest version of the contract,
and using it all of the time will always resort to the latest version,
however, i do believe that once you have a consumer that would like a
stable version of the API some expectations need to be set around how
long that API will be stable.

Using a version number in a device that is say 5 years old, seems
silly if in year 2 you discover a security exploit and you need to fix
it, because those... good urls are not going to change right?  What
will happen is all of that semantic goodness you tried to architect
will get thrown out when you need to map all v1.56 requests to
v1.56.03.  If you just made the changes at the API KEY level and
allowed the manufacturer/ consumer to upgrade via an upgrade pannel,
that same key could map to any version of the API, not just the one
you define.

I think the API key pattern also works for facebook as it allows a
user with an app that consumes it to choose which version to use.

The key to remember is that both the API and it's version are separate
contracts.  I have yet to implement an API this way, but.. I'd like to
it seems to make sense.

--
--
--
Justin Kruger
Social Media Software Engineer -
San Francisco, CA

--
http://twitter.com/jdavid
http://www.linkedin.com/in/jdavid


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Williams  
View profile  
 More options Aug 10 2012, 12:56 pm
From: Peter Williams <pe...@barelyenough.org>
Date: Fri, 10 Aug 2012 10:56:19 -0600
Local: Fri, Aug 10 2012 12:56 pm
Subject: Re: [api-craft] API versioning

On Fri, Aug 10, 2012 at 10:31 AM, Pat Cappelaere <cappela...@gmail.com> wrote:
> So from what I can glean, we seem to agree (or do we?) that:

Who is we?

> 1. We all need to provide semantic/contextual information to help clients understand the data structures that may be passed around.  There may be several ways of doing this based on your preferred API mime-type (html, json, xml).  That's a different thread to explore

I'd say there is definitely *not* consensus on this this point.
(Assuming that by "provide" you mean "provide in http responses".)

> 2. That contextual information itself can be version-able so that the client can (potentially) evolve with the server

I'd say there is also not a general consensus on this point. (Though i
tend to agree.)

> 3. A change of version has to be immediately obvious to a client (rather than fall into it)

Still no consensus. :) (The best changes are ones existing clients
don't even notice.)

> 4. So far there is still no sign of real value added to custom mime types.  Early indications tend to show that:
>         application/vnd.app+json  is really bad

I'd say there is significant evidence that this approach works rather
well. We can argue over whether it is the best approach, but is has
*no* functional problems and has been in use by a fair number of
systems for a fairly long time.

>         if push comes to shove, a better approach would be: application/json; profile="vnd.app"
>         and you get brownie points if you specify version="1.0"
>         and describedby="http://myapp.XYZ.com"
>         for something like: application/json; profile="vnd.app"; version="1.0"; describedby="http://myapp.XYZ.com"

These are all effectively just the domain/app specific mime type
approach implemented in a less well supported (by intermediates and
app frameworks) way.

Peter
barelyenough.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Swiber  
View profile  
 More options Aug 10 2012, 1:22 pm
From: Kevin Swiber <kswi...@gmail.com>
Date: Fri, 10 Aug 2012 13:22:17 -0400
Local: Fri, Aug 10 2012 1:22 pm
Subject: Re: [api-craft] API versioning

On Fri, Aug 10, 2012 at 12:43 PM, Peter Williams <pe...@barelyenough.org>wrote:

I'm not sure I fully understand the scenario.  Is "client A" acting as a
proxy to the service for "client B?" If "client B" can't figure it out, it
breaks.

> The only approach i can think of is to provide a link to every
> resource that is logically equivalent to the current resource (ie, one
> link for each version) in every representation generated by the api.
> That way client B could GET the v1 resource and see that it has a v2
> equivalent and navigate to that supported version of the resource.
> This is certainly possible but it is effectively a just an awkward
> implementation of content negotiation. We are basically just saying
> that each resource has exactly one representation and then using links
> (and extra round trips) to find the representation we actually want.

That seems really awkward, and I'm not sure what the use case is for
switching between versions.

> Many incremental changes/improvement can be made to apis using the
> addition of new link relations and properties. We should definitely
> use that approach when possible. However, when you are introducing
> representations that have a significantly different structure you need
> content negotiation. You can either implement it yourself or you can
> use http's built in (and fairly bad ass) content negotiation. Or you
> could do both.

If by "significantly different," you mean a new format altogether (like PDF
instead of text/plain), then I agree with using content negotiation.

--
Kevin Swiber
Projects: https://github.com/kevinswiber
Twitter: @kevinswiber


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat Cappelaere  
View profile  
 More options Aug 10 2012, 1:23 pm
From: Pat Cappelaere <cappela...@gmail.com>
Date: Fri, 10 Aug 2012 13:23:29 -0400
Local: Fri, Aug 10 2012 1:23 pm
Subject: Re: [api-craft] API versioning

On Aug 10, 2012, at 12:56 PM, Peter Williams <pe...@barelyenough.org> wrote:

> On Fri, Aug 10, 2012 at 10:31 AM, Pat Cappelaere <cappela...@gmail.com> wrote:
>> So from what I can glean, we seem to agree (or do we?) that:

> Who is we?

I was just trying to summarize where I thought this group was converging on because the thread is becoming fairly long and I am loosing it.  Please try to summarize for me as we go.

>> 1. We all need to provide semantic/contextual information to help clients understand the data structures that may be passed around.  There may be several ways of doing this based on your preferred API mime-type (html, json, xml).  That's a different thread to explore

> I'd say there is definitely *not* consensus on this this point.
> (Assuming that by "provide" you mean "provide in http responses".)

Well, are you the only one not doing it?
HTML does it with Microformats, Microdata, HTML5+RDFa… and other profile patterns…
XML does it with schemas
JSON has JSON-Schema…
Siren with Profile management…
[not sure about HAL… no semantic info found provided examples: http://haltalk.herokuapp.com/rels/user
so it cannot really be used in a more complex enterprise system]

>> 3. A change of version has to be immediately obvious to a client (rather than fall into it)

> Still no consensus. :) (The best changes are ones existing clients
> don't even notice.)

That's not realistic.  There will be cases that changes are inevitable and will break clients.

>> 4. So far there is still no sign of real value added to custom mime types.  Early indications tend to show that:
>>        application/vnd.app+json  is really bad

> I'd say there is significant evidence that this approach works rather
> well. We can argue over whether it is the best approach, but is has
> *no* functional problems and has been in use by a fair number of
> systems for a fairly long time.

I was pointed by IT people to problems in organizations that use highly secured proxies/firewalls… they will not punch holes for all those custom media types (especially if they keep changing)…
and having the burden on the developer side to keep mucking with your settings to debug the apis.
So it seemed that the second recommendation was far more palatable while still redundant.

Pat.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Swiber  
View profile  
 More options Aug 10 2012, 1:25 pm
From: Kevin Swiber <kswi...@gmail.com>
Date: Fri, 10 Aug 2012 13:25:45 -0400
Local: Fri, Aug 10 2012 1:25 pm
Subject: Re: [api-craft] API versioning

Just an add-on... I neglected to mention what I felt was somewhat obvious.
 If versioning is absolutely necessary and the client isn't responsible for
choosing a preference from a list of versions, the easiest hypermedia
approach is just to provide a different root URL for your entry point.

v1: http://lucky-day-api.tacos.gov/
v2: http://el-guapo-api.tacos.gov/

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat Cappelaere  
View profile  
 More options Aug 10 2012, 1:38 pm
From: Pat Cappelaere <cappela...@gmail.com>
Date: Fri, 10 Aug 2012 13:38:08 -0400
Local: Fri, Aug 10 2012 1:38 pm
Subject: Re: [api-craft] API versioning

Kevin,

Have you ever tackled any more significant API than dealing with obvious resources that do not require any semantic context?
[there may be a better way to phrase this…]
If I am a geo service, I need to know about projection assumption, lat/long order…
Thanks,
Pat.

On Aug 10, 2012, at 1:25 PM, Kevin Swiber <kswi...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Williams  
View profile  
 More options Aug 10 2012, 1:43 pm
From: Peter Williams <pe...@barelyenough.org>
Date: Fri, 10 Aug 2012 11:43:17 -0600
Local: Fri, Aug 10 2012 1:43 pm
Subject: Re: [api-craft] API versioning

On Fri, Aug 10, 2012 at 11:23 AM, Pat Cappelaere <cappela...@gmail.com> wrote:
>>> 1. We all need to provide semantic/contextual information to help clients understand the data structures that may be passed around.  There may be several ways of doing this based on your preferred API mime-type (html, json, xml).  That's a different thread to explore

>> I'd say there is definitely *not* consensus on this this point.
>> (Assuming that by "provide" you mean "provide in http responses".)

> Well, are you the only one not doing it?
> HTML does it with Microformats, Microdata, HTML5+RDFa… and other profile patterns…
> XML does it with schemas
> JSON has JSON-Schema…
> Siren with Profile management…
> [not sure about HAL… no semantic info found provided examples: http://haltalk.herokuapp.com/rels/user
> so it cannot really be used in a more complex enterprise system]

I was not speaking for myself on this point. Several people have
expressed the idea that the client has some context before it makes a
request and that it can use that context to decide how to process the
response.

>> (The best changes are ones existing clients
>> don't even notice.)

> That's not realistic.  There will be cases that changes are inevitable and will break clients.

I agree that we may not always achieve backwards compatible
improvements. But it is often achievable and it we, as api developers,
should strive for it at all times. If we tried we could achieve a lot
more often than we currently do.

If our mean time to incompatible change was 10 years would it even be
worth having this conversation?

> I was pointed by IT people to problems in organizations that use highly secured proxies/firewalls… they will not punch holes for all those custom media types (especially if they keep changing)…

I suppose that there might be networks some place in the world that
block rare media types but after implementing several apis that are
used by very large, stodgy and enterprisey organizations i have yet to
encounter any such issues. I think this argument falls into the FUD
category.

> and having the burden on the developer side to keep mucking with your settings to debug the apis.

This is a fair critique. Not one that, imo, rises to the level of
disqualifying the solution, though.

> So it seemed that the second recommendation was far more palatable while still redundant.

I'll try FUD argument myself now. :) Are the caches in intermediates
and/or in your http library going to really treat
`application/json;version=1` and `application/json;version=2` as
different? (I am not even sure that according to the HTTP spec they
should.). And are you going to be able to easily implement handing out
different responses based on a mime type parameter?

Peter
barelyenough.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat Cappelaere  
View profile  
 More options Aug 10 2012, 1:54 pm
From: Pat Cappelaere <cappela...@gmail.com>
Date: Fri, 10 Aug 2012 13:54:07 -0400
Local: Fri, Aug 10 2012 1:54 pm
Subject: Re: [api-craft] API versioning

On Aug 10, 2012, at 1:43 PM, Peter Williams <pe...@barelyenough.org> wrote:

If that's the case, they need to speak up.  If the client needs out-of-band info and rely on a pdf spec, then this would be a disqualifier for me

>>> (The best changes are ones existing clients
>>> don't even notice.)

>> That's not realistic.  There will be cases that changes are inevitable and will break clients.

> I agree that we may not always achieve backwards compatible
> improvements. But it is often achievable and it we, as api developers,
> should strive for it at all times. If we tried we could achieve a lot
> more often than we currently do.

Sure but this is not the world I live in.

> If our mean time to incompatible change was 10 years would it even be
> worth having this conversation?

>> I was pointed by IT people to problems in organizations that use highly secured proxies/firewalls… they will not punch holes for all those custom media types (especially if they keep changing)…

> I suppose that there might be networks some place in the world that
> block rare media types but after implementing several apis that are
> used by very large, stodgy and enterprisey organizations i have yet to
> encounter any such issues. I think this argument falls into the FUD
> category.

Nope this sounds real to me. Please do not blow it off unless you can really back it up.  We do have to go through security firewalls.  I do not see why we ought to make it harder on ourselves if solution 2 has the same meaning.

>> and having the burden on the developer side to keep mucking with your settings to debug the apis.

> This is a fair critique. Not one that, imo, rises to the level of
> disqualifying the solution, though.

Fair but I have seen the value either.

>> So it seemed that the second recommendation was far more palatable while still redundant.

> I'll try FUD argument myself now. :) Are the caches in intermediates
> and/or in your http library going to really treat
> `application/json;version=1` and `application/json;version=2` as
> different? (I am not even sure that according to the HTTP spec they
> should.). And are you going to be able to easily implement handing out
> different responses based on a mime type parameter?

We certainly will need to respond with different resource representations as needed.
I am not sure that we will support:
text/myapp+html
application/vnd.myapp+json
application/vnd.myapp+atom+xml
unless there is a legitimate need for it.  Still trying to find it.

Thanks,
Pat.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Williams  
View profile  
 More options Aug 10 2012, 2:05 pm
From: Peter Williams <pe...@barelyenough.org>
Date: Fri, 10 Aug 2012 12:05:39 -0600
Local: Fri, Aug 10 2012 2:05 pm
Subject: Re: [api-craft] API versioning

On Fri, Aug 10, 2012 at 11:22 AM, Kevin Swiber <kswi...@gmail.com> wrote:
> I'm not sure I fully understand the scenario.  Is "client A" acting as a
> proxy to the service for "client B?" If "client B" can't figure it out, it
> breaks.

Lets say i have a order system, an accounting system and a warehouse
(inventory/shipping) system. These systems work together to help me
run my business.

 * the order system, after accepting a new order, notifies the
warehouse api of the order to be shipped and the accounting api of the
revenue by passing the uri of the order to each
 * the warehouse uses that uri to figure out what items to actually
ship (because people can remove items from the order right up until
the moment the order actually ships, a la Amazon).
 * Once the order has shipped the warehouse notifies the accounting
api that the order has been shipped (so that the revenue can be
realized)

Consider the following scenario:

1. we release a new incompatible version of the order api (but we
continue to pass v1 uris to both the warehouse and accounting so
nothing breaks)
2. we update the warehouse to support v2 of the order api and change
it so that we use the v2 uri for the warehouse
3. we stop realizing revenue until we update accounting to support the
v2 order api because when the warehouse says `/v2/order/42` shipped
accounting goes and fetches that resource but doesn't know how to
interpret the representation it gets back.

In this example, if we update accounting first we might be able to
roll things out more incrementally but the larger the number of
interlinked systems the more likely we are going to end up with a
version dead lock between some of them.

Peter
barelyenough.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Roop  
View profile  
 More options Aug 10 2012, 3:00 pm
From: Daniel Roop <dan...@danielroop.com>
Date: Fri, 10 Aug 2012 15:00:15 -0400
Local: Fri, Aug 10 2012 3:00 pm
Subject: Re: [api-craft] API versioning

> 1. We all need to provide semantic/contextual information to help clients
> understand the data structures that may be passed around.  There may be
> several ways of doing this based on your preferred API mime-type (html,
> json, xml).  That's a different thread to explore

I don't know that you NEED to, but I can see potential value in it.

4. So far there is still no sign of real value added to custom mime types.

>  Early indications tend to show that:

This is where i strongly disagree.  Should application/atom+xml not exist
because application/xml   exists?  the Atom mime type builds on top of xml
(and the xml format even encourages this behavior by declare that +xml is a
standard for extending the format to have semantic meaning.

REST in Practice<https://www.amazon.com/dp/0596805829/ref=as_li_ss_til?tag=danroo-20&c...>
(a
great book on this topic) also recommends app specific Media Types.  If you
haven't read the book I would highly recommend it.

since the client has access to your context info (which may include

> version), this info is superfluous

You are suggesting that because in the response the client recieves
contains a reference to a schema, they don't need a say in the version that
is returned?  I think I am missing something.

On Fri, Aug 10, 2012 at 12:31 PM, Pat Cappelaere <cappela...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat Cappelaere  
View profile  
 More options Aug 10 2012, 3:09 pm
From: Pat Cappelaere <cappela...@gmail.com>
Date: Fri, 10 Aug 2012 15:09:54 -0400
Local: Fri, Aug 10 2012 3:09 pm
Subject: Re: [api-craft] API versioning

On Aug 10, 2012, at 3:00 PM, Daniel Roop <dan...@danielroop.com> wrote:

> 1. We all need to provide semantic/contextual information to help clients understand the data structures that may be passed around.  There may be several ways of doing this based on your preferred API mime-type (html, json, xml).  That's a different thread to explore

> I don't know that you NEED to, but I can see potential value in it.

Needs quite a bit in that area.  As soon as you have to deal with specific, non trivial data, you really need to be careful about explaining what you mean (not unlike any semantic effort out there)

> 4. So far there is still no sign of real value added to custom mime types.  Early indications tend to show that:
> This is where i strongly disagree.  Should application/atom+xml not exist because application/xml   exists?  the Atom mime type builds on top of xml (and the xml format even encourages this behavior by declare that +xml is a standard for extending the format to have semantic meaning.

> REST in Practice (a great book on this topic) also recommends app specific Media Types.  If you haven't read the book I would highly recommend it.

LOL.  I do read a few books occasionally. Thanks for the pointer. I am talking about application specific mime-types.
Again, have you seen any indication of people out there exposing their resources and using:
application/vnd.myapp+atom+xml
or creating web pages with domain specific content as text/vnd.myapp+html

Just curious.

> since the client has access to your context info (which may include version), this info is superfluous
> You are suggesting that because in the response the client recieves contains a reference to a schema, they don't need a say in the version that is returned?  I think I am missing something.

Yes.  Since any serious client accessing any serious service would have access to that context information that would also contain version info in some form or another.

So why would you also need to specify a custom media type for serious RESTful applications.  Sorry for drilling on this.
Pat.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Williams  
View profile  
 More options Aug 10 2012, 3:50 pm
From: Peter Williams <pe...@barelyenough.org>
Date: Fri, 10 Aug 2012 13:50:49 -0600
Local: Fri, Aug 10 2012 3:50 pm
Subject: Re: [api-craft] API versioning

On Fri, Aug 10, 2012 at 1:09 PM, Pat Cappelaere <cappela...@gmail.com> wrote:
> Again, have you seen any indication of people out there exposing their
> resources and using:
> application/vnd.myapp+atom+xml
> or creating web pages with domain specific content as text/vnd.myapp+html

Github is the only public API i am aware of that uses vendor media
types.[1] (Anyone else away of other public examples?) I do it on a
regular basis, as do several others that frequent the rest-discuss
mailing list. The APIs i work on are not available to the public, but
they are regularly utilized by clients developed and run by our
customers.

[1]: http://developer.github.com/v3/mime/

Peter
barelyenough.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pat Cappelaere  
View profile  
 More options Aug 10 2012, 4:02 pm
From: Pat Cappelaere <cappela...@gmail.com>
Date: Fri, 10 Aug 2012 16:02:00 -0400
Subject: Re: [api-craft] API versioning
Peter,

On Aug 10, 2012, at 3:50 PM, Peter Williams <pe...@barelyenough.org> wrote:

> On Fri, Aug 10, 2012 at 1:09 PM, Pat Cappelaere <cappela...@gmail.com> wrote:
>> Again, have you seen any indication of people out there exposing their
>> resources and using:
>> application/vnd.myapp+atom+xml
>> or creating web pages with domain specific content as text/vnd.myapp+html

> Github is the only public API i am aware of that uses vendor media
> types.[1] (Anyone else away of other public examples?) I do it on a
> regular basis, as do several others that frequent the rest-discuss
> mailing list. The APIs i work on are not available to the public, but
> they are regularly utilized by clients developed and run by our
> customers.

> [1]: http://developer.github.com/v3/mime/

But that was not my question.  Look at the mime-types.

Regardless Is Github a best practice we ought to follow for reasons I have given?
They still do support original mime-type application/json
[VERSIONing is introduced in the mime-type itself.]
They do not have any "semantically challenged" data types.

If you have domain specific content in an HTML page, do you use text/vnd.app+html ?
If you extend Atom to output domain specific resources, do you use application/vnd.app+atom+xml ?

Thanks,
Pat.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Swiber  
View profile  
 More options Aug 10 2012, 4:03 pm
From: Kevin Swiber <kswi...@gmail.com>
Date: Fri, 10 Aug 2012 16:03:03 -0400
Local: Fri, Aug 10 2012 4:03 pm
Subject: Re: [api-craft] API versioning

I mentioned some options in another strand of this thread[1].

There are options such as hypermedia-driven negotiation (i.e., having the
client select from a list of versions the server provides)... or just using
a completely different URL starting point.

Whatever method... For big ol' changes, I think it makes sense to have the
client choose which version they want to interact with, whether that's by
hypermedia or client developer making a decision at design time.

[1] https://groups.google.com/d/msg/api-craft/iInGY4vmgro/11yucNUBEhoJ

--
Kevin Swiber
Projects: https://github.com/kevinswiber
Twitter: @kevinswiber


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
13protons  
View profile  
 More options Aug 10 2012, 4:31 pm
From: 13protons <a...@13protons.com>
Date: Fri, 10 Aug 2012 13:31:16 -0700 (PDT)
Local: Fri, Aug 10 2012 4:31 pm
Subject: Re: API versioning

My take on versioning is to literally interpret the previous posts about
"you should version if you introduce incompatible features". Adding new
vocabulary to your api that doesn't break what's already in place wouldn't
need a customer facing version increment, even though you'd probably want
to track that progress internally with a minor v #.

-Alan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jack Repenning  
View profile  
 More options Aug 10 2012, 4:37 pm
From: Jack Repenning <repenning.j...@gmail.com>
Date: Fri, 10 Aug 2012 13:37:28 -0700
Local: Fri, Aug 10 2012 4:37 pm
Subject: Re: [api-craft] Re: API versioning

On Aug 10, 2012, at 1:31 PM, 13protons <a...@13protons.com> wrote:

> My take on versioning is to literally interpret the previous posts about "you should version if you introduce incompatible features". Adding new vocabulary to your api that doesn't break what's already in place wouldn't need a customer facing version increment, even though you'd probably want to track that progress internally with a minor v #.

Agreed, that "introducing new URLs for resources" sounds like a "compatible change," and shouldn't cause you to roll your version number: all code that formerly worked with your API still does (right? or did you mean something else?).

Agreed, that you'll want to keep track of anything you change.

But disagree, I think, that the way to track that is "minor version number." I think tracking that via version control is sufficient. In any case, if your tracking scheme includes some such concept as a "minor version number," whatever that is it should not be embedded in the URLs. "Tracking internally," pretty much by definition, means tracking things the users don't need to care about.

Jack Repenning


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Kelly  
View profile  
 More options Aug 11 2012, 5:27 am
From: Mike Kelly <mikekelly...@gmail.com>
Date: Sat, 11 Aug 2012 10:27:02 +0100
Local: Sat, Aug 11 2012 5:27 am
Subject: Re: [api-craft] API versioning

On 10 Aug 2012, at 18:23, Pat Cappelaere <cappela...@gmail.com> wrote:

>>> 1. We all need to provide semantic/contextual information to help clients understand the data structures that may be passed around.  There may be several ways of doing this based on your preferred API mime-type (html, json, xml).  That's a different thread to explore

>> I'd say there is definitely *not* consensus on this this point.
>> (Assuming that by "provide" you mean "provide in http responses".)

> Well, are you the only one not doing it?
> HTML does it with Microformats, Microdata, HTML5+RDFa… and other profile patterns…
> XML does it with schemas
> JSON has JSON-Schema…
> Siren with Profile management…
> [not sure about HAL… no semantic info found provided examples: http://haltalk.herokuapp.com/rels/user
> so it cannot really be used in a more complex enterprise system]

HAL absolutely can be used in a "complex enterprise system" (afaik GEICO have a huge project built on top of it being worked on by large dev team).

If the HTML page at the /rels/user URI is not complex enough then you could also serve a JSON shema document or similar from that URI too.

HAL also has profiles, check out the Internet-Draft:

http://tools.ietf.org/html/draft-kelly-json-hal-03

Cheers,
M


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 76 - 100 of 112 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »