Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation

Unsuspend a Reseller's Account — unsuspendreseller

This function allows you to unsuspend a reseller's account.

Calling Functions

Using the XML API

To use the XML API to perform the unsuspendreseller function from within your custom script:

  • Append the /xml-api/unsuspendreseller function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/xml-api/unsuspendreseller

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Using the JSON API

To use the JSON API to perform the unsuspendreseller function from within your custom script:

  • Append the /json-api/unsuspendreseller function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/json-api/unsuspendreseller

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Variables

Input

The unsuspendreseller function takes the following required variable as input:
  • user (string) — The reseller's username.

Output

Show Hide
  • unsuspendreseller — Root-level XML tag for the output of the unsuspendreseller function.
    • output (string) — An explanation of the actions taken to unsuspend the account.
    • result — Container for the results of the function.
      • status (boolean) — The status of the request.
        • 1 — success.
        • 0 — failure.
      • statusmsg (string) — Additional information about the status of the request.

Examples

XML API

Show Hide

Calling https://example.com:2087/xml-api/unsuspendreseller?user=user123 in WebHost Manager will produce output similar to:

<unsuspendreseller>
     <output>
        Changing shell for user123.
        Shell changed.
        Unlocking password for user user123.
        passwd: Success.
        Unsuspending FTP accounts...
        Updating ftp passwords for user123
        Ftp password files updated.
        Ftp vhost passwords synced
        user123's account is now active
        Unsuspending mysql users
        Notification => admin@example.com via EMAIL [level => 3]
      </output>
      <result>
            <status>1</status>
            <statusmsg>Finished unsuspending reseller.</statusmsg>
      </result>
</unsuspendreseller>

JSON API

Show Hide

Calling https://example.com:2087/json-api/unsuspendreseller?user=user123 in WebHost Manager will produce output similar to:

{
   "result":[
      {
         "status":1,
         "statusmsg":"Finished unsuspending reseller."
      }
   ],
   "output":"Changing shell for user123.\nShell changed.\nUnlocking password for user 
user123.\npasswd: Success.\nUnsuspending FTP accounts...\nUpdating ftp passwords for 
user123\nFtp password files updated.\nFtp vhost passwords synced\nuser123's account is 
now active\nUnsuspending mysql users\nNotification => admin@example.com via EMAIL 
[level => 3]\n"
}

Topic revision: r4 - 26 Jul 2010 - 22:17:27 - Main.JustinSchaefer