I have package as resource. A package can have parent package and so on. On top of hierarchy is the root package. Now the use case is:
Given a packageId of any package (not necessarily root package), I want to retrieve details of the root package that exists in its hierarchy at top.
I am confused between 2 urls : (or any other which is better)
/rest/v1/packageDetails/rootPackage/{packageId}
Or
/rest/v1/packageDetails/{packageId}/rootPackage
what should be the most suitable rest end point url ?