27 endpoints at https://api.vaif.studio, generated from the API's OpenAPI document. The REST API page covers authentication, and All endpoints lists every group.
POST /functions/
Request body (application/json, required)
{
projectId: string (uuid);
envId?: string (uuid);
name: string;
description?: string;
entrypoint?: string;
runtime?: string;
timeoutMs?: number;
schedule?: string;
}
Response 200 (application/json)
{
avgDurationMs: number;
createdAt: string (date-time);
deployError: null | string;
deployStatus: string;
deployedAt: null | string (date-time);
description: null | string;
enabled: boolean;
entrypoint: string;
envId: null | string;
id: string;
invocationCount: number;
lastInvokedAt: null | string (date-time);
lastRunAt: null | string (date-time);
memoryMb: number;
name: string;
projectId: string;
runtime: string;
schedule: null | string;
sourceCode: null | string;
timeoutMs: number;
updatedAt: string (date-time);
}
Errors: 400, 401, 403, 404, 409, with the error body.
GET /functions/project/{projectId}
| Parameter | In | Type | Required |
|---|
projectId | path | string | Yes |
envId | query | string | No |
enabled | query | string | No |
Response 200 (application/json)
{
id: string;
projectId: string;
envId: null | string;
name: string;
description: null | string;
entrypoint: string;
runtime: string;
sourceCode: null | string;
enabled: boolean;
timeoutMs: number;
memoryMb: number;
schedule: null | string;
lastRunAt: null | string (date-time);
lastInvokedAt: null | string (date-time);
invocationCount: number;
avgDurationMs: number;
deployStatus: string;
deployedAt: null | string (date-time);
deployError: null | string;
createdAt: string (date-time);
updatedAt: string (date-time);
}[]
GET /functions/{functionId}
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Response 200 (application/json)
{
deployedBy: null | {
id: string;
name: null | string;
};
envRead: string[];
id: string;
projectId: string;
envId: null | string;
name: string;
description: null | string;
entrypoint: string;
runtime: string;
sourceCode: null | string;
enabled: boolean;
timeoutMs: number;
memoryMb: number;
schedule: null | string;
lastRunAt: null | string (date-time);
lastInvokedAt: null | string (date-time);
invocationCount: number;
avgDurationMs: number;
deployStatus: string;
deployedAt: null | string (date-time);
deployError: null | string;
createdAt: string (date-time);
updatedAt: string (date-time);
}
PATCH /functions/{functionId}
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Request body (application/json, required)
{
name?: string;
description?: string | null;
enabled?: boolean;
timeoutMs?: number;
schedule?: string | null;
entrypoint?: string;
}
Response 200 (application/json)
{
id: string;
projectId: string;
envId: null | string;
name: string;
description: null | string;
entrypoint: string;
runtime: string;
sourceCode: null | string;
enabled: boolean;
timeoutMs: number;
memoryMb: number;
schedule: null | string;
lastRunAt: null | string (date-time);
lastInvokedAt: null | string (date-time);
invocationCount: number;
avgDurationMs: number;
deployStatus: string;
deployedAt: null | string (date-time);
deployError: null | string;
createdAt: string (date-time);
updatedAt: string (date-time);
}
Errors: 400, 401, 403, 404, with the error body.
DELETE /functions/{functionId}
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
}
GET /functions/project/{projectId}/name/{functionName}
| Parameter | In | Type | Required |
|---|
projectId | path | string | Yes |
functionName | path | string | Yes |
envId | query | string | No |
Response 200 (application/json)
{
id: string;
projectId: string;
envId: null | string;
name: string;
description: null | string;
entrypoint: string;
runtime: string;
sourceCode: null | string;
enabled: boolean;
timeoutMs: number;
memoryMb: number;
schedule: null | string;
lastRunAt: null | string (date-time);
lastInvokedAt: null | string (date-time);
invocationCount: number;
avgDurationMs: number;
deployStatus: string;
deployedAt: null | string (date-time);
deployError: null | string;
createdAt: string (date-time);
updatedAt: string (date-time);
}
POST /functions/{functionIdOrName}/invoke
| Parameter | In | Type | Required |
|---|
functionIdOrName | path | string | Yes |
Request body (application/json)
{
body?: null | boolean | number | string | JsonValue[] | {
[key: string]: JsonValue;
};
headers?: {
[key: string]: string;
};
method?: string;
path?: string;
query?: {
[key: string]: string;
};
}
Response 200 (application/json)
null | boolean | number | string | JsonValue[] | {
[key: string]: JsonValue;
}
GET /functions/invocations/function/{functionId}
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
limit | query | string | No |
Response 200 (application/json)
{
id: string;
functionId: string;
projectId: string;
envId: null | string;
status: string;
durationMs: number;
statusCode: null | number;
errorMessage: null | string;
createdAt: string (date-time);
}[]
GET /functions/invocations
| Parameter | In | Type | Required |
|---|
functionId | query | string | No |
projectId | query | string | No |
envId | query | string | No |
status | query | string | No |
since | query | string | No |
until | query | string | No |
limit | query | string | No |
offset | query | string | No |
Response 200 (application/json)
{
invocations: {
id: string;
functionId: string;
projectId: string;
envId: null | string;
status: string;
durationMs: number;
statusCode: null | number;
errorMessage: null | string;
createdAt: string (date-time);
}[];
total: number;
}
GET /functions/{functionId}/invocations
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
limit | query | string | No |
offset | query | string | No |
Response 200 (application/json)
{
id: string;
functionId: string;
projectId: string;
envId: null | string;
status: string;
durationMs: number;
statusCode: null | number;
errorMessage: null | string;
createdAt: string (date-time);
}[]
PUT /functions/{functionId}/source
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Request body (application/json, required)
{
sourceCode: string;
}
Response 200 (application/json)
{
ok: true;
}
Errors: 400, 401, 403, 404, 422, 503, with the error body.
GET /functions/{functionId}/deploy-status
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Response 200 (application/json)
{
functionId: string;
functionName: string;
status: string;
deployedAt: null | string (date-time);
lastError: null | string;
lastUpdated: string (date-time);
}
GET /functions/{functionId}/logs
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
limit | query | string | No |
status | query | string | No |
since | query | string | No |
until | query | string | No |
executionId | query | string | No |
level | query | string | No |
q | query | string | No |
before | query | string | No |
Response 200 (application/json)
{
invocations: {
id: string;
timestamp: string (date-time);
level: string;
status: string;
durationMs: number;
statusCode: null | number;
message: string;
}[];
logs: {
id: string;
executionId: string;
timestamp: string (date-time);
level: string;
message: string;
source: string;
metadata: any;
sequence: number;
}[];
total: number;
hasMore: boolean;
nextCursor: null | string;
}
GET /functions/project/{projectId}/summary
| Parameter | In | Type | Required |
|---|
projectId | path | string | Yes |
envId | query | string | No |
period | query | string | No |
Response 200 (application/json)
{
envId: string;
period: "24h" | "30d" | "7d";
since: string;
totals: {
functionCount: number;
invocations: number;
successes: number;
errors: number;
timeouts: number;
skipped: number;
errorRate: null | number;
avgMs: null | number;
p95Ms: null | number;
slowest: null | {
functionId: string;
name: string;
p95Ms: null | number;
};
};
functions: {
functionId: string;
name: string;
invocations: number;
successes: number;
errors: number;
timeouts: number;
skipped: number;
errorRate: null | number;
avgMs: null | number;
p95Ms: null | number;
maxMs: null | number;
lastRun: null | {
at: string;
status: string;
statusCode: any;
message: any;
};
lastSkipReason: null | string;
triggers: {
event: string;
tableName: string;
enabled: boolean;
}[];
}[];
}
GET /functions/{functionId}/metrics
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
period | query | string | No |
Response 200 (application/json)
{
functionId: string;
functionName: string;
period: "24h" | "30d" | "7d";
summary: {
totalInvocations: number;
successCount: number;
errorCount: number;
timeoutCount: number;
successRate: number;
skippedCount: number;
};
latency: {
avgMs: number;
minMs: number;
maxMs: number;
p95Ms: number;
};
deployment: {
status: string;
deployedAt: null | string (date-time);
lastError: null | string;
};
timeSeries: {
timestamp: string;
success: number;
error: number;
timeout: number;
}[];
}
POST /functions/secrets
Request body (application/json, required)
{
projectId: string (uuid);
envId?: string | null;
key: string;
value: string;
allowProduction?: boolean;
}
Response 200 (application/json)
{
id: string;
projectId: string;
envId: null | string;
key: string;
createdAt: string (date-time);
}
Errors: 400, 401, 403, 404, 409, 500, with the error body.
GET /functions/secrets/project/{projectId}
| Parameter | In | Type | Required |
|---|
projectId | path | string | Yes |
envId | query | string | No |
Response 200 (application/json)
{
id: string;
key: string;
envId: null | string;
createdAt: string (date-time);
}[]
PUT /functions/secrets/{secretId}
| Parameter | In | Type | Required |
|---|
secretId | path | string | Yes |
Request body (application/json, required)
{
value: string;
allowProduction?: boolean;
}
Response 200 (application/json)
{
id: string;
projectId: string;
envId: null | string;
key: string;
createdAt: string (date-time);
}
Errors: 400, 401, 403, 404, 500, with the error body.
DELETE /functions/secrets/{secretId}
| Parameter | In | Type | Required |
|---|
secretId | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
}
GET /functions/{functionId}/triggers
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Response 200 (application/json)
{
id: string;
functionId: string;
projectId: string;
event: string;
tableName: string;
enabled: boolean;
filter: any;
createdAt: string (date-time);
updatedAt: string (date-time);
}[]
POST /functions/{functionId}/triggers
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Request body (application/json, required)
{
event: "db.insert" | "db.update" | "db.delete";
tableName: string;
enabled?: boolean;
filter?: { [key: string]: any };
}
Response 200 (application/json)
{
createdAt: string (date-time);
enabled: boolean;
event: string;
filter: any;
functionId: string;
id: string;
projectId: string;
tableName: string;
updatedAt: string (date-time);
}
Errors: 400, 401, 403, 404, with the error body.
PATCH /functions/triggers/{triggerId}
| Parameter | In | Type | Required |
|---|
triggerId | path | string | Yes |
Request body (application/json, required)
{
enabled: boolean;
}
Response 200 (application/json)
{
id: string;
functionId: string;
projectId: string;
event: string;
tableName: string;
enabled: boolean;
filter: any;
createdAt: string (date-time);
updatedAt: string (date-time);
}
Errors: 400, 401, 403, 404, with the error body.
DELETE /functions/triggers/{triggerId}
| Parameter | In | Type | Required |
|---|
triggerId | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
}
GET /functions/schedule/preview
| Parameter | In | Type | Required |
|---|
cron | query | string | No |
Response 200 (application/json)
{
valid: boolean;
cron: string;
nextRuns: string[];
timezone: string;
} | {
valid: boolean;
cron: string;
error: string;
nextRuns: any[];
timezone: string;
}
GET /functions/{functionId}/schedule
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Response 200 (application/json)
{
functionId: string;
cron: null | string;
enabled: boolean;
lastRunAt: null | string (date-time);
}
PUT /functions/{functionId}/schedule
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Request body (application/json, required)
{
cron: string;
enabled?: boolean;
}
Response 200 (application/json)
{
functionId: string;
cron: null | string;
enabled: boolean;
}
Errors: 400, 401, 403, 404, with the error body.
DELETE /functions/{functionId}/schedule
| Parameter | In | Type | Required |
|---|
functionId | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
}