Currently, I need to make two separate API calls: one to check if the document exists in the collection, and another to either create it if it doesn't exist or update it if it does. Is it possible to streamline this process so that a single API call can handle both scenarios: creating the document if it doesn't exist or updating it if it does?"
Summary
The user is asking if there is a way to automatically create a document if it doesn't exist, or update it if it does. The support team suggests creating a feature request on GitHub and exploring the possibility of adding this feature in a later release. They also mention the option of creating an Appwrite function to streamline the process. Currently, the user needs to make two separate API calls to check if the document exists and either create or update it. No solution is provided in the thread.
Drake
Oct 25, 2023, 20:35
You're asking for an upsert API/method. We don't have that at the moment.
You could try creating an Appwrite function that wraps the logic