Docs : SDK : getDatabases
The Get Databases API lets you retrieve all of your user's databases, or retrieve a single database.
userbase.getDatabases().then((databases) => {
// databases result available
}).catch((e) => console.error(e))
Parameters [optional]
-
databaseName [string | Len: 1-100 | optional] - The database name to retrieve.
-
databaseId [string | optional] - The database's unique identifier to retrieve.
Result
- databases [array]
- databaseName [string] - The database's name.
- databaseId [string] - The database's unique identifier.
- isOwner [boolean] - Whether or not the user owns the database.
- readOnly [boolean] - Whether or not the user has read only permissions to the database.
- resharingAllowed [boolean] - Whether or not the user has permission to reshare the database.
- encryptionMode [string] - The database's encryption mode. Can either be 'end-to-end' or 'server-side'. See the FAQ for more on the encryption modes.
- receivedFromUsername [string | optional] - The username of the user who shared the database with the user. Only provided if the user received access to the database from another user via shareDatabase.
- users [array] - The other users who have access to this database.
- username [string] - The user's username.
- isOwner [boolean] - Whether or not the user owns the database.
- readOnly [boolean] - Whether or not the user has read only permissions to the database.
- resharingAllowed [boolean] - Whether or not the user has permission to reshare the database.
- receivedFromUsername [string | optional] - The username of the user who shared the database with the user. Only provided if the user received access to the database from another user via shareDatabase.
- verified [boolean] - Whether or not the user has been verified via verifyUser.
Errors
- UserNotSignedIn
- TooManyRequests
- ServiceUnavailable