Heyo,
I'm getting Invalid document structure: Unknown attribute: "data" in my function, using this as my code:
TypeScript
const response = await databases.createDocument(
'hp_db',
'userdata',
document.$id,
{
data: {
status: "I'm new here!",
profileUrl: document.$id,
username: document.name,
},
permissions: [
`read(\"user:${document.$id}\")`,
`update(\"user:${document.$id}\")`,
`delete(\"user:${document.$id}\")`,
],
}
);
Am I missing something? Creating it using an API Key
TL;DR
Issue with document creation function due to an attribute error 'data'. Check if the database supports the 'data' attribute. Also, ensure correct API Key usage for document creation.Recommended threads
- restore paused project not working
https://cloud.appwrite.io/console/project-sfo-69b1b841002ca6a07f14/overview/platforms
- 1.6.2 to 1.7.0
Hi everyone. I am running a self-hosted Appwrite server on version 1.6.2. What is the safest way to migrate to the next version? Should I update directly to...
- Exception: Route not found when calling ...
I have self-hosted v1.8.1 and I am using an Appwrite function with node-appwrite v22. When I call the createVarcharColumn() in my server function I get this exc...