diff --git a/examples/1.9.x/client-graphql/examples/presences/update.md b/examples/1.9.x/client-graphql/examples/presences/update.md index 25ce1c84b..cf97766c6 100644 --- a/examples/1.9.x/client-graphql/examples/presences/update.md +++ b/examples/1.9.x/client-graphql/examples/presences/update.md @@ -16,7 +16,7 @@ mutation { status source expiresAt - data + metadata } } ``` diff --git a/examples/1.9.x/client-graphql/examples/presences/upsert.md b/examples/1.9.x/client-graphql/examples/presences/upsert.md index 988ea54c1..e77de3574 100644 --- a/examples/1.9.x/client-graphql/examples/presences/upsert.md +++ b/examples/1.9.x/client-graphql/examples/presences/upsert.md @@ -15,7 +15,7 @@ mutation { status source expiresAt - data + metadata } } ``` diff --git a/examples/1.9.x/console-cli/examples/compute/create-database-backup-policy.md b/examples/1.9.x/console-cli/examples/compute/create-database-backup-policy.md new file mode 100644 index 000000000..acd1c9257 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/compute/create-database-backup-policy.md @@ -0,0 +1,8 @@ +```bash +appwrite compute create-database-backup-policy \ + --database-id \ + --policy-id \ + --name \ + --schedule '' \ + --retention 1 +``` diff --git a/examples/1.9.x/console-cli/examples/compute/list-database-backup-policies.md b/examples/1.9.x/console-cli/examples/compute/list-database-backup-policies.md new file mode 100644 index 000000000..8d4fd4025 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/compute/list-database-backup-policies.md @@ -0,0 +1,5 @@ +```bash +appwrite compute list-database-backup-policies \ + --database-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/presences/update.md b/examples/1.9.x/console-cli/examples/presences/update.md new file mode 100644 index 000000000..5224f375f --- /dev/null +++ b/examples/1.9.x/console-cli/examples/presences/update.md @@ -0,0 +1,4 @@ +```bash +appwrite presences update \ + --presence-id +``` diff --git a/examples/1.9.x/console-cli/examples/presences/upsert.md b/examples/1.9.x/console-cli/examples/presences/upsert.md index 4261cc0c5..ec36b3c99 100644 --- a/examples/1.9.x/console-cli/examples/presences/upsert.md +++ b/examples/1.9.x/console-cli/examples/presences/upsert.md @@ -1,6 +1,5 @@ ```bash appwrite presences upsert \ --presence-id \ - --user-id \ --status ``` diff --git a/examples/1.9.x/console-web/examples/compute/create-database-backup-policy.md b/examples/1.9.x/console-web/examples/compute/create-database-backup-policy.md new file mode 100644 index 000000000..5e6ac7f3d --- /dev/null +++ b/examples/1.9.x/console-web/examples/compute/create-database-backup-policy.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Compute } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const compute = new Compute(client); + +const result = await compute.createDatabaseBackupPolicy({ + databaseId: '', + policyId: '', + name: '', + schedule: '', + retention: 1, + type: 'full', // optional + enabled: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/compute/create-database.md b/examples/1.9.x/console-web/examples/compute/create-database.md index d8fcd9385..d3738db26 100644 --- a/examples/1.9.x/console-web/examples/compute/create-database.md +++ b/examples/1.9.x/console-web/examples/compute/create-database.md @@ -10,6 +10,7 @@ const compute = new Compute(client); const result = await compute.createDatabase({ databaseId: '', name: '', + database: '', // optional engine: 'postgres', // optional version: '17', // optional region: 'fra', // optional diff --git a/examples/1.9.x/console-web/examples/compute/list-database-backup-policies.md b/examples/1.9.x/console-web/examples/compute/list-database-backup-policies.md new file mode 100644 index 000000000..f636f1208 --- /dev/null +++ b/examples/1.9.x/console-web/examples/compute/list-database-backup-policies.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Compute } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const compute = new Compute(client); + +const result = await compute.listDatabaseBackupPolicies({ + databaseId: '', + queries: [] // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/compute/update-database.md b/examples/1.9.x/console-web/examples/compute/update-database.md index 08af41ae6..e99feeb8f 100644 --- a/examples/1.9.x/console-web/examples/compute/update-database.md +++ b/examples/1.9.x/console-web/examples/compute/update-database.md @@ -18,6 +18,7 @@ const result = await compute.updateDatabase({ storageClass: 'ssd', // optional highAvailability: false, // optional highAvailabilityReplicaCount: 0, // optional + highAvailabilitySyncMode: 'async', // optional networkMaxConnections: 10, // optional networkIdleTimeoutSeconds: 60, // optional networkIPAllowlist: [], // optional diff --git a/examples/1.9.x/console-web/examples/manager/delete-cache.md b/examples/1.9.x/console-web/examples/manager/delete-cache.md new file mode 100644 index 000000000..f8ee50c50 --- /dev/null +++ b/examples/1.9.x/console-web/examples/manager/delete-cache.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Manager, Region, CacheTarget, CacheDatabase } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + +const manager = new Manager(client); + +const result = await manager.deleteCache({ + region: Region.Fra, // optional + cache: CacheTarget.Cache, // optional + all: false, // optional + database: CacheDatabase.Console, // optional + projectId: '', // optional + collectionId: '', // optional + documentId: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/presences/update.md b/examples/1.9.x/console-web/examples/presences/update.md new file mode 100644 index 000000000..ce1280b03 --- /dev/null +++ b/examples/1.9.x/console-web/examples/presences/update.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Presences, Permission, Role } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const presences = new Presences(client); + +const result = await presences.update({ + presenceId: '', + status: '', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional + permissions: [Permission.read(Role.any())], // optional + purge: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/presences/upsert.md b/examples/1.9.x/console-web/examples/presences/upsert.md index fa7d6cba1..8c77a0ceb 100644 --- a/examples/1.9.x/console-web/examples/presences/upsert.md +++ b/examples/1.9.x/console-web/examples/presences/upsert.md @@ -9,7 +9,6 @@ const presences = new Presences(client); const result = await presences.upsert({ presenceId: '', - userId: '', status: '', permissions: [Permission.read(Role.any())], // optional expiresAt: '2020-10-15T06:38:00.000+00:00', // optional diff --git a/examples/1.9.x/server-dart/examples/presences/update.md b/examples/1.9.x/server-dart/examples/presences/update.md new file mode 100644 index 000000000..fcdc97b25 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/presences/update.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +Presences presences = Presences(client); + +Presence result = await presences.update( + presenceId: '', + userId: '', + status: '', // (optional) + expiresAt: '2020-10-15T06:38:00.000+00:00', // (optional) + metadata: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + purge: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dotnet/examples/presences/update.md b/examples/1.9.x/server-dotnet/examples/presences/update.md new file mode 100644 index 000000000..723d681cb --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/presences/update.md @@ -0,0 +1,21 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +Presences presences = new Presences(client); + +Presence result = await presences.Update( + presenceId: "", + userId: "", + status: "", // optional + expiresAt: "2020-10-15T06:38:00.000+00:00", // optional + metadata: [object], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional + purge: false // optional +);``` diff --git a/examples/1.9.x/server-go/examples/presences/update.md b/examples/1.9.x/server-go/examples/presences/update.md new file mode 100644 index 000000000..6ae7455d6 --- /dev/null +++ b/examples/1.9.x/server-go/examples/presences/update.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v4/client" + "github.com/appwrite/sdk-for-go/v4/presences" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := presences.New(client) + +response, error := service.Update( + "", + "", + presences.WithUpdateStatus(""), + presences.WithUpdateExpiresAt("2020-10-15T06:38:00.000+00:00"), + presences.WithUpdateMetadata(map[string]interface{}{}), + presences.WithUpdatePermissions(interface{}{"read("any")"}), + presences.WithUpdatePurge(false), +) +``` diff --git a/examples/1.9.x/server-graphql/examples/presences/update.md b/examples/1.9.x/server-graphql/examples/presences/update.md new file mode 100644 index 000000000..c375c5826 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/presences/update.md @@ -0,0 +1,23 @@ +```graphql +mutation { + presencesUpdate( + presenceId: "", + userId: "", + status: "", + expiresAt: "2020-10-15T06:38:00.000+00:00", + metadata: "{}", + permissions: ["read("any")"], + purge: false + ) { + _id + _createdAt + _updatedAt + _permissions + userId + status + source + expiresAt + metadata + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/presences/upsert.md b/examples/1.9.x/server-graphql/examples/presences/upsert.md index 3dacdfa42..3452a7d76 100644 --- a/examples/1.9.x/server-graphql/examples/presences/upsert.md +++ b/examples/1.9.x/server-graphql/examples/presences/upsert.md @@ -16,7 +16,7 @@ mutation { status source expiresAt - data + metadata } } ``` diff --git a/examples/1.9.x/server-kotlin/java/presences/update.md b/examples/1.9.x/server-kotlin/java/presences/update.md new file mode 100644 index 000000000..57cce92e2 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/presences/update.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.Presences; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Presences presences = new Presences(client); + +presences.update( + "", // presenceId + "", // userId + "", // status (optional) + "2020-10-15T06:38:00.000+00:00", // expiresAt (optional) + Map.of("a", "b"), // metadata (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + false, // purge (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/presences/update.md b/examples/1.9.x/server-kotlin/kotlin/presences/update.md new file mode 100644 index 000000000..2089c6441 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/presences/update.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Presences +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val presences = Presences(client) + +val response = presences.update( + presenceId = "", + userId = "", + status = "", // optional + expiresAt = "2020-10-15T06:38:00.000+00:00", // optional + metadata = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + purge = false // optional +) +``` diff --git a/examples/1.9.x/server-nodejs/examples/presences/update.md b/examples/1.9.x/server-nodejs/examples/presences/update.md new file mode 100644 index 000000000..0056a50ce --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/presences/update.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const presences = new sdk.Presences(client); + +const result = await presences.update({ + presenceId: '', + userId: '', + status: '', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + purge: false // optional +}); +``` diff --git a/examples/1.9.x/server-php/examples/presences/update.md b/examples/1.9.x/server-php/examples/presences/update.md new file mode 100644 index 000000000..95912f0f6 --- /dev/null +++ b/examples/1.9.x/server-php/examples/presences/update.md @@ -0,0 +1,24 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$presences = new Presences($client); + +$result = $presences->update( + presenceId: '', + userId: '', + status: '', // optional + expiresAt: '2020-10-15T06:38:00.000+00:00', // optional + metadata: [], // optional + permissions: [Permission::read(Role::any())], // optional + purge: false // optional +);``` diff --git a/examples/1.9.x/server-python/examples/presences/update.md b/examples/1.9.x/server-python/examples/presences/update.md new file mode 100644 index 000000000..fd3a9ef0b --- /dev/null +++ b/examples/1.9.x/server-python/examples/presences/update.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.presences import Presences +from appwrite.models import Presence +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +presences = Presences(client) + +result: Presence = presences.update( + presence_id = '', + user_id = '', + status = '', # optional + expires_at = '2020-10-15T06:38:00.000+00:00', # optional + metadata = {}, # optional + permissions = [Permission.read(Role.any())], # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-rest/examples/presences/update.md b/examples/1.9.x/server-rest/examples/presences/update.md new file mode 100644 index 000000000..03afb4367 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/presences/update.md @@ -0,0 +1,17 @@ +```http +PATCH /v1/presences/{presenceId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: +X-Appwrite-Session: + +{ + "userId": "", + "status": "", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": {}, + "permissions": ["read(\"any\")"], + "purge": false +} +``` diff --git a/examples/1.9.x/server-ruby/examples/presences/update.md b/examples/1.9.x/server-ruby/examples/presences/update.md new file mode 100644 index 000000000..90acb543f --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/presences/update.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +presences = Presences.new(client) + +result = presences.update( + presence_id: '', + user_id: '', + status: '', # optional + expires_at: '2020-10-15T06:38:00.000+00:00', # optional + metadata: {}, # optional + permissions: [Permission.read(Role.any())], # optional + purge: false # optional +) +``` diff --git a/examples/1.9.x/server-rust/examples/presences/update.md b/examples/1.9.x/server-rust/examples/presences/update.md new file mode 100644 index 000000000..479bf78be --- /dev/null +++ b/examples/1.9.x/server-rust/examples/presences/update.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::Presences; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let presences = Presences::new(&client); + + let result = presences.update( + "", + "", + Some(""), // optional + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-swift/examples/presences/update.md b/examples/1.9.x/server-swift/examples/presences/update.md new file mode 100644 index 000000000..67a993e96 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/presences/update.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let presences = Presences(client) + +let presence = try await presences.update( + presenceId: "", + userId: "", + status: "", // optional + expiresAt: "2020-10-15T06:38:00.000+00:00", // optional + metadata: [:], // optional + permissions: [Permission.read(Role.any())], // optional + purge: false // optional +) + +``` diff --git a/specs/1.9.x/open-api3-1.9.x-client.json b/specs/1.9.x/open-api3-1.9.x-client.json index b2c7c1f25..fcfebf153 100644 --- a/specs/1.9.x/open-api3-1.9.x-client.json +++ b/specs/1.9.x/open-api3-1.9.x-client.json @@ -9870,7 +9870,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -10003,7 +10004,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -15472,10 +15474,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata.", + "x-example": { + "key": "value" + }, + "nullable": true } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -15494,7 +15502,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { diff --git a/specs/1.9.x/open-api3-1.9.x-console.json b/specs/1.9.x/open-api3-1.9.x-console.json index 3de202c92..4de6f49e5 100644 --- a/specs/1.9.x/open-api3-1.9.x-console.json +++ b/specs/1.9.x/open-api3-1.9.x-console.json @@ -7432,6 +7432,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -7714,6 +7715,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8045,6 +8047,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8322,6 +8325,12 @@ "description": "Database display name. Max length: 128 chars.", "x-example": "" }, + "database": { + "type": "string", + "description": "Physical database\/catalog name. Defaults to databaseId.", + "default": "", + "x-example": "" + }, "engine": { "type": "string", "description": "Database engine: postgres, mysql, mariadb, or mongodb.", @@ -8343,13 +8352,13 @@ "type": { "type": "string", "description": "Database type: shared (serverless) or dedicated (always-on).", - "default": "shared", + "default": "dedicated", "x-example": "shared" }, "specification": { "type": "string", "description": "Specification identifier.", - "default": "starter", + "default": "s-2vcpu-2gb", "x-example": "" }, "backend": { @@ -8361,21 +8370,21 @@ "cpu": { "type": "integer", "description": "CPU in millicores (125-16000).", - "default": 1000, + "default": 2000, "x-example": 125, "format": "int32" }, "memory": { "type": "integer", "description": "Memory in MB to allocate (128-65536).", - "default": 1024, + "default": 2048, "x-example": 128, "format": "int32" }, "storage": { "type": "integer", "description": "Storage in GB to allocate (1-16384).", - "default": 10, + "default": 25, "x-example": 1, "format": "int32" }, @@ -8407,7 +8416,7 @@ }, "highAvailabilitySyncMode": { "type": "string", - "description": "Replication sync mode. Allowed values: async, sync, quorum.", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", "x-example": "async", "x-nullable": true }, @@ -8496,7 +8505,7 @@ "metricsEnabled": { "type": "boolean", "description": "Enable metrics collection.", - "default": true, + "default": false, "x-example": false }, "poolerEnabled": { @@ -8694,6 +8703,12 @@ "format": "int32", "x-nullable": true }, + "highAvailabilitySyncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, "networkMaxConnections": { "type": "integer", "description": "Maximum concurrent connections.", @@ -9041,6 +9056,185 @@ } } }, + "\/compute\/databases\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List database backup policies.", + "operationId": "computeListDatabaseBackupPolicies", + "tags": [ + "compute" + ], + "description": " List scheduled backup policies for a dedicated database.", + "responses": { + "200": { + "description": "Backup policy list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDatabaseBackupPolicies", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/list-database-backup-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create a database backup policy.", + "operationId": "computeCreateDatabaseBackupPolicy", + "tags": [ + "compute" + ], + "description": " Create a scheduled backup policy for a dedicated database.", + "responses": { + "201": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatabaseBackupPolicy", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/create-database-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "policyId": { + "type": "string", + "description": "Policy 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.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "" + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32" + }, + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "default": true, + "x-example": false + } + }, + "required": [ + "policyId", + "name", + "schedule", + "retention" + ] + } + } + } + } + } + }, "\/compute\/databases\/{databaseId}\/backups\/storage": { "put": { "summary": "Update database backup storage.", @@ -9754,7 +9948,7 @@ } ] }, - "post": { + "patch": { "summary": "Update database credentials.", "operationId": "computeUpdateDatabaseCredentials", "tags": [ @@ -10407,21 +10601,21 @@ ] } }, - "\/compute\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database audit logs.", - "operationId": "computeListDatabaseLogs", + "\/compute\/databases\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update database maintenance window.", + "operationId": "computeUpdateDatabaseMaintenanceWindow", "tags": [ "compute" ], - "description": "List audit logs for a dedicated database. Returns DDL operations and security-relevant events.", + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", "responses": { "200": { - "description": "Dedicated database audit logs list", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseAuditLogList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -10429,15 +10623,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseLogs", + "method": "updateDatabaseMaintenanceWindow", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/list-database-logs.md", + "demo": "compute\/update-database-maintenance-window.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.write", "platforms": [ "console" ], @@ -10462,57 +10656,51 @@ "x-example": "" }, "in": "path" - }, - { - "name": "startTime", - "description": "Start time in ISO 8601 format.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "endTime", - "description": "End time in ISO 8601 format.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of logs to return.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 100 - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "day": { + "type": "string", + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" + }, + "hourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) for maintenance window start.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "day", + "hourUtc" + ] + } + } + } + } } }, - "\/compute\/databases\/{databaseId}\/maintenance": { - "patch": { - "summary": "Update database maintenance window.", - "operationId": "computeUpdateDatabaseMaintenanceWindow", + "\/compute\/databases\/{databaseId}\/metrics": { + "get": { + "summary": "Get database metrics.", + "operationId": "computeGetDatabaseMetrics", "tags": [ "compute" ], - "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", + "description": "Get detailed performance metrics for a dedicated database. Returns CPU, memory, storage, IOPS, QPS, and connection metrics.", "responses": { "200": { - "description": "DedicatedDatabase", + "description": "DatabaseMetrics", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/dedicatedDatabaseMetrics" } } } @@ -10520,100 +10708,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDatabaseMaintenanceWindow", + "method": "getDatabaseMetrics", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/update-database-maintenance-window.md", + "demo": "compute\/get-database-metrics.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "day": { - "type": "string", - "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", - "x-example": "sun" - }, - "hourUtc": { - "type": "integer", - "description": "Hour in UTC (0-23) for maintenance window start.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "day", - "hourUtc" - ] - } - } - } - } - } - }, - "\/compute\/databases\/{databaseId}\/metrics": { - "get": { - "summary": "Get database metrics.", - "operationId": "computeGetDatabaseMetrics", - "tags": [ - "compute" - ], - "description": "Get detailed performance metrics for a dedicated database. Returns CPU, memory, storage, IOPS, QPS, and connection metrics.", - "responses": { - "200": { - "description": "DatabaseMetrics", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseMetrics" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseMetrics", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-metrics.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.read", "platforms": [ "console" ], @@ -11583,76 +11686,6 @@ } } }, - "\/compute\/databases\/{databaseId}\/usage": { - "get": { - "summary": "Get database usage metrics.", - "operationId": "computeGetDatabaseUsage", - "tags": [ - "compute" - ], - "description": "Get usage metrics for a dedicated database including CPU, memory, storage, connections, and query statistics.", - "responses": { - "200": { - "description": "DedicatedDatabase", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseUsage" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseUsage", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "default": "30d" - }, - "in": "query" - } - ] - } - }, "\/console\/assistant": { "post": { "summary": "Create assistant query", @@ -34876,6 +34909,114 @@ ] } }, + "\/manager\/cache": { + "delete": { + "summary": "Clear internal cache", + "operationId": "managerDeleteCache", + "tags": [ + "manager" + ], + "description": "Clears internal cache.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCache", + "group": "cache", + "cookies": false, + "type": "", + "demo": "manager\/delete-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "console" + ], + "packaging": false, + "public": true + }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "Target region.", + "x-example": "fra", + "enum": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ], + "x-enum-name": "Region" + }, + "cache": { + "type": "string", + "description": "Cache target.", + "default": "cache", + "x-example": "cache", + "enum": [ + "cache", + "timelimit", + "locks", + "pubsub", + "queue", + "all" + ], + "x-enum-name": "CacheTarget" + }, + "all": { + "type": "boolean", + "description": "Clear the entire selected cache target.", + "default": false, + "x-example": false + }, + "database": { + "type": "string", + "description": "Database cache scope.", + "default": "console", + "x-example": "console", + "enum": [ + "console", + "project", + "logs" + ], + "x-enum-name": "CacheDatabase" + }, + "projectId": { + "type": "string", + "description": "Project ID for project or logs database cache.", + "default": "", + "x-example": "" + }, + "collectionId": { + "type": "string", + "description": "Collection ID.", + "default": "", + "x-example": "" + }, + "documentId": { + "type": "string", + "description": "Document ID.", + "default": "", + "x-example": "" + } + } + } + } + } + } + } + }, "\/manager\/users\/status": { "patch": { "summary": "Update a user status by ID or email", @@ -46399,7 +46540,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -46414,7 +46556,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "permissions", "expiresAt", @@ -46422,7 +46563,6 @@ ], "required": [ "presenceId", - "userId", "status" ], "responses": [ @@ -46534,14 +46674,15 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", "methods": [ { - "name": "updatePresence", + "name": "update", "namespace": "presences", "desc": "Update presence", "auth": { @@ -46549,7 +46690,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "expiresAt", "metadata", @@ -46557,8 +46697,7 @@ "purge" ], "required": [ - "presenceId", - "userId" + "presenceId" ], "responses": [ { @@ -46567,7 +46706,7 @@ } ], "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", - "demo": "presences\/update-presence.md", + "demo": "presences\/update.md", "public": true } ], @@ -71233,7 +71372,7 @@ "tags": [ "usage" ], - "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, and timestamp. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", + "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", "responses": { "200": { "description": "Usage gauges list", @@ -74510,7 +74649,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -74594,7 +74733,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -74705,7 +74844,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -74775,7 +74914,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -74867,7 +75006,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -86830,10 +86969,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata.", + "x-example": { + "key": "value" + }, + "nullable": true } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -86852,7 +86997,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -99101,65 +99249,6 @@ "resourceType": "database" } }, - "dedicatedDatabaseAuditLog": { - "description": "AuditLog", - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "description": "When the event occurred.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "user": { - "type": "string", - "description": "Database user that performed the action.", - "x-example": "appwrite" - }, - "database": { - "type": "string", - "description": "Database name.", - "x-example": "appwrite" - }, - "action": { - "type": "string", - "description": "The action performed (e.g., CREATE TABLE, DROP INDEX).", - "x-example": "CREATE TABLE" - }, - "object": { - "type": "string", - "description": "The database object affected.", - "x-example": "public.users" - }, - "statement": { - "type": "string", - "description": "The full SQL statement.", - "x-example": "CREATE TABLE users (id serial PRIMARY KEY)" - }, - "clientAddress": { - "type": "string", - "description": "Client IP address.", - "x-example": "192.168.1.100" - } - }, - "required": [ - "timestamp", - "user", - "database", - "action", - "object", - "statement", - "clientAddress" - ], - "example": { - "timestamp": "2020-10-15T06:38:00.000+00:00", - "user": "appwrite", - "database": "appwrite", - "action": "CREATE TABLE", - "object": "public.users", - "statement": "CREATE TABLE users (id serial PRIMARY KEY)", - "clientAddress": "192.168.1.100" - } - }, "dedicatedDatabaseBackup": { "description": "Backup", "type": "object", @@ -99184,6 +99273,16 @@ "description": "Project ID.", "x-example": "5e5ea5c16897e" }, + "policyId": { + "type": "string", + "description": "Backup policy ID when the backup was created by a schedule.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "Backup trigger. Possible values: manual, schedule.", + "x-example": "schedule" + }, "type": { "type": "string", "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival).", @@ -99231,6 +99330,8 @@ "$createdAt", "databaseId", "projectId", + "policyId", + "trigger", "type", "status", "sizeBytes", @@ -99245,6 +99346,8 @@ "$createdAt": "2020-10-15T06:38:00.000+00:00", "databaseId": "5e5ea5c16897e", "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", "type": "full", "status": "completed", "sizeBytes": 1073741824, @@ -100846,6 +100949,11 @@ "description": "Database type: shared (serverless) or dedicated (always-on).", "x-example": "dedicated" }, + "api": { + "type": "string", + "description": "Product API that owns this database: compute, documentsdb, or vectorsdb.", + "x-example": "compute" + }, "region": { "type": "string", "description": "Region identifier (e.g., fra, nyc, syd).", @@ -100864,7 +100972,7 @@ "specification": { "type": "string", "description": "Specification identifier.", - "x-example": "starter" + "x-example": "s-2vcpu-2gb" }, "backend": { "type": "string", @@ -101054,7 +101162,7 @@ "metricsEnabled": { "type": "boolean", "description": "Whether metrics collection is enabled.", - "x-example": true + "x-example": false }, "sqlApiEnabled": { "type": "boolean", @@ -101100,6 +101208,7 @@ "projectId", "name", "type", + "api", "region", "engine", "version", @@ -101152,10 +101261,11 @@ "projectId": "5e5ea5c16897e", "name": "My Production Database", "type": "dedicated", + "api": "compute", "region": "fra", "engine": "postgres", "version": "16", - "specification": "starter", + "specification": "s-2vcpu-2gb", "backend": "edge", "hostname": "db-myproject-mydb.fra.appwrite.network", "connectionPort": 5432, @@ -101192,7 +101302,7 @@ "storageAutoscalingMaxGb": 500, "maintenanceWindowDay": "sun", "maintenanceWindowHourUtc": 3, - "metricsEnabled": true, + "metricsEnabled": false, "sqlApiEnabled": true, "sqlApiAllowedStatements": "SELECT", "sqlApiMaxRows": 10000, @@ -104396,260 +104506,6 @@ "credits": null } }, - "dedicatedDatabaseUsage": { - "description": "DedicatedDatabase", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "provisionedCpu": { - "type": "number", - "description": "Provisioned CPU cores for the database specification.", - "x-example": 2, - "format": "double" - }, - "provisionedMemoryBytes": { - "type": "integer", - "description": "Provisioned memory in bytes for the database specification.", - "x-example": 4294967296, - "format": "int32" - }, - "provisionedStorageBytes": { - "type": "integer", - "description": "Provisioned storage in bytes for the database specification.", - "x-example": 107374182400, - "format": "int32" - }, - "provisionedConnections": { - "type": "integer", - "description": "Maximum concurrent connections allowed by the database specification.", - "x-example": 200, - "format": "int32" - }, - "computeTotal": { - "type": "integer", - "description": "Total aggregated compute time in milliseconds.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound network traffic in bytes.", - "x-example": 0, - "format": "int32" - }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound network traffic in bytes.", - "x-example": 0, - "format": "int32" - }, - "connectionsTotal": { - "type": "integer", - "description": "Total aggregated number of database connections.", - "x-example": 0, - "format": "int32" - }, - "coldStartsTotal": { - "type": "integer", - "description": "Total aggregated number of cold starts.", - "x-example": 0, - "format": "int32" - }, - "cpuTotal": { - "type": "number", - "description": "Latest CPU usage percent (0-100).", - "x-example": 45.2, - "format": "double" - }, - "memoryTotal": { - "type": "number", - "description": "Latest memory usage percent (0-100).", - "x-example": 62.1, - "format": "double" - }, - "qpsTotal": { - "type": "number", - "description": "Latest queries per second.", - "x-example": 230.7, - "format": "double" - }, - "iopsReadTotal": { - "type": "number", - "description": "Latest read IOPS.", - "x-example": 125.5, - "format": "double" - }, - "iopsWriteTotal": { - "type": "number", - "description": "Latest write IOPS.", - "x-example": 45.3, - "format": "double" - }, - "compute": { - "type": "array", - "description": "Aggregated compute time per period in milliseconds.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used per period in bytes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "inbound": { - "type": "array", - "description": "Aggregated inbound network traffic per period in bytes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "outbound": { - "type": "array", - "description": "Aggregated outbound network traffic per period in bytes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "connections": { - "type": "array", - "description": "Aggregated number of database connections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "coldStarts": { - "type": "array", - "description": "Aggregated number of cold starts per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "cpu": { - "type": "array", - "description": "CPU usage percent per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "memory": { - "type": "array", - "description": "Memory usage percent per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "qps": { - "type": "array", - "description": "Queries per second per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "iopsRead": { - "type": "array", - "description": "Read IOPS per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "iopsWrite": { - "type": "array", - "description": "Write IOPS per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "$id", - "range", - "provisionedCpu", - "provisionedMemoryBytes", - "provisionedStorageBytes", - "provisionedConnections", - "computeTotal", - "storageTotal", - "inboundTotal", - "outboundTotal", - "connectionsTotal", - "coldStartsTotal", - "cpuTotal", - "memoryTotal", - "qpsTotal", - "iopsReadTotal", - "iopsWriteTotal", - "compute", - "storage", - "inbound", - "outbound", - "connections", - "coldStarts", - "cpu", - "memory", - "qps", - "iopsRead", - "iopsWrite" - ], - "example": { - "$id": "5e5ea5c16897e", - "range": "30d", - "provisionedCpu": 2, - "provisionedMemoryBytes": 4294967296, - "provisionedStorageBytes": 107374182400, - "provisionedConnections": 200, - "computeTotal": 0, - "storageTotal": 0, - "inboundTotal": 0, - "outboundTotal": 0, - "connectionsTotal": 0, - "coldStartsTotal": 0, - "cpuTotal": 45.2, - "memoryTotal": 62.1, - "qpsTotal": 230.7, - "iopsReadTotal": 125.5, - "iopsWriteTotal": 45.3, - "compute": [], - "storage": [], - "inbound": [], - "outbound": [], - "connections": [], - "coldStarts": [], - "cpu": [], - "memory": [], - "qps": [], - "iopsRead": [], - "iopsWrite": [] - } - }, "usageEvent": { "description": "usageEvent", "type": "object", @@ -104750,17 +104606,31 @@ "type": "string", "description": "The snapshot timestamp.", "x-example": "2026-04-09T12:00:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type.", + "x-example": "dedicatedDatabases" + }, + "resourceId": { + "type": "string", + "description": "The resource ID.", + "x-example": "production" } }, "required": [ "metric", "value", - "time" + "time", + "resourceType", + "resourceId" ], "example": { "metric": "users", "value": 1500, - "time": "2026-04-09T12:00:00.000+00:00" + "time": "2026-04-09T12:00:00.000+00:00", + "resourceType": "dedicatedDatabases", + "resourceId": "production" } }, "usageOrganization": { @@ -105577,34 +105447,6 @@ "blocks": "" } }, - "dedicatedDatabaseAuditLogList": { - "description": "Dedicated database audit logs list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of auditLogs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "auditLogs": { - "type": "array", - "description": "List of auditLogs.", - "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseAuditLog" - }, - "x-example": "" - } - }, - "required": [ - "total", - "auditLogs" - ], - "example": { - "total": 5, - "auditLogs": "" - } - }, "dedicatedDatabaseConnectionList": { "description": "Dedicated database connections list", "type": "object", diff --git a/specs/1.9.x/open-api3-1.9.x-server.json b/specs/1.9.x/open-api3-1.9.x-server.json index bf8af1f85..2e102b795 100644 --- a/specs/1.9.x/open-api3-1.9.x-server.json +++ b/specs/1.9.x/open-api3-1.9.x-server.json @@ -5802,6 +5802,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6088,6 +6089,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6423,6 +6425,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -29215,7 +29218,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -29352,14 +29356,15 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", "methods": [ { - "name": "updatePresence", + "name": "update", "namespace": "presences", "desc": "Update presence", "auth": { @@ -29386,7 +29391,7 @@ } ], "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", - "demo": "presences\/update-presence.md", + "demo": "presences\/update.md", "public": true } ], @@ -52294,7 +52299,7 @@ "tags": [ "usage" ], - "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, and timestamp. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", + "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", "responses": { "200": { "description": "Usage gauges list", @@ -55552,7 +55557,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -55637,7 +55642,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -55749,7 +55754,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -55820,7 +55825,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -55913,7 +55918,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -66153,10 +66158,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata.", + "x-example": { + "key": "value" + }, + "nullable": true } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -66175,7 +66186,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -74332,17 +74346,31 @@ "type": "string", "description": "The snapshot timestamp.", "x-example": "2026-04-09T12:00:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type.", + "x-example": "dedicatedDatabases" + }, + "resourceId": { + "type": "string", + "description": "The resource ID.", + "x-example": "production" } }, "required": [ "metric", "value", - "time" + "time", + "resourceType", + "resourceId" ], "example": { "metric": "users", "value": 1500, - "time": "2026-04-09T12:00:00.000+00:00" + "time": "2026-04-09T12:00:00.000+00:00", + "resourceType": "dedicatedDatabases", + "resourceId": "production" } }, "activityEventList": { diff --git a/specs/1.9.x/swagger2-1.9.x-client.json b/specs/1.9.x/swagger2-1.9.x-client.json index f08217b1e..afa1607e6 100644 --- a/specs/1.9.x/swagger2-1.9.x-client.json +++ b/specs/1.9.x/swagger2-1.9.x-client.json @@ -10377,7 +10377,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -10508,7 +10509,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -15756,10 +15758,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "x-example": { + "key": "value" + } } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -15778,7 +15786,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { diff --git a/specs/1.9.x/swagger2-1.9.x-console.json b/specs/1.9.x/swagger2-1.9.x-console.json index d907050f4..4b5bb6753 100644 --- a/specs/1.9.x/swagger2-1.9.x-console.json +++ b/specs/1.9.x/swagger2-1.9.x-console.json @@ -8100,6 +8100,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8109,6 +8110,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -8393,6 +8395,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8402,6 +8405,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -8734,6 +8738,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8743,6 +8748,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -9017,6 +9023,12 @@ "description": "Database display name. Max length: 128 chars.", "x-example": "" }, + "database": { + "type": "string", + "description": "Physical database\/catalog name. Defaults to databaseId.", + "default": "", + "x-example": "" + }, "engine": { "type": "string", "description": "Database engine: postgres, mysql, mariadb, or mongodb.", @@ -9038,13 +9050,13 @@ "type": { "type": "string", "description": "Database type: shared (serverless) or dedicated (always-on).", - "default": "shared", + "default": "dedicated", "x-example": "shared" }, "specification": { "type": "string", "description": "Specification identifier.", - "default": "starter", + "default": "s-2vcpu-2gb", "x-example": "" }, "backend": { @@ -9056,21 +9068,21 @@ "cpu": { "type": "integer", "description": "CPU in millicores (125-16000).", - "default": 1000, + "default": 2000, "x-example": 125, "format": "int32" }, "memory": { "type": "integer", "description": "Memory in MB to allocate (128-65536).", - "default": 1024, + "default": 2048, "x-example": 128, "format": "int32" }, "storage": { "type": "integer", "description": "Storage in GB to allocate (1-16384).", - "default": 10, + "default": 25, "x-example": 1, "format": "int32" }, @@ -9102,7 +9114,7 @@ }, "highAvailabilitySyncMode": { "type": "string", - "description": "Replication sync mode. Allowed values: async, sync, quorum.", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", "x-example": "async", "x-nullable": true }, @@ -9191,7 +9203,7 @@ "metricsEnabled": { "type": "boolean", "description": "Enable metrics collection.", - "default": true, + "default": false, "x-example": false }, "poolerEnabled": { @@ -9385,6 +9397,12 @@ "format": "int32", "x-nullable": true }, + "highAvailabilitySyncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, "networkMaxConnections": { "type": "integer", "description": "Maximum concurrent connections.", @@ -9730,39 +9748,37 @@ ] } }, - "\/compute\/databases\/{databaseId}\/backups\/storage": { - "put": { - "summary": "Update database backup storage.", - "operationId": "computeUpdateDatabaseBackupStorage", - "consumes": [ - "application\/json" - ], + "\/compute\/databases\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List database backup policies.", + "operationId": "computeListDatabaseBackupPolicies", + "consumes": [], "produces": [ "application\/json" ], "tags": [ "compute" ], - "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", + "description": " List scheduled backup policies for a dedicated database.", "responses": { "200": { - "description": "BackupStorageConfig", + "description": "Backup policy list", "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseBackupStorage" + "$ref": "#\/definitions\/backupPolicyList" } } }, "deprecated": false, "x-appwrite": { - "method": "updateDatabaseBackupStorage", + "method": "listDatabaseBackupPolicies", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/update-database-backup-storage.md", + "demo": "compute\/list-database-backup-policies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "databases.read", "platforms": [ "console" ], @@ -9787,92 +9803,51 @@ "in": "path" }, { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", - "x-example": "s3" - }, - "bucket": { - "type": "string", - "description": "Storage bucket or container name.", - "x-example": "" - }, - "region": { - "type": "string", - "description": "Storage region.", - "default": "", - "x-example": "" - }, - "prefix": { - "type": "string", - "description": "Object key prefix for backups.", - "default": "backups\/", - "x-example": "" - }, - "endpoint": { - "type": "string", - "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", - "default": "", - "x-example": "" - }, - "accessKey": { - "type": "string", - "description": "Access key or client ID for authentication.", - "x-example": "" - }, - "secretKey": { - "type": "string", - "description": "Secret key or service account JSON for authentication.", - "x-example": "" - } - }, - "required": [ - "provider", - "bucket", - "accessKey", - "secretKey" - ] - } + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" } ] - } - }, - "\/compute\/databases\/{databaseId}\/backups\/{backupId}": { - "get": { - "summary": "Get a database backup.", - "operationId": "computeGetDatabaseBackup", - "consumes": [], + }, + "post": { + "summary": "Create a database backup policy.", + "operationId": "computeCreateDatabaseBackupPolicy", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "tags": [ "compute" ], - "description": "Get details of a specific database backup including its status, size, and timestamps.", + "description": " Create a scheduled backup policy for a dedicated database.", "responses": { - "200": { - "description": "Backup", + "201": { + "description": "backup", "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseBackup" + "$ref": "#\/definitions\/backupPolicy" } } }, "deprecated": false, "x-appwrite": { - "method": "getDatabaseBackup", + "method": "createDatabaseBackupPolicy", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/get-database-backup.md", + "demo": "compute\/create-database-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.write", "platforms": [ "console" ], @@ -9897,18 +9872,60 @@ "in": "path" }, { - "name": "backupId", - "description": "Backup ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "policyId": { + "type": "string", + "description": "Policy 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.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "" + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32" + }, + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "default": true, + "x-example": false + } + }, + "required": [ + "policyId", + "name", + "schedule", + "retention" + ] + } } ] - }, - "delete": { - "summary": "Delete a database backup.", - "operationId": "computeDeleteDatabaseBackup", + } + }, + "\/compute\/databases\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update database backup storage.", + "operationId": "computeUpdateDatabaseBackupStorage", "consumes": [ "application\/json" ], @@ -9918,19 +9935,22 @@ "tags": [ "compute" ], - "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "BackupStorageConfig", + "schema": { + "$ref": "#\/definitions\/dedicatedDatabaseBackupStorage" + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteDatabaseBackup", + "method": "updateDatabaseBackupStorage", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/delete-database-backup.md", + "demo": "compute\/update-database-backup-storage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9959,20 +9979,65 @@ "in": "path" }, { - "name": "backupId", - "description": "Backup ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" + }, + "bucket": { + "type": "string", + "description": "Storage bucket or container name.", + "x-example": "" + }, + "region": { + "type": "string", + "description": "Storage region.", + "default": "", + "x-example": "" + }, + "prefix": { + "type": "string", + "description": "Object key prefix for backups.", + "default": "backups\/", + "x-example": "" + }, + "endpoint": { + "type": "string", + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "default": "", + "x-example": "" + }, + "accessKey": { + "type": "string", + "description": "Access key or client ID for authentication.", + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "Secret key or service account JSON for authentication.", + "x-example": "" + } + }, + "required": [ + "provider", + "bucket", + "accessKey", + "secretKey" + ] + } } ] } }, - "\/compute\/databases\/{databaseId}\/branches": { + "\/compute\/databases\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "List database branches.", - "operationId": "computeListDatabaseBranches", + "summary": "Get a database backup.", + "operationId": "computeGetDatabaseBackup", "consumes": [], "produces": [ "application\/json" @@ -9980,22 +10045,149 @@ "tags": [ "compute" ], - "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", + "description": "Get details of a specific database backup including its status, size, and timestamps.", "responses": { "200": { - "description": "BranchList", + "description": "Backup", "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseBranchList" + "$ref": "#\/definitions\/dedicatedDatabaseBackup" } } }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseBranches", + "method": "getDatabaseBackup", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/list-database-branches.md", + "demo": "compute\/get-database-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete a database backup.", + "operationId": "computeDeleteDatabaseBackup", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "compute" + ], + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDatabaseBackup", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/delete-database-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/compute\/databases\/{databaseId}\/branches": { + "get": { + "summary": "List database branches.", + "operationId": "computeListDatabaseBranches", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "compute" + ], + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", + "responses": { + "200": { + "description": "BranchList", + "schema": { + "$ref": "#\/definitions\/dedicatedDatabaseBranchList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDatabaseBranches", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/list-database-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10429,7 +10621,7 @@ } ] }, - "post": { + "patch": { "summary": "Update database credentials.", "operationId": "computeUpdateDatabaseCredentials", "consumes": [ @@ -11063,37 +11255,39 @@ ] } }, - "\/compute\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database audit logs.", - "operationId": "computeListDatabaseLogs", - "consumes": [], + "\/compute\/databases\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update database maintenance window.", + "operationId": "computeUpdateDatabaseMaintenanceWindow", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "tags": [ "compute" ], - "description": "List audit logs for a dedicated database. Returns DDL operations and security-relevant events.", + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", "responses": { "200": { - "description": "Dedicated database audit logs list", + "description": "DedicatedDatabase", "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseAuditLogList" + "$ref": "#\/definitions\/dedicatedDatabase" } } }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseLogs", + "method": "updateDatabaseMaintenanceWindow", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/list-database-logs.md", + "demo": "compute\/update-database-maintenance-window.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.write", "platforms": [ "console" ], @@ -11118,67 +11312,63 @@ "in": "path" }, { - "name": "startTime", - "description": "Start time in ISO 8601 format.", - "required": false, - "type": "string", - "x-example": "", - "in": "query" - }, - { - "name": "endTime", - "description": "End time in ISO 8601 format.", - "required": false, - "type": "string", - "x-example": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of logs to return.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 100, - "in": "query" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "day": { + "type": "string", + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" + }, + "hourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) for maintenance window start.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "day", + "hourUtc" + ] + } } ] } }, - "\/compute\/databases\/{databaseId}\/maintenance": { - "patch": { - "summary": "Update database maintenance window.", - "operationId": "computeUpdateDatabaseMaintenanceWindow", - "consumes": [ - "application\/json" - ], + "\/compute\/databases\/{databaseId}\/metrics": { + "get": { + "summary": "Get database metrics.", + "operationId": "computeGetDatabaseMetrics", + "consumes": [], "produces": [ "application\/json" ], "tags": [ "compute" ], - "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", + "description": "Get detailed performance metrics for a dedicated database. Returns CPU, memory, storage, IOPS, QPS, and connection metrics.", "responses": { "200": { - "description": "DedicatedDatabase", + "description": "DatabaseMetrics", "schema": { - "$ref": "#\/definitions\/dedicatedDatabase" + "$ref": "#\/definitions\/dedicatedDatabaseMetrics" } } }, "deprecated": false, "x-appwrite": { - "method": "updateDatabaseMaintenanceWindow", + "method": "getDatabaseMetrics", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/update-database-maintenance-window.md", + "demo": "compute\/get-database-metrics.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "databases.read", "platforms": [ "console" ], @@ -11203,131 +11393,50 @@ "in": "path" }, { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "day": { - "type": "string", - "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", - "x-example": "sun" - }, - "hourUtc": { - "type": "integer", - "description": "Hour in UTC (0-23) for maintenance window start.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "day", - "hourUtc" - ] - } + "name": "period", + "description": "Metrics aggregation period. Allowed values: 1h (last hour), 24h (last 24 hours), 7d (last 7 days), 30d (last 30 days).", + "required": false, + "type": "string", + "x-example": "1h", + "default": "24h", + "in": "query" } ] } }, - "\/compute\/databases\/{databaseId}\/metrics": { - "get": { - "summary": "Get database metrics.", - "operationId": "computeGetDatabaseMetrics", - "consumes": [], + "\/compute\/databases\/{databaseId}\/migrations": { + "post": { + "summary": "Migrate database between shared and dedicated.", + "operationId": "computeCreateDatabaseMigration", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "tags": [ "compute" ], - "description": "Get detailed performance metrics for a dedicated database. Returns CPU, memory, storage, IOPS, QPS, and connection metrics.", + "description": "Migrate a database between shared and dedicated types. Shared to dedicated creates an always-on StatefulSet with external access. Dedicated to shared converts to a serverless pod that scales to zero when idle. Data is preserved during migration.", "responses": { "200": { - "description": "DatabaseMetrics", + "description": "DedicatedDatabase", "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseMetrics" + "$ref": "#\/definitions\/dedicatedDatabase" } } }, "deprecated": false, "x-appwrite": { - "method": "getDatabaseMetrics", + "method": "createDatabaseMigration", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/get-database-metrics.md", + "demo": "compute\/create-database-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "period", - "description": "Metrics aggregation period. Allowed values: 1h (last hour), 24h (last 24 hours), 7d (last 7 days), 30d (last 30 days).", - "required": false, - "type": "string", - "x-example": "1h", - "default": "24h", - "in": "query" - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/migrations": { - "post": { - "summary": "Migrate database between shared and dedicated.", - "operationId": "computeCreateDatabaseMigration", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Migrate a database between shared and dedicated types. Shared to dedicated creates an always-on StatefulSet with external access. Dedicated to shared converts to a serverless pod that scales to zero when idle. Data is preserved during migration.", - "responses": { - "200": { - "description": "DedicatedDatabase", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabase" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseMigration", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-migration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "databases.write", "platforms": [ "console" ], @@ -12187,72 +12296,6 @@ ] } }, - "\/compute\/databases\/{databaseId}\/usage": { - "get": { - "summary": "Get database usage metrics.", - "operationId": "computeGetDatabaseUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Get usage metrics for a dedicated database including CPU, memory, storage, connections, and query statistics.", - "responses": { - "200": { - "description": "DedicatedDatabase", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseUsage" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseUsage", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - } - ] - } - }, "\/console\/assistant": { "post": { "summary": "Create assistant query", @@ -35466,6 +35509,144 @@ ] } }, + "\/manager\/cache": { + "delete": { + "summary": "Clear internal cache", + "operationId": "managerDeleteCache", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "manager" + ], + "description": "Clears internal cache.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCache", + "group": "cache", + "cookies": false, + "type": "", + "demo": "manager\/delete-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "console" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "Target region.", + "x-example": "fra", + "enum": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ], + "x-enum-name": "Region", + "x-enum-keys": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ] + }, + "cache": { + "type": "string", + "description": "Cache target.", + "default": "cache", + "x-example": "cache", + "enum": [ + "cache", + "timelimit", + "locks", + "pubsub", + "queue", + "all" + ], + "x-enum-name": "CacheTarget", + "x-enum-keys": [ + "cache", + "timelimit", + "locks", + "pubsub", + "queue", + "all" + ] + }, + "all": { + "type": "boolean", + "description": "Clear the entire selected cache target.", + "default": false, + "x-example": false + }, + "database": { + "type": "string", + "description": "Database cache scope.", + "default": "console", + "x-example": "console", + "enum": [ + "console", + "project", + "logs" + ], + "x-enum-name": "CacheDatabase", + "x-enum-keys": [ + "console", + "project", + "logs" + ] + }, + "projectId": { + "type": "string", + "description": "Project ID for project or logs database cache.", + "default": "", + "x-example": "" + }, + "collectionId": { + "type": "string", + "description": "Collection ID.", + "default": "", + "x-example": "" + }, + "documentId": { + "type": "string", + "description": "Document ID.", + "default": "", + "x-example": "" + } + } + } + } + ] + } + }, "\/manager\/users\/status": { "patch": { "summary": "Update a user status by ID or email", @@ -47017,7 +47198,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -47032,7 +47214,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "permissions", "expiresAt", @@ -47040,7 +47221,6 @@ ], "required": [ "presenceId", - "userId", "status" ], "responses": [ @@ -47150,14 +47330,15 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", "methods": [ { - "name": "updatePresence", + "name": "update", "namespace": "presences", "desc": "Update presence", "auth": { @@ -47165,7 +47346,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "expiresAt", "metadata", @@ -47173,8 +47353,7 @@ "purge" ], "required": [ - "presenceId", - "userId" + "presenceId" ], "responses": [ { @@ -47183,7 +47362,7 @@ } ], "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", - "demo": "presences\/update-presence.md", + "demo": "presences\/update.md", "public": true } ], @@ -72344,7 +72523,7 @@ "tags": [ "usage" ], - "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, and timestamp. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", + "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", "responses": { "200": { "description": "Usage gauges list", @@ -75602,7 +75781,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -75683,7 +75862,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -75795,7 +75974,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -75863,7 +76042,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -75953,7 +76132,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -87812,10 +87991,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "x-example": { + "key": "value" + } } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -87834,7 +88019,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -100235,65 +100423,6 @@ "resourceType": "database" } }, - "dedicatedDatabaseAuditLog": { - "description": "AuditLog", - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "description": "When the event occurred.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "user": { - "type": "string", - "description": "Database user that performed the action.", - "x-example": "appwrite" - }, - "database": { - "type": "string", - "description": "Database name.", - "x-example": "appwrite" - }, - "action": { - "type": "string", - "description": "The action performed (e.g., CREATE TABLE, DROP INDEX).", - "x-example": "CREATE TABLE" - }, - "object": { - "type": "string", - "description": "The database object affected.", - "x-example": "public.users" - }, - "statement": { - "type": "string", - "description": "The full SQL statement.", - "x-example": "CREATE TABLE users (id serial PRIMARY KEY)" - }, - "clientAddress": { - "type": "string", - "description": "Client IP address.", - "x-example": "192.168.1.100" - } - }, - "required": [ - "timestamp", - "user", - "database", - "action", - "object", - "statement", - "clientAddress" - ], - "example": { - "timestamp": "2020-10-15T06:38:00.000+00:00", - "user": "appwrite", - "database": "appwrite", - "action": "CREATE TABLE", - "object": "public.users", - "statement": "CREATE TABLE users (id serial PRIMARY KEY)", - "clientAddress": "192.168.1.100" - } - }, "dedicatedDatabaseBackup": { "description": "Backup", "type": "object", @@ -100318,6 +100447,16 @@ "description": "Project ID.", "x-example": "5e5ea5c16897e" }, + "policyId": { + "type": "string", + "description": "Backup policy ID when the backup was created by a schedule.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "Backup trigger. Possible values: manual, schedule.", + "x-example": "schedule" + }, "type": { "type": "string", "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival).", @@ -100365,6 +100504,8 @@ "$createdAt", "databaseId", "projectId", + "policyId", + "trigger", "type", "status", "sizeBytes", @@ -100379,6 +100520,8 @@ "$createdAt": "2020-10-15T06:38:00.000+00:00", "databaseId": "5e5ea5c16897e", "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", "type": "full", "status": "completed", "sizeBytes": 1073741824, @@ -101992,6 +102135,11 @@ "description": "Database type: shared (serverless) or dedicated (always-on).", "x-example": "dedicated" }, + "api": { + "type": "string", + "description": "Product API that owns this database: compute, documentsdb, or vectorsdb.", + "x-example": "compute" + }, "region": { "type": "string", "description": "Region identifier (e.g., fra, nyc, syd).", @@ -102010,7 +102158,7 @@ "specification": { "type": "string", "description": "Specification identifier.", - "x-example": "starter" + "x-example": "s-2vcpu-2gb" }, "backend": { "type": "string", @@ -102200,7 +102348,7 @@ "metricsEnabled": { "type": "boolean", "description": "Whether metrics collection is enabled.", - "x-example": true + "x-example": false }, "sqlApiEnabled": { "type": "boolean", @@ -102246,6 +102394,7 @@ "projectId", "name", "type", + "api", "region", "engine", "version", @@ -102298,10 +102447,11 @@ "projectId": "5e5ea5c16897e", "name": "My Production Database", "type": "dedicated", + "api": "compute", "region": "fra", "engine": "postgres", "version": "16", - "specification": "starter", + "specification": "s-2vcpu-2gb", "backend": "edge", "hostname": "db-myproject-mydb.fra.appwrite.network", "connectionPort": 5432, @@ -102338,7 +102488,7 @@ "storageAutoscalingMaxGb": 500, "maintenanceWindowDay": "sun", "maintenanceWindowHourUtc": 3, - "metricsEnabled": true, + "metricsEnabled": false, "sqlApiEnabled": true, "sqlApiAllowedStatements": "SELECT", "sqlApiMaxRows": 10000, @@ -105572,271 +105722,6 @@ "credits": null } }, - "dedicatedDatabaseUsage": { - "description": "DedicatedDatabase", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "provisionedCpu": { - "type": "number", - "description": "Provisioned CPU cores for the database specification.", - "x-example": 2, - "format": "double" - }, - "provisionedMemoryBytes": { - "type": "integer", - "description": "Provisioned memory in bytes for the database specification.", - "x-example": 4294967296, - "format": "int32" - }, - "provisionedStorageBytes": { - "type": "integer", - "description": "Provisioned storage in bytes for the database specification.", - "x-example": 107374182400, - "format": "int32" - }, - "provisionedConnections": { - "type": "integer", - "description": "Maximum concurrent connections allowed by the database specification.", - "x-example": 200, - "format": "int32" - }, - "computeTotal": { - "type": "integer", - "description": "Total aggregated compute time in milliseconds.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound network traffic in bytes.", - "x-example": 0, - "format": "int32" - }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound network traffic in bytes.", - "x-example": 0, - "format": "int32" - }, - "connectionsTotal": { - "type": "integer", - "description": "Total aggregated number of database connections.", - "x-example": 0, - "format": "int32" - }, - "coldStartsTotal": { - "type": "integer", - "description": "Total aggregated number of cold starts.", - "x-example": 0, - "format": "int32" - }, - "cpuTotal": { - "type": "number", - "description": "Latest CPU usage percent (0-100).", - "x-example": 45.2, - "format": "double" - }, - "memoryTotal": { - "type": "number", - "description": "Latest memory usage percent (0-100).", - "x-example": 62.1, - "format": "double" - }, - "qpsTotal": { - "type": "number", - "description": "Latest queries per second.", - "x-example": 230.7, - "format": "double" - }, - "iopsReadTotal": { - "type": "number", - "description": "Latest read IOPS.", - "x-example": 125.5, - "format": "double" - }, - "iopsWriteTotal": { - "type": "number", - "description": "Latest write IOPS.", - "x-example": 45.3, - "format": "double" - }, - "compute": { - "type": "array", - "description": "Aggregated compute time per period in milliseconds.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used per period in bytes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "inbound": { - "type": "array", - "description": "Aggregated inbound network traffic per period in bytes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "outbound": { - "type": "array", - "description": "Aggregated outbound network traffic per period in bytes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "connections": { - "type": "array", - "description": "Aggregated number of database connections per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "coldStarts": { - "type": "array", - "description": "Aggregated number of cold starts per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "cpu": { - "type": "array", - "description": "CPU usage percent per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "memory": { - "type": "array", - "description": "Memory usage percent per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "qps": { - "type": "array", - "description": "Queries per second per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "iopsRead": { - "type": "array", - "description": "Read IOPS per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "iopsWrite": { - "type": "array", - "description": "Write IOPS per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "$id", - "range", - "provisionedCpu", - "provisionedMemoryBytes", - "provisionedStorageBytes", - "provisionedConnections", - "computeTotal", - "storageTotal", - "inboundTotal", - "outboundTotal", - "connectionsTotal", - "coldStartsTotal", - "cpuTotal", - "memoryTotal", - "qpsTotal", - "iopsReadTotal", - "iopsWriteTotal", - "compute", - "storage", - "inbound", - "outbound", - "connections", - "coldStarts", - "cpu", - "memory", - "qps", - "iopsRead", - "iopsWrite" - ], - "example": { - "$id": "5e5ea5c16897e", - "range": "30d", - "provisionedCpu": 2, - "provisionedMemoryBytes": 4294967296, - "provisionedStorageBytes": 107374182400, - "provisionedConnections": 200, - "computeTotal": 0, - "storageTotal": 0, - "inboundTotal": 0, - "outboundTotal": 0, - "connectionsTotal": 0, - "coldStartsTotal": 0, - "cpuTotal": 45.2, - "memoryTotal": 62.1, - "qpsTotal": 230.7, - "iopsReadTotal": 125.5, - "iopsWriteTotal": 45.3, - "compute": [], - "storage": [], - "inbound": [], - "outbound": [], - "connections": [], - "coldStarts": [], - "cpu": [], - "memory": [], - "qps": [], - "iopsRead": [], - "iopsWrite": [] - } - }, "usageEvent": { "description": "usageEvent", "type": "object", @@ -105937,17 +105822,31 @@ "type": "string", "description": "The snapshot timestamp.", "x-example": "2026-04-09T12:00:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type.", + "x-example": "dedicatedDatabases" + }, + "resourceId": { + "type": "string", + "description": "The resource ID.", + "x-example": "production" } }, "required": [ "metric", "value", - "time" + "time", + "resourceType", + "resourceId" ], "example": { "metric": "users", "value": 1500, - "time": "2026-04-09T12:00:00.000+00:00" + "time": "2026-04-09T12:00:00.000+00:00", + "resourceType": "dedicatedDatabases", + "resourceId": "production" } }, "usageOrganization": { @@ -106792,35 +106691,6 @@ "blocks": "" } }, - "dedicatedDatabaseAuditLogList": { - "description": "Dedicated database audit logs list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of auditLogs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "auditLogs": { - "type": "array", - "description": "List of auditLogs.", - "items": { - "type": "object", - "$ref": "#\/definitions\/dedicatedDatabaseAuditLog" - }, - "x-example": "" - } - }, - "required": [ - "total", - "auditLogs" - ], - "example": { - "total": 5, - "auditLogs": "" - } - }, "dedicatedDatabaseConnectionList": { "description": "Dedicated database connections list", "type": "object", diff --git a/specs/1.9.x/swagger2-1.9.x-server.json b/specs/1.9.x/swagger2-1.9.x-server.json index c11c712ba..45decc2db 100644 --- a/specs/1.9.x/swagger2-1.9.x-server.json +++ b/specs/1.9.x/swagger2-1.9.x-server.json @@ -6406,6 +6406,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6415,6 +6416,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -6703,6 +6705,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6712,6 +6715,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -7048,6 +7052,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -7057,6 +7062,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -29719,7 +29725,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -29854,14 +29861,15 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", "methods": [ { - "name": "updatePresence", + "name": "update", "namespace": "presences", "desc": "Update presence", "auth": { @@ -29888,7 +29896,7 @@ } ], "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", - "demo": "presences\/update-presence.md", + "demo": "presences\/update.md", "public": true } ], @@ -53328,7 +53336,7 @@ "tags": [ "usage" ], - "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, and timestamp. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", + "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", "responses": { "200": { "description": "Usage gauges list", @@ -56564,7 +56572,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -56646,7 +56654,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -56759,7 +56767,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -56828,7 +56836,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -56919,7 +56927,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -67068,10 +67076,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "x-example": { + "key": "value" + } } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -67090,7 +67104,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -75267,17 +75284,31 @@ "type": "string", "description": "The snapshot timestamp.", "x-example": "2026-04-09T12:00:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type.", + "x-example": "dedicatedDatabases" + }, + "resourceId": { + "type": "string", + "description": "The resource ID.", + "x-example": "production" } }, "required": [ "metric", "value", - "time" + "time", + "resourceType", + "resourceId" ], "example": { "metric": "users", "value": 1500, - "time": "2026-04-09T12:00:00.000+00:00" + "time": "2026-04-09T12:00:00.000+00:00", + "resourceType": "dedicatedDatabases", + "resourceId": "production" } }, "activityEventList": {