Servers
(servers)
Overview
Servers
Available Operations
- list - List
- create - Create
- get - Get
- delete - Delete
- update - Update
- getResources - Resources
- getDomains - Domains
- validate - Validate
list
List all servers.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.list();
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { serversList } from "coolify/funcs/serversList.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await serversList(coolify);
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.Server[]>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | */* |
create
Create Server.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.create({
name: "My Server",
description: "My Server Description",
ip: "127.0.0.1",
port: 22,
user: "root",
privateKeyUuid: "og888os",
isBuildServer: false,
instantValidate: false,
proxyType: "traefik",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { serversCreate } from "coolify/funcs/serversCreate.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await serversCreate(coolify, {
name: "My Server",
description: "My Server Description",
ip: "127.0.0.1",
port: 22,
user: "root",
privateKeyUuid: "og888os",
isBuildServer: false,
instantValidate: false,
proxyType: "traefik",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CreateServerRequestBody | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.CreateServerResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | */* |
get
Get server by UUID.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.get({
uuid: "878632ca-cced-4853-8da6-87221abec029",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { serversGet } from "coolify/funcs/serversGet.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await serversGet(coolify, {
uuid: "878632ca-cced-4853-8da6-87221abec029",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetServerByUuidRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.Server>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | */* |
delete
Delete server by UUID.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.delete({
uuid: "183d3ea1-6bc7-4679-83e6-ee71ea432238",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { serversDelete } from "coolify/funcs/serversDelete.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await serversDelete(coolify, {
uuid: "183d3ea1-6bc7-4679-83e6-ee71ea432238",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteServerByUuidRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.DeleteServerByUuidResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | */* |
update
Update Server.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.update({
uuid: "1c295953-9423-418a-96cd-0fd6e1b41a9e",
requestBody: {},
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { serversUpdate } from "coolify/funcs/serversUpdate.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await serversUpdate(coolify, {
uuid: "1c295953-9423-418a-96cd-0fd6e1b41a9e",
requestBody: {},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateServerByUuidRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.Server[]>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | */* |
getResources
Get resources by server.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.getResources({
uuid: "ce37b3ba-2b08-4d5d-9238-c6a5920c72c9",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { serversGetResources } from "coolify/funcs/serversGetResources.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await serversGetResources(coolify, {
uuid: "ce37b3ba-2b08-4d5d-9238-c6a5920c72c9",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetResourcesByServerUuidRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ResponseBody[]>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | */* |
getDomains
Get domains by server.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.getDomains({
uuid: "03ea70d2-cdac-4a42-b170-cbba7d1cffcf",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { serversGetDomains } from "coolify/funcs/serversGetDomains.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await serversGetDomains(coolify, {
uuid: "03ea70d2-cdac-4a42-b170-cbba7d1cffcf",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetDomainsByServerUuidRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetDomainsByServerUuidResponseBody[]>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | */* |
validate
Validate server by UUID.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.servers.validate({
uuid: "ef3bad97-f956-4f33-8e23-85d6e694004d",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { serversValidate } from "coolify/funcs/serversValidate.js";
// Use `CoolifyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const coolify = new CoolifyCore({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await serversValidate(coolify, {
uuid: "ef3bad97-f956-4f33-8e23-85d6e694004d",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ValidateServerByUuidRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ValidateServerByUuidResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
| errors.Unauthenticated | 401, 403, 407, 511 | application/json |
| errors.NotFound | 404, 501, 505 | application/json |
| errors.Timeout | 408, 504 | application/json |
| errors.RateLimited | 429 | application/json |
| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
| errors.APIError | 4XX, 5XX | */* |