Back

[SOLVED] please what am i doing wrong?

  • 0
  • Functions
  • Cloud
Zionnite
2 Jan, 2024, 23:35

but one quick question, whenever i set the permission and comes back again, the permission i selected auto removed and i have to set it again, this has been going on and on,

whats is happening?

TL;DR
User is asking for help with understanding and implementing Appwrite functions. They have questions about calling functions directly vs using the SDK, how to execute a cloud function, and how to set permissions in the appwrite.json file. Solution: The user found a solution by calling the generated domain name of the function via Postman. They also learned about creating executions using the Appwrite SDK. For setting permissions in the appwrite.json file, it was mentioned that running `appwrite deploy` resets the permissions to the values in the file each time.
ideclon
2 Jan, 2024, 23:37

Every time you run appwrite deploy, the permissions are reset to the values in your appwrite.json file

Zionnite
2 Jan, 2024, 23:39

wow, very interesing...

so how do i set it now via the appwrite.json?

Drake
2 Jan, 2024, 23:43

have you tried looking at the file? and docs?

Zionnite
2 Jan, 2024, 23:46

i'm on that now...

Zionnite
3 Jan, 2024, 22:30

Hello pals, I have a quick question, first, I want to thank you for your support thus far. I came to understand yesterday that there is a function API, I never knew before that can be used to execute my functions, so my question is this,

do I need a function already created and deployed to the appwrite cloud (called Function A), then after which I can create another function (Function B) with the function API to trigger the first appwrite (function A).

please is this correct??

Zionnite
3 Jan, 2024, 23:26

@Steven @ideclon

ideclon
3 Jan, 2024, 23:28

To execute any Appwrite Function, you create an Execution. You can create an Execution by either by clicking the Create Execution button in the Console, or by calling the functions.createExecution() method with the Appwrite SDK from your own code. See https://appwrite.io/docs/products/functions/execution

Zionnite
3 Jan, 2024, 23:32

okay, lets say i created a function to get list of newly register users, can i write the code to execute this function inside this function that list out all newly registered users

Zionnite
3 Jan, 2024, 23:33

besides, i created a function to execute a cloud function in my server side code with nodejs and yet nothing was outputted, no erros, no logs. nothing

ideclon
3 Jan, 2024, 23:43

When you say "newly registered", how are you classifying that?

ideclon
3 Jan, 2024, 23:46

What's your code (to execute the Function)?

Zionnite
4 Jan, 2024, 00:13

[SOLVED] please what am i doing wrong?

Zionnite
4 Jan, 2024, 00:21

my issue was that I don't really understand how the appwrite cloud functions, but I have a little bit of understanding now, what I did me to get the results was to use the generated domain name and call it via Postman

thank you very much @ideclon @Steven

ideclon
4 Jan, 2024, 00:22

So you're calling the Function directly, instead of using the Appwrite SDK?

Zionnite
4 Jan, 2024, 00:25

I'm using the appwrite sdk

ideclon
4 Jan, 2024, 00:27

But not to call the Function. And looking at your Function, could you not just do that client side?

Zionnite
4 Jan, 2024, 00:29

sorry, i do not understand you, can you please rephrase ?

ideclon
4 Jan, 2024, 00:30

What are you building?

Zionnite
4 Jan, 2024, 00:31

oooh okay, this has not just what i want to do, here are some of the things i'm aiming to use the appwrite function for

  1. i want to pair user together upon certain conditions
  2. i want to recieved a webhook from a 3rd party cdn upon video encoded and make it upate the user posted that video
Zionnite
4 Jan, 2024, 00:32

so, what i just did was to do a testing to see how appwrite works, now i'm getting to statrt implementing what i want to build with appwrite functions

ideclon
4 Jan, 2024, 00:33

But I assume you're building some kind of frontend application?

Zionnite
4 Jan, 2024, 00:49

not really

Zionnite
4 Jan, 2024, 00:49

i'm building an app with flutter

ideclon
4 Jan, 2024, 00:55

And are you using the SDK in Flutter?

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