First, there is no method in ModeShape's RESTful service to return all nodes from a repository. A repository can have millions of nodes with lots of content, so such a request would be make no sense and could have a monstrously-large response. Instead, there are methods to return some/all of the children (or descendants up to some depth) under a parent.
Secondly, the "context" is a term used in servlet-based applications, and typically refers to the location where the application is started within the server. By default this is "modeshape-rest
", although you can change it to something else by modifying the web.xml
in the WAR file.
The "response format" is typically JSON.
The RESTful service can access multiple repositories deployed in the same server, so in the URL format
http://<host>:<port>/<context>/<repository_name>/<workspace_name>/items/<node_path>
the variables in angle brackts(e.g., "<repository_name>
") would be replaced with the actual value. For example, if the RESTful service is accessible on the local machine on port 8080 in the default app context "modeshape-rest
" in the repository named "my-repository
" with workspace "default
", you can get the node at the path "/a/b/c
" by making an HTTP GET request at this URL:
http://localhost:8080/modeshape-rest/my-repository/default/items/a/b/c HTTP/1.1
where the actual HTTP request might look like this:
GET /modeshape-rest/my-repository/default/items/a/b/c HTTP/1.1
Host: http://localhost:8080
Accept: application/json
and the response will be a JSON file describing the node. All of the other methods on the RESTful service use a similar pattern and are described in the service documentation.