> On April 13, 2017, 12:37 p.m., David Radley wrote:
> > My understanding of Rest calls is that POST should be for create and PUT 
> > for update - to mirror the http spec - I would stick withj this standard.  
> > I like the separation between create and upate - especially for types - so 
> > we can explicitly understand the intent of the operation as create or 
> > update for governance.
> 
> Apoorv Naik wrote:
>     Yes that's correct. Let me revisit this and see if it makes more sense to 
> introduce a new endpoint for this functionality. Let's say POST 
> /types/typedefs/createOrUpdate
> 
> Apoorv Naik wrote:
>     Hey David, do you any comments on introducing the new endpoint ?
> 
> David Radley wrote:
>     Looking at https://en.wikipedia.org/wiki/Representational_state_transfer  
> this seems to be a reasonable description of the REST standard. I notice the 
> table "Relationship between URL and HTTP methods". so it seems to me :
>     - post without the new resournce name in the URL is create only. This is 
> the creation mechanism which is very widespread ; I have only seen this way 
> of creating.  
>     - put with the new resource name in the URL is update or create. I have 
> not seen this widely used for create. 
>     
>     I think if we expose the post and put as above - then the user can choose 
> between create only or "update or create".

With the new proposed endpoint - createOrUpdate would look like the name of a 
resource. So this would be non-standard Rest; I suggest we keep as standard as 
possible on the API to facilitate easy integration.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58333/#review171862
-----------------------------------------------------------


On April 12, 2017, 8:35 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58333/
> -----------------------------------------------------------
> 
> (Updated April 12, 2017, 8:35 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues, 
> Sarath Subramanian, and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> TypesREST to support creation in an update call
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/store/AtlasTypeDefStore.java 
> 198bd8fe515a96e654b24de3af92b6edfac3a6ae 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java
>  82465bfcbe7705e5493481a5aa080c0390a1cfe4 
>   webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java 
> 424ca58ce0bdeb71a6ddc829f98f303988216c99 
>   webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java 
> 5d846cf317ae46fa88ef7877baad129638e38e03 
> 
> 
> Diff: https://reviews.apache.org/r/58333/diff/3/
> 
> 
> Testing
> -------
> 
> mvn clean package executes successfully
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>

Reply via email to