API Design · Middle · Question 2 of 75

When should a relationship be its own resource, like /users/42/memberships?

Explanation

Treating a membership as a resource gives you natural create, update and delete operations on it.

Further reading

Problem with a question

API Design · Middle · question 2

Test yourself

Take the API Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz