Docs
Skip to content
post

Create operations

Endpoint

posthttps://<REGION>.cloud.appwrite.io...sactions/{transactionId}/operations

Description

Required scopes

documents.writerows.write

Authentication

Initialize the Appwrite client with setProject() and ensure the user is signed in. The SDK sends the session header automatically after login.

Path

string
Required

Body

object
Status
Content type
201
application/json

Transaction

Name
Type
Description
string
string
string
string
integer
string
JavaScript
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);