Message from discussion
Please try new Mongodb REST server written in java using Jetty
Received: by 10.66.82.98 with SMTP id h2mr1290877pay.27.1346413938698;
Fri, 31 Aug 2012 04:52:18 -0700 (PDT)
X-BeenThere: mongodb-user@googlegroups.com
Received: by 10.68.210.197 with SMTP id mw5ls12274726pbc.7.gmail; Fri, 31 Aug
2012 04:52:08 -0700 (PDT)
Received: by 10.68.129.69 with SMTP id nu5mr1657132pbb.17.1346413928184;
Fri, 31 Aug 2012 04:52:08 -0700 (PDT)
Date: Fri, 31 Aug 2012 04:52:07 -0700 (PDT)
From: Joseph Greenawalt <joe.greenaw...@gmail.com>
To: mongodb-user@googlegroups.com
Message-Id: <da9f009b-089d-4b5b-af4b-143f80bc2063@googlegroups.com>
In-Reply-To: <eb98820c-75b9-408a-a9c6-1d1e5c54db76@googlegroups.com>
References: <2314877d-7bc9-414b-9379-9d32dc8b3674@l4g2000vbt.googlegroups.com>
<218e488d-fa92-4bb4-9966-06a6d9c39aba@googlegroups.com>
<CAKXwo=9ju+1X5+dNQ99qPA+LB34216cO-v9Uxp=jrGB0KbweCQ@mail.gmail.com>
<eb98820c-75b9-408a-a9c6-1d1e5c54db76@googlegroups.com>
Subject: Re: [mongodb-user] Re: Please try new Mongodb REST server written
in java using Jetty
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_425_21125379.1346413927691"
------=_Part_425_21125379.1346413927691
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
I agree.
On Friday, August 31, 2012 12:25:24 AM UTC-4, Michael Rose wrote:
> GET may make more sense for that operation given its lack of server-side =
mutation of data.
>=20
> On Thursday, August 30, 2012 3:18:52 PM UTC-6, Andyg wrote:Do POST instea=
d of GET request
>=20
> See examples
>=20
> curl -i "http://localhost:8081/query/my/users" -XPOST -d'{firstName:"joe"=
}'
>=20
>=20
>=20
> On Thu, Aug 30, 2012 at 4:04 PM, Joseph Greenawalt
>=20
> <joe.gre...@gmail.com> wrote:
>=20
> > Hi,
>=20
> > I'm trying to do a simple query:
>=20
> > http://localhost:8081/query/my/users/?firstName=3Djoe
>=20
> > however that returns every record not the ones with firstName=3Djoe
>=20
> >
>=20
> > Do you see what I'm doing wrong?
>=20
> >
>=20
> > Thanks,
>=20
> > Joe
>=20
> >
>=20
> > On Friday, April 13, 2012 8:08:08 PM UTC-4, Andyg wrote:
>=20
> >>
>=20
> >>
>=20
> >> I wrote a simple REST server based =C2=A0on Jetty
>=20
> >> It's basically embedded Jetty with servlets
>=20
> >>
>=20
> >> Some available features
>=20
> >> can enble ssl
>=20
> >> can enable ip filter
>=20
> >> mongodb access (read,write,admin) based on user role
>=20
> >>
>=20
> >> Source, need ant and JDK 1.5 or later
>=20
> >> http://commondatastorage.googleapis.com/andreidata/mongoser-src.tar.gz
>=20
> >>
>=20
> >> Binary, need JRE 1.6 or later
>=20
> >> http://commondatastorage.googleapis.com/andreidata/mongoser.tar.gz
>=20
> >>
>=20
> >> Please try and let me know
>=20
> >> Thanks
>=20
> >>
>=20
> >>
>=20
> >> Some examples with curl
>=20
> >> mongoser=3D"http://yourmongohost.com:8081"
>=20
> >>
>=20
> >> list databases
>=20
> >> curl -i "$mongohost/database"
>=20
> >>
>=20
> >> drop database
>=20
> >> curl -i "$mongohost/database?dbname=3Dfoo" -XDELETE
>=20
> >>
>=20
> >> get db stat
>=20
> >> curl -i "$mongohost/database?dbname=3Dfoo&op=3Dstats"
>=20
> >>
>=20
> >> list collections
>=20
> >> curl -i "$mongohost/collection?dbname=3Dfoo"
>=20
> >>
>=20
> >> get col stat
>=20
> >> curl -i "$mongohost/collection?dbname=3Dfoo&op=3Dstats&colname=3Dtest"
>=20
> >>
>=20
> >> create col
>=20
> >> curl -i "$mongohost/collection?dbname=3Dfoo&colname=3Dtest" -XPUT
>=20
> >>
>=20
> >>
>=20
> >> add record
>=20
> >> curl -i "$mongohost/write?dbname=3Dfoo&colname=3Dtest" -XPUT --data-bi=
nary
>=20
> >> '{name:"foo"}'
>=20
> >>
>=20
> >> add multi record must be separated by newline
>=20
> >> curl -i "$mongohost/write?dbname=3Dfoo&colname=3Dtest" -XPUT --data-bi=
nary
>=20
> >> $'{name:"foo"}\n{name:"moo"}\n{name:"cow"}'
>=20
> >>
>=20
> >> update record, first field is condition, must be separated by newline
>=20
> >> curl -i "$mongohost/write?dbname=3Dfoo&colname=3Dtest" -XPOST --data-
>=20
> >> binary $'{name:"foo"}\n{name:"newfoo"}'
>=20
> >>
>=20
> >> delete records with condition
>=20
> >> curl -i "$mongohost/write?dbname=3Dfoo&colname=3Dtest" -XDELETE -d
>=20
> >> '{name:"newfoo"}'
>=20
> >>
>=20
> >> read all records in collection
>=20
> >> curl -i "$mongohost/query?dbname=3Dfoo&colname=3Dtest"
>=20
> >>
>=20
> >> with limit
>=20
> >> curl -i "$mongohost/query?dbname=3Dfoo&colname=3Dtest&limit=3D3"
>=20
> >> with limit and skip
>=20
> >> curl -i "$mongohost/query?dbname=3Dfoo&colname=3Dtest&limit=3D3&skip=
=3D3"
>=20
> >> with condition
>=20
> >> curl -i "$mongohost/query?dbname=3Dfoo&colname=3Dtest" -XPOST -
>=20
> >> d'{name:"newfoo"}'
>=20
> >>
>=20
> >> list indexes
>=20
> >> curl -i "$mongohost/index?dbname=3Dfoo&colname=3Dtest"
>=20
> >>
>=20
> >> add index
>=20
> >> curl -i "$mongohost/index?dbname=3Dfoo&colname=3Dtest" -XPUT -d"{name:
>=20
> >> 1,age:1}"
>=20
> >>
>=20
> >> delete index
>=20
> >> curl -i "$mongohost/index?dbname=3Dfoo&colname=3Dtest" -XDELETE -d"{na=
me:
>=20
> >> 1,age:1}"
>=20
> >
>=20
> > --
>=20
> > You received this message because you are subscribed to the Google
>=20
> > Groups "mongodb-user" group.
>=20
> > To post to this group, send email to mongod...@googlegroups.com
>=20
> > To unsubscribe from this group, send email to
>=20
> > mongodb-user...@googlegroups.com
>=20
> > See also the IRC channel -- freenode.net#mongodb
------=_Part_425_21125379.1346413927691--