Back

is it mandatory to provide all document required fields in document update api ?

  • 0
  • Functions
  • Cloud
mydigitalpro9
23 Oct, 2024, 20:18

I’m trying to update an existing document using the function API but only want to modify one or two fields. However, I’m receiving a 400 error, indicating that all required fields must be included in the request, even though I’m not changing them. Is it necessary to pass all the required fields in the document, along with the fields I’m trying to update while calling updateDocument api?

I have followed the given api documentation https://appwrite.io/docs/references/cloud/client-web/databases#updateDocument

TL;DR
When using the updateDocument API function, all required fields must be included in the request, even if they are not being modified. This is necessary for a successful update, as per the API documentation provided.
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