AddRolesToUser
UserRoles
|
Adds specific roles to an existing user
details
Arguments
Name
|
Description
|
Default |
userName R
|
User to update
|
|
projectId R
|
The project id of the database
|
|
objectNames
|
Comma-separated list of 'database.collection' names for which the roles will apply, where the collection is optional if roles apply at the adatabase level
|
|
roleNames
|
Comma-separated list of roles to be applied to the collections (For Admin Database: atlasAdmin,readWriteAnyDatabase,readAnyDatabase,clusterMonitor,backup,dbAdminAnyDatabase,enableSharding -- For a Database: dbAdmin,read,readWrite -- For a Collection: read,readWrite )
|
|
SQL Call
INSERT INTO MongoDB.usersRoles (userName,projectId,objectNames,roleNames) VALUES ('user1', '123'
Http Call
/bsc/mongodb/addrolestouser
Output Columns
String userName | | String projectId | | String objectNames | | String roleNames | |
|
AddTeamUsers
TeamUser
|
Adds a user to an existing team
details
Arguments
Name
|
Description
|
Default |
orgId R
|
The organization id
|
|
teamId R
|
The team id
|
|
userIds R
|
A comma-separated list of user ids
|
|
SQL Call
EXEC MongoDB.AddTeamUser '12345', '654321', '987123' INSERT INTO MongoDB.TeamUser (orgId, teamId, userIds) VALUES ('123', '234' '345,456,567')
Http Call
/bsc/mongodb/addteamusers
Output Columns
This call does not return data.
|
CreateCollection
Collections
|
Creates a new collection in a database
details
Arguments
Name
|
Description
|
Default |
databaseName
|
Database name to where the collection will be created (leave blank to use the default database)
|
|
name
|
The name of the collection to create
|
|
SQL Call
EXEC MongoDB.CreateCollection 'newdb', 'mycollection' INSERT INTO MongoDB.Collections (databaseName, name) VALUES ('newdb', 'mycollection')
Http Call
/bsc/mongodb/createcollection
Output Columns
This call does not return data.
|
CreateDatabase
Databases
|
Creates a new database in an existing cluster
details
Arguments
Name
|
Description
|
Default |
clusterId R
|
The cluster id in which to add the new database
|
|
databaseName R
|
The name of the database to create
|
|
SQL Call
INSERT INTO MongoDB.Databases (clusterId, databaseName) VALUES ('123', 'newdb')
Http Call
/bsc/mongodb/createdatabase
Output Columns
This call does not return data.
|
CreateProject
Projects
|
Creates a new project
details
Arguments
Name
|
Description
|
Default |
orgId R
|
The Organization Id this project belongs to
|
|
name R
|
The name of the project
|
|
SQL Call
EXEC MongoDB.CreateProject '12345', 'myProject'
Http Call
/bsc/mongodb/createproject
Output Columns
Int32 clusterCount | | String created | | String id | | String name | | String orgId | |
|
CreateTeam
Team
|
Creates a new team in an organization
details
Arguments
Name
|
Description
|
Default |
orgId R
|
Organization Id in which to create the team
|
|
name R
|
The name of the team
|
|
usernames
|
Comma-separated list of user names to assign to the list
|
|
SQL Call
EXEC MongoDB.CreateTeam '123456', 'new team', 'user1,user2' INSERT INTO MongoDB.Team (orgId, name, usernames) VALUES ('123', 'new team', 'user1,user2')
Http Call
/bsc/mongodb/createteam
Output Columns
This call does not return data.
|
CreateUser
Users
|
Adds a new user to a database
details
Arguments
Name
|
Description
|
Default |
userName R
|
User name to create
|
|
password
|
The password to assign to the user (leave blank to assign a random password)
|
|
projectId R
|
The project id of the database
|
|
objectNames
|
Comma-separated list of 'database.collection' names for which the roles will apply, where the collection is optional if roles apply at the adatabase level
|
|
roleNames
|
Comma-separated list of roles to be applied to the collections (For Admin Database: atlasAdmin,readWriteAnyDatabase,readAnyDatabase,clusterMonitor,backup,dbAdminAnyDatabase,enableSharding -- For a Database: dbAdmin,read,readWrite -- For a Collection: read,readWrite )
|
|
ldapAuthType
|
LDAP authentication type (NONE, USER, GROUP)
|
NONE |
SQL Call
INSERT INTO MongoDB.users (userName,password,projectId,databaseName,collectionNames,roleNames) VALUES ('user1','pwd00!','123','mydb','read')
Http Call
/bsc/mongodb/createuser
Output Columns
String userName | | String projectId | | String ldapAuthType | | String objectNames | | String roleNames | | String password | |
|
DeleteDocument
Table
|
Deletes one document from an existing collection; uses the _id the value provided is not a BSON filter.
details
Arguments
Name
|
Description
|
Default |
name
|
The name of the collection (format: database.collection or collection)
|
|
filter R
|
The BSON filter or _id value of the document
|
|
dataType
|
The optional BSON data type of the field (default is string)
|
string |
SQL Call
EXEC MongoDB.DeleteDocument 'mycollection', '{ "_id": ObjectId("56fc5dcb39ee682bdc609b02") }' // a complete BSON filter EXEC MongoDB.DeleteDocument 'mycollection', '56fc5dcb39ee682bdc609b02', 'ObjectId' // and ObjectId as a BSON data type using the _id field EXEC MongoDB.DeleteDocument 'mycollection', 'ObjectId("56fc5dcb39ee682bdc609b02") // an ObjectId as BSON using the _id field EXEC MongoDB.DeleteDocument 'mycollection', 'key001' // a string using the _id field EXEC MongoDB.DeleteDocument 'mycollection', 123456, 'Int64' // a long value using the _id field
Http Call
/bsc/mongodb/deletedocument
Output Columns
This call does not return data.
|
DeleteProject
Projects
|
Deletes a MongoDB project
details
Arguments
Name
|
Description
|
Default |
projectId R
|
The project id to delete
|
|
SQL Call
EXEC MongoDB.DeleteProject '123456'
Http Call
/bsc/mongodb/deleteproject
Output Columns
This call does not return data.
|
DeleteTeam
Team
|
Deletes a team from an organization
details
Arguments
Name
|
Description
|
Default |
orgId R
|
The organization id where the team is found
|
|
teamId R
|
The team id to delete
|
|
SQL Call
EXEC MongoDB.DeleteTeam '12345', '987654'
Http Call
/bsc/mongodb/deleteteam
Output Columns
This call does not return data.
|
DeleteUser
DeleteUser
|
Deletes a user in a database
details
Arguments
Name
|
Description
|
Default |
userName R
|
User name to create
|
|
projectId R
|
Project id in which the user will be created
|
|
databaseName
|
Optional authentication database name (admin for Atlas)
|
admin |
SQL Call
EXEC MongoDB.DeleteUser 'username', 'abcdef', 'admin'
Http Call
/bsc/mongodb/deleteuser
Output Columns
This call does not return data.
|
DropCollection
Collections
|
Drops a collection from a database
details
Arguments
Name
|
Description
|
Default |
databaseName
|
Database name to where the collection will be dropped (leave blank to use the default database)
|
|
name
|
The name of the collection to drop
|
|
SQL Call
EXEC MongoDB.DropCollection 'newdb', 'mycollection' DELETE FROM MongoDB.Collections WHERE databaseName='newdb' AND name='mycollection'
Http Call
/bsc/mongodb/dropcollection
Output Columns
This call does not return data.
|
DropDatabase
Databases
|
Deletes a database from a cluster
details
Arguments
Name
|
Description
|
Default |
clusterId R
|
The cluster id in which to add the new database
|
|
databaseName R
|
The name of the database to delete
|
|
SQL Call
DELETE FROM MongoDB.Databases WHERE clusterId='123' AND databaseName='newdb'
Http Call
/bsc/mongodb/dropdatabase
Output Columns
This call does not return data.
|
DropUser
Users
|
Deletes a user from a database
details
Arguments
Name
|
Description
|
Default |
userName R
|
User name to create
|
|
password R
|
The password to assign to the user
|
|
projectId R
|
The project id of the database
|
|
databaseName
|
Name of the database in which the user will be created
|
|
collectionNames
|
Comma-separated collection names for which the roles will apply
|
|
roleNames
|
Comma-separated list of roles to be applied to the collections (For Admin Database: atlasAdmin,readWriteAnyDatabase,readAnyDatabase,clusterMonitor,backup,dbAdminAnyDatabase,enableSharding -- For a Database: dbAdmin,read,readWrite -- For a Collection: read,readWrite )
|
|
SQL Call
DELETE FROM MongoDB.users WHERE userName='user1' AND projectId='123' AND databaseName='mydb'
Http Call
/bsc/mongodb/dropuser
Output Columns
String userName | | String databaseName | | String groupId | | String ldapAuthType | | String roles | |
|
GetAlertNotifications
AlertNotifications
|
Get notifications for a specific alert that were generated in MongoDB Atlas
details
Arguments
Name
|
Description
|
Default |
projectId R
|
Project id to filter on
|
|
alertId R
|
Alert id to filter on
|
|
SQL Call
SELECT * FROM MongoDB.AlertNotifications
Http Call
/bsc/mongodb/getalertnotifications
Output Columns
String typeName | | Int32 intervalMin | | Int32 delayMin | | Boolean emailEnabled | | Boolean smsEnabled | | String username | | String teamId | | String emailAddress | | String mobileNumber | | String notificationToken | | String roomName | | String channelName | | String apiToken | | String orgName | | String flowName | | String flowdockApiToken | | String serviceKey | | String victorOpsApiKey | | String victorOpsRoutingKey | | String opsGenieApiKey | |
|
GetAlerts
Alerts
|
Get alerts that were generated in MongoDB Atlas
details
Arguments
Name
|
Description
|
Default |
projectId R
|
Project id to filter on
|
|
alertId
|
Alert id to filter on
|
|
SQL Call
SELECT * FROM MongoDB.Alerts
Http Call
/bsc/mongodb/getalerts
Output Columns
String id | | String groupId | | String eventTypeName | | String created | | String updated | | Boolean enabled | | String matchers | | String metricThresholdMetricName | | String metricThresholdOperator | | Int32 metricThresholdThreshold | | String metricThresholdUnits | | String metricThresholdMode | | Boolean hasNotifications | |
|
GetAPIKeys
APIKeys
|
Get API Keys within an organization
details
Arguments
Name
|
Description
|
Default |
orgId R
|
Organization id to filter on
|
|
apiKeyId
|
Optional API Key to filter on
|
|
SQL Call
SELECT * FROM MongoDB.APIKeys
Http Call
/bsc/mongodb/getapikeys
Output Columns
String desc | | String id | | String privateKey | | String publicKey | | String roles | |
|
GetAtlasEvents
AtlasEvents
|
Get events that were generated in MongoDB Atlas
details
Arguments
Name
|
Description
|
Default |
orgId
|
Organization id to filter on
|
|
groupid
|
Group id to filter on
|
|
eventId
|
Event id to filter on
|
|
eventType
|
Event type to filter on (ex: GROUP_CREATED)
|
|
minDate
|
Start date of events
|
|
maxDate
|
End date of events
|
|
SQL Call
SELECT * FROM MongoDB.AtlasEvents
Http Call
/bsc/mongodb/getatlasevents
Output Columns
String alertId | | String alertConfigId | | String apiKeyId | | String collection | | String created | | String currentValueNumber | | String currentValueUnits | | String database | | String eventTypeName | | String groupId | | String hostname | | String id | | String invoiceId | | String isGlobalAdmin | | String metricName | | String opType | | String orgId | | String paymentId | | String port | | String publicKey | | String remoteAddress | | String replicaSetName | | String shardName | | String targetPublicKey | | String targetUsername | | String teamId | | String userId | | String username | | String whitelistEntry | |
|
GetAtlasUser
AtlasUser
|
Get details about an Atlas user
details
Arguments
Name
|
Description
|
Default |
userName
|
Name of the user to return
|
|
userId
|
Id of the user to return
|
|
SQL Call
SELECT * FROM MongoDB.AtlasUser WHERE username = 'user@domain.com'
Http Call
/bsc/mongodb/getatlasuser
Output Columns
String emailAddress | | String firstName | | String id | | String lastName | | String mobileNumber | | String roles | | String teamIds | | String userName | |
|
GetClusters
Clusters
|
Get clusters within an organization
details
Arguments
Name
|
Description
|
Default |
projectId R
|
Project id to filter on
|
|
clusterName
|
Optional cluster name to filter on
|
|
SQL Call
SELECT * FROM MongoDB.Clusters
Http Call
/bsc/mongodb/getclusters
Output Columns
Boolean diskGBEnabled | | Boolean backupEnabled | | Boolean biConnectorEnabled | | String biConnectorReadPreference | | String clusterType | | Double diskSizeGB | | String encryptionAtRestProvider | | String groupId | | String id | | String mongoDBVersion | | String mongoDBMajorVersion | | String mongoURI | | String mongoURIUpdated | | String mongoURIWithOptions | | String name | | Int32 numShards | | Boolean paused | | Boolean providerBackupEnabled | | String providerSettingsProviderName | | String providerSettingsBackingProviderName | | String providerSettingsRegionName | | String providerSettingsInstanceSizeName | | Int32 providerSettingsDiskIOPS | | String providerSettingsDiskTypeName | | Boolean providerSettingsEncryptEBSVolume | | Int32 replicationFactor | | String srvAddress | | String stateName | |
|
GetCollections
Collections
|
Gets a list of available collections within the current database
details
Arguments
Name
|
Description
|
Default |
databaseName
|
Database name to search in (leave blank to use the default database)
|
|
SQL Call
SELECT * FROM MongoDB.Collections
Http Call
/bsc/mongodb/getcollections
Output Columns
This call does not return data.
|
GetDatabases
Databases
|
Gets a list of available databases within the current cluster
details
Arguments
SQL Call
SELECT * FROM MongoDB.Databases
Http Call
/bsc/mongodb/getdatabases
Output Columns
This call does not return data.
|
GetDocuments
Table
|
Get documents from an existing table as rows and columns
details
Arguments
Name
|
Description
|
Default |
name
|
The name of the collection to query (format: database.collection or collection)
|
|
filter
|
a valid filter to apply
|
|
SQL Call
SELECT * FROM MongoDB.table@mytable SELECT ID, Title, Age, State FROM MongoDB.table@mytable WHERE State in ('Florida', 'New York') OR Age > 25
Http Call
/bsc/mongodb/getdocuments
Output Columns
This call does not return data.
|
GetInvoices
Invoices
|
Get available invoices
details
Arguments
Name
|
Description
|
Default |
orgId R
|
Organization id to filter on
|
|
invoiceId
|
Optional invoice Id to filter on
|
|
SQL Call
SELECT * FROM MongoDB.Invoices
Http Call
/bsc/mongodb/getinvoices
Output Columns
Double amountBilledCents | | Double amountPaidCents | | String created | | Double creditsCents | | String endDate | | String id | | String groupId | | String orgId | | Double salesTaxCents | | String startDate | | String statusName | | Double subtotalCents | | String updated | |
|
GetOrganizations
Organizations
|
Get available organizations
details
Arguments
Name
|
Description
|
Default |
orgId
|
Optional organization id to filter on
|
|
SQL Call
SELECT * FROM MongoDB.Organizations
Http Call
/bsc/mongodb/getorganizations
Output Columns
|
GetOrganizationWhiteList
OrganizationWhiteList
|
Get available organization-level whitelist entries
details
Arguments
Name
|
Description
|
Default |
orgId R
|
Organization to filter on
|
|
apiKeyId R
|
APIKey Id to filter on
|
|
SQL Call
SELECT * FROM MongoDB.organizationwhitelist WHERE orgId = 'abc' AND apiKeyId = 'abc'
Http Call
/bsc/mongodb/getorganizationwhitelist
Output Columns
String cidrBlock | | Int64 count | | String created | | String ipAddress | | String lastUsed | | String lastUsedAddress | |
|
GetProjectAPIKeys
ProjectAPIKeys
|
Get API Keys within a project
details
Arguments
Name
|
Description
|
Default |
projectId R
|
Project id to filter on
|
|
SQL Call
SELECT * FROM MongoDB.ProjectAPIKeys
Http Call
/bsc/mongodb/getprojectapikeys
Output Columns
String desc | | String id | | String privateKey | | String publicKey | | String roles | |
|
GetProjects
Projects
|
Get available projects
details
Arguments
Name
|
Description
|
Default |
projectId
|
Optional projectId to filter on
|
|
projectName
|
Optional projectName to filter on
|
|
SQL Call
SELECT * FROM MongoDB.Projects
Http Call
/bsc/mongodb/getprojects
Output Columns
Int32 clusterCount | | String created | | String id | | String name | | String orgId | |
|
GetTeams
Teams
|
Get available teams within an organization
details
Arguments
Name
|
Description
|
Default |
orgId R
|
Organization id to filter on
|
|
teamId
|
Optional team id to filter on
|
|
teamName
|
Optional team name to filter on
|
|
SQL Call
SELECT * FROM MongoDB.Teams
Http Call
/bsc/mongodb/getteams
Output Columns
|
GetTeamUsers
TeamUsers
|
Get users assigned to a teams within an organization
details
Arguments
Name
|
Description
|
Default |
orgId R
|
Organization id to filter on
|
|
SQL Call
SELECT * FROM MongoDB.TeamUsers
Http Call
/bsc/mongodb/getteamusers
Output Columns
String emailAddress | | String firstName | | String id | | String lastName | | String roles | | String teamsId | | String userName | |
|
GetUserRoles
UserRoles
|
Gets roles of an existing user
details
Arguments
Name
|
Description
|
Default |
userName R
|
User name to create
|
|
projectId R
|
The project id of the database
|
|
SQL Call
SELECT * FROM MongoDB.usersRoles WHERE userName='user1' AND projectId='123'
Http Call
/bsc/mongodb/getuserroles
Output Columns
String userName | | String databaseName | | String collectionName | | String roleName | |
|
GetUsers
Users
|
Get users that have access to a database
details
Arguments
Name
|
Description
|
Default |
projectId R
|
The project id of the database
|
|
userName
|
Specify a user name to return a single result from MongoDB
|
|
SQL Call
SELECT * FROM MongoDB.users WHERE projectId = 'abcdef'
Http Call
/bsc/mongodb/getusers
Output Columns
String userName | | String databaseName | | String groupId | | String ldapAuthType | | String roles | |
|
GetWhiteList
WhiteList
|
Get available whitelist
details
Arguments
Name
|
Description
|
Default |
projectId R
|
ProjectId to filter on
|
|
whiteListEntry
|
Optional white list entry to filter on
|
|
SQL Call
SELECT * FROM MongoDB.whitelist
Http Call
/bsc/mongodb/getwhitelist
Output Columns
String cidrBlock | | String ipAddress | | String groupId | | String comment | | String deleteAfterDate | |
|
InsertDocument
Table
|
Inserts one document into an existing collection; generates a random ObjectId if _id is not provided.
details
Arguments
Name
|
Description
|
Default |
name
|
The name of the collection (format: database.collection or collection)
|
|
data
|
The BSON document when specifying
|
|
SQL Call
EXEC MongoDB.InsertDocument 'mycollection', '{ "_id": "123456", "appname": "sqlserver" }' // a BSON document with an _id as a string value EXEC MongoDB.InsertDocument 'mycollection', '{ "appname": "sqlserver" }' // a BSON document without an _id
Http Call
/bsc/mongodb/insertdocument
Output Columns
|
ping
ping
|
Ping test
details
Arguments
SQL Call
EXEC MongoDB.ping
Http Call
/bsc/mongodb/ping
Output Columns
|
RemoveTeamUser
TeamUser
|
Removes a user from an existing team
details
Arguments
Name
|
Description
|
Default |
orgId R
|
The organization id
|
|
teamId R
|
The team id
|
|
userId R
|
A single user id to remove
|
|
SQL Call
EXEC MongoDB.RemoveTeamUser '12345', '654321', '987123' DELETE FROM MongoDB.TeamUser WHERE orgId = '123' AND teamId = '234' AND userId = '345'
Http Call
/bsc/mongodb/removeteamuser
Output Columns
This call does not return data.
|
ResetUserPassword
UserPassword
|
Updates an existing user password in a database
details
Arguments
Name
|
Description
|
Default |
userName R
|
User to update
|
|
password
|
The password to assign to the user (leave blank to generate a random password)
|
|
projectId R
|
The project id of the database
|
|
SQL Call
UPDATE MongoDB.UserPassword SET password='123' WHERE userName='user1' AND projectId='123'
Http Call
/bsc/mongodb/resetuserpassword
Output Columns
String userName | | String projectId | | String password | |
|
ResetUserRoles
UserRoles
|
Updates an existing user roles in a database
details
Arguments
Name
|
Description
|
Default |
userName R
|
User to update
|
|
projectId R
|
The project id of the database
|
|
objectNames
|
Comma-separated list of 'database.collection' names for which the roles will apply, where the collection is optional if roles apply at the adatabase level
|
|
roleNames
|
Comma-separated list of roles to be applied to the collections (For Admin Database: atlasAdmin,readWriteAnyDatabase,readAnyDatabase,clusterMonitor,backup,dbAdminAnyDatabase,enableSharding -- For a Database: dbAdmin,read,readWrite -- For a Collection: read,readWrite )
|
|
SQL Call
UPDATE MongoDB.userRoles SET objectNames='mydb.collection', roleNames='read' WHERE userName='user1' AND projectId='123'
Http Call
/bsc/mongodb/resetuserroles
Output Columns
String userName | | String projectId | | String objectNames | | String roleNames | |
|
UpdateTeam
Team
|
Updates the team name of an existing team
details
Arguments
Name
|
Description
|
Default |
orgId R
|
Organization Id in which to create the team
|
|
name R
|
New name for the team
|
|
SQL Call
EXEC MongoDB.UpdateTeam '123456', 'new team 2' UPDATE MongoDB.Team SET name = 'new team 2' WHERE orgId = '123'
Http Call
/bsc/mongodb/updateteam
Output Columns
This call does not return data.
|
UpdateUser
UpdateUser
|
Updates an existing user in a database
details
Arguments
Name
|
Description
|
Default |
userName R
|
User name to create
|
|
password
|
Password for this user (leave blank if not updating the password)
|
|
projectId R
|
Project id in which the user will be created
|
|
roles
|
A roles JSON string that provides collectionName, databaseName and roleName
|
|
databaseName
|
Optional authentication database name (admin for Atlas)
|
admin |
SQL Call
EXEC MongoDB.UpdateUser 'username', 'password', 'abcdef', 'roles', 'NONE', 'admin'
Http Call
/bsc/mongodb/updateuser
Output Columns
String userName | | String databaseName | | String groupId | | String ldapAuthType | | String roles | |
|
UpsertDocument
UpsertDocument
|
Inserts or updates a single document in an existing collection; if the _id field is provided, attempts to update the corresponding document. If no _id field is provided, an ObjectId() value is automatically generated.
details
Arguments
Name
|
Description
|
Default |
name R
|
The name of the collection (format: database.collection or collection)
|
|
data R
|
The document to send as a BSON or JSON string
|
|
filter
|
A JSON or BSON document that provides the filter to use
|
|
SQL Call
EXEC MongoDB.UpsertDocument 'mycollection', '{ "_id": ObjectId("56fc5dcb39ee682bdc609b02"), "state": "FL", "createdOn": ISODate("2019-01-01T08:00.00.000+00:00"), "ts": Timestamp(1412180887, 1) }'
Http Call
/bsc/mongodb/upsertdocument
Output Columns
|
AddTeamToProject
AddTeamToProject
|
Adds a single team to an existing project
details
Arguments
Name
|
Description
|
Default |
projectId R
|
The project id to update
|
|
teamId R
|
The team id to add
|
|
roleNames R
|
List of roles to assign to the team (GROUP_OWNER, GROUP_READ_ONLY,GROUP_DATA_ACCESS_ADMIN,GROUP_DATA_ACCESS_READ_WRITE,GROUP_DATA_ACCESS_READ_ONLY)
|
|
SQL Call
EXEC MongoDB.AddTeamToProject '78912345', '123456789'
Http Call
/bsc/mongodb/addteamtoproject
Output Columns
Int32 clusterCount | | String created | | String id | | String name | | String orgId | |
|