Haufe-Lexware/api-style-guide

Composite Id as Ressource Id - URL structure

MariusSchumann opened this issue · 4 comments

In many existing web applications we have to deal with mutliple Ids (Composite Keys). Let's say, Order 4711 and Order LIne 42, whereas the Order Lines are exposed via the rest API.

How do we apply this to the REST URL structure?

1) odernlines/4711/42 
   or
2) odernlines(4711,42)

Are there any guidelines?

From my point of view that is not a composite key. Simply use

orders/4711/orderlines/42

Agreed. Should we add that to the guide or add an FAQ document to the guide to track these?

Can we get a close on this? @MariusSchumann or @Kodrafo - can one of you please add the change?

I will do that and look for a appropriate location in the style guide