8
 Followers
43
 Likes

REST expose: allow PATCH and indicate which fields have been sent

Integration
New

It is possible to consume a REST API using the PATCH method, but it isn't possible to expose a REST API with it. PATCH is meant for selectively updating data (instead of all at once, like PUT). I would like the Platform to support PATCH for an exposed REST API as well.

However, PATCH is useless without being able to detect which fields (Attributes) have been sent by the calling party. Currently, if a consuming party doesn't send all the fields, the Platform will set them to the default value. This works for most cases, but not for a PATCH. Therefore, when supporting PATCH, there must be some way (via a runtime property) for the Platform to indicate which fields have been sent, and which were not.

Created on 19 Jul 2018
Comments (9)
Merged this idea with 'Add HTTP method 'Patch' for exposing REST api methods' (created on 27 Jun 2018 06:39:30 by Stefan Dirkx)

For now the only available values are: Get, Post, Put and Delete



This comment was:
- originally posted on idea 'Add HTTP method 'Patch' for exposing REST api methods' (created on 27 Jun 2018 by Stefan Dirkx)
- merged to idea 'REST expose: allow PATCH and indicate which fields have been sent' on 23 Oct 2018 15:06:37 by Kilian Hekhuis

Hi Stefan,


Can you detail your use case to use PATCH in an exposed REST API? Thanks!



This comment was:
- originally posted on idea 'Add HTTP method 'Patch' for exposing REST api methods' (created on 27 Jun 2018 by Stefan Dirkx)
- merged to idea 'REST expose: allow PATCH and indicate which fields have been sent' on 23 Oct 2018 15:06:37 by Kilian Hekhuis

Changed the category to Integration




This comment was:
- originally posted on idea 'Add HTTP method 'Patch' for exposing REST api methods' (created on 27 Jun 2018 by Stefan Dirkx)
- merged to idea 'REST expose: allow PATCH and indicate which fields have been sent' on 23 Oct 2018 15:06:37 by Kilian Hekhuis

André,

For an use case, please take a look at the accepted answer here:

https://stackoverflow.com/questions/47921841/rest-api-update-single-field-of-resource



This comment was:
- originally posted on idea 'Add HTTP method 'Patch' for exposing REST api methods' (created on 27 Jun 2018 by Stefan Dirkx)
- merged to idea 'REST expose: allow PATCH and indicate which fields have been sent' on 23 Oct 2018 15:06:37 by Kilian Hekhuis

A must have... Please, implement patch

How is this still marked as new? :D 

Please implement PATCH. André, as an example, I cannot implement a SCIM client because it uses patch - http://www.simplecloud.info/

Please consider enabling this. 

We don't need to waste time asking for specific scenarios as http protocol includes this for a long time. Http protocol have a specification, blocking us to adhere to it is the answer. We don't need a specific scenario.

Just don't block us to use what is correct if we know what we are doing.

On consumed apis OS supports PATCH and the dropdown list includes it. Why should you block it on exposed?

To don't block on very specific use cases just include PATCH on drop-down for verb on exposed method, ignore or split suggestions based on a fragile specification or the case of fields suggested by Kilian.

 I think PATCH was first on RFC-5789, https://tools.ietf.org/html/rfc5789 in 2010.

views
1011
Followers
8