Services
(services)
Overview
Services
Available Operations
- list - List
- create - Create
- get - Get
- delete - Delete
- listEnvs - List Envs
- createEnv - Create Env
- updateEnv - Update Env
- updateEnvsBulk - Update Envs (Bulk)
- deleteEnv - Delete Env
- start - Start
- stop - Stop
- restart - Restart
list
List all services.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.list();
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesList } from "coolify/funcs/servicesList.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 servicesList(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.Service[]>
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 a one-click service
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.create({
type: "gitea",
projectUuid: "<id>",
environmentName: "<value>",
serverUuid: "<id>",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesCreate } from "coolify/funcs/servicesCreate.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 servicesCreate(coolify, {
type: "gitea",
projectUuid: "<id>",
environmentName: "<value>",
serverUuid: "<id>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CreateServiceRequestBody | ✔️ | 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.CreateServiceResponseBody>
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 service 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.services.get({
uuid: "5639b38b-4535-4e45-a890-384cf735116d",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesGet } from "coolify/funcs/servicesGet.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 servicesGet(coolify, {
uuid: "5639b38b-4535-4e45-a890-384cf735116d",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetServiceByUuidRequest | ✔️ | 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.Service>
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 service 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.services.delete({
uuid: "14cb9244-2326-4bec-9c7e-4b61cdd548f5",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesDelete } from "coolify/funcs/servicesDelete.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 servicesDelete(coolify, {
uuid: "14cb9244-2326-4bec-9c7e-4b61cdd548f5",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteServiceByUuidRequest | ✔️ | 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.DeleteServiceByUuidResponseBody>
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 | */* |
listEnvs
List all envs by service UUID.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.listEnvs({
uuid: "ef4a6137-8bba-4132-909e-72f1b2d26d47",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesListEnvs } from "coolify/funcs/servicesListEnvs.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 servicesListEnvs(coolify, {
uuid: "ef4a6137-8bba-4132-909e-72f1b2d26d47",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListEnvsByServiceUuidRequest | ✔️ | 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.EnvironmentVariable[]>
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 | */* |
createEnv
Create env by service UUID.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.createEnv({
uuid: "b793dd27-7b05-40e6-b80c-e49c6dd37147",
requestBody: {},
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesCreateEnv } from "coolify/funcs/servicesCreateEnv.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 servicesCreateEnv(coolify, {
uuid: "b793dd27-7b05-40e6-b80c-e49c6dd37147",
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.CreateEnvByServiceUuidRequest | ✔️ | 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.CreateEnvByServiceUuidResponseBody>
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 | */* |
updateEnv
Update env by service UUID.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.updateEnv({
uuid: "37d5d3ba-c274-48f2-818c-6ab32dbc0de2",
requestBody: {
key: "<key>",
value: "<value>",
},
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesUpdateEnv } from "coolify/funcs/servicesUpdateEnv.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 servicesUpdateEnv(coolify, {
uuid: "37d5d3ba-c274-48f2-818c-6ab32dbc0de2",
requestBody: {
key: "<key>",
value: "<value>",
},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateEnvByServiceUuidRequest | ✔️ | 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.UpdateEnvByServiceUuidResponseBody>
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 | */* |
updateEnvsBulk
Update multiple envs by service UUID.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.updateEnvsBulk({
uuid: "b88c7e0b-d8f9-4138-bf33-e97852e42e37",
requestBody: {
data: [
{},
],
},
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesUpdateEnvsBulk } from "coolify/funcs/servicesUpdateEnvsBulk.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 servicesUpdateEnvsBulk(coolify, {
uuid: "b88c7e0b-d8f9-4138-bf33-e97852e42e37",
requestBody: {
data: [
{},
],
},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateEnvsByServiceUuidRequest | ✔️ | 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.UpdateEnvsByServiceUuidResponseBody>
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 | */* |
deleteEnv
Delete env 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.services.deleteEnv({
uuid: "6b5e4a6b-40ac-4774-b639-b27d9c59c9a2",
envUuid: "b300b74f-72ea-4848-85d3-4b61a952165c",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesDeleteEnv } from "coolify/funcs/servicesDeleteEnv.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 servicesDeleteEnv(coolify, {
uuid: "6b5e4a6b-40ac-4774-b639-b27d9c59c9a2",
envUuid: "b300b74f-72ea-4848-85d3-4b61a952165c",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteEnvByServiceUuidRequest | ✔️ | 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.DeleteEnvByServiceUuidResponseBody>
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 | */* |
start
Start service. Post request is also accepted.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.start({
uuid: "230d98c7-fc68-4357-9260-dd6c6394ea60",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesStart } from "coolify/funcs/servicesStart.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 servicesStart(coolify, {
uuid: "230d98c7-fc68-4357-9260-dd6c6394ea60",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StartServiceByUuidRequest | ✔️ | 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.StartServiceByUuidResponseBody>
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 | */* |
stop
Stop service. Post request is also accepted.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.stop({
uuid: "578100c6-9564-4ccb-94f7-ce1dfb7b5d65",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesStop } from "coolify/funcs/servicesStop.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 servicesStop(coolify, {
uuid: "578100c6-9564-4ccb-94f7-ce1dfb7b5d65",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StopServiceByUuidRequest | ✔️ | 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.StopServiceByUuidResponseBody>
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 | */* |
restart
Restart service. Post request is also accepted.
Example Usage
import { Coolify } from "coolify";
const coolify = new Coolify({
bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await coolify.services.restart({
uuid: "c5048915-c301-46b1-9a79-4a3ae47609b2",
});
// Handle the result
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { CoolifyCore } from "coolify/core.js";
import { servicesRestart } from "coolify/funcs/servicesRestart.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 servicesRestart(coolify, {
uuid: "c5048915-c301-46b1-9a79-4a3ae47609b2",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.RestartServiceByUuidRequest | ✔️ | 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.RestartServiceByUuidResponseBody>
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 | */* |