REST API
For integration in non-Java environments, one idea is to add a REST API that allows simple access to fleXive contents via HTTP.
This page collects proposals for methods that should be available. The implementation will probably use the Restlet
framework. The given URIs are not final, they are just used for grouping the methods and will change in the actual implementation.
The response should be an XML document, the response format will have to be determined. Contents could use a more readable version of the XML-export format.
The related forum discussion can be found here
.
Authorization/Authentication
Without authentication, any REST request has only guest user privileges. To gain more access, HTTP-Session-based authentication is provided (similar to a web application).
/auth/login
Login the user, returns the HTTP session ID to be provided in future requests.
/auth/logout
Performs a logout for the HTTP session.
Read-only access to fleXive content
/content
Returns a content instance by PK.
/tree
Returns the subtree identified by query parameters (e.g. node ID, node path, tree depth).
/tree/contents
Returns the contents of a subtree (e.g. for tree-based navigation on a website).
/query
Returns the results of a FxSQL search query.
Creating/editing fleXive contents
/content/create
Create a new content, using the same XML representation as returned by /content.
/content/upload
Convenience method for creating "binary" contents (like images, which have only one binary property).