appwrite/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md

19 lines
581 B
Markdown
Raw Normal View History

2024-07-03 15:25:40 +00:00
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
2024-07-03 15:25:40 +00:00
const databases = new Databases(client);
const response = await databases.updateStringAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
2024-09-09 08:38:15 +00:00
'<DEFAULT>', // default
null, // size (optional)
'' // newKey (optional)
2024-07-03 15:25:40 +00:00
);