Timeline for answer to Design: Update properties on an entity in a RESTful, resource-based, API by Eric Stein
Current License: CC BY-SA 4.0
Post Revisions
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 1, 2024 at 9:30 | comment | added | Emaborsa | @EricStein How would you pass the parameter? In the body as Json object, body as plain text or url search value? | |
| Nov 20, 2019 at 12:52 | comment | added | goedi |
This seems reasonable. What if I want to update a field for all resources which satisfy some predicate? For ex, change status of all active orders. Would the following make sense? PUT /orders/active/status
|
|
| May 24, 2018 at 18:01 | comment | added | Steven Evers | Fair enough, I misspoke. name/savings-target are not resources, and if I model them as such then it feels like I'm so loosely defining "resources" that the term loses value for the purpose of designing the API, and "everything's a resource and it's all just endpoints" again. I might be wrong. What do you think? | |
| May 21, 2018 at 23:27 | comment | added | Eric Stein | @StevenEvers ReSTful APIs don't expose entities. They expose "resources". A resource can be whatever you need it to be. | |
| May 21, 2018 at 20:16 | comment | added | Steven Evers | I had thought of that and the concern I had was that name/savings-target are not entities within the domain (they're just properties on the account entity) but are being modeled that way using endpoints like this. | |
| May 21, 2018 at 18:58 | history | answered | Eric Stein | CC BY-SA 4.0 |