[katello-devel] API v2 - proposed changes in routes

Dmitri Dolguikh dmitri at redhat.com
Tue Mar 5 14:31:14 UTC 2013


On 05/03/13 01:29 PM, Eric D Helms wrote:
> On #2, if one of our core operating principles is that nearly 
> everything is scoped based on an organization, why would we want to 
> abstract that away and not make it explicit as part of resource 
> look-up?  Given that a design goal of RESTful APIs is to be 
> predictable, I would think the form that includes organization at the 
> trunk of the route is more predictable and mimics how resources are 
> structured.
>
> On changes to JSON format, I would like to make the request that there 
> be thought put into API "paging".  I am starting to work on using the 
> API for some UI components and adding our Elasticsearch infrastructure 
> to these API calls.  This typically involves requesting a chunk of 
> resources (say 25 for example) and then requesting the next 25 as the 
> user demands them.  As well, being able to look at the returned data 
> to know the total number of records even though I am only getting say 
> 26-50 with that particular call.

Hmm, wouldn't paging be better expressed as a url parameter (it is in 
essence a filter after all):

  /organizations/?from=10&to=20

Total number of records in the collection would come in json though.

-d




More information about the katello-devel mailing list