--- title: postgres full: true --- import { Root, API, APIInfo, APIExample, Responses, Response, ResponseTypes, ExampleResponse, TypeScriptResponse, Property, ObjectCollapsible, Requests, Request } from "fumadocs-ui/components/api"; ## postgres-create ### Authorization "} required={true}> In: `header` ### Request Body Minimum length: `1` Minimum length: `1` Minimum length: `1` Default: `"postgres:15"` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.create" \ -d '{ "name": "string", "appName": "string", "databaseName": "string", "databaseUser": "string", "databasePassword": "string", "dockerImage": "postgres:15", "projectId": "string", "description": "string" }' ``` ```js fetch("http://localhost:3000/api/postgres.create", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-one ### Authorization "} required={true}> In: `header` ### Query Parameters | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X GET "http://localhost:3000/api/postgres.one?postgresId=string" ``` ```js fetch("http://localhost:3000/api/postgres.one?postgresId=string", { method: "GET" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-start ### Authorization "} required={true}> In: `header` ### Request Body | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.start" \ -d '{ "postgresId": "string" }' ``` ```js fetch("http://localhost:3000/api/postgres.start", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-stop ### Authorization "} required={true}> In: `header` ### Request Body | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.stop" \ -d '{ "postgresId": "string" }' ``` ```js fetch("http://localhost:3000/api/postgres.stop", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-saveExternalPort ### Authorization "} required={true}> In: `header` ### Request Body | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.saveExternalPort" \ -d '{ "postgresId": "string", "externalPort": 0 }' ``` ```js fetch("http://localhost:3000/api/postgres.saveExternalPort", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-deploy ### Authorization "} required={true}> In: `header` ### Request Body | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.deploy" \ -d '{ "postgresId": "string" }' ``` ```js fetch("http://localhost:3000/api/postgres.deploy", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-changeStatus ### Authorization "} required={true}> In: `header` ### Request Body Value in: `"idle" | "running" | "done" | "error"` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.changeStatus" \ -d '{ "postgresId": "string", "applicationStatus": "idle" }' ``` ```js fetch("http://localhost:3000/api/postgres.changeStatus", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-remove ### Authorization "} required={true}> In: `header` ### Request Body | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.remove" \ -d '{ "postgresId": "string" }' ``` ```js fetch("http://localhost:3000/api/postgres.remove", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-saveEnvironment ### Authorization "} required={true}> In: `header` ### Request Body | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.saveEnvironment" \ -d '{ "postgresId": "string", "env": "string" }' ``` ```js fetch("http://localhost:3000/api/postgres.saveEnvironment", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-reload ### Authorization "} required={true}> In: `header` ### Request Body | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.reload" \ -d '{ "postgresId": "string", "appName": "string" }' ``` ```js fetch("http://localhost:3000/api/postgres.reload", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## postgres-update ### Authorization "} required={true}> In: `header` ### Request Body Minimum length: `1` Minimum length: `1` Minimum length: `1` Minimum length: `1` Default: `"postgres:15"` Value in: `"idle" | "running" | "done" | "error"` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/postgres.update" \ -d '{ "postgresId": "string", "name": "string", "appName": "string", "databaseName": "string", "databaseUser": "string", "databasePassword": "string", "description": "string", "dockerImage": "postgres:15", "command": "string", "env": "string", "memoryReservation": 0, "externalPort": 0, "memoryLimit": 0, "cpuReservation": 0, "cpuLimit": 0, "applicationStatus": "idle", "createdAt": "string", "projectId": "string" }' ``` ```js fetch("http://localhost:3000/api/postgres.update", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ```