Reference
Nodes
Resources
MongoDB

MongoDB Resource

The MongoDB Resource makes it easy to pull data out of a MongoDB instance and display or process it within Dynaboard.

Configuration Steps

  1. Find the connection parameters or the connection string for your database.
    • Connection strings follow the format protocol://username:password@hostname:port/databaseName?[options]
  2. Fill in the required connection information in the resource properties panel.
    • Secret fields (e.g. passwords or certificates) require clicking the ✓ to the right of the field to save the input.
  3. It's recommended to always enable SSL.
  4. If your database is behind a firewall (very common), you'll need to allow Dynaboard's outbound IP address (opens in a new tab).
  5. Click "Test Connection" at the bottom of the panel to verify everything works!

Common Configuration Errors

  • If the connection errors after a while, you may not have configured the firewall rules properly.
  • A secret may be unsaved (e.g. passwords or certificates). Click the ✓ to the right of the field to save it. The text will disappear after a successful save.
  • We don't currently support X.509 certificates for authentication.
  • We don't currently support CA certificates during authentication.

Properties

Environment Profiles

Propprofiles
Typearray
Default[ { 'dbProtocol': '-', 'dbHost': '127.0.0.1', 'dbPort': '27017', 'dbDatabaseName': '', 'dbUser': 'user', 'dbSSL': true, 'environment': '' } ]

The profiles configured for this resource in an environment

Environment Profile

Propprofiles[]
Typeobject
Defaultundefined

A profile of this resource for an environment

MongoDB protocol

Propprofiles[].dbProtocol
TypeMongoDbResourceNodeProtocol ('-' | 'mongodb://' | 'mongodb+srv://')
Defaultundefined

Protocol to use when connecting to the MongoDB server.

MongoDB host

Propprofiles[].dbHost
Typestring
Defaultundefined

Hostname or IP address to use for the connection. E.g. this-entire-string.is-the-hostname.com

MongoDB port

Propprofiles[].dbPort
Typestring
Defaultundefined

Port to use for the connection.

Database

Propprofiles[].dbDatabaseName
Typestring
Defaultundefined

The database name to use for the connection.

Username

Propprofiles[].dbUser
Typestring
Defaultundefined

The username to use for the connection.

Password

Propprofiles[].dbPass
Type({ ref: string } | undefined)
Defaultundefined

The password to use for the connection.

SSL

Propprofiles[].dbSSL
Typeboolean
Defaultundefined

Disable to remove SSL encryption. Not recommended to disable.

SSL CA

Propprofiles[].dbSSLCA
Type({ ref: string } | undefined)
Defaultundefined

CA cert to validate MongoDB server.

Environment

Propprofiles[].environment
Typestring
Defaultundefined

The name of the environment with which this profile is associated

Actions

Aggregate

Run aggregation pipeline

ParameterTypeDefault
queryAggregateunknown{}
collectionstringundefined

Count

Count all documents matching the query

ParameterTypeDefault
queryCountunknown{}
collectionstringundefined

Delete many

Delete multiple documents matching the query

ParameterTypeDefault
queryDeleteManyunknown{'_id':'Insert ID here'}
collectionstringundefined

Delete one

Delete one document matching the query. In case there are multiple documents that are matching the query, the first one will be deleted.

ParameterTypeDefault
queryDeleteOneunknown{'_id':'Insert ID here'}
collectionstringundefined

Distinct

Return all distinct values of a field

ParameterTypeDefault
queryDistinctunknown{}
collectionstringundefined
fieldstringundefined

Find

Find all documents matching the query

ParameterTypeDefault
queryFindunknown{}
collectionstringundefined
projectionunknownundefined
sortByunknownundefined
limitstringundefined
skipstringundefined

Find one

Find one document matching the query

ParameterTypeDefault
queryFindOneunknown{}
collectionstringundefined
projectionunknownundefined
sortByunknownundefined
limitstringundefined
skipstringundefined

Find one and update

Find one document matching the filter, and then apply the update. Returns updated document.

ParameterTypeDefault
filterFindOneAndUpdateunknown{}
collectionstringundefined
projectionunknownundefined
updateFindOneAndUpdateunknownundefined

Insert many

Insert many documents at the same time

ParameterTypeDefault
documentInsertManyunknown{}
collectionstringundefined

Insert one

Insert one document

ParameterTypeDefault
documentInsertOneunknown{}
collectionstringundefined

List collections

List all collections from the database

ParameterTypeDefault

Update many

Update many documents, or create new ones if the upsert is set to true.

ParameterTypeDefault
filterUpdateManyunknown{}
updateUpdateManyunknown{}
collectionstringundefined
upsertUpdateManybooleantrue

Update one

Update one document, or create new one if the upsert is set to true.

ParameterTypeDefault
filterUpdateOneunknown{}
updateUpdateOneunknown{}
collectionstringundefined
upsertUpdateOnebooleantrue