I wrote a simple REST server based on Jetty
It's basically embedded Jetty with servlets
Some available features
can enble ssl
can enable ip filter
mongodb access (read,write,admin) based on user role
Source, need ant and JDK 1.5 or later
http://commondatastorage.googleapis.com/andreidata/mongoser-src.tar.gz
Binary, need JRE 1.6 or later
http://commondatastorage.googleapis.com/andreidata/mongoser.tar.gz
Please try and let me know
Thanks
Some examples with curl
mongoser="
http://yourmongohost.com:8081"
list databases
curl -i "$mongohost/database"
drop database
curl -i "$mongohost/database?dbname=foo" -XDELETE
get db stat
curl -i "$mongohost/database?dbname=foo&op=stats"
list collections
curl -i "$mongohost/collection?dbname=foo"
get col stat
curl -i "$mongohost/collection?dbname=foo&op=stats&colname=test"
create col
curl -i "$mongohost/collection?dbname=foo&colname=test" -XPUT
add record
curl -i "$mongohost/write?dbname=foo&colname=test" -XPUT --data-binary
'{name:"foo"}'
add multi record must be separated by newline
curl -i "$mongohost/write?dbname=foo&colname=test" -XPUT --data-binary
$'{name:"foo"}\n{name:"moo"}\n{name:"cow"}'
update record, first field is condition, must be separated by newline
curl -i "$mongohost/write?dbname=foo&colname=test" -XPOST --data-
binary $'{name:"foo"}\n{name:"newfoo"}'
delete records with condition
curl -i "$mongohost/write?dbname=foo&colname=test" -XDELETE -d
'{name:"newfoo"}'
read all records in collection
curl -i "$mongohost/query?dbname=foo&colname=test"
with limit
curl -i "$mongohost/query?dbname=foo&colname=test&limit=3"
with limit and skip
curl -i "$mongohost/query?dbname=foo&colname=test&limit=3&skip=3"
with condition
curl -i "$mongohost/query?dbname=foo&colname=test" -XPOST -
d'{name:"newfoo"}'
list indexes
curl -i "$mongohost/index?dbname=foo&colname=test"
add index
curl -i "$mongohost/index?dbname=foo&colname=test" -XPUT -d"{name:
1,age:1}"
delete index
curl -i "$mongohost/index?dbname=foo&colname=test" -XDELETE -d"{name:
1,age:1}"