3
 Followers
21
 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
Comments (5)
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
views
383
Followers
3