REST API: How to name a derived resource? -
The relative interface is a gazillion of naming conventions, questions about esp. All singular versus plural resource names are some denominations around:
retrieve / retrieve collection of user users / retrieve / user / {id} user's mail / user. Folder / User / {ID} User Delete / Update User {ID} User Delete
However, the above work is not done when the resource is from the environment. The Utpnn value.
My hypothetical application has the following end point:
Get information about the source of the received / source query
He answers:
- Referrer URL
- Remote IP
Since source
turns out from the environment There is no more than one source, so the resource is calling source
or searching for the source / {foo}
is not practical.
How can the rest of the styles handle the naming of these institutions?
Fielding Notes in Their Famous Section 6.2.1:
.. Writers need an identifier, which closely matches the words that they intend with a hymurphedia reference, Allows to stay.
Therefore, it is understandable to use the plain
source
end point.This would be a different thing if you want to provide more general service around the IP address provided, like
Comments
Post a Comment