Create operations
Endpoint
posthttps://<REGION>.cloud.appwrite.io...sactions/{transactionId}/operations
Description
Create multiple operations in a single transaction.
Required scopes
Authentication
setProject() and ensure the user is signed in. The SDK sends the session header automatically after login.Path
Transaction ID.
Body
Array of staged operations.
Transaction
Transaction ID.
Transaction creation time in ISO 8601 format.
Transaction update date in ISO 8601 format.
Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.
Number of operations in the transaction.
Expiration time in ISO 8601 format.
import { Client, TablesDB } from "appwrite";
const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createOperations({ transactionId: '<TRANSACTION_ID>', operations: [ { "action": "create", "databaseId": "<DATABASE_ID>", "tableId": "<TABLE_ID>", "rowId": "<ROW_ID>", "data": { "name": "Walter O'Brien" } } ] // optional});
console.log(result);TablesDB
transactions
rows
Create operations
Endpoint
posthttps://<REGION>.cloud.appwrite.io...sactions/{transactionId}/operations
Description
Create multiple operations in a single transaction.
Required scopes
Authentication
setProject() and ensure the user is signed in. The SDK sends the session header automatically after login.Path
Transaction ID.
Body
Array of staged operations.
Transaction
Transaction ID.
Transaction creation time in ISO 8601 format.
Transaction update date in ISO 8601 format.
Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.
Number of operations in the transaction.
Expiration time in ISO 8601 format.
import { Client, TablesDB } from "appwrite";
const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createOperations({ transactionId: '<TRANSACTION_ID>', operations: [ { "action": "create", "databaseId": "<DATABASE_ID>", "tableId": "<TABLE_ID>", "rowId": "<ROW_ID>", "data": { "name": "Walter O'Brien" } } ] // optional});
console.log(result);