<div dir="ltr"><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Cons:</div><ol><li>Lost investment in nesting.</li><li>Different structure than Pulp 2.</li></ol></blockquote><div>The "lost investment in nesting" con isn't a con. This is an example of the the "sunk cost" fallacy.</div><div><br></div><div>I don't think it matters much if our URL structure is different than in Pulp 2. Pulp 3 is already massively different. This is a small detail compared to the other changes being made. I don't think anyone will start switching to Pulp 3 and suddenly shout "oh no, my API client doesn't work because of the lack of nested paths!" If they do, the bigger issue is that their API client is bad.</div><div><br></div><div>I've written some small API-focused applications in the past, and I've found that nested URLs were problematic because they enforced strict sub-set relationships that often became problematic in the future. For example, if I have this URL structure:</div><div><br></div><div>/api/v1/people/{person_id}/items/{item_id}</div><div><br></div><div>...then it's easy to get info about the items a person has. But what if I want to find out which of my party members has concentrated sprayflesh, because a band of cloned delusional megalomaniacal robots is about to successfully murder a teammate, and I need to heal them <i>now</i>? Do I need to make four API calls?</div><div><br></div><div><span style="font-family:monospace,monospace">GET /api/v1/people/1/items?name=Concentrated%20Sprayflesh</span></div><div><span style="font-family:monospace,monospace">GET /api/v1/people/2/items?name=Concentrated%20Sprayflesh</span></div><div><span style="font-family:monospace,monospace">GET /api/v1/people/3/items?name=Concentrated%20Sprayflesh</span></div><div><span style="font-family:monospace,monospace">GET /api/v1/people/4/items?name=Concentrated%20Sprayflesh</span></div><div><br></div>Worse, let's say I'm a developer debugging an issue, and I want to find every concentrated sprayflesh in the known world. Do I need to make several thousand API calls? Both of these use cases are more elegantly solved by allowing users to work directly with items, and by providing good filtering support. This is based on my experience with some small old apps though, and none of them went into production. Take it as you will.<span style="font-family:monospace,monospace"><br></span></div></div></div>