Back

Function : Sample for execute

  • 0
  • Functions
Mickaël LT
8 Mar, 2023, 14:26

Hi, Sorry for the spam... but can't found in the documentation any sample for the property execute in appwrite.json.

{ "projectId": "113431412", "projectName": "MyProject", "functions": [ { "$id": "12345", "name": "function_first", "runtime": "node-16.0", "path": "functions/function_first", "entrypoint": "src/index.js", "ignore": [ "node_modules", ".npm" ], "execute": [ "users" ], "events": [], "schedule": "", "timeout": 15, "variables" : { "APPWRITE_FUNCTION_ENDPOINT":"https://....", "APPWRITE_FUNCTION_API_KEY":"...." } }, }

What sort of string can I put in the property execute ? The documentation say to go to https://appwrite.io/docs/permissions but I've try many thing ("any", "users", "role.any", etc) but nothing works...

TL;DR
The user is having trouble understanding how the "execute" property works in the appwrite.json file for a function. They have tried different values such as "users" and "any", but it doesn't work. They are looking for a sample or clarification on what string to use for the property. No solution is provided in this support thread.
rafagazani
8 Mar, 2023, 14:46

"team:admin"

Mickaël LT
8 Mar, 2023, 14:49

This don't work. I've try this, and then when postman if I listFunction, in the property execute there is nothing.

rafagazani
8 Mar, 2023, 14:49

"execute": [ "users", "any" ],

Mickaël LT
8 Mar, 2023, 14:49

But If I create manually (on the appwrite frontend) the function, and putting a role, I obtain a well formatted execute property

Mickaël LT
8 Mar, 2023, 14:51

Ok, if i put two roles it works 👌

Drake
8 Mar, 2023, 18:14

it should also work with 1 value as well 🧐

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