For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

sp.listConnections() (mongosh method)

sp.listConnections()

Returns documents for each connection in the connection registry of the current stream processing workspace. Each document provides descriptive information including the name and type of each connection.

You can only invoke this command while connected to a stream processing workspace.

This command requires mongosh version ≥ 2.0.

The sp.listConnections() method has the following syntax:

sp.listConnections()

sp.listConnections() takes no fields.

sp.listConnections() returns documents describing all of the connections in the connection registry of the current stream processing workspace to the shell.

The user running sp.listConnections() must have the atlasAdmin role.

The following example shows an expected response from sp.listConnections():

sp.listStreamProcessors()
1{
2 ok: 1,
3 connections: [
4 { name: 'vt', type: 'atlas', cluster: 'versiontest' },
5 { name: 'testkafka', type: 'kafka' },
6 { name: 'sample_stream_solar', type: 'inmemory' },
7 { name: 'jsncluster0', type: 'atlas', cluster: 'jsncluster0' }
8 ]
9}