I’m currently planning on implementing API for HgLab and the obvious role model for me here is GitHub.
My API obviously won’t be an exact copy due to inherent differences between Mercurial and Git and due to different tasks GitHub and HgLab solve, but similarity will be quite clear.
How ethical of me will it be to copy their API to a significant extent? Is the API design copyrightable?
3
I am not a lawyer. If you are genuinely worried about this you should consult one.
It is typically considered fine to duplicate an API as long as you don’t look at the implementation at all. For instance, this is what the Wine project does with the Win32 API. In Oracle’s recent court case against Google, one of Oracle’s arguments was that Google was not allowed to copy Oracle’s APIs for Java, however, the court did not agree with this argument.
2
As of Nov 2019, the Oracle vs. Google case has reached the Supreme Court. Oracle is in the driver’s seat, having won at Federal appeals court level. In reading through various articles, it looks like the core issue is whether you exactly copy the API in order to offer a competing product, i.e. one that users can swap out with your competitor and not have to change anything. If you’re not doing that you should be Ok.
Sun made Java open source many years ago, but the Java use license prevents redistribution (as noted here). Unfortunately for Google, that’s what they do: redistribute in order to compete with the copyright owner, without paying. IMHO, they will not be able to convince 5 conservative justices that this is ok.
7