Skip to Content

Functions

Serverless functions with HTTP or cron triggers. Functions are deployed as lightweight containers with automatic scaling.

Endpoints

MethodPathDescription
GET/api/v1/functionsList functions (?projectId=)
POST/api/v1/functionsCreate function
GET/api/v1/functions/:idGet function
PUT/api/v1/functions/:idUpdate function
DELETE/api/v1/functions/:idDelete function

Lifecycle

MethodPathDescription
POST/api/v1/functions/:id/deployDeploy function
POST/api/v1/functions/:id/startStart
POST/api/v1/functions/:id/stopStop

Versions & Executions

MethodPathDescription
GET/api/v1/functions/:id/executionsExecution history
GET/api/v1/functions/:id/versionsList versions
GET/api/v1/functions/:id/versions/:versionId/logsVersion deployment logs
POST/api/v1/functions/:id/versions/:versionId/deployDeploy specific version
GET/api/v1/functions/:id/dependenciesGet dependencies

POST /api/v1/functions

{ "project_id": "uuid", "environment_id": "uuid", "server_id": "uuid", "name": "send-email", "runtime": "node20", "code": "module.exports = async (req, res) => { res.send('ok') }", "dependencies": "{\"nodemailer\": \"^6.9.0\"}", "trigger_type": "http", "exposed_port": 8080, "cpu_limit": "0.5", "memory_limit": "256m", "timeout_seconds": 30, "env": { "SMTP_HOST": "smtp.example.com" } }

For cron-triggered functions:

{ "trigger_type": "cron", "schedule": "*/5 * * * *", "schedule_config": { "timezone": "UTC" } }

Runtimes: node20, python3, go, bun, deno

Trigger types: http, cron

Last updated on