webCOMAND

Archives Web Service

Provides access to webCOMAND backup archives, including the ability to list, downloading and get metadata about backup files.

list Method (default)

Lists all webCOMAND backup archives in the system.

Parameters

  • type - Optional type of archive to filter by (either 'cms' or 'db'), otherwise all will be listed.

info Method

Returns metadata for a single webCOMAND backup archive, by filename.

Parameters

  • filename - Filename of the file to retrieve meta information from.
  • type - Optional type of archive (either 'cms' or 'db'), in the event of duplicates.

download Method

Returns the full webCOMAND archive file data.

Parameters

  • filename - Filename of the file to download.
  • type - Optional type of archive (either 'cms' or 'db'), in the event of duplicates.
  • limit - Optional bandwidth limiter, expressed in kilobits per second.  By default bandwidth will be unlimited.

Request Example

Example archives web service request using io_comand_web\client.

// HTTP POST request to list backup archives.
$token = '1234';
$url = 'https://demo.webcomand.com/ws/archives/list';
$response = \io_comand_web\client::post($url, [
    'headers' => [
        "Content-Type: application/json",
        "Authorization: Token $token"
    ],
    'fields' => [
        'type' => 'cms'
    ]
]);
if(!is_array($response?->data?->contents)) {
    echo("Unexpected response.\n");
    exit();
}
foreach($response->data->contents as $backup) {
    echo($backup->Filename . " (v" . $backup->webCOMANDVersion . ")\n");
}