I don't buy the SAMBA example in the original article. As I understand it they reverse engineered the API/protocol from the on the wire network traffic. This would to me make it not a case of literal copying and therefore not infringing a copyright in the API (if it exists).
The equivalent for a general API would be avoiding the documentation and the actual API files (headers etc.) and developing an alternative implementation from examples of client code and the behaviour observed of the library when tested with inputs.
This may be the answer, allow APIs to be copyrighted (in general - some may be too trivial to be copyrightable where there are limited sensible approaches) but allow the reverse engineering of behaviour.
Of course it would be possible to grant licenses to the the API and it may be sensible to consider the flexibility of the API license when choosing to use a library, webservice or framework and the difficulty of transferring away from it to an alternative supplier.
It's much less ambiguous to exclude APIs from copyright. Otherwise, you'll have endless battles trying to prove that someone really did have access to the API documentation, or some derivative work thereof. Or, someone will argue that reverse engineering an API should not be permitted.
On the flip side, API copyrights could be rendered moot by simply reverse engineering everything, which isn't really that hard.
That is already an issue with many areas of copyright law where assessment needs to be made. If doing reverse engineering you would need to document your approach and be careful to stick to it.
Whether it is or isn't hard will depend on the size and scale of the API that you are trying to recreate. It is probably hard enough that it would normally be easier to create your own API except where you were doing it to create an alternative platform for existing code.
'only solution' that is a very absolute response, is there not even room for discussion? I would have downvoted you if I could and I have upvoted comments I don't agree with in this thread that added depth and thought to the discussion.
Secondly exactly what is it a solution to?
Have you considered any possible costs or downsides to the proposal?