jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "frm/HttpOperations" by frm
Date Wed, 11 Mar 2015 16:46:25 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The "frm/HttpOperations" page has been changed by frm:
https://wiki.apache.org/jackrabbit/frm/HttpOperations?action=diff&rev1=6&rev2=7

  
   * `childrenCount` - a number representing the maximum number of children to read for each
returned node. This parameter is optional and is a single-value parameter.
  
- In case of success, the server returns a `200` response with a content type of `application/json`.
The body of the response is a JSON object representing a tree node. If the root of the tree
was not found, the JSON document will simply have the value `null`.
+ In case of success, the server returns a `200` response with a content type of `application/json`.
If the tree is not found at the specified revision (or at the latest revision), a `404` response
is returned. If a revision is specified and that revision is not valid, a `410` response is
returned. The body of the response is a JSON object representing a tree node. 
  
  A node is represented with a JSON object with the following structure:
  
  {{{
  {
-   "revision": "...",
-   "tree": {
-     "properties": {
+   "properties": {
-       "foo": {"type": "string", "value": "bar"},
+     "foo": {"type": "string", "value": "bar"},
-       "baz": {"type": "uri", "value": "http://acme.com"},
+     "baz": {"type": "uri", "value": "http://acme.com"},
-       "qux": {"type": "booleans", "value": [true, false, true]}
+     "qux": {"type": "booleans", "value": [true, false, true]}
-     },
+   },
-     "children": {
+   "children": {
-       "bob": null,
+     "bob": null,
-       "sue": null
+     "sue": null
-     }
    }
- }
  }}}
  
+ The response also contains a header called `Oak-Revision` containing the revision the tree
is bound to. If a tree is read from the latest revision, the `Oak-Revision` header will contain
the revision ID that was used on the server to read the returned tree. This allows the client
to reuse that revision ID for subsequent reads. If a tree is read from a specified revision,
the content of `Oak-Revision` simply contains the revision ID specified by the client. The
`Oak-Revision` header is present in case of both a `200` and a `404` response, but it is not
available in case of a `410` response.
- There are two things to note about the response returned by this method.
- 
- First, the returned tree is bound to a revision. This is especially handy if a client performs
a request agains the latest revision at `/revisions/last/tree/:path`. When the tree is returned,
the client has also a way to know which revision it is bound to - i.e. which revision was
the latest at the time the call was performed.
- 
- Second, there is no special return code when a tree is not found at the provided path. Instead,
a response for a tree that was not found is similar to the following:
- 
- {{{
- {
-   "revision": "...",
-   "tree": null
- }
- }}}
  
  Property values are serialized according to the following rules:
  

Mime
View raw message