Changes between Initial Version and Version 1 of Bookmarks Project/RestAPI


Ignore:
Timestamp:
06/05/15 19:03:14 (9 years ago)
Author:
peter
Comment:

moved webapp REST API docs from bookmarks/trunk/api@89

Legend:

Unmodified
Added
Removed
Modified
  • Bookmarks Project/RestAPI

    v1 v1  
     1= Bookmarks API = 
     2{{{ 
     3GET / 
     4  Lists the bookmarks 
     5 
     6  Params: 
     7    format=json|xbel|text|csv|html 
     8    tag={tag} (repeatable) 
     9    limit={limit} 
     10    offset={offset} (only if limit is given) 
     11 
     12GET /{id} 
     13  Gets a individual bookmark 
     14 
     15GET /{id}/{field} 
     16  Gets an individual field of an individual bookmark 
     17 
     18GET /feed 
     19  Gets an Atom feed of the bookmarks 
     20 
     21  Params: 
     22    tag={tag} (repeatable) 
     23 
     24POST / 
     25  Create or update a bookmark 
     26 
     27POST /{id} 
     28  Update a bookmark 
     29}}} 
     30== TODO == 
     31{{{ 
     32PUT /{id} 
     33  Create or update a bookmark; requires the entire resource representation to be given in JSON or XBEL 
     34 
     35DELETE /{id} 
     36  Delete a bookmark 
     37 
     38  -- bookmarks that have been deleted 
     39  create table deleted_bookmarks ( 
     40      id integer, 
     41      dtime integer 
     42  ); 
     43  create view active_bookmarks as select * from bookmarks where id not in (select id from deleted_bookmarks) 
     44 
     45  insert into deleted_bookmarks (id) values (?)  <-- {id} 
     46 
     47  then a request to /{id} checks the deleted_bookmarks table and issues a 410 (cacheable) if it is in there 
     48 
     49PUT /{id}/{field} 
     50  Set a single field of a bookmark 
     51}}}