Back

[SOLVED] REST API curl example for Function Create Execution

  • 0
  • Functions
  • Web
MyWay
14 Apr, 2023, 17:57

Hi, I'm trying to execute a function using CURL, which is working fine, but I can't figure out how to pass req.payload data.

I have tried with -d '{"payload": {"Key":"Value"}}' but then my function can't find Key. I have already tested my function manually using the webui and it's working, so it should be something with the format I need when passing data using curl.

TL;DR
The user was trying to execute a function using CURL but was having trouble passing req.payload data. Another user suggested using the "-d" flag and providing the data in the format '{"payload": {"Key":"Value"}}'. The user confirmed that it worked and shared a link for more information.
Drake
14 Apr, 2023, 18:13

Please see https://appwrite.io/docs/client/functions?sdk=rest-default#functionsCreateExecution

create execution has a data parameter that expects a string

MyWay
14 Apr, 2023, 18:31

Thank you, that worked!

Drake
14 Apr, 2023, 18:31

[SOLVED] REST API curl example

Drake
14 Apr, 2023, 18:32

[SOLVED] REST API curl example for Function Create Execution

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