Get list of bases
Gets the list of databases
- Parameters
- Advanced call ?
Function GetListOfBases(Val Connection) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Connection | --dbc | String, Arbitrary | ✔ | Connection or connection string |
Returns
Map Of KeyAndValue - Operation result
| Parameter | Description |
|---|---|
| addin_mode | Manual selection of external component connection mode (for 1C): Isolated, NotIsolated |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Address = "127.0.0.1:1234";
Login = "bayselonarrend";
Password = "12we...";
ConnectionParams = New Structure("authSource", "admin");
ConnectionString = OPI_MongoDB.GenerateConnectionString(Address, , Login, Password, ConnectionParams);
Connection = OPI_MongoDB.CreateConnection(ConnectionString);
Result = OPI_MongoDB.GetListOfBases(Connection);
- Bash
- CMD/Bat
oint mongodb GetListOfBases \
--dbc "mongodb://bayselonarrend:12we3456!2154@127.0.0.1:27017/?authSource=admin"
oint mongodb GetListOfBases ^
--dbc "mongodb://bayselonarrend:12we3456!2154@127.0.0.1:27017/?authSource=admin"
Result
{
"result": true,
"data": {
"databases": [
{
"name": "admin",
"sizeOnDisk": 188416,
"empty": false
},
{
"name": "config",
"sizeOnDisk": 73728,
"empty": false
},
{
"name": "local",
"sizeOnDisk": 81920,
"empty": false
},
{
"name": "main",
"sizeOnDisk": 73728,
"empty": false
}
],
"totalSize": 417792,
"totalSizeMb": 0,
"ok": 1
}
}