Story #601
Evaluate REST url paths
100%
Description
As developers of the REST interface for DataONE, we need to ensure that the URL patterns are able to carry the information as expected with no ambiguity.
This story arises because of concern over the presence of "/" characters in identifiers, and the presences of the identifiers as URL components. So for example, expressing the identifier "http://mydata.com/some/data/set/1.0/metadata" in a couple of the interface URLs:
:get():
http://some.server/mn/object/http%3A%2F%2Fmydata.com%2Fsome%2Fdata%2Fset%2F1.0%2Fmetadata
:getSystemMetadata():
http://some.server/mn/object/http%3A%2F%2Fmydata.com%2Fsome%2Fdata%2Fset%2F1.0%2Fmetadata/meta
According to RFC 2616 (HTTP/1.1):
Characters other than those in the "reserved" and "unsafe" sets (see RFC 2396 r42) are equivalent to their ""%" HEX HEX" encoding.
So this approach should be valid, but can be considered fragile as there is some interpretation on how such URLs are handled by applications.
An alternative would be to simply use key, value pairs for adding this information. However, this needs to be evaluated.
History
#1 Updated by Dave Vieglais over 14 years ago
- Status changed from New to Closed
resolved by using only a single path element at the start of the REST URL patterns. So for example,
/object//meta becomes /meta/
The architecture docs have been updated to reflect these changes.