Mongo DB REST Option - rest

I know that one of the biggest differences between CouchDB and MongoDB is that Couch uses a REST interface. I've installed Mongo without any other libraries, and the mongod service provides a --rest command-line option.
Does the MongoDB REST interface do the same thing as CouchDB's? If not then what's it for?

MongoDB does not use a REST interface for communications.
You will need to install a specific driver for you language. Just as you would for MySQL or SQL Server or most other databases.
The list of drivers are here.
The --rest option allows for you to run some basic queries and monitoring against the mongod process. It is not a full REST API.

If you're interested in a REST API interface for MongoDB then check out the Sleepy.Mongoose project.

Reason for this is that you started the database without the --rest option. To do this you can start the database from your MongoDB bin directory like "./mongod --rest".

Related

connect to documentdb using robomongo

I have a Document DB (using the DocumentDB interface, NOT the MongoDb interface), so the connection string looks like:
AccountEndpoint=https://SomeDatabase.documents.azure.com:443/;AccountKey=xxxxx;
it does NOT look like this:
mongodb://SomeDatabase:xxxxx==#SomeDatabase.documents.azure.com:10255/?ssl=true&replicaSet=globaldb
Question:
How do I connect using RoboMongo or other MongoDb tools/code?
The stuff I looked at said things like take the username (that it shows in the MongoDb version of Cosmos DB (which won't help, as it is a totally different database and the connection string there won't work for apps that need the DocumentDb interface)
Is there a way to do this,or by 'adding support for MongoDB interface to Document DB' like adding the ability to talk to a Ms-SQL Server using MongoDB because you can always download MongoDb an install that on the same machine. (and not be able to get any data passed between them)
When you use Cosmos DB, you must choose, for your deployed database, which API to use with it (DocumentDB, MongoDB, Tables, Gremlin). You cannot use multiple APIs against the same database.
The only way to use MongoDB tools & frameworks is to deploy a Cosmos DB database with the MongoDB API. The MongoDB API is what provides compatibility with MongoDB. Note: The oplog is not provided with the Cosmos MongoDB API, so tools that rely on reading/tailing the oplog will not work.
The DocumentDB API does not surface any of the MongoDB API, so you will not be able to use MongoDB-specific tools when deploying a DocumentDB-specific database.
Note: The MongoDB API of Cosmos does not surface an oplog, so any operations which attempt to query the oplog will not succeed.
Have you seen this how-to by Microsoft for this: Use Robomongo with an Azure Cosmos DB
And one more related: Connecting to Azure Cosmos DB emulator from RoboMongo

Connecting MongoDB instance (on Compose) directly to MongoDB on Bluemix

I am looking for a Tool or Tool Set that can connect a MongoDB instance (on Compose) directly to MongoDB on Bluemix to extract / and move data from a MongoDB database on compose.com to a MongoDB database on Bluemix Public.
Is there a way to do this i.e. are there any known best practices to solve the problem?
I'd take a look at using mongodump and mongorestore: https://help.compose.com/docs/mongodb-tools#using-mongodump-and-mongorestore
I know you mention "directly" (as in no middle man) but I don't think that's currently possible (e.g. copydb is not an option in these managed instances).

Iron router cannot open mongo console

I am using iron router and unfortunately every time i cd into a directory generated by iron cli,i am notified i am not in a meteor directory.
So i have tried iron mongo and opens
> meteor mongo
MongoDB shell version: 2.6.7
connecting to: 127.0.0.1:3001/meteor
but has been this way for the last five minutes. Is there an alternative way to access the mongodb that comes with meteor or what should be done incase you are using iron router?.
In my case,i just want to see how many collections i have like
show collections
I think is best way for you it is use some Admin UI. Check "mongodb admin ui" in google for variants.
For my part I can recommend:
Robomongo
Its is really perfect mongo manager. Native and cross-platform MongoDB manager
Whatever platform you use today — Robomongo is available for you. Distributed as a native application, fast and snappy Robomongo uses very little of your machine resources.
But if you find some critical for you bugs, try another perfect tool
MongoVUE
MongoVUE is an innovative MongoDB desktop application for Windows OS that gives you an elegant and highly usable GUI interface to work with MongoDB. Now there is one less worry in managing your web-scale data.
Grab the local mongo connection string first then connect as follows
God#God-HP-EliteBook-2540p:~/crud$ iron mongo
> meteor mongo
MongoDB shell version: 2.6.7
connecting to: 127.0.0.1:3001/meteor
^C
God#God-HP-EliteBook-2540p:~/crud$ mongo mongodb://127.0.0.1:3001/meteor
Feed commands
God#God-HP-EliteBook-2540p:~/crud$ mongo mongodb://127.0.0.1:3001/meteor
MongoDB shell version: 3.2.4
connecting to: mongodb://127.0.0.1:3001/meteor
meteor:PRIMARY> show collections
Cannot use 'commands' readMode, degrading to 'legacy' mode
crud
meteor_accounts_loginServiceConfiguration
roles
system.indexes
users
meteor:PRIMARY> show dbs
admin (empty)
local 0.063GB
meteor 0.031GB
meteor:PRIMARY>

Connecting to external dummy MongoDB server

To run Meteor without Mongo, a dummy MongoDB server is needed. Obviously, one solution is to run mongod locally, or launch a mock MongoDB server.
What other ways are there to connect to a dummy MongoDB server for testing purposes?
Any Mongo hosting providers that have put up a dummy/test server, basically a /dev/null over mongodb://?
mongolab has that in their free sandbox level.
compose.io also has a free sandbox level.
search for 'mongo sandbox' or 'mongo free'.
the local mongo (on osx) is invaluable; don't know about wind blows.

can I use MongoDb in server-less mode?

I'm considering using MongoDb for a backing store for a WPF app that I'm building. Mostly just to get some exposure to NoSQL. Ideally I'd like to make a mongodb database, put it in my application's root folder (or ./data) and connect to it with LINQ -- without having mongo.exe running. I did something similar recently with SQLite and found it to be a great change from XML for data storage.
Is this possible with MongoDb? All the samples that I've seen require mongod.exe to be running when you connect to the database. And the data is always stored in c:\data\db.
Answer, yes. Need to use the --dbpath switch and version 1.5.2 (for "upsert").