Files
Coolify-TypeScript-SDK/docs/sdks/deployments
2024-11-19 21:24:42 -06:00
..
2024-11-19 21:24:42 -06:00

Deployments

(deployments)

Overview

Deployments

Available Operations

list

List currently running deployments

Example Usage

import { Coolify } from "coolify";

const coolify = new Coolify({
  bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "",
});

async function run() {
  const result = await coolify.deployments.list();

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { CoolifyCore } from "coolify/core.js";
import { deploymentsList } from "coolify/funcs/deploymentsList.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 deploymentsList(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.ApplicationDeploymentQueue[]>

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 deployment 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.deployments.get({
    uuid: "2ad7d3d7-960f-4230-bfe2-5ed5941b0a65",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { CoolifyCore } from "coolify/core.js";
import { deploymentsGet } from "coolify/funcs/deploymentsGet.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 deploymentsGet(coolify, {
    uuid: "2ad7d3d7-960f-4230-bfe2-5ed5941b0a65",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetDeploymentByUuidRequest ✔️ 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.ApplicationDeploymentQueue>

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 */*

deployByTagOrUuid

Deploy by tag or uuid. Post request 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.deployments.deployByTagOrUuid({});

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { CoolifyCore } from "coolify/core.js";
import { deploymentsDeployByTagOrUuid } from "coolify/funcs/deploymentsDeployByTagOrUuid.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 deploymentsDeployByTagOrUuid(coolify, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.DeployByTagOrUuidRequest ✔️ 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.DeployByTagOrUuidResponseBody>

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 */*