----- Original Message -----
On Mon, May 16, 2011 at 1:57 PM, Justin Harris <
jharris(a)redhat.com >
wrote:
Hey gang,
So for this multi-owner stuff, we probably need to change how users
are created, then associated with an owner. Currently, the client will
POST to /owners/<id>/users to create a new user under that owner. We
could keep this the same, but that will likely involve a lot of
semi-magic logic where we check if that user is already in the
database and either update or create them. Alternatively, we could
move the user creation to POST /users and then require a second call
to associate a user with an owner (and subsequent calls when adding
more than one owner). The super RESTy approach would be to create a
/membership resource to manage this, which would be fine to implement.
All this does mean that we break the api for user creation, though I'm
not sure how heavily we are using this outside of our functional
tests. Does anyone have an opinion on this either way?
At first glance I prefer:
POST /users to create the user
PUT /owners/{id}/users/ to add the user to an owner
This last one would equate to "replace the users collection with what I am
providing" which doesn't seem
like what we are trying to do here.
and maybe a PUT to roles if need be.
jesus
_______________________________________________
candlepin mailing list
candlepin(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/candlepin