Update Function
PATCH
/v1/functions/{id}PATCH
/v1/functions/{id}Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
tenantId | string | No | |
name | string | No | |
description | string | No | |
mode | "EXECUTION_MODE_UNSPECIFIED" | "EXECUTION_MODE_WEBHOOK" | "EXECUTION_MODE_PROXY" | "EXECUTION_MODE_ISOLATED" | No | |
parameters | object | No | |
webhook | object | No | |
proxy | object | No | |
isolated | object | No | |
timeoutMs | integer | No | |
memoryMb | integer | No | |
maxRetries | integer | No | |
enabled | boolean | No |
Responses
200 Update function
| Property | Type | Description |
|---|---|---|
function | object |
default An unexpected error response.
| Property | Type | Description |
|---|---|---|
code | integer | |
message | string | |
details | object[] |
Request
curl -X PATCH "http://localhost:8089/v1/functions/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tenantId":"string","name":"string","description":"string","mode":"EXECUTION_MODE_UNSPECIFIED","webhook":{"url":"string","method":"string","timeoutMs":0},"proxy":{"baseUrl":"string","path":"string","method":"string"},"isolated":{"runtime":"string","code":"string","packages":["string"],"dockerHost":"string"},"timeoutMs":0,"memoryMb":0,"maxRetries":0,"enabled":true}'const response = await fetch("http://localhost:8089/v1/functions/{id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"tenantId": "string",
"name": "string",
"description": "string",
"mode": "EXECUTION_MODE_UNSPECIFIED",
"webhook": {
"url": "string",
"method": "string",
"timeoutMs": 0
},
"proxy": {
"baseUrl": "string",
"path": "string",
"method": "string"
},
"isolated": {
"runtime": "string",
"code": "string",
"packages": [
"string"
],
"dockerHost": "string"
},
"timeoutMs": 0,
"memoryMb": 0,
"maxRetries": 0,
"enabled": true
}),
});
const data = await response.json();import requests
response = requests.patch(
"http://localhost:8089/v1/functions/{id}",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"tenantId": "string",
"name": "string",
"description": "string",
"mode": "EXECUTION_MODE_UNSPECIFIED",
"webhook": {
"url": "string",
"method": "string",
"timeoutMs": 0
},
"proxy": {
"baseUrl": "string",
"path": "string",
"method": "string"
},
"isolated": {
"runtime": "string",
"code": "string",
"packages": [
"string"
],
"dockerHost": "string"
},
"timeoutMs": 0,
"memoryMb": 0,
"maxRetries": 0,
"enabled": true
},
)
data = response.json()Response
{
"function": {
"id": "string",
"tenantId": "string",
"name": "string",
"description": "string",
"mode": "EXECUTION_MODE_UNSPECIFIED",
"webhook": {
"url": "string",
"method": "string",
"timeoutMs": 0
},
"proxy": {
"baseUrl": "string",
"path": "string",
"method": "string"
},
"isolated": {
"runtime": "string",
"code": "string",
"packages": [
"string"
],
"dockerHost": "string"
},
"timeoutMs": 0,
"memoryMb": 0,
"maxRetries": 0,
"enabled": true,
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
}{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
