[
https://issues.apache.org/jira/browse/GEODE-7938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17077679#comment-17077679
]
Darrel Schneider commented on GEODE-7938:
-----------------------------------------
The new solution now supports a "keys" query parameter that can be used instead
of the old path variable.
With the new "keys", which is a comma separated list, if any of the keys
contain special characters then they should be UTF-8 encoded.
The server will UTF-8 decode all of these keys.
So now you can do GET, PUT, or DELETE with a
{noformat}
?keys=key1,key2...
{noformat}
and those keys can have special characters in them. If you are using the
swagger web page it automatically does UTF-8 encoding.
The old "keys" path variable endpoints are still implemented but users are
encouraged to use the new "?keys=" query parameter flavor.
If you want to create a key that needs to be UTF-8 encoded then the old
{noformat}
POST {region}?key=key
{noformat}
will not work. The key is not decoded by the server.
So for this use case use the new
{noformat}
PUT {region}?op=CREATE&keys=key
{noformat}
> dev rest api should allow '.' and '/' characters in region keys
> ---------------------------------------------------------------
>
> Key: GEODE-7938
> URL: https://issues.apache.org/jira/browse/GEODE-7938
> Project: Geode
> Issue Type: Bug
> Components: rest (dev)
> Reporter: Darrel Schneider
> Assignee: Darrel Schneider
> Priority: Major
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> The dev rest api has multiple endpoints that can take region entry keys
> either as path variables or as query parameters. If the key contains a "/"
> then it can cause problems with parsing the URL. The '.' character also
> causes problems.
> The operations and endpoints that do not allow '.' and '/' in region keys are:
> {noformat}
> GET, PUT, and DELETE on /v1/{region}/{keys}
> POST on /v1/{region}?key={key}
> {noformat}
> A solution should be found that does not break backwards compatibility but
> that also allows these characters to be in the specified region key(s).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)