Skip to content

Interface: Databases ​

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:19

Properties ​

client ​

client: Client

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:20

Methods ​

create() ​

Call Signature ​

create(params): Promise<Database>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:59

Create a new Database.

Parameters ​
params ​
databaseId ​

string

Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.

enabled? ​

boolean

Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.

name ​

string

Database name. Max length: 128 chars.

Returns ​

Promise<Database>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.create instead.

Call Signature ​

create(databaseId, name, enabled?): Promise<Database>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:75

Create a new Database.

Parameters ​
databaseId ​

string

Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.

name ​

string

Database name. Max length: 128 chars.

enabled? ​

boolean

Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.

Returns ​

Promise<Database>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createBooleanAttribute() ​

Call Signature ​

createBooleanAttribute(params): Promise<AttributeBoolean>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:459

Create a boolean attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

boolean

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeBoolean>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createBooleanColumn instead.

Call Signature ​

createBooleanAttribute(databaseId, collectionId, key, required, xdefault?, array?): Promise<AttributeBoolean>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:481

Create a boolean attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

boolean

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

Returns ​

Promise<AttributeBoolean>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createCollection() ​

Call Signature ​

createCollection(params): Promise<Collection>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:309

Create a new Collection. Before using this route, you should create a new database resource using either a server integration API or directly from your database console.

Parameters ​
params ​
attributes? ​

object[]

Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.

collectionId ​

string

Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.

databaseId ​

string

Database ID.

documentSecurity? ​

boolean

Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. Learn more about permissions.

enabled? ​

boolean

Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.

indexes? ​

object[]

Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).

name ​

string

Collection name. Max length: 128 chars.

permissions? ​

string[]

An array of permissions strings. By default, no user is granted with any permissions. Learn more about permissions.

Returns ​

Promise<Collection>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createTable instead.

Call Signature ​

createCollection(databaseId, collectionId, name, permissions?, documentSecurity?, enabled?, attributes?, indexes?): Promise<Collection>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:334

Create a new Collection. Before using this route, you should create a new database resource using either a server integration API or directly from your database console.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.

name ​

string

Collection name. Max length: 128 chars.

permissions? ​

string[]

An array of permissions strings. By default, no user is granted with any permissions. Learn more about permissions.

documentSecurity? ​

boolean

Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. Learn more about permissions.

enabled? ​

boolean

Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.

attributes? ​

object[]

Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.

indexes? ​

object[]

Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).

Returns ​

Promise<Collection>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createDatetimeAttribute() ​

Call Signature ​

createDatetimeAttribute(params): Promise<AttributeDatetime>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:530

Create a date time attribute according to the ISO 8601 standard.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for the attribute in ISO 8601 format. Cannot be set when attribute is required.

Returns ​

Promise<AttributeDatetime>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createDatetimeColumn instead.

Call Signature ​

createDatetimeAttribute(databaseId, collectionId, key, required, xdefault?, array?): Promise<AttributeDatetime>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:551

Create a date time attribute according to the ISO 8601 standard.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for the attribute in ISO 8601 format. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

Returns ​

Promise<AttributeDatetime>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createDocument() ​

Call Signature ​

createDocument<Document>(params): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1828

Create a new Document. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration. Make sure to define attributes before creating documents.

data ​

Document extends DefaultDocument ? Partial<Document> & Record<string, any> : Partial<Document> & Omit<Document, keyof Document>

Document data as JSON object.

databaseId ​

string

Database ID.

documentId ​

string

Document 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.

permissions? ​

string[]

An array of permissions strings. By default, only the current user is granted all permissions. Learn more about permissions.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createRow instead.

Call Signature ​

createDocument<Document>(databaseId, collectionId, documentId, data, permissions?, transactionId?): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1849

Create a new Document. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration. Make sure to define attributes before creating documents.

documentId ​

string

Document 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.

data ​

Document extends DefaultDocument ? Partial<Document> & Record<string, any> : Partial<Document> & Omit<Document, keyof Document>

Document data as JSON object.

permissions? ​

string[]

An array of permissions strings. By default, only the current user is granted all permissions. Learn more about permissions.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createDocuments() ​

Call Signature ​

createDocuments<Document>(params): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1861

Create new Documents. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration. Make sure to define attributes before creating documents.

databaseId ​

string

Database ID.

documents ​

object[]

Array of documents data as JSON objects.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createRows instead.

Call Signature ​

createDocuments<Document>(databaseId, collectionId, documents, transactionId?): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1878

Create new Documents. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration. Make sure to define attributes before creating documents.

documents ​

object[]

Array of documents data as JSON objects.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createEmailAttribute() ​

Call Signature ​

createEmailAttribute(params): Promise<AttributeEmail>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:601

Create an email attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeEmail>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createEmailColumn instead.

Call Signature ​

createEmailAttribute(databaseId, collectionId, key, required, xdefault?, array?): Promise<AttributeEmail>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:623

Create an email attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

Returns ​

Promise<AttributeEmail>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createEnumAttribute() ​

Call Signature ​

createEnumAttribute(params): Promise<AttributeEnum>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:676

Create an enum attribute. The elements param acts as a white-list of accepted values for this attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

elements ​

string[]

Array of enum values.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeEnum>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createEnumColumn instead.

Call Signature ​

createEnumAttribute(databaseId, collectionId, key, elements, required, xdefault?, array?): Promise<AttributeEnum>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:700

Create an enum attribute. The elements param acts as a white-list of accepted values for this attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

elements ​

string[]

Array of enum values.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

Returns ​

Promise<AttributeEnum>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createFloatAttribute() ​

Call Signature ​

createFloatAttribute(params): Promise<AttributeFloat>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:757

Create a float attribute. Optionally, minimum and maximum values can be provided.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

max? ​

number

Maximum value.

min? ​

number

Minimum value.

required ​

boolean

Is attribute required?

xdefault? ​

number

Default value. Cannot be set when required.

Returns ​

Promise<AttributeFloat>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createFloatColumn instead.

Call Signature ​

createFloatAttribute(databaseId, collectionId, key, required, min?, max?, xdefault?, array?): Promise<AttributeFloat>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:783

Create a float attribute. Optionally, minimum and maximum values can be provided.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

min? ​

number

Minimum value.

max? ​

number

Maximum value.

xdefault? ​

number

Default value. Cannot be set when required.

array? ​

boolean

Is attribute an array?

Returns ​

Promise<AttributeFloat>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createIndex() ​

Call Signature ​

createIndex(params): Promise<Index>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2222

Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be key, fulltext, and unique.

Parameters ​
params ​
attributes ​

string[]

Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Index Key.

lengths? ​

number[]

Length of index. Maximum of 100

orders? ​

OrderBy[]

Array of index orders. Maximum of 100 orders are allowed.

type ​

DatabasesIndexType

Index type.

Returns ​

Promise<Index>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createIndex instead.

Call Signature ​

createIndex(databaseId, collectionId, key, type, attributes, orders?, lengths?): Promise<Index>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2246

Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be key, fulltext, and unique.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Index Key.

type ​

DatabasesIndexType

Index type.

attributes ​

string[]

Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.

orders? ​

OrderBy[]

Array of index orders. Maximum of 100 orders are allowed.

lengths? ​

number[]

Length of index. Maximum of 100

Returns ​

Promise<Index>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createIntegerAttribute() ​

Call Signature ​

createIntegerAttribute(params): Promise<AttributeInteger>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:843

Create an integer attribute. Optionally, minimum and maximum values can be provided.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

max? ​

number | bigint

Maximum value

min? ​

number | bigint

Minimum value

required ​

boolean

Is attribute required?

xdefault? ​

number | bigint

Default value. Cannot be set when attribute is required.

Returns ​

Promise<AttributeInteger>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createIntegerColumn instead.

Call Signature ​

createIntegerAttribute(databaseId, collectionId, key, required, min?, max?, xdefault?, array?): Promise<AttributeInteger>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:869

Create an integer attribute. Optionally, minimum and maximum values can be provided.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

min? ​

number | bigint

Minimum value

max? ​

number | bigint

Maximum value

xdefault? ​

number | bigint

Default value. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

Returns ​

Promise<AttributeInteger>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createIpAttribute() ​

Call Signature ​

createIpAttribute(params): Promise<AttributeIp>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:927

Create IP address attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value. Cannot be set when attribute is required.

Returns ​

Promise<AttributeIp>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createIpColumn instead.

Call Signature ​

createIpAttribute(databaseId, collectionId, key, required, xdefault?, array?): Promise<AttributeIp>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:949

Create IP address attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

Returns ​

Promise<AttributeIp>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createLineAttribute() ​

Call Signature ​

createLineAttribute(params): Promise<AttributeLine>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:999

Create a geometric line attribute.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.

Returns ​

Promise<AttributeLine>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createLineColumn instead.

Call Signature ​

createLineAttribute(databaseId, collectionId, key, required, xdefault?): Promise<AttributeLine>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1018

Create a geometric line attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.

Returns ​

Promise<AttributeLine>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createLongtextAttribute() ​

Call Signature ​

createLongtextAttribute(params): Promise<AttributeLongtext>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1068

Create a longtext attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeLongtext>

Throws ​

Call Signature ​

createLongtextAttribute(databaseId, collectionId, key, required, xdefault?, array?, encrypt?): Promise<AttributeLongtext>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1092

Create a longtext attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

Returns ​

Promise<AttributeLongtext>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createMediumtextAttribute() ​

Call Signature ​

createMediumtextAttribute(params): Promise<AttributeMediumtext>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1143

Create a mediumtext attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeMediumtext>

Throws ​

Call Signature ​

createMediumtextAttribute(databaseId, collectionId, key, required, xdefault?, array?, encrypt?): Promise<AttributeMediumtext>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1167

Create a mediumtext attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

Returns ​

Promise<AttributeMediumtext>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createOperations() ​

Call Signature ​

createOperations(params): Promise<Transaction>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:185

Create multiple operations in a single transaction.

Parameters ​
params ​
operations? ​

object[]

Array of staged operations.

transactionId ​

string

Transaction ID.

Returns ​

Promise<Transaction>

Throws ​

Call Signature ​

createOperations(transactionId, operations?): Promise<Transaction>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:198

Create multiple operations in a single transaction.

Parameters ​
transactionId ​

string

Transaction ID.

operations? ​

object[]

Array of staged operations.

Returns ​

Promise<Transaction>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createPointAttribute() ​

Call Signature ​

createPointAttribute(params): Promise<AttributePoint>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1216

Create a geometric point attribute.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.

Returns ​

Promise<AttributePoint>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createPointColumn instead.

Call Signature ​

createPointAttribute(databaseId, collectionId, key, required, xdefault?): Promise<AttributePoint>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1235

Create a geometric point attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.

Returns ​

Promise<AttributePoint>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createPolygonAttribute() ​

Call Signature ​

createPolygonAttribute(params): Promise<AttributePolygon>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1283

Create a geometric polygon attribute.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.

Returns ​

Promise<AttributePolygon>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createPolygonColumn instead.

Call Signature ​

createPolygonAttribute(databaseId, collectionId, key, required, xdefault?): Promise<AttributePolygon>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1302

Create a geometric polygon attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.

Returns ​

Promise<AttributePolygon>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createRelationshipAttribute() ​

Call Signature ​

createRelationshipAttribute(params): Promise<AttributeRelationship>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1354

Create relationship attribute. Learn more about relationship attributes.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key? ​

string

Attribute Key.

onDelete? ​

RelationMutate

Constraints option

relatedCollectionId ​

string

Related Collection ID.

twoWay? ​

boolean

Is Two Way?

twoWayKey? ​

string

Two Way Attribute Key.

type ​

RelationshipType

Relation type

Returns ​

Promise<AttributeRelationship>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createRelationshipColumn instead.

Call Signature ​

createRelationshipAttribute(databaseId, collectionId, relatedCollectionId, type, twoWay?, key?, twoWayKey?, onDelete?): Promise<AttributeRelationship>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1380

Create relationship attribute. Learn more about relationship attributes.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

relatedCollectionId ​

string

Related Collection ID.

type ​

RelationshipType

Relation type

twoWay? ​

boolean

Is Two Way?

key? ​

string

Attribute Key.

twoWayKey? ​

string

Two Way Attribute Key.

onDelete? ​

RelationMutate

Constraints option

Returns ​

Promise<AttributeRelationship>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createStringAttribute() ​

Call Signature ​

createStringAttribute(params): Promise<AttributeString>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1431

Create a string attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID. You can create a new table using the Database service server integration.

databaseId ​

string

Database ID.

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

size ​

number

Attribute size for text attributes, in number of characters.

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeString>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createStringColumn instead.

Call Signature ​

createStringAttribute(databaseId, collectionId, key, size, required, xdefault?, array?, encrypt?): Promise<AttributeString>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1457

Create a string attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new table using the Database service server integration.

key ​

string

Attribute Key.

size ​

number

Attribute size for text attributes, in number of characters.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

Returns ​

Promise<AttributeString>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createTextAttribute() ​

Call Signature ​

createTextAttribute(params): Promise<AttributeText>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1512

Create a text attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeText>

Throws ​

Call Signature ​

createTextAttribute(databaseId, collectionId, key, required, xdefault?, array?, encrypt?): Promise<AttributeText>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1536

Create a text attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

Returns ​

Promise<AttributeText>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createTransaction() ​

Call Signature ​

createTransaction(params?): Promise<Transaction>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:102

Create a new transaction.

Parameters ​
params? ​
ttl? ​

number

Seconds before the transaction expires.

Returns ​

Promise<Transaction>

Throws ​

Call Signature ​

createTransaction(ttl?): Promise<Transaction>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:113

Create a new transaction.

Parameters ​
ttl? ​

number

Seconds before the transaction expires.

Returns ​

Promise<Transaction>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createUrlAttribute() ​

Call Signature ​

createUrlAttribute(params): Promise<AttributeUrl>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1587

Create a URL attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeUrl>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.createUrlColumn instead.

Call Signature ​

createUrlAttribute(databaseId, collectionId, key, required, xdefault?, array?): Promise<AttributeUrl>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1609

Create a URL attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

Returns ​

Promise<AttributeUrl>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


createVarcharAttribute() ​

Call Signature ​

createVarcharAttribute(params): Promise<AttributeVarchar>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1662

Create a varchar attribute.

Parameters ​
params ​
array? ​

boolean

Is attribute an array?

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

size ​

number

Attribute size for varchar attributes, in number of characters. Maximum size is 16381.

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeVarchar>

Throws ​

Call Signature ​

createVarcharAttribute(databaseId, collectionId, key, size, required, xdefault?, array?, encrypt?): Promise<AttributeVarchar>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1688

Create a varchar attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

size ​

number

Attribute size for varchar attributes, in number of characters. Maximum size is 16381.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

array? ​

boolean

Is attribute an array?

encrypt? ​

boolean

Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.

Returns ​

Promise<AttributeVarchar>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


decrementDocumentAttribute() ​

Call Signature ​

decrementDocumentAttribute<Document>(params): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2116

Decrement a specific attribute of a document by a given value.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
attribute ​

string

Attribute key.

collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

documentId ​

string

Document ID.

min? ​

number

Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.

transactionId? ​

string

Transaction ID for staging the operation.

value? ​

number

Value to increment the attribute by. The value must be a number.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.decrementRowColumn instead.

Call Signature ​

decrementDocumentAttribute<Document>(databaseId, collectionId, documentId, attribute, value?, min?, transactionId?): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2139

Decrement a specific attribute of a document by a given value.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

documentId ​

string

Document ID.

attribute ​

string

Attribute key.

value? ​

number

Value to increment the attribute by. The value must be a number.

min? ​

number

Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


delete() ​

Call Signature ​

delete(params): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:253

Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.

Parameters ​
params ​
databaseId ​

string

Database ID.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.delete instead.

Call Signature ​

delete(databaseId): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:264

Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.

Parameters ​
databaseId ​

string

Database ID.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


deleteAttribute() ​

Call Signature ​

deleteAttribute(params): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1764

Deletes an attribute.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.deleteColumn instead.

Call Signature ​

deleteAttribute(databaseId, collectionId, key): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1779

Deletes an attribute.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


deleteCollection() ​

Call Signature ​

deleteCollection(params): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:402

Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.deleteTable instead.

Call Signature ​

deleteCollection(databaseId, collectionId): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:415

Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


deleteDocument() ​

Call Signature ​

deleteDocument(params): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2084

Delete a document by its unique ID.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

documentId ​

string

Document ID.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.deleteRow instead.

Call Signature ​

deleteDocument(databaseId, collectionId, documentId, transactionId?): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2101

Delete a document by its unique ID.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

documentId ​

string

Document ID.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


deleteDocuments() ​

Call Signature ​

deleteDocuments<Document>(params): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1953

Bulk delete documents using queries, if no queries are passed then all documents are deleted.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.deleteRows instead.

Call Signature ​

deleteDocuments<Document>(databaseId, collectionId, queries?, transactionId?): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1970

Bulk delete documents using queries, if no queries are passed then all documents are deleted.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


deleteIndex() ​

Call Signature ​

deleteIndex(params): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2283

Delete an index.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Index Key.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.deleteIndex instead.

Call Signature ​

deleteIndex(databaseId, collectionId, key): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2298

Delete an index.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Index Key.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


deleteTransaction() ​

Call Signature ​

deleteTransaction(params): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:165

Delete a transaction by its unique ID.

Parameters ​
params ​
transactionId ​

string

Transaction ID.

Returns ​

Promise<{ }>

Throws ​

Call Signature ​

deleteTransaction(transactionId): Promise<{ }>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:176

Delete a transaction by its unique ID.

Parameters ​
transactionId ​

string

Transaction ID.

Returns ​

Promise<{ }>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


get() ​

Call Signature ​

get(params): Promise<Database>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:207

Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.

Parameters ​
params ​
databaseId ​

string

Database ID.

Returns ​

Promise<Database>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.get instead.

Call Signature ​

get(databaseId): Promise<Database>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:218

Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.

Parameters ​
databaseId ​

string

Database ID.

Returns ​

Promise<Database>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


getAttribute() ​

Call Signature ​

getAttribute(params): Promise<AttributeBoolean | AttributeInteger | AttributeFloat | AttributeEmail | AttributeEnum | AttributeUrl | AttributeIp | AttributeDatetime | AttributeRelationship | AttributeString>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1738

Get attribute by ID.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

Returns ​

Promise<AttributeBoolean | AttributeInteger | AttributeFloat | AttributeEmail | AttributeEnum | AttributeUrl | AttributeIp | AttributeDatetime | AttributeRelationship | AttributeString>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.getColumn instead.

Call Signature ​

getAttribute(databaseId, collectionId, key): Promise<AttributeBoolean | AttributeInteger | AttributeFloat | AttributeEmail | AttributeEnum | AttributeUrl | AttributeIp | AttributeDatetime | AttributeRelationship | AttributeString>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1753

Get attribute by ID.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

Returns ​

Promise<AttributeBoolean | AttributeInteger | AttributeFloat | AttributeEmail | AttributeEnum | AttributeUrl | AttributeIp | AttributeDatetime | AttributeRelationship | AttributeString>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


getCollection() ​

Call Signature ​

getCollection(params): Promise<Collection>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:344

Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

Returns ​

Promise<Collection>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.getTable instead.

Call Signature ​

getCollection(databaseId, collectionId): Promise<Collection>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:357

Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

Returns ​

Promise<Collection>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


getDocument() ​

Call Signature ​

getDocument<Document>(params): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1983

Get a document by its unique ID. This endpoint response returns a JSON object with the document data.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

documentId ​

string

Document ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

transactionId? ​

string

Transaction ID to read uncommitted changes within the transaction.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.getRow instead.

Call Signature ​

getDocument<Document>(databaseId, collectionId, documentId, queries?, transactionId?): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2002

Get a document by its unique ID. This endpoint response returns a JSON object with the document data.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

documentId ​

string

Document ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

transactionId? ​

string

Transaction ID to read uncommitted changes within the transaction.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


getIndex() ​

Call Signature ​

getIndex(params): Promise<Index>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2257

Get an index by its unique ID.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Index Key.

Returns ​

Promise<Index>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.getIndex instead.

Call Signature ​

getIndex(databaseId, collectionId, key): Promise<Index>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2272

Get an index by its unique ID.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Index Key.

Returns ​

Promise<Index>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


getTransaction() ​

Call Signature ​

getTransaction(params): Promise<Transaction>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:121

Get a transaction by its unique ID.

Parameters ​
params ​
transactionId ​

string

Transaction ID.

Returns ​

Promise<Transaction>

Throws ​

Call Signature ​

getTransaction(transactionId): Promise<Transaction>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:132

Get a transaction by its unique ID.

Parameters ​
transactionId ​

string

Transaction ID.

Returns ​

Promise<Transaction>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


incrementDocumentAttribute() ​

Call Signature ​

incrementDocumentAttribute<Document>(params): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2154

Increment a specific attribute of a document by a given value.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
attribute ​

string

Attribute key.

collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

documentId ​

string

Document ID.

max? ​

number

Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.

transactionId? ​

string

Transaction ID for staging the operation.

value? ​

number

Value to increment the attribute by. The value must be a number.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.incrementRowColumn instead.

Call Signature ​

incrementDocumentAttribute<Document>(databaseId, collectionId, documentId, attribute, value?, max?, transactionId?): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2177

Increment a specific attribute of a document by a given value.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

documentId ​

string

Document ID.

attribute ​

string

Attribute key.

value? ​

number

Value to increment the attribute by. The value must be a number.

max? ​

number

Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


list() ​

Call Signature ​

list(params?): Promise<DatabaseList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:32

Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.

Parameters ​
params? ​
queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name

string

Search term to filter your list results. Max length: 256 chars.

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

Returns ​

Promise<DatabaseList>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.list instead.

Call Signature ​

list(queries?, search?, total?): Promise<DatabaseList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:47

Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.

Parameters ​
queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name

search? ​

string

Search term to filter your list results. Max length: 256 chars.

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

Returns ​

Promise<DatabaseList>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


listAttributes() ​

Call Signature ​

listAttributes(params): Promise<AttributeList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:427

List attributes in the collection.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

Returns ​

Promise<AttributeList>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.listColumns instead.

Call Signature ​

listAttributes(databaseId, collectionId, queries?, total?): Promise<AttributeList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:444

List attributes in the collection.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

Returns ​

Promise<AttributeList>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


listCollections() ​

Call Signature ​

listCollections(params): Promise<CollectionList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:276

Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.

Parameters ​
params ​
databaseId ​

string

Database ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity

search? ​

string

Search term to filter your list results. Max length: 256 chars.

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

Returns ​

Promise<CollectionList>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.listTables instead.

Call Signature ​

listCollections(databaseId, queries?, search?, total?): Promise<CollectionList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:293

Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.

Parameters ​
databaseId ​

string

Database ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity

search? ​

string

Search term to filter your list results. Max length: 256 chars.

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

Returns ​

Promise<CollectionList>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


listDocuments() ​

Call Signature ​

listDocuments<Document>(params): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1793

Get a list of all the user's documents in a given collection. You can use the query params to filter your results.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

transactionId? ​

string

Transaction ID to read uncommitted changes within the transaction.

ttl? ​

number

TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.listRows instead.

Call Signature ​

listDocuments<Document>(databaseId, collectionId, queries?, transactionId?, total?, ttl?): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1814

Get a list of all the user's documents in a given collection. You can use the query params to filter your results.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

transactionId? ​

string

Transaction ID to read uncommitted changes within the transaction.

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

ttl? ​

number

TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


listIndexes() ​

Call Signature ​

listIndexes(params): Promise<IndexList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2189

List indexes in the collection.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

Returns ​

Promise<IndexList>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.listIndexes instead.

Call Signature ​

listIndexes(databaseId, collectionId, queries?, total?): Promise<IndexList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2206

List indexes in the collection.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error

total? ​

boolean

When set to false, the total count returned will be 0 and will not be calculated.

Returns ​

Promise<IndexList>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


listTransactions() ​

Call Signature ​

listTransactions(params?): Promise<TransactionList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:83

List transactions across all databases.

Parameters ​
params? ​
queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries.

Returns ​

Promise<TransactionList>

Throws ​

Call Signature ​

listTransactions(queries?): Promise<TransactionList>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:94

List transactions across all databases.

Parameters ​
queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries.

Returns ​

Promise<TransactionList>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


update() ​

Call Signature ​

update(params): Promise<Database>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:229

Update a database by its unique ID.

Parameters ​
params ​
databaseId ​

string

Database ID.

enabled? ​

boolean

Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.

name? ​

string

Database name. Max length: 128 chars.

Returns ​

Promise<Database>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.update instead.

Call Signature ​

update(databaseId, name?, enabled?): Promise<Database>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:244

Update a database by its unique ID.

Parameters ​
databaseId ​

string

Database ID.

name? ​

string

Database name. Max length: 128 chars.

enabled? ​

boolean

Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.

Returns ​

Promise<Database>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateBooleanAttribute() ​

Call Signature ​

updateBooleanAttribute(params): Promise<AttributeBoolean>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:495

Update a boolean attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New attribute key.

required ​

boolean

Is attribute required?

xdefault? ​

boolean

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeBoolean>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateBooleanColumn instead.

Call Signature ​

updateBooleanAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeBoolean>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:516

Update a boolean attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

boolean

Default value for attribute when not provided. Cannot be set when attribute is required.

newKey? ​

string

New attribute key.

Returns ​

Promise<AttributeBoolean>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateCollection() ​

Call Signature ​

updateCollection(params): Promise<Collection>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:371

Update a collection by its unique ID.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

documentSecurity? ​

boolean

Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. Learn more about permissions.

enabled? ​

boolean

Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.

name? ​

string

Collection name. Max length: 128 chars.

permissions? ​

string[]

An array of permission strings. By default, the current permissions are inherited. Learn more about permissions.

Returns ​

Promise<Collection>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateTable instead.

Call Signature ​

updateCollection(databaseId, collectionId, name?, permissions?, documentSecurity?, enabled?): Promise<Collection>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:392

Update a collection by its unique ID.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

name? ​

string

Collection name. Max length: 128 chars.

permissions? ​

string[]

An array of permission strings. By default, the current permissions are inherited. Learn more about permissions.

documentSecurity? ​

boolean

Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. Learn more about permissions.

enabled? ​

boolean

Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.

Returns ​

Promise<Collection>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateDatetimeAttribute() ​

Call Signature ​

updateDatetimeAttribute(params): Promise<AttributeDatetime>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:565

Update a date time attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New attribute key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeDatetime>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateDatetimeColumn instead.

Call Signature ​

updateDatetimeAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeDatetime>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:586

Update a date time attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

newKey? ​

string

New attribute key.

Returns ​

Promise<AttributeDatetime>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateDocument() ​

Call Signature ​

updateDocument<Document>(params): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2051

Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID.

data? ​

Document extends DefaultDocument ? Partial<Document> & Record<string, any> : Partial<Document> & Partial<Omit<Document, keyof Document>>

Document data as JSON object. Include only attribute and value pairs to be updated.

databaseId ​

string

Database ID.

documentId ​

string

Document ID.

permissions? ​

string[]

An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateRow instead.

Call Signature ​

updateDocument<Document>(databaseId, collectionId, documentId, data?, permissions?, transactionId?): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2072

Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

documentId ​

string

Document ID.

data? ​

Document extends DefaultDocument ? Partial<Document> & Record<string, any> : Partial<Document> & Partial<Omit<Document, keyof Document>>

Document data as JSON object. Include only attribute and value pairs to be updated.

permissions? ​

string[]

An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateDocuments() ​

Call Signature ​

updateDocuments<Document>(params): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1922

Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID.

data? ​

object

Document data as JSON object. Include only attribute and value pairs to be updated.

databaseId ​

string

Database ID.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateRows instead.

Call Signature ​

updateDocuments<Document>(databaseId, collectionId, data?, queries?, transactionId?): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1941

Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

data? ​

object

Document data as JSON object. Include only attribute and value pairs to be updated.

queries? ​

string[]

Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateEmailAttribute() ​

Call Signature ​

updateEmailAttribute(params): Promise<AttributeEmail>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:638

Update an email attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeEmail>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateEmailColumn instead.

Call Signature ​

updateEmailAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeEmail>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:660

Update an email attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeEmail>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateEnumAttribute() ​

Call Signature ​

updateEnumAttribute(params): Promise<AttributeEnum>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:716

Update an enum attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

elements ​

string[]

Updated list of enum values.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeEnum>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateEnumColumn instead.

Call Signature ​

updateEnumAttribute(databaseId, collectionId, key, elements, required, xdefault?, newKey?): Promise<AttributeEnum>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:740

Update an enum attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

elements ​

string[]

Updated list of enum values.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeEnum>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateFloatAttribute() ​

Call Signature ​

updateFloatAttribute(params): Promise<AttributeFloat>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:800

Update a float attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

max? ​

number

Maximum value.

min? ​

number

Minimum value.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

number

Default value. Cannot be set when required.

Returns ​

Promise<AttributeFloat>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateFloatColumn instead.

Call Signature ​

updateFloatAttribute(databaseId, collectionId, key, required, xdefault?, min?, max?, newKey?): Promise<AttributeFloat>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:826

Update a float attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

number

Default value. Cannot be set when required.

min? ​

number

Minimum value.

max? ​

number

Maximum value.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeFloat>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateIntegerAttribute() ​

Call Signature ​

updateIntegerAttribute(params): Promise<AttributeInteger>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:886

Update an integer attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

max? ​

number | bigint

Maximum value

min? ​

number | bigint

Minimum value

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

number | bigint

Default value. Cannot be set when attribute is required.

Returns ​

Promise<AttributeInteger>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateIntegerColumn instead.

Call Signature ​

updateIntegerAttribute(databaseId, collectionId, key, required, xdefault?, min?, max?, newKey?): Promise<AttributeInteger>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:912

Update an integer attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

number | bigint

Default value. Cannot be set when attribute is required.

min? ​

number | bigint

Minimum value

max? ​

number | bigint

Maximum value

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeInteger>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateIpAttribute() ​

Call Signature ​

updateIpAttribute(params): Promise<AttributeIp>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:964

Update an ip attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value. Cannot be set when attribute is required.

Returns ​

Promise<AttributeIp>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateIpColumn instead.

Call Signature ​

updateIpAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeIp>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:986

Update an ip attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value. Cannot be set when attribute is required.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeIp>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateLineAttribute() ​

Call Signature ​

updateLineAttribute(params): Promise<AttributeLine>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1032

Update a line attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New attribute key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.

Returns ​

Promise<AttributeLine>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateLineColumn instead.

Call Signature ​

updateLineAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeLine>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1053

Update a line attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.

newKey? ​

string

New attribute key.

Returns ​

Promise<AttributeLine>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateLongtextAttribute() ​

Call Signature ​

updateLongtextAttribute(params): Promise<AttributeLongtext>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1106

Update a longtext attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeLongtext>

Throws ​

Call Signature ​

updateLongtextAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeLongtext>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1128

Update a longtext attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeLongtext>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateMediumtextAttribute() ​

Call Signature ​

updateMediumtextAttribute(params): Promise<AttributeMediumtext>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1181

Update a mediumtext attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeMediumtext>

Throws ​

Call Signature ​

updateMediumtextAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeMediumtext>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1203

Update a mediumtext attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeMediumtext>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updatePointAttribute() ​

Call Signature ​

updatePointAttribute(params): Promise<AttributePoint>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1249

Update a point attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New attribute key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.

Returns ​

Promise<AttributePoint>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updatePointColumn instead.

Call Signature ​

updatePointAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributePoint>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1270

Update a point attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.

newKey? ​

string

New attribute key.

Returns ​

Promise<AttributePoint>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updatePolygonAttribute() ​

Call Signature ​

updatePolygonAttribute(params): Promise<AttributePolygon>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1316

Update a polygon attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New attribute key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.

Returns ​

Promise<AttributePolygon>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updatePolygonColumn instead.

Call Signature ​

updatePolygonAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributePolygon>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1337

Update a polygon attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

any[]

Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.

newKey? ​

string

New attribute key.

Returns ​

Promise<AttributePolygon>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateRelationshipAttribute() ​

Call Signature ​

updateRelationshipAttribute(params): Promise<AttributeRelationship>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1394

Update relationship attribute. Learn more about relationship attributes.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

onDelete? ​

RelationMutate

Constraints option

Returns ​

Promise<AttributeRelationship>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateRelationshipColumn instead.

Call Signature ​

updateRelationshipAttribute(databaseId, collectionId, key, onDelete?, newKey?): Promise<AttributeRelationship>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1414

Update relationship attribute. Learn more about relationship attributes.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

onDelete? ​

RelationMutate

Constraints option

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeRelationship>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateStringAttribute() ​

Call Signature ​

updateStringAttribute(params): Promise<AttributeString>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1473

Update a string attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new table using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

size? ​

number

Maximum size of the string attribute.

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeString>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateStringColumn instead.

Call Signature ​

updateStringAttribute(databaseId, collectionId, key, required, xdefault?, size?, newKey?): Promise<AttributeString>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1497

Update a string attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new table using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

size? ​

number

Maximum size of the string attribute.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeString>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateTextAttribute() ​

Call Signature ​

updateTextAttribute(params): Promise<AttributeText>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1550

Update a text attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeText>

Throws ​

Call Signature ​

updateTextAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeText>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1572

Update a text attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeText>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateTransaction() ​

Call Signature ​

updateTransaction(params): Promise<Transaction>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:142

Update a transaction, to either commit or roll back its operations.

Parameters ​
params ​
commit? ​

boolean

Commit transaction?

rollback? ​

boolean

Rollback transaction?

transactionId ​

string

Transaction ID.

Returns ​

Promise<Transaction>

Throws ​

Call Signature ​

updateTransaction(transactionId, commit?, rollback?): Promise<Transaction>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:157

Update a transaction, to either commit or roll back its operations.

Parameters ​
transactionId ​

string

Transaction ID.

commit? ​

boolean

Commit transaction?

rollback? ​

boolean

Rollback transaction?

Returns ​

Promise<Transaction>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateUrlAttribute() ​

Call Signature ​

updateUrlAttribute(params): Promise<AttributeUrl>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1624

Update an url attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeUrl>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.updateUrlColumn instead.

Call Signature ​

updateUrlAttribute(databaseId, collectionId, key, required, xdefault?, newKey?): Promise<AttributeUrl>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1646

Update an url attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeUrl>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


updateVarcharAttribute() ​

Call Signature ​

updateVarcharAttribute(params): Promise<AttributeVarchar>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1703

Update a varchar attribute. Changing the default value will not update already existing documents.

Parameters ​
params ​
collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

databaseId ​

string

Database ID.

key ​

string

Attribute Key.

newKey? ​

string

New Attribute Key.

required ​

boolean

Is attribute required?

size? ​

number

Maximum size of the varchar attribute.

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

Returns ​

Promise<AttributeVarchar>

Throws ​

Call Signature ​

updateVarcharAttribute(databaseId, collectionId, key, required, xdefault?, size?, newKey?): Promise<AttributeVarchar>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1727

Update a varchar attribute. Changing the default value will not update already existing documents.

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID. You can create a new collection using the Database service server integration.

key ​

string

Attribute Key.

required ​

boolean

Is attribute required?

xdefault? ​

string

Default value for attribute when not provided. Cannot be set when attribute is required.

size? ​

number

Maximum size of the varchar attribute.

newKey? ​

string

New Attribute Key.

Returns ​

Promise<AttributeVarchar>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


upsertDocument() ​

Call Signature ​

upsertDocument<Document>(params): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2016

Create or update a Document. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID.

data? ​

Document extends DefaultDocument ? Partial<Document> & Record<string, any> : Partial<Document> & Partial<Omit<Document, keyof Document>>

Document data as JSON object. Include all required attributes of the document to be created or updated.

databaseId ​

string

Database ID.

documentId ​

string

Document ID.

permissions? ​

string[]

An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.upsertRow instead.

Call Signature ​

upsertDocument<Document>(databaseId, collectionId, documentId, data?, permissions?, transactionId?): Promise<Document>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:2037

Create or update a Document. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

documentId ​

string

Document ID.

data? ​

Document extends DefaultDocument ? Partial<Document> & Record<string, any> : Partial<Document> & Partial<Omit<Document, keyof Document>>

Document data as JSON object. Include all required attributes of the document to be created or updated.

permissions? ​

string[]

An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<Document>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.


upsertDocuments() ​

Call Signature ​

upsertDocuments<Document>(params): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1891

Create or update Documents. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
params ​
collectionId ​

string

Collection ID.

databaseId ​

string

Database ID.

documents ​

object[]

Array of document data as JSON objects. May contain partial documents.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

This API has been deprecated since 1.8.0. Please use TablesDB.upsertRows instead.

Call Signature ​

upsertDocuments<Document>(databaseId, collectionId, documents, transactionId?): Promise<DocumentList<Document>>

Defined in: node_modules/.pnpm/node-appwrite@23.1.0/node_modules/node-appwrite/dist/services/databases.d.mts:1909

Create or update Documents. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.

Type Parameters ​
Document ​

Document extends Document = DefaultDocument

Parameters ​
databaseId ​

string

Database ID.

collectionId ​

string

Collection ID.

documents ​

object[]

Array of document data as JSON objects. May contain partial documents.

transactionId? ​

string

Transaction ID for staging the operation.

Returns ​

Promise<DocumentList<Document>>

Throws ​
Deprecated ​

Use the object parameter style method for a better developer experience.