For details on a specific method, including syntax and examples, click on the link to the method's reference page.
Runs a command against the
Runs admin/diagnostic pipeline which does not require an underlying collection.
Returns help information for a database command.
Creates a new collection or a view. Commonly used to create a capped collection.
Creates a view.
Reports the current in-progress operations.
Removes the current database.
Flushes writes to disk and locks the database to prevent write operations and assist backup operations. Wraps
Allows writes to continue on a database locked with
Returns a collection or view object. Used to access collections with names that are not valid in
Returns collection information for all collections and views in the current database.
Lists all collections and views in the current database.
Returns the log message verbosity levels.
Returns the name of the current database.
Returns a document that reflects the current profiling level and the profiling threshold.
Returns a document with replication statistics.
Provides access to the specified database.
Returns a document that reports the state of the replica set.
Displays descriptions of common
Returns a document with information about the system MongoDB runs on. Wraps
Terminates a specified operation.
Displays a list of common database commands.
Deprecated. Ends an authenticated session.
Prints statistics from every collection. Wraps
Prints a formatted report of the replica set status from the perspective of the primary.
Prints a formatted report of the replica set status from the perspective of the secondaries.
Prints a report of the sharding configuration and the chunk ranges.
Deprecated since version 4.4.1: Use
Removed in MongoDB 5.0. Resets the last error status.
Performs online TLS certificate rotation. Wraps
Runs a database command.
Returns a document with information about the runtime used to start the MongoDB instance. Wraps
Returns a document that provides an overview of the state of the database process.
Sets a single log message verbosity level.
Modifies the current level of database profiling.
Returns a document that reports on the state of the current database.
Returns the version of the
Opens a change stream cursor for a database to report on all its non-