node package manager


MongoLab Partner API wrapper


MongoLab Partner API wrapper & CLI interface.

npm install mongolab-partner

var mongolab = require('mongolab-partner')({username: "my-username", password: "super secret"})
mongolab.viewPartner(function(err, res) {
  if (err) return console.log(err)

The module should be initialized with an options object:

{username: ..., password: ...}

It will return an object which implements the following API calls:



createAccount({accountName: ..., adminUser: ..., adminEmail: ...}, cb)

createDatabase({databaseName: ..., databaseUser: ..., databasePassword: ..., plan: ..., cloud: ..., accountName: ...}, cb)

listDatabases(accountName, cb)

viewDatabase(accountName, cb)

deleteDatabase(accountName, databaseName, cb)

mongolab-partner <command> [options]

Commands map to API calls. The following are available:

  • viewPartner
  • viewAccounts
  • createAccount
  • createDatabase
  • listDatabases
  • viewDatabase
  • deleteDatabase

Create database example:

mongolab-partner createDatabase \
  -u <username>  \
  -p <password>  \
  --accountName <account name> \
  --databaseUsername <database username> \
  --databasePassword <database password> \
  --databaseName <database name>`

View database example:

mongolab-partner viewDatabase \
  -u <username> \
  -p <password> \
  --accountName <account name>\
  --databaseName <database name>

List databases:

mongolab-partner listDatabases -u <username> -p <password> --accountName <account name>