Child pages
  • WHM API 1 Functions - backup_user_list
Skip to end of metadata
Go to start of metadata

 

Description

This function lists users with a backup file on a specified date.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/backup_user_list?api.version=1&restore_point=2014-10-10
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/backup_user_list?api.version=1&restore_point=2014-10-10
 Command Line
whmapi1 backup_user_list restore_point=2014-10-10


Notes:

  • 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/api/whmapi1

 Output (JSON)
{
    "data": {
        "user": [{
            "status": "active",
            "username": "example"
        }, {
            "status": "active",
            "username": "example2"
        }, {
            "status": "active",
            "username": "example3"
        }]
    },
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "backup_user_list"
    }
}
 Output (XML)
<result>
   <data>
      <user>
         <status>active</status>
         <username>example</username>
      </user>
      <user>
         <status>active</status>
         <username>example2</username>
      </user>
      <user>
         <status>active</status>
         <username>example3</username>
      </user>
   </data>
      <metadata>
         <version>1</version>
         <reason>OK</reason>
         <result>1</result>
         <command>backup_user_list</command>
      </metadata>
</result>


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
restore_pointstring

Required

The date.

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

  • YYYY represents the year
  • MM represents the month
  • DD represents the day.
2014-10-10

Returns

ReturnTypeDescriptionPossible valuesExample
user hash A hash of the user information.This hash includes the status and username returns.
 

status

string

The account's backup status.

The function returns this value in the user hash.

  • active
  • inactive
  • no_backup
active

username

string

The user's username.

The function returns this value in the user hash.

A valid username.username