Get your free beta license ↗
API operation · backups group
GET

/backups/accounts

First published 14 Oct 20260.2.0Unchanged since publication

List customers and their nightly backup status

Who may call it
AdministratorResellerCustomer
Token scope, any of
backupsreadall
Answers200 OK

Each entry includes the customer's name, package and account state. The backups field indicates whether nightly backups are enabled for the customer, and in_run indicates whether tonight's run includes them. For excluded customers, out_reason is off if nightly backups are disabled for the account or suspended if the account is suspended and backups.skip_suspended is on. The nights field counts finished archives under backups.dir by day for comparison with backups.keep_days. The latest field gives the newest archive's day and size.

The last_night field reports the day and outcome from the last full run for each customer. The outcome is archived with the archive size, refused with a disk-space error, failed with the error message, out with the exclusion reason, or none if the customer was absent from the run. Runs started with user through POST /backups/run are skipped. Customers with refused or failed outcomes appear first, with entries sorted by name within each group.

Omit q, status, page and per_page to return all customers. Supply any of them to request a page. The response gives total across all matching pages, page, pages and more, which is true when another page follows. The counts field totals each status after applying q and before applying status. The API returns 400 for an unrecognized status and 403 if the caller lacks administrator privileges.

As a command

Run as root on the server

Parameters

qquery ·string, up to 200 characters
Case-insensitive substring of the customer name. The API ignores values longer than 200 characters or containing ASCII control characters.
statusquery ·string, one of refused, failed, out, short
Nightly backup status to filter by. Use refused for customers refused for lack of disk space in the last full run, failed for customers whose archive failed in that run, out for customers excluded from tonight's run because their nightly backups are off or their account is suspended and backups.skip_suspended is on, or short for customers with fewer archived nights than backups.keep_days.
pagequery ·integer, 1 or more
Page number, defaulting to 1. The API uses the last page if the requested page is higher and ignores values outside the 1- to 9-digit decimal format.
per_pagequery ·integer, 1 to 1000
Number of customers per page, defaulting to 25. The API ignores values outside the 1- to 4-digit decimal format.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/backups/accounts?q=text&status=refused&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "accounts": [
    {
      "backups": true,
      "in_run": true,
      "keep_days": 1,
      "last_night": {
        "day": "2026-09-09",
        "error": "Domain 'example.com' already exists",
        "reason": "text",
        "size": 1,
        "state": "archived"
      },
      "latest": {
        "day": "2026-09-09",
        "modified_at": "text",
        "size": 1
      },
      "name": "alice",
      "nights": 1,
      "out_reason": "",
      "package": "basic",
      "status": "active"
    }
  ],
  "counts": {
    "all": 1,
    "failed": 1,
    "out": 1,
    "refused": 1,
    "short": 1
  },
  "keep_days": 1,
  "last_night": "text",
  "more": true,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "total": 1
}

Errors

5 errors, each a status and a sentence
400Invalid <what>: expected a non-negative integer
400per_page is a number from 1 to 1000
400status is one of
401Authentication required
403Insufficient privileges
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.0 on 14 Oct 2026.
urbestack.com/docs/api/get-backups-accounts/