Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Sites → Update Variable

AI-generated

Overview

This node interacts with the Appwrite API to update a variable within a specified site. It is useful for managing site-specific variables dynamically, such as configuration settings or environment variables, by updating their key-value pairs. For example, it can be used to update API keys, feature flags, or other site-specific data without manual intervention.

Use Case Examples

  1. Updating a site's environment variable to change an API endpoint URL.
  2. Modifying a feature flag variable to enable or disable a feature on a site.

Properties

Name Meaning
Site ID The unique identifier of the site where the variable exists.
Variable ID The unique identifier of the variable to be updated.
Key The key name of the variable to update.
Value The new value to assign to the variable.

Output

JSON

  • variableId - The ID of the updated variable.
  • key - The key name of the updated variable.
  • value - The new value of the updated variable.

Dependencies

  • Requires Appwrite API credentials including endpoint, project ID, and API key for authentication.

Troubleshooting

  • Ensure the Site ID and Variable ID are correct and exist in the Appwrite project to avoid 'variable not found' errors.
  • Verify that the API key has sufficient permissions to update variables on the specified site.
  • Check network connectivity and Appwrite endpoint availability if requests fail.
  • Common error messages include authentication failures due to invalid API keys, or permission errors if the API key lacks update rights.

Discussion