Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Attribute → Create DateTime
AI-generatedOverview
This node interacts with the Appwrite API to create a DateTime attribute within a specified database and collection. It is useful for automating the management of database schemas by programmatically adding DateTime attributes, which can be required or optional, have default values, and be defined as arrays if needed. Practical applications include setting up timestamp fields for records, scheduling data entries, or tracking event times in an Appwrite database.
Use Case Examples
- Creating a DateTime attribute named 'createdAt' in a user database to track record creation times.
- Adding a required DateTime attribute to an event collection to store event start times.
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 added. |
| Attribute Key | The key or name of the DateTime attribute to create. |
| Required | Specifies whether the DateTime attribute is mandatory for records. |
| Default Value | The default DateTime value assigned to the attribute if none is provided. |
| Array | Indicates if the attribute should hold an array of DateTime values instead of a single value. |
Output
JSON
attributeId- The unique identifier of the created DateTime attribute.key- The key or name of the created attribute.type- The data type of the attribute, which is DateTime.required- Indicates if the attribute is required.defaultValue- The default value set for the attribute.array- Indicates if the attribute is an array.
Dependencies
- Appwrite API
- API key credential for authentication
Troubleshooting
- Ensure the provided Database ID and Collection ID are correct and exist in the Appwrite project.
- Verify that the API key credential has sufficient permissions to create attributes in the specified database and collection.
- Check that the attribute key is unique within the collection to avoid conflicts.
- If the node throws authentication errors, confirm that the API key and project ID are correctly configured.
Links
- Appwrite Documentation - Create DateTime Attribute - Official documentation for creating DateTime attributes in Appwrite databases.