yacy_search_server/htroot/api/table_p.xml
orbiter 05f34a3fa7 added a full, complete, database insert, update and delete API for the tables.
Please see this example:

list all database tables:
http://localhost:8090/api/table_p.xml

now create a new table and insert some values into 'mytable'
http://localhost:8090/api/table_p.xml?table=mytable&pk=&commitrow=&col_termin=Release%20Machen&col_datum=24.11.2011&col_status=ongoing

list the table content:
http://localhost:8090/api/table_p.xml?table=mytable&pk=

update the table and change a single value inside. You must refer to the row using a primary key 'pk'
http://localhost:8090/api/table_p.xml?table=mytable&pk=000000000001&commitrow=&col_datum=29.11.2011

you can also select rows using a search operator
http://localhost:8090/api/table_p.xml?table=mytable&pk=&count=10&search=

now lets delete the row:
http://localhost:8090/api/table_p.xml?table=mytable&pk=&deleterows=pk_000000000001

and we can also delete the complete table:
http://localhost:8090/api/table_p.xml?table=mytable&deletetable=

You can use this to administrate the robots, bookmarks and API steering using an outside application!

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8071 6c8d7289-2bf4-0310-a012-ef5d649a1542
2011-11-22 12:31:07 +00:00

24 lines
526 B
XML

<tables count="#[tablecount]#">
#(showtable)#
#{tables}#
<table name="#[table]#" count="#[num]#"/>
#{/tables}#
::
<table name="#[table]#" count="#[num]#">
<columns>
#{columns}#
<column name="#[header]#" />
#{/columns}#
</columns>
<rows>
#{list}#
<row#(showpk)#:: key="#[pk]#"#(/showpk)#>
#{columns}#
<column name="#[column]#">#[cell]#</column>
#{/columns}#
</row>
#{/list}#
</rows>
</table>
#(/showtable)#
</tables>