You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have introduced two new API endpoints that allow you to deploy and update Edge Functions programmatically. This will be handy if you're building a Supabase integration or want to create an internal workflow without relying on Supabase CLI.
This endpoint allows you to deploy a function by providing source files and metadata in a multipart/form-data body. You can also provide a function slug as the query parameter. If an existing function for the same slug exists, it will be updated; otherwise, a new function will be created.
You can pass the bundleOnly=1 query parameter to return the response metadata to the bundled function without persisting it. This is useful if you want to bulk update multiple functions atomically. Check the next section for the new bulk update endpoint.
This endpoint allows you to update multiple Edge Functions atomically.
When deploying multiple edge functions, we recommend calling the deploy endpoint with the bundleOnly=1 query parameter, collecting the responses and then calling bulk update endpoint to update them atomically.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have introduced two new API endpoints that allow you to deploy and update Edge Functions programmatically. This will be handy if you're building a Supabase integration or want to create an internal workflow without relying on Supabase CLI.
These are the same endpoints we use internally for Deploying Edge Functions from CLI without needing Docker and writing Edge Functions using AI assistant.
Deploy an Edge Function
This endpoint allows you to deploy a function by providing source files and metadata in a
multipart/form-data
body. You can also provide a functionslug
as the query parameter. If an existing function for the same slug exists, it will be updated; otherwise, a new function will be created.You can pass the
bundleOnly=1
query parameter to return the response metadata to the bundled function without persisting it. This is useful if you want to bulk update multiple functions atomically. Check the next section for the new bulk update endpoint.API reference: https://supabase.com/docs/reference/api/v1-deploy-a-function
Example:
After the function is created, you can immediately invoke it:
Bulk update Edge Functions
This endpoint allows you to update multiple Edge Functions atomically.
When deploying multiple edge functions, we recommend calling the deploy endpoint with the
bundleOnly=1
query parameter, collecting the responses and then calling bulk update endpoint to update them atomically.API reference: https://supabase.com/docs/reference/api/v1-bulk-update-functions
Beta Was this translation helpful? Give feedback.
All reactions