Following this [[model|http://tiddlyhome.bidix.info/BidiX/namespaces/TiddlyHome/tiddlers/A%20Model%20for%20a%20RESTful%20API.html]] above the [[TiddlyHome1|http://tiddlyhome2.bidix.info/]] API.
! URI Resources
!! User
* {{{{username}}}}<br>Display the resource {{{{username}}}}
!! Namespace
* {{{{username}/namespaces}}}<br>Namespace container owns by {username}.
* {{{{username}/namespaces{namespace_id}}}} <br>{namespace_id} owns by {username}.
!! Tiddler
* {{{{username}/namespaces{namespace_id}/tiddlers}}} <br>Tiddler container in {namespace_id} owns by {username}.
* {{{{username}/namespaces{namespace_id}/tiddlers{tiddler_id}}}} <br>{tiddler_id} in {namespace_id} owns by {username}.
!! Tiddlywiki
* {{{{username}/tiddlywikis}}}<br>Tiddlywiki container own by {username}.
* {{{{username}/tiddlywikis{tiddlywiki_id}}}} <br>{tiddlywiki_id} owns by {username}.
! Requests to ~TiddlyHome Service
Actually {{{PUT}}} is not implemented.
For now requested content-type (HTTP Request header) are not interpreted. All responses, except when specified, are in {{{Content-type: text/html}}}.
Return code conform to [[model|http://bidix.appspot.com/BidiX/namespaces/TiddlyHome/tiddlers/A%20Model%20for%20a%20RESTful%20API]].
!! User
* {{{GET {username}}}} <br>Return username and mail address.//Need more developments.//
* {{{GET www.google.com/accounts/ServiceLogin?...}}} <br>For now available only from a browser. Redirect to the current page once the login (or logout) is done.
!! Namespace
* {{{GET {username}/namespaces}}} <br>List of Namespace own by {username}.
* {{{POST {username}/namespaces}}} <br>Create or update namespace with these attributes :
**name
**access: 'on' | '/%%/'
**owner_name:
**previous_name: if different from name, previous name is deleted.
**return_url: response redirect to this url
* {{{GET {username}/namespaces?new}}} <br>Return a form that submit a {{{POST {username}/namespaces}}}. This form is empty.
* {{{GET {username}/namespaces{namespace_id}}}} <br>return an HTML page for {namespace_id} details.
* {{{GET {username}/namespaces{namespace_id}?edit}}} <br>Return a form that submit a {{{POST {username}/namespaces}}}. This form is filled with {namespace_id} details.
* {{{DELETE {username}/namespaces{namespace_id}}}} <br>{{{GET {username}/namespaces{namespace_id}?delete}}} <br>Delete {namespace_id}.
!! Tiddlywiki
* {{{GET {username}/tiddlywikis}}} <br>List of Tiddlywiki own by {username}.
* {{{POST {username}/tiddlywikis}}} <br>Create or update tiddlywiki with these attributes :
**name
**namespace_name
**access: 'on' | '/%%/'
**title
**subtitle
**{tiddler_title}: 'on' | '/%%/' (for each tiddler in {namespace_name})
**previous_name: if different from name, previous name is deleted.
**return_url: response redirect to this url
* {{{PUT {username}/tiddlywikis{tiddlywiki_id}?put}}} <br>{{{POST {username}/tiddlywikis{tiddlywiki_id}?put}}} <br>//Not documented//
* {{{GET {username}/tiddlywikis?new}}} <br>Return a form that submit a {{{POST {username}/tiddlywikis}}}. This form is empty.
* {{{GET {username}/tiddlywikis{tiddlywiki_id}}}} <br>return an HTML page for {tiddlywiki_id} details.
* {{{GET {username}/tiddlywikis{tiddlywiki_id}.html}}} <br>return a [[TiddlyWiki|http://www.tiddlywiki.com/]] page for {tiddlywiki_id}.
* {{{GET {username}/tiddlywikis{tiddlywiki_id}.xml}}} <br>return a xml page in RSS format for {tiddlywiki_id}.
* {{{GET {username}/tiddlywikis{tiddlywiki_id}?edit}}} <br>Return a form that submit a {{{POST {username}/tiddlywikis}}}. This form is filled with {tiddlywiki_id} details.
* {{{GET {username}/tiddlywikis{tiddlywiki_id}?upload}}} <br>Return a form that upload a [[TiddlyWiki|http://www.tiddlywiki.com/]] a {{{POST {username}/tiddlywikis{tiddlywiki_id}?put}}}.
* {{{DELETE {username}/tiddlywikis{tiddlywiki_id}}}} <br>{{{GET {username}/tiddlywikis{tiddlywiki_id}?delete}}} <br>Delete {tiddlywiki_id}.
!! Tiddler
* {{{GET {username}/namespaces{namespace_id}/tiddlers}}} <br>List of Tiddler in {namespace_id}.
* {{{POST {username}/namespaces{namespace_id}/tiddlers}}} <br>Create or update a tiddler with these attributes :
**title
**tags
**text
**html: wikified text
**previous_title: if different from title, previous title is deleted.
**return_url: response redirect to this url
* {{{GET {username}/namespaces{namespace_id}/tiddlers?new}}} <br>Return a form that submit a {{{POST {username}/namespaces{namespace_id}/tiddlers}}}. This form is empty.
* {{{GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}.html}}} <br>return an HTML page {tiddler_id} only with html content for publishing (Tiddlyhomes use this for HomePage and HelpPage).
* {{{GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}.txt}}} <br>return a text/plain page for {tiddler_id} text.
* {{{GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}.js}}} <br>return a text/plain page for {tiddler_id} text.
* {{{GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}.tw}}} <br>return a text/plain page for {tiddler_id} in [[TiddlyWiki|http://www.tiddlywiki.com/]] StoreArea format.
* {{{GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}?edit}}} <br>Return a form that submit a {{{POST {username}/namespaces{namespace_id}/tiddlers}}}. This form is filled with {tiddler_id} details.
* {{{DELETE {username}/namespaces{namespace_id}/tiddlers{tiddler_id}}}} <br>{{{GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}?delete}}} <br>Delete {tiddler_id}.
Tiddler 'TiddlyHome Restful API' in Namespace 'TiddlyHome'
TiddlyHome Restful API
BidiX - 2008-09-27 08:13:50 (created: 2008-06-17 05:59:22 )
tags: Documentation Design RESTful API
Following this model above the TiddlyHome1 API.
For now requested content-type (HTTP Request header) are not interpreted. All responses, except when specified, are in
Return code conform to model.
URI Resources
User
-
{username}
Display the resource{username}
Namespace
-
{username}/namespaces
Namespace container owns by {username}. -
{username}/namespaces{namespace_id}
{namespace_id} owns by {username}.
Tiddler
-
{username}/namespaces{namespace_id}/tiddlers
Tiddler container in {namespace_id} owns by {username}. -
{username}/namespaces{namespace_id}/tiddlers{tiddler_id}
{tiddler_id} in {namespace_id} owns by {username}.
Tiddlywiki
-
{username}/tiddlywikis
Tiddlywiki container own by {username}. -
{username}/tiddlywikis{tiddlywiki_id}
{tiddlywiki_id} owns by {username}.
Requests to TiddlyHome Service
ActuallyPUT is not implemented.For now requested content-type (HTTP Request header) are not interpreted. All responses, except when specified, are in
Content-type: text/html.Return code conform to model.
User
-
GET {username}
Return username and mail address.Need more developments. -
GET www.google.com/accounts/ServiceLogin?...
For now available only from a browser. Redirect to the current page once the login (or logout) is done.
Namespace
-
GET {username}/namespaces
List of Namespace own by {username}. -
POST {username}/namespaces
Create or update namespace with these attributes :- name
- access: 'on' | ''
- owner_name:
- previous_name: if different from name, previous name is deleted.
- return_url: response redirect to this url
-
GET {username}/namespaces?new
Return a form that submit aPOST {username}/namespaces. This form is empty. -
GET {username}/namespaces{namespace_id}
return an HTML page for {namespace_id} details. -
GET {username}/namespaces{namespace_id}?edit
Return a form that submit aPOST {username}/namespaces. This form is filled with {namespace_id} details. -
DELETE {username}/namespaces{namespace_id}GET {username}/namespaces{namespace_id}?delete
Delete {namespace_id}.
Tiddlywiki
-
GET {username}/tiddlywikis
List of Tiddlywiki own by {username}. -
POST {username}/tiddlywikis
Create or update tiddlywiki with these attributes :- name
- namespace_name
- access: 'on' | ''
- title
- subtitle
- {tiddler_title}: 'on' | '' (for each tiddler in {namespace_name})
- previous_name: if different from name, previous name is deleted.
- return_url: response redirect to this url
-
PUT {username}/tiddlywikis{tiddlywiki_id}?putPOST {username}/tiddlywikis{tiddlywiki_id}?put
Not documented -
GET {username}/tiddlywikis?new
Return a form that submit aPOST {username}/tiddlywikis. This form is empty. -
GET {username}/tiddlywikis{tiddlywiki_id}
return an HTML page for {tiddlywiki_id} details. -
GET {username}/tiddlywikis{tiddlywiki_id}.html
return a TiddlyWiki page for {tiddlywiki_id}. -
GET {username}/tiddlywikis{tiddlywiki_id}.xml
return a xml page in RSS format for {tiddlywiki_id}. -
GET {username}/tiddlywikis{tiddlywiki_id}?edit
Return a form that submit aPOST {username}/tiddlywikis. This form is filled with {tiddlywiki_id} details. -
GET {username}/tiddlywikis{tiddlywiki_id}?upload
Return a form that upload a TiddlyWiki aPOST {username}/tiddlywikis{tiddlywiki_id}?put. -
DELETE {username}/tiddlywikis{tiddlywiki_id}GET {username}/tiddlywikis{tiddlywiki_id}?delete
Delete {tiddlywiki_id}.
Tiddler
-
GET {username}/namespaces{namespace_id}/tiddlers
List of Tiddler in {namespace_id}. -
POST {username}/namespaces{namespace_id}/tiddlers
Create or update a tiddler with these attributes :- title
- tags
- text
- html: wikified text
- previous_title: if different from title, previous title is deleted.
- return_url: response redirect to this url
-
GET {username}/namespaces{namespace_id}/tiddlers?new
Return a form that submit aPOST {username}/namespaces{namespace_id}/tiddlers. This form is empty. -
GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}.html
return an HTML page {tiddler_id} only with html content for publishing (Tiddlyhomes use this for HomePage and HelpPage). -
GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}.txt
return a text/plain page for {tiddler_id} text. -
GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}.js
return a text/plain page for {tiddler_id} text. -
GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}.tw
return a text/plain page for {tiddler_id} in TiddlyWiki StoreArea format. -
GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}?edit
Return a form that submit aPOST {username}/namespaces{namespace_id}/tiddlers. This form is filled with {tiddler_id} details. -
DELETE {username}/namespaces{namespace_id}/tiddlers{tiddler_id}GET {username}/namespaces{namespace_id}/tiddlers{tiddler_id}?delete
Delete {tiddler_id}.
TiddlyHome 2.0 Beta