Schema deployments endpoints
10 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.
GET /deployments/project/{projectId}
| Parameter | In | Type | Required |
|---|---|---|---|
projectId | path | string | Yes |
env | query | string | No |
limit | query | string | No |
offset | query | string | No |
Response 200 (application/json)
{
deployments: {
id: any;
projectId: any;
envId: any;
version: any;
status: any;
triggeredBy: any;
summary: any;
createdAt: any;
appliedAt: any;
}[];
total: number;
limit: number;
offset: number;
}GET /deployments/project/{projectId}/stats
| Parameter | In | Type | Required |
|---|---|---|---|
projectId | path | string | Yes |
Response 200 (application/json)
{
total: number;
applied: number;
failed: number;
inProgress: number;
successRate: null | number;
avgBuildMs: null | number;
latestAt: null | string;
byEnv: {
[key: string]: {
total: number;
applied: number;
failed: number;
};
};
}GET /deployments/{deploymentId}
| Parameter | In | Type | Required |
|---|---|---|---|
deploymentId | path | string | Yes |
Response 200 (application/json)
{
deployment: {
id: any;
projectId: any;
envId: any;
version: any;
status: any;
triggeredBy: any;
summary: any;
createdAt: any;
appliedAt: any;
};
steps: {
id: any;
deploymentId: any;
stepName: any;
status: any;
durationMs: null | number;
errorMessage: null | string;
createdAt: any;
}[];
}GET /deployments/{deploymentId}/steps
| Parameter | In | Type | Required |
|---|---|---|---|
deploymentId | path | string | Yes |
Response 200 (application/json)
{
steps: {
id: any;
deploymentId: any;
stepName: any;
status: any;
durationMs: null | number;
errorMessage: null | string;
createdAt: any;
}[];
}POST /deployments/{deploymentId}/rollback
| Parameter | In | Type | Required |
|---|---|---|---|
deploymentId | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
status: string;
}POST /deployments/promote
Request body (application/json, required)
{
projectId: string (uuid);
fromEnv: string;
toEnv: string;
confirmSkip?: string;
allowProduction?: boolean;
}Response 200 (application/json)
{
ok: boolean;
deploymentId: any;
status: string;
}POST /deployments/trigger
Request body (application/json)
{
projectId: string;
env: string;
schemaDefinition: {
schemaVersion: "1.0";
tables: {
name: string;
columns: {
name: any;
type: any;
primaryKey?: any;
unique?: any;
nullable?: any;
default?: any;
references?: any;
}[];
indexes?: any[];
unique?: any[];
publicRead?: boolean;
ownerColumn?: string;
}[];
};
migrationName?: string;
}Response 200 (application/json)
{
ok: boolean;
deploymentId: any;
status: string;
}GET /deployments/tokens/project/{projectId}
List deployment tokens for a project
| Parameter | In | Type | Required |
|---|---|---|---|
projectId | path | string (uuid) | Yes |
envId | query | string | No |
Response 200 (application/json)
{
tokens: {
id: string;
envId: string;
scope: "schema" | "services";
serviceNames: string[] | null;
createdAt: string | string (date-time);
revokedAt: string | string (date-time);
expiresAt: string | string (date-time);
}[];
}Errors: 401, 403, with the error body.
POST /deployments/tokens
Create a deployment token
Request body (application/json, required)
{
projectId: string (uuid);
envId: string (uuid);
scope?: "schema" | "services";
serviceNames?: string[];
expiresInDays?: 30 | 90 | 365;
}Response 200 (application/json)
{
ok: true;
token: string;
id: string;
expiresAt: string | null;
}Errors: 400, 401, 403, with the error body.
POST /deployments/tokens/{tokenId}/revoke
Revoke a deployment token
| Parameter | In | Type | Required |
|---|---|---|---|
tokenId | path | string (uuid) | Yes |
Response 200 (application/json)
{
ok: true;
}Errors: 401, 403, 404, with the error body.