Check backup storage
/v1/backup-destinations/{destinationId}/actions/check Tests the storage again by writing a small file and deleting it: the answer is the storage, ok, or error with what went wrong in lastError. Use it after adding Rabbitflare's key to an SFTP server (whose identity, its host key, is noted at the first successful check and expected from then on), or after changing the storage's keys or permissions. An S3-compatible endpoint or an SFTP server that isn't on the public internet (any more) isn't tried (409 conflict: connect the storage again with another address; 503 try_again when its DNS doesn't answer). 30 checks an hour per account.
Storage belongs to the whole account, as in the panel, not to a server: a token limited to some servers sees and manages all of it too, with where it points (detail) and the count of sites on every server that back up to it (siteCount).
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
sites:files - Files and logins. File Manager, WordPress logins, cron jobs, backup downloads and backup storage. Full access to the sites' code and data.
Headers
| Field | Type and description |
|---|---|
Idempotency-Key | string 1 to 255 characters A key of your own for this request, like a UUID: letters, digits and |
Path parameters
| Field | Type and description |
|---|---|
destinationId Required | string The storage's id. |
Example request
curl -X POST "https://api.rabbitflare.com/v1/backup-destinations/9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c23/actions/check" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/backup-destinations/9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c23/actions/check", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
const data = await rf.backupDestinations.check({
destinationId: "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c23",
});
console.log(data); <?php
$ch = curl_init('https://api.rabbitflare.com/v1/backup-destinations/9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c23/actions/check');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
print_r(json_decode($body, true)['data']); import os
import requests
response = requests.post(
"https://api.rabbitflare.com/v1/backup-destinations/9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c23/actions/check",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
timeout=120,
)
response.raise_for_status()
print(response.json()["data"]) Response
200 OK Returns the BackupDestination object in data.
The BackupDestination object's fields 10 fields
| Field | Type and description |
|---|---|
id | string The storage's id: what a site's backup settings name as |
kind | string What it is: Known values: |
name | string Its name. |
detail | string Where it points: a bucket and its folder ( |
status | string
Known values: |
lastError | string or null What went wrong when it was last checked or used, in one plain sentence. Null unless |
publicKey | string or null An SFTP server's Rabbitflare key, when it signs in with one: this public half goes in the user's |
hostKeyFingerprint | string or null An SFTP server's identity (its host key's fingerprint), noted at its first successful check: backups go only to a server that still has it. Null until then, and for other kinds. |
siteCount | integer How many sites back up to it now. |
createdAt | string An ISO 8601 time, in UTC When it was connected. |
Example response
{
"data": {
"id": "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c23",
"kind": "sftp",
"name": "Office NAS",
"detail": "[email protected]:site-backups",
"status": "ok",
"lastError": null,
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGk2bVx0dGhpcyBpcyBhbiBleGFtcGxlIGtleSBvbmx5 rabbitflare.com-backups",
"hostKeyFingerprint": "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8",
"siteCount": 0,
"createdAt": "2026-11-19T10:02:00.000Z"
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
403 feature_ | This product isn't open to the account. Contact support if you'd like it opened. |
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |
409 conflict | This clashes with something that exists, or is already done (for example, a domain already connected to a site). Read |
429 rate_ | Too many requests. Wait for Retry-After seconds, then go on more slowly. |
503 try_ | It couldn't be started just now; nothing was changed. Try again in a minute. |