APIs are a contract

by greg on July 2, 2008

Apparently Twitter is no longer returning a response when a post is sent in using the API – at least according to Craig’s tweet. This is probably designed to help Twitter with their scaling problems, but I cringed a little inside when I read that, because it also breaks a whole lot of Twitter clients that rely on that response to know when a post is successfully sent. I especially feel sad for my iPhone-developing brethren – don’t think I can publicly talk about the details, but I think this means a lot of Twitter clients launching on the iPhone will go out the door broken.

APIs are a contract – by releasing them, you’re implicitly promising that they’ll work consistently. Too many changes on too little notice ultimately leads to too few developers.

{ 1 comment… read it below or add one }

Mukul Kumar July 2, 2008 at 9:03 pm

Hi Greg,

I have been dealing with Web APIs for about 16 months now, as a programmer, and I know how much of a pain it is to for an app to keep working with an API. APIs by definition are “not supposed to change their interfaces”, and they are “supposed to work”, and they are supposed to work “across version migrations”, and are supposed to “keep the offsets of the return data structures constant across releases”. I have seen most APIs break ALL of the above rules. Welcome to the world of APIs. I have learnt it the hard way, and I am superparanoid when somebody asks me to “quickly integrate with an API, with no recurrent maintenance costs”.

Thanks,
Mukul.
“Designing Caches for Highly Scalable Web 2.0 Applications” – http://tinyurl.com/5wfowg

Leave a Comment

Previous post:

Next post: