Add a backup destination
const url = 'https://example.com/api/v1/backup-destinations';const options = { method: 'POST', headers: { cookie: '__Host-shardkeep_session=<__Host-shardkeep_session>', 'Content-Type': 'application/json' }, body: '{"name":"example","kind":"NODE_DIRECTORY","subdirectory":"example","s3":{"endpoint":"example","bucket":"example","region":"example","prefix":"example","accessKeyId":"example","secretAccessKey":"example","caPem":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/backup-destinations \ --header 'Content-Type: application/json' \ --cookie __Host-shardkeep_session=<__Host-shardkeep_session> \ --data '{ "name": "example", "kind": "NODE_DIRECTORY", "subdirectory": "example", "s3": { "endpoint": "example", "bucket": "example", "region": "example", "prefix": "example", "accessKeyId": "example", "secretAccessKey": "example", "caPem": "example" } }'Global administrators only; audited. Shardkeep generates the destination’s age key pair: backups are encrypted to
it before they leave a Node. The private key comes back once, as recoveryKey: keep it offline, as it decrypts
every backup stored there even without Shardkeep.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Host name and optional port; HTTPS is always used.
Required when adding; omit to keep the stored one.
PEM certificates to trust in addition to the system roots, for a self-signed endpoint.
Responses
Section titled “Responses”Destination added.
object
object
For NODE_DIRECTORY, the directory below each Agent’s -backup-dir.
object
Whether extra CA certificates are trusted for the endpoint.
The age public key backups are encrypted to.
The age private key (AGE-SECRET-KEY-1…) that decrypts this destination’s backups. Shown only once.
Example
{ "destination": { "kind": "NODE_DIRECTORY" }}The request is invalid.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Not signed in, or the credentials are invalid.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Signed in, but not allowed.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Clashes with existing data or state.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Shardkeep is free software under the AGPL-3.0. Minecraft is a trademark of Mojang AB; Shardkeep is not affiliated with or endorsed by Mojang or Microsoft.