Files
discoursejs/docs/sdks/backups

Backups

(backups)

Available Operations

createBackup

Create backup

Example Usage

import { SDK } from "@lukehagar/discoursejs";

const sdk = new SDK();

async function run() {
  const result = await sdk.backups.createBackup();

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

run();

Parameters

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

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

downloadBackup

Download backup

Example Usage

import { SDK } from "@lukehagar/discoursejs";

const sdk = new SDK();

async function run() {
  await sdk.backups.downloadBackup("<value>", "<value>");

  
}

run();

Parameters

Parameter Type Required Description
filename string ✔️ N/A
token string ✔️ N/A
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<void>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

getBackups

List backups

Example Usage

import { SDK } from "@lukehagar/discoursejs";

const sdk = new SDK();

async function run() {
  const result = await sdk.backups.getBackups();

  // 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<operations.ResponseBody[]>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

sendDownloadBackupEmail

Send download backup email

Example Usage

import { SDK } from "@lukehagar/discoursejs";

const sdk = new SDK();

async function run() {
  await sdk.backups.sendDownloadBackupEmail("<value>");

  
}

run();

Parameters

Parameter Type Required Description
filename string ✔️ N/A
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<void>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /