Clokeep Clokeep Docs
Documentation API Reference
Restore batchesList restore batches
Restore batches View as Markdown

List restore batches

Newest first, 15 per page, each with its per-account counts.

Get /api/v1/restore-batches
curl 'https://app.clokeep.com/api/v1/restore-batches' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Accept: application/json'
<?php

$ch = curl_init('https://app.clokeep.com/api/v1/restore-batches');

curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer YOUR_API_TOKEN',
    'Accept: application/json',
  ],
]);

$response = curl_exec($ch);

echo $response;
const response = await fetch("https://app.clokeep.com/api/v1/restore-batches", {
  headers: {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
  },
});

console.log(await response.text());
import requests

response = requests.get(
    "https://app.clokeep.com/api/v1/restore-batches",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Accept": "application/json",
    },
)

print(response.text)
{
  "data": [
    {
      "id": 64,
      "server_id": 12,
      "status": "completed_with_failures",
      "status_label": "Completed with failures",
      "choices": {
        "components": [
          "settings",
          "files",
          "databases",
          "mail"
        ],
        "apply_settings": true,
        "rollback_live": false,
        "database_mode": "per_account",
        "database_modes": {
          "17": "overwrite",
          "18": "new"
        },
        "mail_overwrite": false
      },
      "as_of": null,
      "accounts": {
        "restored": 7,
        "restored_with_warnings": 1,
        "failed": 1,
        "skipped": 0,
        "cancelled": 0,
        "left": 0,
        "total": 9
      },
      "initiated_by_user_id": 8,
      "retry_of_batch_id": null,
      "stop_reason": null,
      "stop_requested_at": null,
      "started_at": "2026-11-20T10:40:00+00:00",
      "finished_at": "2026-11-20T11:52:13+00:00",
      "created_at": "2026-11-20T10:40:00+00:00",
      "updated_at": "2026-11-20T11:52:13+00:00"
    }
  ],
  "links": {
    "first": "https://app.clokeep.com/api/v1/restore-batches?page=1",
    "last": "https://app.clokeep.com/api/v1/restore-batches?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "https://app.clokeep.com/api/v1/restore-batches?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "path": "https://app.clokeep.com/api/v1/restore-batches",
    "per_page": 15,
    "to": 1,
    "total": 1
  }
}
{
  "message": "Unauthenticated."
}
{
  "message": "Your role does not permit this action."
}
{
  "message": "Too Many Attempts."
}

New to the API? Read Restore many accounts at once.

Query Parameters

  • server_idinteger

    Only batches on this server.

    Example: 12

  • statusstring

    Only batches in this status: running, stopping, completed, completed_with_failures or stopped.

    Example: completed_with_failures

  • pageinteger

    The page to return. Pages hold 15 items.

    Default: 1

    Example: 2

Response

200

  • dataobject[]
    Show properties
    • data.idinteger
    • data.server_idinteger
    • data.statusstring

      running while accounts are restored, stopping while the restore in progress finishes after a stop; then completed, completed_with_failures or stopped.

      One of: running, stopping, completed, completed_with_failures, stopped

    • data.status_labelstring

      One of: Running, Stopping, Completed, Completed with failures, Stopped

    • data.choicesobject

      The choices applied to every account. database_mode is per_account when it was left out with settings applied: then database_modes gives each account's mode (overwrite for an account missing from the server at the last sync when the batch was created, new for the others), keyed by hosting account id; it is an empty list [] otherwise.

      Show properties
      • data.choices.componentsstring[]

        One of: settings, files, databases, mail

      • data.choices.apply_settingsboolean
      • data.choices.rollback_liveboolean
      • data.choices.database_modestring

        One of: new, overwrite, per_account

      • data.choices.database_modesobject
      • data.choices.mail_overwriteboolean
    • data.as_ofstring · date-timenullable

      Each account is restored from its newest backup at or before this moment; null for its newest backup.

    • data.accountsobject

      What happened to each account, counted per account: an account restored one component at a time counts once.

      Show properties
      • data.accounts.restoredinteger
      • data.accounts.restored_with_warningsinteger
      • data.accounts.failedinteger
      • data.accounts.skippedinteger
      • data.accounts.cancelledinteger
      • data.accounts.leftinteger
      • data.accounts.totalinteger
    • data.initiated_by_user_idintegernullable

      The user who started the batch.

    • data.retry_of_batch_idintegernullable

      The ended batch whose failed accounts this one restores again; null for a first batch.

    • data.stop_reasonstringnullable

      Why the batch was stopped: Stopped by a user (a stop from the panel or the API) or Client suspended; null unless it was stopped.

    • data.stop_requested_atstring · date-timenullable

      When the stop was asked for; null unless the batch was stopped.

    • data.started_atstring · date-timenullable
    • data.finished_atstring · date-timenullable

      When the batch ended; null while it is running or stopping.

    • data.itemsobject[]
      Show properties
      • data.items.positioninteger

        The item's place in the batch, from 1. Items run in this order.

      • data.items.hosting_account_idintegernullable

        The account restored; null once the account was deleted.

      • data.items.domain_namestringnullable

        The account's domain; null once the account was deleted.

      • data.items.componentstringnullable

        The one component this item restores when the plan keeps one backup per component; null when the backup holds them all.

        One of: settings, files, databases, mail, null

      • data.items.backup_artifact_idintegernullable

        The backup restored; null once it was deleted.

      • data.items.backup_run_idintegernullable

        The restore run of this item, once it was queued; null before.

      • data.items.statusstring

        One of: pending, running, completed, failed, skipped, cancelled

      • data.items.status_labelstring

        One of: Pending, Running, Completed, Failed, Skipped, Cancelled

      • data.items.reasonstringnullable

        Why the item failed or was skipped, or what a restore that completed only in part left out; null otherwise.

    • data.created_atstring · date-timenullable
    • data.updated_atstring · date-timenullable
  • linksobject
    Show properties
    • links.firststringnullable
    • links.laststringnullable
    • links.prevstringnullable
    • links.nextstringnullable
  • metaobject
    Show properties
    • meta.current_pageinteger
    • meta.fromintegernullable
    • meta.last_pageinteger
    • meta.linksobject[]

      Generated paginator links.

      Show properties
      • meta.links.urlstringnullable
      • meta.links.labelstring
      • meta.links.pageintegernullable

        The page the link opens; null on a previous or next link with no page to open. Absent on a ... gap.

      • meta.links.activeboolean
    • meta.pathstringnullable

      Base path for paginator generated URLs.

    • meta.per_pageinteger

      Number of items shown per page.

    • meta.tointegernullable

      Number of the last item in the slice.

    • meta.totalinteger

      Total number of items being paginated.

401

The request carries no valid token: the Authorization: Bearer header is missing, or its token is unknown, revoked or past its expiry date. Send a current personal access token.

  • messagestring

    Always Unauthenticated.

403

The token may not read this. The message says why: Your role does not permit this action. (its owner is not an Admin, Operator or Viewer in the client), This account is disabled., This token is not bound to a client you belong to., or Client suspended.

  • messagestring

    What went wrong.

429

More than 120 requests a minute for this user. Wait the seconds in Retry-After, then retry.

  • messagestring

    What went wrong.

Esc
↑↓to navigate↵to openEscto close