[katello-devel] Resources: should they include 'organizations/:id'?

Bryan Kearney bkearney at redhat.com
Wed Jun 1 12:43:00 UTC 2011


On 05/31/2011 05:15 PM, Brad Buckingham wrote:
> Team,
>
> While working on search enhancements, I noticed that we are inconsistent
> in how we have resources defined, with respect to including organization
> as part of the resource.
>
> For example,
>
> - the following resources include organization:
> /organizations/:organization_id/environments
> /organizations/:organization_id/providers
>
> - however, the following do not:
> /changesets
> /dashboard
> /notices
> /roles
> /sync_plans
> /sync_schedules
> /sync_management
> /systems
> /users
>
> Note: the above is not all possible resources, just an example... :)
>
> While it may not be necessary to include organization in every resource,
> should we be consistent in including it for each resource that can be
> defined per organization? Do we need to include it?
>
> Note: The resolution to this thread should probably apply to both UI and
> API.
>
> (In general, given the primary keys that RAILs includes in the model
> definitions, we may not necessarily require the organization within the
> resource to ensure uniqueness; however, if a user were a super-user,
> they might want to be able to provide it to narrow the information
> returned to them.)
>

API wise.. I think we should make the /organizations/:org_id hte main 
path. However, it may get you only a small set of the data. If you want 
full details you may need to go to /resource/resource_id. I think (and 
correct me if I am wrong) this is the pattern we looked at in candlepin 
before ownergeddon.

-- bk




More information about the katello-devel mailing list