Plans endpoints
4 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 /plans/save
Save an AI-generated plan
Request body (application/json, required)
{
orgId: string (uuid);
name: string;
description?: string;
visibility?: "public" | "org_private" | "unlisted";
taskType: string;
plan: {
version: string;
intent: string;
steps: {
action: string;
args?: { [key: string]: any };
}[];
warnings?: string[];
};
}Response 200 (application/json)
{
ok: true;
plan: {
id: string;
ownerOrgId: string;
name: string;
description?: string | null;
visibility: string;
taskType: string;
plan?: any;
createdAt: string | string (date-time);
updatedAt?: string | string (date-time);
};
}Errors: 400, 401, 403, with the error body.
GET /plans/org/{orgId}
List saved plans for an organization
| Parameter | In | Type | Required |
|---|---|---|---|
orgId | path | string (uuid) | Yes |
Response 200 (application/json)
{
plans: {
id: string;
ownerOrgId: string;
name: string;
description?: string | null;
visibility: string;
taskType: string;
plan?: any;
createdAt: string | string (date-time);
updatedAt?: string | string (date-time);
}[];
}Errors: 401, 403, with the error body.
GET /plans/{planId}
Get a saved plan by ID
| Parameter | In | Type | Required |
|---|---|---|---|
planId | path | string (uuid) | Yes |
Response 200 (application/json)
{
plan: {
id: string;
ownerOrgId: string;
name: string;
description?: string | null;
visibility: string;
taskType: string;
plan?: any;
createdAt: string | string (date-time);
updatedAt?: string | string (date-time);
};
}Errors: 403, 404, with the error body.
POST /plans/apply
Apply a saved plan to a project
Request body (application/json, required)
{
projectId: string (uuid);
planId: string (uuid);
allowApply?: boolean;
envId?: string (uuid);
allowProduction?: boolean;
}Response 200 (application/json)
{
ok: true;
appliedSteps?: any;
}Errors: 400, 401, 403, 404, 500, with the error body.