Requirement
In some REST integrations, clients may require the use of the PATCH method to update records in their applications (for example, Salesforce REST API only supports the PATCH method for record updates).
Since PATCH is not directly supported through standard configurations, a custom plugin can be used to achieve this functionality.
Solution Overview
We have created a custom Java plugin that performs a REST API call using the PATCH method.
This custom plugin allows you to send a PATCH request by defining your REST URL, request body, and headers.
This article applies to Adeptia Connect version 3.7.2 and later, as well as Java 17.
Java Compatibility
The previous version of the custom plugin was compatible up to Java 8.
https://support.adeptia.com/hc/en-us/articles/360001242846-PATCH-Method-in-REST-API
The updated version of this custom plugin has been revised and tested to work with Java 17.
It uses the Apache HttpClient library (from `org.apache.http.`) and replaces older, deprecated classes from Java 8 with newer compatible ones for Java 17 environments.
Instructions
1. Download the updated custom plugin file (`CP_PatchOperationLatest_Java17.java`).
2. Update the following fields as per your configuration:
URL: The REST endpoint you want to call.
Body: The JSON payload for the PATCH request.
Headers: Add any required headers, such as `Content-Type` or authentication keys.
3. Validate that the response is correct.
Comments
0 comments
Please sign in to leave a comment.