Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Attribute → Create Boolean

AI-generated

Overview

This node interacts with the Appwrite API to create a Boolean attribute within a specified database collection. It is useful for defining schema attributes that store Boolean values, such as flags or toggles, in Appwrite databases. For example, it can be used to add a 'isActive' Boolean attribute to user profiles or product entries.

Use Case Examples

  1. Create a Boolean attribute 'isActive' in a user database collection to track active status.
  2. Add a Boolean attribute 'isVerified' to a collection to indicate verification status.

Properties

Name Meaning
Database ID The ID of the database where the attribute will be created.
Collection ID The ID of the collection within the database where the attribute will be created.
Attribute Key The key or name of the Boolean attribute to create.
Required Whether the Boolean attribute is mandatory (required) in the collection.
Default Value The default Boolean value for the attribute if none is provided.
Array Whether the attribute is an array of Boolean values instead of a single Boolean.

Output

JSON

  • attributeId - The unique identifier of the created Boolean attribute.
  • key - The key or name of the created attribute.
  • type - The data type of the attribute, which is Boolean.
  • required - Indicates if the attribute is required.
  • defaultValue - The default value assigned to the attribute.
  • array - Indicates if the attribute is an array of Booleans.

Dependencies

  • Appwrite API key credential for authentication

Troubleshooting

  • Ensure the provided Database ID and Collection ID are correct and exist in Appwrite.
  • Verify that the API key credential has sufficient permissions to create attributes in the specified database and collection.
  • If the attribute key already exists, the node may throw an error; use a unique key name.
  • Check network connectivity to the Appwrite endpoint to avoid connection errors.

Links

Discussion