[katello-devel] Merged sync status cli/api

Bryan Kearney bkearney at redhat.com
Mon Aug 29 12:50:38 UTC 2011


On 08/29/2011 04:00 AM, Tomas Strachota wrote:
> On 29/08/11 09:07, Dmitri Dolguikh wrote:
>> Hey Tomas,
>>
>> I think it would be a bit more restful if resource url mirrored the
>> model for synchronization: We have a sync resource, which supports
>> various types of sub-resources. I think a better way to show that would
>> be: /sync/{repositories, products, providers}.
>>
>> What do you think?
>> -d
>>
>
> I was inspired by pulp's routes and thought of it as of action for the
> repo/product/provider resources. I have no strong opinion about that. I
> like the idea that you start new synchronization eg by route:
>
> POST /repositories/ID/sync/
>
> rather than
>
> POST /sync/repositories/ID/
>
> We have ids only for repo synces. Product and provider synces are
> handled as list of it's repo synchronizations. We can't have any route
> like /sync/ID/... and therefore I chose the other way.
>
> But I'm a rest newbie so if it breaks any of the rest-best-practices
> rules, I have nothing against changing it;)
>
> T.


I think best practice is to try and avoid action resources, and go with 
the making true resources like sync. However.. at some point.. it does 
seem to break down.

- bk




More information about the katello-devel mailing list