Back

AppwriteException: Missing required parameter: "data"

  • 0
  • Databases
ianmont
27 Mar, 2023, 22:16

Hi im getting this error while creating a new document, it says that it is missing required parameter "data", but i dont know what data stands for.

I attach photos of the error, my attributes page and how im creating the document

TL;DR
The user received an AppwriteException error stating that a required parameter "data" is missing while trying to create a new document. Another user in the thread pointed out that the createDocument() function requires four parameters: databaseId, collectionId, documentId, and data. They also provided a link to the documentation for more information. The user acknowledged that they were missing the ID for the document and should check the function signature and their calling method. There is no specific solution mentioned in the thread.
Drake
27 Mar, 2023, 22:53

take a look at the function signature for createDocument() compared to how you're calling it. 4 parameters are required:

  1. databaseId
  2. collectionId
  3. documentId
  4. data

https://appwrite.io/docs/client/databases?sdk=web-default#databasesCreateDocument

ianmont
28 Mar, 2023, 19:07

thanks i figured out that i was missing the ID for the document

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more