How "store" REST archetype isn't creating a new resource and a new URI?
Asked Answered
B

1

8

REST API design indicates there are four resources archetypes: document, collection, store and controller.

Store do not create new resources; therefore a store never generates new URIs.

An example:

PUT /users/12245/favorites/boston-celtics

A user added Boston Celtics to his favorites list.

But how that isn't creating a new resource ? and how it isnt generating a new URI?

Brosine answered 19/9, 2012 at 17:54 Comment(2)
I think it is worth to comment that "archetypes" are just a terminology created on the book from Mark Massé, Rest API Design RulebookVallejo
There is no connection between REST and the terms you describe above except in one rather underwhelming book.Urushiol
C
3

A store does not create a resource on its own. The user of the store creates endpoints / URIs.

The contrast is between a Collection and a Store

Collection A collection resource is a server-managed directory of resources. Clients may propose new resources to be added to a collection. However, it is up to the collection to choose to create a new resource, or not. A collection resource chooses what it wants to contain and also decides the URIs of each contained resource.

Store A store is a client-managed resource repository. A store resource lets an API client: put resources in, get them back out, and decide when to delete them.

Call answered 19/9, 2012 at 18:8 Comment(2)
The linked resource no longer exists.Urushiol
This answer gives no more information than what is already in the doc. If you could give an example of client manager resource and server managed that would have helped.Uranology

© 2022 - 2024 — McMap. All rights reserved.