Also Oracle vs Google in their legal battle about the use of Java APIs in Android. https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google...
Google won out over Oracle in the end but it took a long time — from 2012 until 2016; four years of court cases — with some courts finding that API structures were copyrightable and others found that they were not, or that reimplementation was fair use. I guess we now have a precedent thanks to this but it could still be an issue? IANAL so I don’t know.