Hi, here's my 2 cents re the first proposal...
Why do we have separation between objects and tags/comments? Shouldn't
the objects mapping be enough to handle them?
And speaking of objects where is the path to get all objects, not just
from a page? I propose:
* /objects[?start=offset&number=n] (The list of objects in the wiki)
* /objects/{className}/ (All the object of class {className} in the
wiki) <-- missing
* /object/guid/{guid} (The object identified by its {guid})
* /object/guid/{guid}/properties (The property list for the object
identified by its {guid})
* /object/guid/{guid}/properties/{property} (The property for the
object identified by its {guid})
* /object/guid/{guid}/history/{version} (The version {version} of
the object identified by {guid})
* /object/guid/{guid}/history/{version}/properties (The property
list for the version {version} of the object identified by {guid})
* /space/{space}/page/{page}/objects[?start=offset&number=n] (The
list of objects associated to a {page})
* /space/{space}/page/{page}/objects/{className}/ (All the object of
class {className} in a {page}) <-- missing
*
/space/{space}/page/{page}/history/{version}/objects[?start=offset&number=n]
(The list of objects associated to a {page}'s {version})
* /space/{space}/page/{page}/history/{version}/objects/{className}/
(All the object of class {className} in a {page}'s {version}) <-- missing
Do we still need this, since the object's number should be deprecated by
the use of the guid:
* /space/{space}/page/{page}/object/{className}/{objectNumber} (The
object identified by {id})
*
/space/{space}/page/{page}/object/{className}/{objectNumber}/properties
(The property list for the object identified by {id})
*
/space/{space}/page/{page}/object/{className}/{objectNumber}/properties/{property}
(The property the object identified by {id})
And does it make sense to have this, when we already know the guid of
the object we want:
* /spaces/{space}/pages/{page}/objects/guid/{guid} (The object
identified by its {guid})
* /spaces/{space}/pages/{page}/objects/guid/{guid}/properties (The
property list for the object identified by its {guid})
*
/spaces/{space}/pages/{page}/objects/guid/{guid}/properties/{property}
(The property for the object identified by its {guid})
The semantics implies that object operations can be performed on:
- a page
- an older version of a page (read-only)
- the wiki
IMO, it's more flexible this way.
With this mapping you should have access to comments/tags (and
attachments?).
The drawback would be that we loose:
* /tags/{tag1}[,{tag2},{tag3}...][?start=offset&number=n] (The list
of pages tagged with tags {tag1}, {tag2}, {tag3}, ...)
Of course, we could still have it as a convention or we could even
create a generic way of getting this result with other objects as well.
Related to pages, we could also have:
* /pages[?start=offset&number=n] (The list of available pages in the
space in the entire wiki)
Could we need it?
Thanks.
P.S.: From what I asked around, it seems that attachments are not
objects. That seems weird to me because, intuitively, the attachments
should be objects on a page of the class Attachment. On attachments you
have versioning, meta-data and an attachment can exist on a page or not,
the behaviour of an object. Could anybody explain the reason for this
please?
Fabio Mancinelli wrote:
> Dear all,
>
> I worked a bit on the design of the RESTful API and as a result I've
> integrated what was written on the
> http://dev.xwiki.org/xwiki/bin/view/Design/RestfulAPI page.
>
> There is still a big and important part missing (maybe the most
> important one), i.e., the one about the data formats for representations
> (in particular the XML schemas to be used in requests and responses). I
> am working on it.
>
> Anyway you can already comment on what is present on the page.
>
> Thank you.
>
> -Fabio
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs