REST API - Patch?

I’m wondering how to update just one item on a huge REST API endpoint.
Am I missing something or is there no PATCH method?
How to update, one item only in a REST API endpoint with - say 80 items?

Typically a REST API would give an individual update route for every item, so to update item 23, you’d call PUT (or PATCH) https://myapi.com/api/v1/someResourceName/1. What API are you specifically using, or is it custom built?

That said, the ability to use the PATCH method when using Update record with REST API direct integration should be added: https://tracker.appgyver.com/feature-requests/p/rest-api-direct-integration-needs-support-for-patch-method

Thank’s for the answer. PUT and PATCH are different imho. For PATCH you just provide the item to be updated/changed.

I’m using the Django RESTful API (https://www.django-rest-framework.org/).
I can work with the HTTP module, but I thought that since we have the full Schema, once the general GET is setup, a PATCH would be very handy.

It depends – normally, PUT would change the whole target object to a new one (i.e. missing properties are removed), while PATCH just changes the given fields.

Some REST APIs might have a “mass-modify” action by calling PATCH on the resource root, in which case you would pass in an array of objects to update with the single API call.

That said, I agree, the feature set for the REST API direct integration could and should be expanded – you can follow (and upvote) the issue in the Tracker link above!

1 Like