-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Description
🔖 Feature description
Please provide a public API route to list all databases, returning each database’s ID, name, and metadata.
🎤 Pitch
This enables apps to dynamically discover database IDs at runtime instead of relying on fragile hard-coded values, so if an administrator deletes a database, the deployed application doesn’t break.
import 'package:appwrite/appwrite.dart';
Future<void> main() async {
// Appwrite client to communicate with the server
final client = Client()
..setEndpoint("https://cloud.appwrite.io/v1")
..setProject("<PROJECT_ID>")
..setKey("<APPWRITE_KEY>");
// Database service instance
final databases = Databases(client);
// Example: list all databases
final list = await databases.list();
// Find the database you want by name
final users = list.databases.where(
(d) => d.name == "users",
orElse: () => throw Exception("Database 'users' not found"),
);
print("Found database:");
print("Name: ${users.name}");
print("ID: ${users.$id}");
}This is just an example of the appwrite flutter SDK I Invision.
But there is no endpoint to make this actually happen, none that I know of.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels