What is the difference between PUT and PATCH requests in Appian?
What is the difference between PUT and PATCH requests in Appian?
Answer
Both are HTTP methods you can use in Appian Integrations and Web APIs to update a resource.
PUT replaces an existing resource with the data you send. It usually needs the complete resource, and any field you leave out may be removed, reset or rejected, depending on how the API is built.
PATCH updates only the fields you send. Fields you leave out generally stay as they are, again depending on how the API implements PATCH.
Example
Consider an Employee Management application in Appian that integrates with an external HR system. The existing employee data looks like this:
The scenario is updating John’s salary from 60000 to 70000.
Using PUT (full update):
The complete employee record is sent, with the salary updated.
Using PATCH (partial update):
Only the salary field is sent. The name and department remain unchanged if the API supports this partial-update format.
Key differences
Feature | PUT | PATCH |
|---|---|---|
Purpose | Full replacement | Partial modification |
Request body | Usually complete resource | Specific changes |
Missing fields | May be reset or rejected | Usually unchanged |
Idempotent | Yes | Not necessarily |
Best use case | Replace employee details | Update only salary |
Appian supports both methods in Integration objects and Web APIs, but it doesn’t decide which fields to keep or replace. That is up to the receiving API’s implementation.
Interview takeaway: use PUT when you’re replacing the entire resource, and PATCH when you’re changing specific fields and want the rest left alone.