News for hackers. Stuff that matters.
Re:API Design Guide by absalyamov on Wednesday February 22, 2017 @11:27PM (#13711626)
As described in https://cloud.google.com/apis/design/design_patterns#get_uni...:

  //calendar.googleapis.com/users/-/events/123
Re:API Design Guide by theptip on Wednesday February 22, 2017 @11:49PM (#13711735)
Hadn't spotted that, it's an interesting syntax and I quite like it.

But it doesn't cover the case I'm referring to; in their example you MUST return the fully-qualified URL:

> shelves/shelf713/books/book8141, not shelves/-/books/book8141

This precludes there being multiple shelves with the same book (sensible in their example, since a book has only one shelf, but not in the example above).

Re:API Design Guide by the8bit on Thursday February 23, 2017 @12:09PM (#13715530)
While sometimes this does get tricky with resources that are clearly owned or associated with multiple things, often times a resource only has one real owner and it is unambiguous. It does make moving things a bit weird though, as moving a book between two shelves makes it have a different fully qualified name.
Re:API Design Guide by theptip on Thursday February 23, 2017 @01:39PM (#13716464)
Agree; put another way, sometimes you really do need a M2M relationship.