[katello-devel] How should we post objects

Tomas Strachota tstrachota at redhat.com
Tue Jul 17 12:20:03 UTC 2012


On 07/16/2012 03:38 PM, Bryan Kearney wrote:
> On 07/13/2012 11:07 AM, Dmitri Dolguikh wrote:
>> The difference between creating a new object and updating an existing
>> one is (in the context of this discussion) in idempotency: repeated
>> calls to create an object may return a new object every time, while
>> making the same change over and over again should result in the same
>> state of the object. So: POST is for creation, PUT is for updates.
>>
>
> Agree. My main qustion is if I should be opening bugs where the json
> which is postd does not have the following:
>
> object_name: {
> attr: "foo"
> }
>
> an instead has:
>
> {
> attr: "foo"
> }
>
> -- bk
>

I'm for opening bugs in such cases and working towards consistency.

As far as I remember from the previous discussion more people seemed to 
like using {obj_name: {...}} pattern as it had slightly more advantages.

T.




More information about the katello-devel mailing list