Skip to content
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Add a backup target

Opens the target and writes the marker .tse-backup-target into it, or keeps the marker that is there. Each backup checks the marker first. The console has at most one local target. The credentials of an s3 target are kept encrypted and never returned.

POST/api/v1/console-backup/targets
Authorization
tse_sessionAPI key · cookierequired
Request body
requiredapplication/json
kindstringrequired

local: the backup directory of the console host (TSE_BACKUP_DIR). s3: an S3-compatible bucket

Allowed:locals3
namestringrequired
min length 1 · max length 100
secretsBackupTargetSecretsBody

Required for an s3 target

Show properties
s3S3BackupSecrets

The credentials of an s3 target. The console keeps them encrypted and never returns them

Show properties
access_key_idstringrequired
secret_access_keystringrequired
session_tokenstring
settingsBackupTargetSettingsBody
Show properties
s3S3BackupSettings

The settings of an s3 target. A local target has no settings

Show properties
bucketstringrequired
ca_bundlestring
endpointstring
path_styleboolean
prefixstring
regionstring
Responses
200

OK

created_atstring<date-time>required
idstringrequired
kindstringrequired
Allowed:locals3
namestringrequired
secrets_setbooleanrequired

The target has stored credentials. The API never returns them

settingsBackupTargetSettingsBodyrequired
Show properties
s3S3BackupSettings

The settings of an s3 target. A local target has no settings

Show properties
bucketstringrequired
ca_bundlestring
endpointstring
path_styleboolean
prefixstring
regionstring
updated_atstring<date-time>required
default

Error

codestring

Stable code of the refusal, when the route has codes

detailsstring[]

Additional detail, e.g. per-field validation failures

errorstringrequired

Human-readable error message

Request
curl -X POST 'https://console.example.com/api/v1/console-backup/targets' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "kind": "local",
  "name": "string",
  "secrets": {
    "s3": {
      "access_key_id": "string",
      "secret_access_key": "string",
      "session_token": "string"
    }
  },
  "settings": {
    "s3": {
      "bucket": "string",
      "ca_bundle": "string",
      "endpoint": "string",
      "path_style": true,
      "prefix": "string",
      "region": "string"
    }
  }
}'
Response
{
  "created_at": "2019-08-24T14:15:22Z",
  "id": "string",
  "kind": "local",
  "name": "string",
  "secrets_set": true,
  "settings": {
    "s3": {
      "bucket": "string",
      "ca_bundle": "string",
      "endpoint": "string",
      "path_style": true,
      "prefix": "string",
      "region": "string"
    }
  },
  "updated_at": "2019-08-24T14:15:22Z"
}