Back

Custom REST API

  • 0
  • Functions
  • Web
showmore
22 Mar, 2023, 06:52

hey guys, can please help me, how can i create custom Rest API in appwrite ? I try using cloud function but it return fixed response, should I use web SDK and create my REST API there ? thanks

TL;DR
User is asking for help in creating a custom REST API in Appwrite. They mention encountering a network error when executing their function code and inquire if it is due to their desktop docker bandwidth. They also express a desire to return custom responses instead of fixed ones. The response suggests that custom API endpoints and more HTTP possibilities will be included in future releases of Appwrite. The user further asks about the possibility of bulk creating documents and creating multiple collections based on their own business rule validation. A link to a feature request on GitHub is provided. No solution is mentioned in the thread.
safwan
22 Mar, 2023, 06:54

What exactly do you want to do with your API?

showmore
22 Mar, 2023, 06:56

creating multiple collections based on my own business rule validation, i have to wright it by my own way, its not enough the already build one

safwan
22 Mar, 2023, 07:07

if i'm not wrong, there is no way to 'bulk create' documents right now. There is a feature request on the github repo though

safwan
22 Mar, 2023, 07:08

Other than this, I don't think you can create your own API endpoint. That's up to the appwrite devs to decide

showmore
22 Mar, 2023, 07:55

hoo, In firebase cloud function, you can create your own custom API endpoint, why don't appwrite, implement that ?

showmore
22 Mar, 2023, 07:59

and one more when my function executed, from 10, 4 has failed due to network error, its become my desktop docker bandwidth or ?

Meldiron
22 Mar, 2023, 09:25

In next functions iteration we plan to integrate functions much closer to HTTP, allowing you to define custom API endpoints.

From past, Appwrite Functions started as feature requested by frontend developers to run code securely. Since Appwrite 1.0 we noticed many backend developers are using Appwrite Functions to host their backend code to simplify workflow and deployment. You can expect custom API endpoints support as well as more HTTP possibilities with Appwrite Functions in future releases.

showmore
22 Mar, 2023, 09:29

ok, Matej thanks for your response , when will the future releases, do you know the time?

Meldiron
22 Mar, 2023, 09:35

It's under active development. I don't have any ETA yet. Next Appwrite release will be 1.3, and I am not expecting to have functions iteration in it. I am pretty confident Appwrite 1.4 will include custom endpoints support.

Drake
22 Mar, 2023, 15:20

Appwrite Functions sort of let's you do that. You would write a function that would take in some input and can then create collections...

Drake
22 Mar, 2023, 15:21

what was the error message? what's the code?

showmore
25 Mar, 2023, 05:40

right, I try that but the problem are, when I call the function via HTTP protocol, it return me with fixed response, while I want to return custom response,

showmore
25 Mar, 2023, 05:41

when my function executed, from 10, 4 has failed due to network error, its because my desktop docker bandwidth or ? can any body explain me, imagine if I request million request and most of them failed. thanks

Drake
25 Mar, 2023, 15:55

It depends on what you do in your function code

Drake
25 Mar, 2023, 15:55

What's the error?

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