Definition
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
mongoshversion ≥ 2.0.
Syntax
The sp.listConnections() method has the following syntax:
sp.listConnections()
Command Fields
sp.listConnections() takes no fields.
Behavior
sp.listConnections() returns documents describing all of the connections in the connection registry of the current stream processing workspace to the shell.
Access Control
The user running sp.listConnections() must have the atlasAdmin role.
Example
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 }