Create database
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/databases
Description
Create a new Database.
Required scopes
Authentication
setProject() and a server API key (setKey()). For direct REST calls, send X-Appwrite-Project and X-Appwrite-Key.Parameters
Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
Database name. Max length: 128 chars.
Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
Database
Database ID.
Database name.
Database creation date in ISO 8601 format.
Database update date in ISO 8601 format.
If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.
Database type.
Database status. Possible values: provisioning, ready or failed
Database backup policies.
Object type
Database backup archives.
Object type
using Appwrite;using Appwrite.Models;using Appwrite.Services;
Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
Database result = await databases.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false // optional);Databases
databases
transactions
collections
attributes
documents
indexes
Create database
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/databases
Description
Create a new Database.
Required scopes
Authentication
setProject() and a server API key (setKey()). For direct REST calls, send X-Appwrite-Project and X-Appwrite-Key.Parameters
Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
Database name. Max length: 128 chars.
Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
Database
Database ID.
Database name.
Database creation date in ISO 8601 format.
Database update date in ISO 8601 format.
If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.
Database type.
Database status. Possible values: provisioning, ready or failed
Database backup policies.
Object type
Database backup archives.
Object type
using Appwrite;using Appwrite.Models;using Appwrite.Services;
Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
Database result = await databases.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false // optional);