Skip to content

Storage buckets endpoints

9 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 /buckets/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
envIdquerystringNo
Response 200 (application/json)
{
  ok: boolean;
  buckets: {
    id: string;
    projectId: string;
    envId: null | string;
    storageEnvironment: string;
    name: string;
    public: boolean;
    fileSizeLimit: null | number;
    allowedMimeTypes: any;
    corsOrigins: any;
    sizeBytes: number;
    createdAt: string (date-time);
    updatedAt: string (date-time);
  }[];
}

GET /buckets/{bucketId}

ParameterInTypeRequired
bucketIdpathstringYes
Response 200 (application/json)
{
  ok: boolean;
  bucket: {
    id: string;
    projectId: string;
    envId: null | string;
    storageEnvironment: string;
    name: string;
    public: boolean;
    fileSizeLimit: null | number;
    allowedMimeTypes: any;
    corsOrigins: any;
    sizeBytes: number;
    createdAt: string (date-time);
    updatedAt: string (date-time);
  };
}

PUT /buckets/{bucketId}

ParameterInTypeRequired
bucketIdpathstringYes
Request body (application/json, required)
{
  public?: boolean;
  fileSizeLimit?: number;
  allowedMimeTypes?: string[] | null;
  corsOrigins?: string[] | null;
  allowProduction?: boolean;
}
Response 200 (application/json)
{
  ok: true;
  bucket?: any;
}

Errors: 400, 401, 403, 404, with the error body.

DELETE /buckets/{bucketId}

ParameterInTypeRequired
bucketIdpathstringYes
Response 200 (application/json)
{
  ok: boolean;
  deleted: boolean;
  deletedObjectCount: number;
}

GET /buckets/{bucketId}/files

ParameterInTypeRequired
bucketIdpathstringYes
prefixquerystringNo
maxKeysquerystringNo
continuationTokenquerystringNo
Response 200 (application/json)
{
  ok: boolean;
  files: any[];
  folders: any[];
  nextToken?: any;
  isTruncated: boolean;
} | {
  ok: boolean;
  files: {
    size: number;
    lastModified?: string (date-time);
    etag?: string;
    key: string;
  }[];
  folders: string[];
  nextToken?: string;
  isTruncated: boolean;
}

DELETE /buckets/{bucketId}/files

ParameterInTypeRequired
bucketIdpathstringYes
keyquerystringYes
Response 200 (application/json)
{
  ok: boolean;
  deleted: boolean;
}

POST /buckets/{bucketId}/upload

ParameterInTypeRequired
bucketIdpathstringYes
keyquerystringYes
contentTypequerystringNo
Request body (application/octet-stream, required)
string (binary)
Response 200 (application/json)
{
  ok: boolean;
  key: string;
  sizeBytes: number;
}

POST /buckets/{bucketId}/upload-url

ParameterInTypeRequired
bucketIdpathstringYes
Request body (application/json)
{
  key: string;
  contentType?: string;
  sizeBytes?: number;
}
Response 200 (application/json)
{
  ok: boolean;
  url: string;
  key: string;
  expiresIn: number;
}

POST /buckets/{bucketId}/signed-url

ParameterInTypeRequired
bucketIdpathstringYes
Request body (application/json)
{
  key: string;
  expiresIn?: number;
}
Response 200 (application/json)
{
  ok: boolean;
  url: string;
  expiresIn: number;
  transforms: {
    supported: boolean;
    endpoint: string;
    params: string[];
  };
}