Bug 815492 - Documentation shows /infinispan/rest in the client examples
Documentation shows /infinispan/rest in the client examples
Product: JBoss Data Grid 6
Classification: JBoss
Component: Documentation (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 6.0.0
Assigned To: gsheldon
Depends On:
  Show dependency treegraph
Reported: 2012-04-23 13:45 EDT by Brian Ashburn
Modified: 2012-08-15 12:44 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-14 23:05:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Brian Ashburn 2012-04-23 13:45:15 EDT
Description of problem:
There is no clear description of the base URL used by the REST server. The Python and Ruby examples both show it as "/infinispan/rest". The default page that comes up when the server comes up "http://localhost:8080" does not give the base URL at all.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:
The examples and front page for the REST server should show the base URL as "http://localhost:8080/rest/<cache name>/<key>"

Additional info:
Comment 1 Misha H. Ali 2012-06-06 21:22:44 EDT
Brian, I may be misunderstanding you, but is it sufficient to add a note specifying the base url with a brief explanation of the same, for example:

"The JBoss Data Grid REST server is mapped onto the location "/" as a default. As a result, the base URL is:


In the listed base URL, "/rest" represents the REST servlet, "MyData" represents the name of the cache and "MyKey" represents the key.

Please clarify if I am missing what you intended for this bug.
Comment 2 Martin Gencur 2012-06-11 08:01:19 EDT
I see the problem here. The following part of documentation specifies /infinispan/rest/... as the path for REST server: http://documentation-stage.bne.redhat.com/docs/en-US/JBoss_Data_Grid/6/html/Developer_Guide/chap-The_REST_Interface.html

This issue is only present with Ruby and Python examples.

http.post('/infinispan/rest/MyData/MyKey', DATA HERE', {"Content-Type" => "text/plain"}) 

should be replaced with 

http.post('/rest/MyData/MyKey', DATA HERE', {"Content-Type" => "text/plain"}) 

but there are more issues like this one.

Otherwise the home page of JDG server shows the proper context path starting with /rest (home page at http://localhost:8080/) so this should not be a problem.
Comment 3 gsheldon 2012-06-11 20:47:50 EDT
Ruby Client code:


Have corrected occurrence of /infinispan in 5 parts of the example code on lines 4, 6, 8, 10, and 12.

4) http.post('/rest/MyData/MyKey', DATA HERE', {"Content-Type" => "text/plain"})
6) puts http.get('/rest/MyData/MyKey').body
8) http.put('/rest/MyData/MyKey', 'MORE DATA', {"Content-Type" => "text/plain"})
10) http.delete('/rest/MyData/MyKey')
12) http.put('/rest/MyImages/Image.png', File.read('/Users/michaelneale/logo.png'), {"Content-Type" => "image/png"})

Python Client code:


Corrected occurrence of /infinispan in 2 parts of the example code:

3rd line after #How to insert data:

conn.request("POST", "/rest/Bucket/0", data, {"Content-Type": "text/plain"})

3rd line after #How to retrieve data:

conn.request("GET", "/rest/Bucket/0")

Changes will appear on the stage after the next brew.
Comment 4 Brian Ashburn 2012-06-12 10:13:12 EDT
Those are the changes that I was looking for. Thanks.
Comment 5 Misha H. Ali 2012-06-12 17:03:00 EDT
Thanks Martin and Brian. Marking this bug resolved and awaiting release.

Note You need to log in before you can comment on or make changes to this bug.