跳到主要内容

getBackupsCounts

BackupsCountResultWrapper getBackupsCounts(from, to, paid)

GET /api/2.0/backup/getbackupscountbypaid

Get free and paid backup counts

Counts the backups of the current portal created within a period and splits the result into the ones covered by the free monthly allowance and the ones charged to the portal wallet, which saves calling GET api/2.0/backup/getbackupscount twice. The paid query parameter is accepted but not read here: the answer always carries both figures. The period behaves as it does for GET api/2.0/backup/getbackupscount - it defaults to the current calendar month, both bounds are UTC and inclusive, and a from later than to is rejected. The counts are over history records rather than over stored archives, so they include backups that have already been deleted.

Parameters​

NameInTypeDescriptionNotes
fromqueryDate (date-time)The start of the period, in UTC and inclusive. It defaults to the first day of the current calendar month at 00:00 UTC, and it has to be no later than to.[optional] [example: 2026-03-01T00:00:00Z]
toqueryDate (date-time)The end of the period, in UTC and inclusive. It defaults to the moment of the call.[optional] [example: 2026-03-31T23:59:59Z]
paidqueryBooleanCounts the backups charged to the portal wallet when true, and the ones covered by the free monthly allowance when false, which is the default. It is read only by GET api/2.0/backup/getbackupscount and is ignored by GET api/2.0/backup/getbackupscountbypaid, which always reports both.[optional] [example: false]

Responses​

Status codeDescriptionTypeResponse headers
200The number of free and of paid backups created within the periodBackupsCountResultWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The start of the period is later than its end, or from, to or paid cannot be parsed--
403No permissions to perform this action--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

BackupsCountResultWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json