xefer

The Rebel Interface

The interface is built around the three major elements of XBEL: <xbel>, <folder> and <bookmark>. Folders are stored under URLs that end in “/”, and bookmarks are stored under URLs that do not end in “/”.

The <folder> Element

URL Format

xbel/.../folder-name/

Interface
HTTP MethodDescription
GET Get the folder and it’s children. See this note on hierarchy.
POST If a <folder> is POSTed, create a new folder under the given url.
If a <bookmark> is POSTed, create a new bookmark resource under the given url.
If any other entity type is POSTed, it is accepted and made a part of the resource, but no new resource is created.
All folders or bookmarks which will be URL-addressible must contain a <title> element.
Note: A shorter, URL-friendly name can also be associated with the bookmark using the Dublic Core element <alternative>. See this note on URIs.
PUT Create or update the folder at the given url.
If the folder already exists, it will be replaced by the PUT entity; all children of the resource will be replaced by the children of the entity also.
If the parent folder(s) do not exist, they will be created as necessary.
Note: Any element that is PUT to a URI must contain an <alternative> element. The value of the element must match the last element of the hierarchical URL name. See this note on URIs.
DELETEDelete the folder and all it’s children.
OPTIONS Returns metadata about the allowed methods and appropriate schemas for elements that may be PUT or POSTed at the URI.

The <bookmark> Element

URL Format

xbel/.../folder-name/bookmark-name

Interface
HTTP MethodDescription
GET Get the bookmark.
POST Accepts the entity and includes it under the bookmark, but no resource is ever created.
PUT Create or update a bookmark at the given url. If the parent folders do not exist, they will be created also, as necessary.
Note: Any element that is PUT to a URI must contain an <alternative> element. The value of the element must match the last element of the hierarchical URL name. See this note on URIs.
DELETEDelete the bookmark and all it’s children.
OPTIONS Returns metadata about the allowed methods and appropriate schemas for a bookmark that may be PUT at the URI.

The <xbel> Element

URL Format

xbel or xbel/

Interface

The <xbel> element is handled exactly the same way as the <folder> element, except that the <xbel> element can be referenced with or without the trailing “/”, other than that its behavior is the same.


The <title>, <desc>, <info> and <metadata> Elements

Interface

All these elements are common to the folder, bookmark and XBEL document elements. They are semantically rich but they are not themselves addressable resources. Any of these elements can be POSTed to the XBEL element that they are describing, but they do not return a resource location.


The <alias> and <separator> Elements

Interface

These elements are common to the folder and XBEL document elements. They are semantically rich but they are not themselves addressable resources. Any of these elements can be POSTed to the XBEL element that they will be included with, but they do not return a resource location.

It really doesn't make much sense to POST a <separator> element to it’s parent as it will simply be appended to the list of children. If seperators are need, the parent should be edited by the client and then PUT.

archive

topics

projects

feed