mirror of
https://github.com/LukeHagar/Dokploy-ts-sdk.git
synced 2025-12-06 04:19:37 +00:00
1631 lines
127 KiB
Markdown
1631 lines
127 KiB
Markdown
# Application
|
|
(*application*)
|
|
|
|
## Overview
|
|
|
|
### Available Operations
|
|
|
|
* [create](#create)
|
|
* [getOne](#getone)
|
|
* [reload](#reload)
|
|
* [delete](#delete)
|
|
* [stop](#stop)
|
|
* [start](#start)
|
|
* [redeploy](#redeploy)
|
|
* [saveEnvironment](#saveenvironment)
|
|
* [saveBuildType](#savebuildtype)
|
|
* [saveGithubProvider](#savegithubprovider)
|
|
* [saveGitlabProvider](#savegitlabprovider)
|
|
* [saveBitbucketProvider](#savebitbucketprovider)
|
|
* [saveDockerProvider](#savedockerprovider)
|
|
* [saveGitProdiver](#savegitprodiver)
|
|
* [markRunning](#markrunning)
|
|
* [update](#update)
|
|
* [refreshToken](#refreshtoken)
|
|
* [deploy](#deploy)
|
|
* [cleanQueues](#cleanqueues)
|
|
* [readTraefikConfig](#readtraefikconfig)
|
|
* [updateTraefikConfig](#updatetraefikconfig)
|
|
* [readAppMonitoring](#readappmonitoring)
|
|
|
|
## create
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-create" method="post" path="/application.create" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.create({
|
|
name: "<value>",
|
|
projectId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationCreate } from "dokploy/funcs/applicationCreate.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationCreate(dokploy, {
|
|
name: "<value>",
|
|
projectId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationCreate failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationCreateRequest](../../models/operations/applicationcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## getOne
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-one" method="get" path="/application.one" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.getOne({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationGetOne } from "dokploy/funcs/applicationGetOne.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationGetOne(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationGetOne failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationOneRequest](../../models/operations/applicationonerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## reload
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-reload" method="post" path="/application.reload" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.reload({
|
|
appName: "<value>",
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationReload } from "dokploy/funcs/applicationReload.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationReload(dokploy, {
|
|
appName: "<value>",
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationReload failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationReloadRequest](../../models/operations/applicationreloadrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## delete
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-delete" method="post" path="/application.delete" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.delete({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationDelete } from "dokploy/funcs/applicationDelete.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationDelete(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationDelete failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationDeleteRequest](../../models/operations/applicationdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## stop
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-stop" method="post" path="/application.stop" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.stop({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationStop } from "dokploy/funcs/applicationStop.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationStop(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationStop failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationStopRequest](../../models/operations/applicationstoprequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## start
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-start" method="post" path="/application.start" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.start({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationStart } from "dokploy/funcs/applicationStart.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationStart(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationStart failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationStartRequest](../../models/operations/applicationstartrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## redeploy
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-redeploy" method="post" path="/application.redeploy" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.redeploy({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationRedeploy } from "dokploy/funcs/applicationRedeploy.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationRedeploy(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationRedeploy failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationRedeployRequest](../../models/operations/applicationredeployrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## saveEnvironment
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-saveEnvironment" method="post" path="/application.saveEnvironment" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.saveEnvironment({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationSaveEnvironment } from "dokploy/funcs/applicationSaveEnvironment.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationSaveEnvironment(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationSaveEnvironment failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationSaveEnvironmentRequest](../../models/operations/applicationsaveenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## saveBuildType
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-saveBuildType" method="post" path="/application.saveBuildType" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.saveBuildType({
|
|
applicationId: "<id>",
|
|
buildType: "dockerfile",
|
|
dockerContextPath: "<value>",
|
|
dockerBuildStage: null,
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationSaveBuildType } from "dokploy/funcs/applicationSaveBuildType.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationSaveBuildType(dokploy, {
|
|
applicationId: "<id>",
|
|
buildType: "dockerfile",
|
|
dockerContextPath: "<value>",
|
|
dockerBuildStage: null,
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationSaveBuildType failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationSaveBuildTypeRequest](../../models/operations/applicationsavebuildtyperequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## saveGithubProvider
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-saveGithubProvider" method="post" path="/application.saveGithubProvider" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.saveGithubProvider({
|
|
applicationId: "<id>",
|
|
owner: null,
|
|
githubId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationSaveGithubProvider } from "dokploy/funcs/applicationSaveGithubProvider.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationSaveGithubProvider(dokploy, {
|
|
applicationId: "<id>",
|
|
owner: null,
|
|
githubId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationSaveGithubProvider failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationSaveGithubProviderRequest](../../models/operations/applicationsavegithubproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## saveGitlabProvider
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-saveGitlabProvider" method="post" path="/application.saveGitlabProvider" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.saveGitlabProvider({
|
|
applicationId: "<id>",
|
|
gitlabBranch: "<value>",
|
|
gitlabBuildPath: "<value>",
|
|
gitlabOwner: "<value>",
|
|
gitlabRepository: "<value>",
|
|
gitlabId: "<id>",
|
|
gitlabProjectId: 950.43,
|
|
gitlabPathNamespace: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationSaveGitlabProvider } from "dokploy/funcs/applicationSaveGitlabProvider.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationSaveGitlabProvider(dokploy, {
|
|
applicationId: "<id>",
|
|
gitlabBranch: "<value>",
|
|
gitlabBuildPath: "<value>",
|
|
gitlabOwner: "<value>",
|
|
gitlabRepository: "<value>",
|
|
gitlabId: "<id>",
|
|
gitlabProjectId: 950.43,
|
|
gitlabPathNamespace: "<value>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationSaveGitlabProvider failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationSaveGitlabProviderRequest](../../models/operations/applicationsavegitlabproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## saveBitbucketProvider
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-saveBitbucketProvider" method="post" path="/application.saveBitbucketProvider" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.saveBitbucketProvider({
|
|
bitbucketBranch: "<value>",
|
|
bitbucketBuildPath: "<value>",
|
|
bitbucketOwner: "<value>",
|
|
bitbucketRepository: "<value>",
|
|
bitbucketId: "<id>",
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationSaveBitbucketProvider } from "dokploy/funcs/applicationSaveBitbucketProvider.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationSaveBitbucketProvider(dokploy, {
|
|
bitbucketBranch: "<value>",
|
|
bitbucketBuildPath: "<value>",
|
|
bitbucketOwner: "<value>",
|
|
bitbucketRepository: "<value>",
|
|
bitbucketId: "<id>",
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationSaveBitbucketProvider failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationSaveBitbucketProviderRequest](../../models/operations/applicationsavebitbucketproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## saveDockerProvider
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-saveDockerProvider" method="post" path="/application.saveDockerProvider" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.saveDockerProvider({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationSaveDockerProvider } from "dokploy/funcs/applicationSaveDockerProvider.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationSaveDockerProvider(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationSaveDockerProvider failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationSaveDockerProviderRequest](../../models/operations/applicationsavedockerproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## saveGitProdiver
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-saveGitProdiver" method="post" path="/application.saveGitProdiver" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.saveGitProdiver({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationSaveGitProdiver } from "dokploy/funcs/applicationSaveGitProdiver.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationSaveGitProdiver(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationSaveGitProdiver failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationSaveGitProdiverRequest](../../models/operations/applicationsavegitprodiverrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## markRunning
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-markRunning" method="post" path="/application.markRunning" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.markRunning({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationMarkRunning } from "dokploy/funcs/applicationMarkRunning.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationMarkRunning(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationMarkRunning failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationMarkRunningRequest](../../models/operations/applicationmarkrunningrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## update
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-update" method="post" path="/application.update" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.update({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationUpdate } from "dokploy/funcs/applicationUpdate.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationUpdate(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationUpdate failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationUpdateRequest](../../models/operations/applicationupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## refreshToken
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-refreshToken" method="post" path="/application.refreshToken" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.refreshToken({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationRefreshToken } from "dokploy/funcs/applicationRefreshToken.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationRefreshToken(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationRefreshToken failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationRefreshTokenRequest](../../models/operations/applicationrefreshtokenrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## deploy
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-deploy" method="post" path="/application.deploy" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.deploy({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationDeploy } from "dokploy/funcs/applicationDeploy.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationDeploy(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationDeploy failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationDeployRequest](../../models/operations/applicationdeployrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## cleanQueues
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-cleanQueues" method="post" path="/application.cleanQueues" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.cleanQueues({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationCleanQueues } from "dokploy/funcs/applicationCleanQueues.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationCleanQueues(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationCleanQueues failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationCleanQueuesRequest](../../models/operations/applicationcleanqueuesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## readTraefikConfig
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-readTraefikConfig" method="get" path="/application.readTraefikConfig" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.readTraefikConfig({
|
|
applicationId: "<id>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationReadTraefikConfig } from "dokploy/funcs/applicationReadTraefikConfig.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationReadTraefikConfig(dokploy, {
|
|
applicationId: "<id>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationReadTraefikConfig failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationReadTraefikConfigRequest](../../models/operations/applicationreadtraefikconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## updateTraefikConfig
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-updateTraefikConfig" method="post" path="/application.updateTraefikConfig" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.updateTraefikConfig({
|
|
applicationId: "<id>",
|
|
traefikConfig: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationUpdateTraefikConfig } from "dokploy/funcs/applicationUpdateTraefikConfig.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationUpdateTraefikConfig(dokploy, {
|
|
applicationId: "<id>",
|
|
traefikConfig: "<value>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationUpdateTraefikConfig failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationUpdateTraefikConfigRequest](../../models/operations/applicationupdatetraefikconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* |
|
|
|
|
## readAppMonitoring
|
|
|
|
### Example Usage
|
|
|
|
<!-- UsageSnippet language="typescript" operationID="application-readAppMonitoring" method="get" path="/application.readAppMonitoring" -->
|
|
```typescript
|
|
import { Dokploy } from "dokploy";
|
|
|
|
const dokploy = new Dokploy({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await dokploy.application.readAppMonitoring({
|
|
appName: "<value>",
|
|
});
|
|
|
|
console.log(result);
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Standalone function
|
|
|
|
The standalone function version of this method:
|
|
|
|
```typescript
|
|
import { DokployCore } from "dokploy/core.js";
|
|
import { applicationReadAppMonitoring } from "dokploy/funcs/applicationReadAppMonitoring.js";
|
|
|
|
// Use `DokployCore` for best tree-shaking performance.
|
|
// You can create one instance of it to use across an application.
|
|
const dokploy = new DokployCore({
|
|
authorization: process.env["DOKPLOY_AUTHORIZATION"] ?? "",
|
|
});
|
|
|
|
async function run() {
|
|
const res = await applicationReadAppMonitoring(dokploy, {
|
|
appName: "<value>",
|
|
});
|
|
if (res.ok) {
|
|
const { value: result } = res;
|
|
console.log(result);
|
|
} else {
|
|
console.log("applicationReadAppMonitoring failed:", res.error);
|
|
}
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `request` | [operations.ApplicationReadAppMonitoringRequest](../../models/operations/applicationreadappmonitoringrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.ErrorT](../../models/errort.md)\>**
|
|
|
|
### Errors
|
|
|
|
| Error Type | Status Code | Content Type |
|
|
| -------------------------- | -------------------------- | -------------------------- |
|
|
| errors.DokployDefaultError | 4XX, 5XX | \*/\* | |