----- "Adam Young" ayoung@redhat.com wrote:
We are currently only going to unbind by entitlement ID. Thus to do unbind by product
GET http://host:8080/candlepin/consumers/<uuid>/entitlements and iterate through the collection to find the entitlement id for the given product
Then:
DELETE http://host:8080/candlepin/consumers/<uuid>/entitlements/<id>
I'd prefer it if instead the first step were:
GET http://host:8080/candlepin/consumers/<uuid>/products/<id>
Which would return a page with entitlement ID on it.
To sidestep your original question entirely... This feels like we are going too far down the hierarchy.
I would think that the first call is good, then for the second: DELETE http://host:8080/candlepin/entitlements/<id>
So with the first GET, you are requesting the collection of entitlements that are entitled to the specified consumer, but when dealing with a specific entitlement by id, just use the "global" collection to reference it.
Bryan - is this consistent with HATEOAS?
- justin
candlepin mailing list candlepin@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/candlepin
On 03/23/2010 12:02 PM, Justin Harris wrote:
----- "Adam Young"ayoung@redhat.com wrote:
We are currently only going to unbind by entitlement ID. Thus to do unbind by product
GET http://host:8080/candlepin/consumers/<uuid>/entitlements and iterate through the collection to find the entitlement id for the given product
Then:
DELETE http://host:8080/candlepin/consumers/<uuid>/entitlements/<id>
I'd prefer it if instead the first step were:
GET http://host:8080/candlepin/consumers/<uuid>/products/<id>
Which would return a page with entitlement ID on it.
To sidestep your original question entirely... This feels like we are going too far down the hierarchy.
I would think that the first call is good, then for the second: DELETE http://host:8080/candlepin/entitlements/<id>
I mis-stated. What you wrote is what is actually done.
So with the first GET, you are requesting the collection of entitlements that are entitled to the specified consumer, but when dealing with a specific entitlement by id, just use the "global" collection to reference it.
Bryan - is this consistent with HATEOAS?
- justin
candlepin mailing list candlepin@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/candlepin
candlepin mailing list candlepin@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/candlepin
On 03/23/2010 12:11 PM, Adam Young wrote:
On 03/23/2010 12:02 PM, Justin Harris wrote:
----- "Adam Young"ayoung@redhat.com wrote:
We are currently only going to unbind by entitlement ID. Thus to do unbind by product
GET http://host:8080/candlepin/consumers/<uuid>/entitlements and iterate through the collection to find the entitlement id for the given product
Then:
DELETE http://host:8080/candlepin/consumers/<uuid>/entitlements/<id>
I'd prefer it if instead the first step were:
GET http://host:8080/candlepin/consumers/<uuid>/products/<id>
Which would return a page with entitlement ID on it.
To sidestep your original question entirely... This feels like we are going too far down the hierarchy.
I would think that the first call is good, then for the second: DELETE http://host:8080/candlepin/entitlements/<id>
I mis-stated. What you wrote is what is actually done.
So with the first GET, you are requesting the collection of entitlements that are entitled to the specified consumer, but when dealing with a specific entitlement by id, just use the "global" collection to reference it.
Bryan - is this consistent with HATEOAS?
Given my 12 seconds of research, I think so.
-- bk
candlepin@lists.fedorahosted.org