/users
with the data {username: 'skwee357', email: '[email protected]'}
and the server is capable of creating a resource, it will respond with 201 and resource location (lets assume /users/1
) and any next call to GET /users/1
will return {id: 1, username: 'skwee357', email: '[email protected]'}
./users/1
with 'patch document'. In my case it would be a json {email: '[email protected]'}
. The server then returns 200 (assuming permission are ok). This brings me to first question:/users
to replace the entire collection. Issuing PUT on a specific entity makes no sense after PATCH was introduced. Am I wrong?/users
, as you suggest, then you might get back an entity such asemail
).email
, now that's the only thing in this entity. This has resulted in data loss.GET /users
returns a list of users, currently:newuser
to the list of users. After calling this the first time, GET /users
would return:GET /users
returns:f(f(f(x))) = f(x)
, but makes no guarantes about f(g(f(x)))
.