Our documentation is getting an overhaul! We would like your input! Click here to take a look at the beta launch of our new documentation site! Only cPanel & WHM version 82 documentation exists on our beta at this time. 84 will be added to the new site soon! Leave your feedback here: https://go.cpanel.net/docsfeedback
WHM API 1 Functions - backup_set_list_combined - Developer Documentation - cPanel Documentation
Child pages
  • WHM API 1 Functions - backup_set_list_combined
Skip to end of metadata
Go to start of metadata

Description

This function lists locally-stored and backup-destination stored backup files for the server's accounts.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/backup_set_list_combined?api.version=1
 Command Line
whmapi1 backup_set_list_combined


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
   "data":{
      "destination_legend":{
         "LmTZCUpqqLSPH8AO7pVtIeNK":{
            "type":"Local",
            "name":"local_dest"
         },
         "GLT1vFsVO8cqk2UWWFpJ9kSQ":{
            "type":"Local",
            "name":"extra_directory"
         }
      },
      "backup_set":{
         
         "example":[
            {
               "when":"2019-02-13",
               "where":"local"
            },
            {
               "when":"2019-02-06",
               "where":"local"
            },
            {
               "where":"local",
               "when":"2019-02-15"
            },
            {
               "where":"local",
               "when":"2019-01-15"
            },
         ],
         "example2":[
            {
               "where":"local",
               "when":"2019-02-13"
            },
            {
               "when":"2019-02-06",
               "where":"local"
            },
            {
               "when":"2019-02-15",
               "where":"local"
            },
            {
               "when":"2019-01-15",
               "where":"local"
            },
         ]
      }
   },
   "metadata":{
      "reason":"OK",
      "result":1,
      "command":"backup_set_list_combined",
      "version":1
   }
}


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
backup_sethash of arraysA hash of arrays that contains the server's cPanel account usernames and their backup information.This hash of arrays includes the username return. 

username

array of hashes

An array of hashes that contains unnamed hashes with the when and where returns.

Note:

This return name is the cPanel account's username.

The function returns this value in the backup_set hash of arrays.

A valid cPanel account username.example1

when

timestamp

The backup file's saved date.

The function returns this value in the username array of hashes.

A date in YYYY-MM-DD format, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the day.

2018-12-15

where

string

The backup file's destination ID string.

Note:

This return name is the destination's identification string.

The function returns this value in the username array of hashes.

A valid string.
LmTZCUpqqLSPH8AO7pVtIeNK
destination_legendhashA hash of hashes that contains a backup's destination and type information.This hash of hashes includes the destination ID return.

destination ID

hash

A hash that contains the name and type returns.

Note:

This return name is the destination's identification string.

The function returns this value in the destination_legend hash of hashes.

A valid string.

LmTZCUpqqLSPH8AO7pVtIeNK

name

string

The backup destination's name.

The function returns this value in the destination ID hash.

A valid string.local_dest

type

string

The transport type.

The function returns this value in the destination ID hash.

  • AmazonS3
  • Backblaze
  • Custom
  • FTP
  • GoogleDrive
  • Local
  • Rsync
  • S3Compatible
  • SFTP
  • WebDAV
Local