Verb | Meaning (Simple) | Behaviour | SQL/Data Analogy | Use Case |
---|---|---|---|---|
GET | “Tell me about this.” | Retrieves a resource or field | SELECT * FROM table WHERE id = x | Viewing a project status or employee detail |
POST | “Here’s a new thing.” | Creates a new resource | INSERT INTO table ... | New project added, first metadata entry |
PUT | “Replace the whole thing.” | Full update (overwrites everything) | UPDATE table SET col = full_new_value | Reset a metadata block, replace a whole JSON object |
PATCH | “Change just these parts.” | Partial update (merge or modify specific fields) | UPDATE table SET col = JSON_MODIFY(...) | Add LoadDate , update SourceType but keep rest of the JSON untouched |
DELETE | “Remove this thing.” | Deletes a resource | DELETE FROM table WHERE id = x or UPDATE ... SET is_deleted = 1 | Remove a project, a relationship, or soft-delete a view |
HEAD | “Do you have this?” | Same as GET, but without the response body | EXISTS(...) or metadata lookup | Check if a key exists, useful for RPV frameworks |
OPTIONS | “What can I do here?” | Lists allowed operations on a resource | Metadata about available endpoints or actions | Discover valid fields for update or allowed actions in a UI |
PUT | (idempotent) “Set this to exactly this.” | Always results in the same final state, no matter how many times it’s run | Overwrite: SET col = value | Replacing entire JSON lineage block without merge logic |
PATCH | (non-idempotent or weakly idempotent) “Apply this change” | May result in slightly different values depending on context | UPDATE col = col + 1 or merge with existing JSON | Add expiry_date if not present, but don’t overwrite existing one |