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

List Current Reseller ACL Lists — listacls

This function lists the saved reseller ACL lists on the server. (ACL lists can be found in the WHM interface on the Edit Privileges/Nameservers screen).

Calling Functions

Using the XML API

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

  • Append the /xml-api/listacls 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/listacls

  • 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 listacls function from within your custom script:

  • Append the /json-api/listacls 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/listacls

  • 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

None

Output

note Note: Most output variables represent features in WHM.

  • listacls — Root-level XML tag for the output of the listacls function.
    • acls — Container for an individual ACL.
      • name (string) — Name of the ACL.
      • add-pkg (boolean) — Allow the creation of packages.
        • 1 — yes.
        • 0 — no.
      • add-pkg-ip (boolean) — Allow the creation of packages with dedicated IPs.
        • 1 — yes.
        • 0 — no.
      • add-pkg-shell (boolean) — Allow the creation of packages with shell access.
        • 1 — yes.
        • 0 — no.
      • all (boolean) — All features.
        ALERT! Warning: If this feature is set to 1, the user has root access.
        • 1 — yes.
        • 0 — no.
      • allow-addoncreate (boolean) — Allow the creation of packages with unlimited addon domains.
        • 1 — yes.
        • 0 — no.
      • allow-parkedcreate (boolean) — Allow the creation of packages with parked domains.
        • 1 — yes.
        • 0 — no.
      • allow-unlimited-bw-pkgs (boolean) — Allow the creation of packages with unlimited bandwidth usage.
        • 1 — yes.
        • 0 — no.
      • allow-unlimited-disk-pkgs (boolean) — Allow the creation of packages with unlimited disk space.
        • 1 — yes.
        • 0 — no.
      • allow-unlimited-pkgs (boolean) — Allow the creation of packages with unlimited bandwidth.
        • 1 — yes.
        • 0 — no.
      • clustering (boolean) — Enable clustering.
        • 1 — yes.
        • 0 — no.
      • create-acct (boolean) — Allow the reseller to create a new account.
        • 1 — yes.
        • 0 — no.
      • create-dns (boolean) — Allow the reseller to add DNS zones.
        • 1 — yes.
        • 0 — no.
      • demo-setup (boolean) — Allow the reseller to turn an account into a demo account.
        • 1 — yes.
        • 0 — no.
      • disallow-shell (boolean) — Never allow creation of accounts with shell access.
        • 1 — yes.
        • 0 — no.
      • edit-account (boolean) — Allow the reseller to modify an account.
        • 1 — yes.
        • 0 — no.
      • edit-dns (boolean) — Allow editing of DNS zones.
        • 1 — yes.
        • 0 — no.
      • edit-mx (boolean) — Allow editing of MX entries,
        • 1 — yes.
        • 0 — no.
      • edit-pkg (boolean) — Allow editing of packages.
        • 1 — yes.
        • 0 — no.
      • frontpage (boolean) — Allow the reseller to install and uninstall FrontPage extensions.
        • 1 — yes.
        • 0 — no.
      • kill-acct (boolean) — Allow termination of accounts.
        • 1 — yes.
        • 0 — no.
      • kill-dns (boolean) Allow the reseller to remove DNS entries.
        • 1 — yes.
        • 0 — no.
      • limit-bandwidth (boolean) — Allow the reseller to modify bandiwdth limits.
        ALERT! Warning: This feature allows the reseller to circumvent package bandwidth limits, if you are not using resource limits.
        • 1 — yes.
        • 0 — no.
      • list-accts (boolean) — Allow the reseller to list his or her accounts.
        • 1 — yes.
        • 0 — no.
      • mailcheck (boolean) — Allow the reseller to access the WHM Mail Troubleshooter.
        • 1 — yes.
        • 0 — no.
      • news (boolean) — Allow the reseller to modify cPanel/WHM news.
        • 1 — yes.
        • 0 — no.
      • park-dns (boolean) — Allow the reseller to park domains.
        • 1 — yes.
        • 0 — no.
      • passwd (boolean) — Allow the reseller to modify passwords.
        • 1 — yes.
        • 0 — no.
      • quota (boolean) — Allow the reseller to modify disk quotas.
        ALERT! Warning: This feature allows resellers to circumvent package limits for disk space, if you are not using resource limits.
        • 1 — yes.
        • 0 — no.
      • rearrange-accts (boolean) — Allow the reseller to rearrange accounts.
        • 1 — yes.
        • 0 — no.
      • res-cart (boolean) — Allow the reseller to reset the shopping cart.
        • 1 — yes.
        • 0 — no.
      • resftp (boolean) — Allow the reseller to synchronize FTP passwords.
        • 1 — yes.
        • 0 — no.
      • restart (boolean) — Allow the reseller to restart services.
        • 1 — yes.
        • 0 — no.
      • show-bandwidth (boolean) — Allow the reseller to view accounts' bandwidth usage.
        • 1 — yes.
        • 0 — no.
      • ssl (boolean) — Allow the reseller to access the SSL Manager.
        • 1 — yes.
        • 0 — no.
      • ssl-buy (boolean) — Allow the reseller to purchase and install SSL certificates.
        • 1 — yes.
        • 0 — no.
      • ssl-gencrt (boolean) — Allow the reseller to access the SSL CSR/CRT generator.
        • 1 — yes.
        • 0 — no.
      • stats (boolean) — Allow the reseller to view account statistics.
        • 1 — yes.
        • 0 — no.
      • status (boolean) — Allow the reseller to view the Service Status feature in WHM.
        • 1 — yes.
        • 0 — no.
      • suspend-acct (boolean) — Allow the reseller to suspend accounts.
        • 1 — yes.
        • 0 — no.
      • thirdparty (boolean) — Allow the reseller to access and manage third-party services (or "Plugins").
        • 1 — yes.
        • 0 — no.
      • upgrade-account (boolean) — Allow the reseller to upgrade and downgrade accounts.
        • 1 — yes.
        • 0 — no.
      • viewglobalpackages (boolean) — Allow the reseller to view any package on the server.
        • 1 — yes.
        • 0 — no.

Examples

XML API

Calling https://example.com:2087/xml-api/listacls in WebHost Manager will produce output similar to:

<listacls>
   <acls>
        <name>acl1</name>
         <add-pkg>0</add-pkg>
         <add-pkg-ip>0</add-pkg-ip>
         <add-pkg-shell>0</add-pkg-shell>
         <all>0</all>
         <allow-addoncreate>0</allow-addoncreate>
         <allow-parkedcreate>0</allow-parkedcreate>
         <allow-unlimited-bw-pkgs>0</allow-unlimited-bw-pkgs>
         <allow-unlimited-disk-pkgs>0</allow-unlimited-disk-pkgs>
         <allow-unlimited-pkgs>0</allow-unlimited-pkgs>
         <clustering>0</clustering>
         <create-acct>0</create-acct>
         <create-dns>0</create-dns>
         <demo>0</demo>
         <demo-setup>0</demo-setup>
         <disallow-shell>0</disallow-shell>
         <edit-account>0</edit-account>
         <edit-dns>0</edit-dns>
         <edit-mx>0</edit-mx>
         <edit-pkg>0</edit-pkg>
         <frontpage>0</frontpage>
         <kill-acct>0</kill-acct>
         <kill-dns>0</kill-dns>
         <limit-bandwidth>0</limit-bandwidth>
         <list-accts>0</list-accts>
         <mailcheck>0</mailcheck>
         <news>0</news>
         <park-dns>0</park-dns>
         <passwd>0</passwd>
         <quota>0</quota>
         <rearrange-accts>0</rearrange-accts>
         <res-cart>0</res-cart>
         <resftp>0</resftp>
         <restart>0</restart>
         <show-bandwidth>0</show-bandwidth>
         <ssl>1</ssl>
         <ssl-buy>0</ssl-buy>
         <ssl-gencrt>0</ssl-gencrt>
         <stats>0</stats>
         <status>0</status>
         <suspend-acct>0</suspend-acct>
         <thirdparty>0</thirdparty>
         <upgrade-account>0</upgrade-account>
         <viewglobalpackages>0</viewglobalpackages>
    </acls>
    <acls>
         <name>acl2</name>
         <add-pkg>1</add-pkg>
         <add-pkg-ip>0</add-pkg-ip>
         <add-pkg-shell>0</add-pkg-shell>
         <all>0</all>
         <allow-addoncreate>0</allow-addoncreate>
         <allow-parkedcreate>0</allow-parkedcreate>
         <allow-unlimited-bw-pkgs>0</allow-unlimited-bw-pkgs>
         <allow-unlimited-disk-pkgs>0</allow-unlimited-disk-pkgs>
         <allow-unlimited-pkgs>0</allow-unlimited-pkgs>
         <clustering>1</clustering>
         <create-acct>1</create-acct>
         <create-dns>1</create-dns>
         <demo>0</demo>
         <demo-setup>1</demo-setup>
         <disallow-shell>1</disallow-shell>
         <edit-account>1</edit-account>
         <edit-dns>1</edit-dns>
         <edit-mx>1</edit-mx>
         <edit-pkg>1</edit-pkg>
         <frontpage>1</frontpage>
         <kill-acct>1</kill-acct>
         <kill-dns>1</kill-dns>
         <limit-bandwidth>1</limit-bandwidth>
         <list-accts>1</list-accts>
         <mailcheck>1</mailcheck>
         <news>1</news>
         <park-dns>1</park-dns>
         <passwd>1</passwd>
         <quota>1</quota>
         <rearrange-accts>1</rearrange-accts>
         <res-cart>1</res-cart>
         <resftp>1</resftp>
         <restart>1</restart>
         <show-bandwidth>1</show-bandwidth>
         <ssl>1</ssl>
         <ssl-buy>1</ssl-buy>
         <ssl-gencrt>1</ssl-gencrt>
         <stats>1</stats>
         <status>1</status>
         <suspend-acct>1</suspend-acct>
         <thirdparty>1</thirdparty>
         <upgrade-account>1</upgrade-account>
         <viewglobalpackages>1</viewglobalpackages>
     </acls>
</listacls>

JSON API

Calling the URL https://example.com:2087/json-api/listacls in WebHost Manager will produce output similar to:

{
   "acls":{
      "acl1":{
         "kill-dns":"1",
         "edit-dns":"1",
         "edit-mx":"1",
         "status":"0",
         "add-pkg":"1",
         "suspend-acct":"1",
         "add-pkg-shell":"0",
         "viewglobalpackages":"1",
         "resftp":"1",
         "list-accts":"1",
         "quota":"0",
         "passwd":"1",
         "all":"0",
         "park-dns":"1",
         "rearrange-accts":"0",
         "news":"1",
         "allow-addoncreate":"0",
         "demo":"0",
         "edit-account":"0",
         "allow-unlimited-disk-pkgs":"0",
         "allow-parkedcreate":"0",
         "frontpage":"1",
         "restart":"1",
         "ssl-gencrt":"1",
         "add-pkg-ip":"0",
         "allow-unlimited-pkgs":"0",
         "ssl-buy":"1",
         "disallow-shell":"1",
         "res-cart":"1",
         "kill-acct":"1",
         "create-dns":"1",
         "allow-unlimited-bw-pkgs":"0",
         "clustering":"1",
         "mailcheck":"1",
         "ssl":"1",
         "edit-pkg":"1",
         "upgrade-account":"1",
         "show-bandwidth":"1",
         "thirdparty":"1",
         "limit-bandwidth":"0",
         "create-acct":"1",
         "demo-setup":"0",
         "stats":"0"
      },
      "acl2":{
         "kill-dns":"0",
         "edit-dns":"0",
         "edit-mx":"0",
         "status":"0",
         "add-pkg":"0",
         "suspend-acct":"0",
         "add-pkg-shell":"0",
         "viewglobalpackages":"0",
         "resftp":"0",
         "list-accts":"0",
         "quota":"0",
         "passwd":"0",
         "all":"0",
         "park-dns":"0",
         "rearrange-accts":"0",
         "news":"0",
         "allow-addoncreate":"0",
         "demo":"0",
         "edit-account":"0",
         "allow-unlimited-disk-pkgs":"0",
         "allow-parkedcreate":"0",
         "frontpage":"0",
         "restart":"0",
         "ssl-gencrt":"0",
         "add-pkg-ip":"0",
         "allow-unlimited-pkgs":"0",
         "ssl-buy":"0",
         "disallow-shell":"0",
         "res-cart":"0",
         "kill-acct":"0",
         "create-dns":"0",
         "allow-unlimited-bw-pkgs":"0",
         "clustering":"0",
         "mailcheck":"0",
         "ssl":"1",
         "edit-pkg":"0",
         "upgrade-account":"0",
         "show-bandwidth":"0",
         "thirdparty":"0",
         "limit-bandwidth":"0",
         "create-acct":"0",
         "demo-setup":"0",
         "stats":"0"
      }
   }
}

Topic revision: r6 - 29 Sep 2009 - 18:01:43 - MelanieSeibert