Currently, there's no way to retrieve information about the service being interacted with (e.g., its name).
This would be useful in some cases like error reporting (i.e., which service is having an issue?).
I'm thinking we create a ResterMetaData middleware that looks for paths beginning in /rester/v* and processes them. For example, /rester/v1/info could return a hash of information about the service (i.e., {"name": "MyService", "versions": [2,3,4]})
In the future, we could use this for more advanced things too. For example, retrieving a list of available endpoints (/rester/v1/endpoints) or getting details on endpoints (/rester/v1/endpoints/v3/users -- could return required parameters).
The version in /rester/v1/info would allow us to support different versions of the builtin metadata endpoints.
Currently, there's no way to retrieve information about the service being interacted with (e.g., its name).
This would be useful in some cases like error reporting (i.e., which service is having an issue?).
I'm thinking we create a
ResterMetaData
middleware that looks for paths beginning in/rester/v*
and processes them. For example,/rester/v1/info
could return a hash of information about the service (i.e.,{"name": "MyService", "versions": [2,3,4]}
)In the future, we could use this for more advanced things too. For example, retrieving a list of available endpoints (
/rester/v1/endpoints
) or getting details on endpoints (/rester/v1/endpoints/v3/users
-- could return required parameters).The version in
/rester/v1/info
would allow us to support different versions of the builtin metadata endpoints.