Child pages
  • WHM API 1 Functions - restore_queue_state

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function lists the tasks in the restoration queue.

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/restore_queue_state?api.version=1
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/restore_queue_state?api.version=1
Expand
titleCommand Line
Code Block
languagebash
whmapi1 restore_queue_state

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{  
   "data":{  
      "pending":[  
         {  
            "restore_point":"2016-05-24",
            "options":{  
               "subdomains":1,
               "mysql":1,
               "give_ip":0,
               "mail_config":1
            },
            "user":"user1"
         },
         {  
            "options":{  
               "mail_config":1,
               "mysql":1,
               "give_ip":0,
               "subdomains":1
            },
            "user":"user2",
            "restore_point":"2016-05-24"
         },
         {  
            "restore_point":"2016-05-24",
            "options":{  
               "give_ip":0,
               "mysql":1,
               "subdomains":1,
               "mail_config":1
            },
            "user":"user3"
         }
      ],
      "completed":[  
      ],
      "active":[  
      ],
      "is_active":false
   },
   "metadata":{  
      "result":1,
      "command":"restore_queue_state",
      "version":1,
      "reason":"OK"
   }
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<result>
    <data>
        <is_active>false</is_active>
        <active></active>
        <pending>
            <restore_point>2016-05-24</restore_point>
            <options>
                <subdomains>1</subdomains>
                <mysql>1</mysql>
                <give_ip>0</give_ip>
                <mail_config>1</mail_config>
            </options>
            <user>user1</user>
        </pending>
        <pending>
            <restore_point>2016-05-24</restore_point>
            <options>
                <subdomains>1</subdomains>
                <mysql>1</mysql>
                <give_ip>0</give_ip>
                <mail_config>1</mail_config>
            </options>
            <user>user2</user>
        </pending>
        <pending>
            <restore_point>2016-05-24</restore_point>
            <options>
                <subdomains>0</subdomains>
                <mysql>1</mysql>
                <give_ip>1</give_ip>
                <mail_config>1</mail_config>
            </options>
            <user>user3</user>
        </pending>
        <complete></complete>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>restore_queue_states</command>
    </metadata>
</result>

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
is_activestringWhether the restoration queue is actively processing a task.
  • true
  • false
false
completedarray of hashesAn array of hashes of restoration queue items that the system has already processed.

Each hash contains the user and restore_point returns and the options hash.

Note
titleNote:

For more information about these returns, see the Queued item information table below. 

 
activearray of hashesAn array of hashes of restoration queue items that the system is actively processing.

Each hash contains the user and restore_point returns and the options hash.

Note
titleNote:

For more information about these returns, see the Queued item information table below.


 
pendingarray of hashesAn array of of hashes of restoration queue items that the system will process next.

Each hash contains the user and restore_point returns and the options hash.

Note
titleNote:

For more information about these returns, see the Queued item information table below.


 

Anchor
Queued
Queued
Queued item information

Note
titleNote:

These returns may appear in the completed, active, or pending arrays of hashes. 

ReturnTypeDescriptionPossible valuesExample
userstringThe cPanel account's username.

A valid cPanel username.

user1
optionshashA hash of restoration options.This hash includes the mysql, subdomains, mail_config, and give_ip returns. 

subdomains

Boolean

Whether the restoration process will restore the account's subdomains.

The function returns this value in the options hash.

  • 1 — Will restore.
  • 0 — Will not restore.
1

mysql

Boolean

Whether the restoration process will restore the account's MySQL® databases.

The function returns this value in the options hash.

  • 1 — Will restore.
  • 0 — Will not restore.
1

give_ip

Boolean

Whether the restoration process will assign a dedicated IP address to the account.

The function returns this value in the options hash.

  • 1 — Will assign.
  • 0 — Will not assign.
0

mail_config

Boolean

Whether the restoration process will restore the account's email configuration.

The function returns this value in the options hash.

  • 1 — Will restore.
  • 0 — Will not restore.
1