Back

[SOLVED] Function executions

  • 0
  • Functions
mav8rick
6 Oct, 2023, 08:40

Hi all, I was trying out calling functions over REST and I noted that calling a particular function (supplying the right input data) using https://[hostname]/v1/functions/{functionId}/executions will cause the server to return the full list of executions ever done! This is clearly not ideal as the no. of executions will only grow and the calling program gets to "see" all the previous responses (security issue).

I know this does not happen if I'm calling using e.g. the Flutter SDK but I would need a corresponding solution when I use REST.

Anyone got some tips for me?

TL;DR
The user was experiencing an issue when calling a specific function using REST. When making the call, the server returned a full list of all previous executions, which posed a security issue. The user mentioned that this did not happen when using the Flutter SDK. They requested tips for a solution when using REST. Solution: The user was advised not to use an API key when testing and to set the relevant execute access. The "Execute Access" in the Settings tab should be configured accordingly.
darShan
6 Oct, 2023, 08:52

What's the Execute Access in Settings Tab?

mav8rick
6 Oct, 2023, 10:42

"Any"

darShan
6 Oct, 2023, 10:53

You should set relevant execute access. You see all these executions and other details of using Any. This means everyone can fire up your function.

darShan
6 Oct, 2023, 10:54

Also, are you using api key when using REST?

mav8rick
6 Oct, 2023, 11:38

I was just doing some initial tests so yes, I was using an API key (so as not to bother copying and pasting the session cookie)

mav8rick
6 Oct, 2023, 17:12

OK, lesson learnt - do not use API key even if just testing.

Drake
6 Oct, 2023, 18:34

Also, you were calling List Exeuctions so this is expected

Drake
6 Oct, 2023, 18:34

[SOLVED] Function executions

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