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

Description

This function lists the server's Access Control Lists (ACLs) and each list's privileges.

Examples


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


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

 Output (JSON)
{  
   "data":{  
      "acl":[  
         {  
            "privileges":{  
	            "allow-unlimited-disk-pkgs":1,
      		    "list-pkgs":0,
         		"basic-system-info":0,
         		"limit-bandwidth":0,
         		"news":0,
         		"add-pkg-shell":0,
        	 	"allow-unlimited-pkgs":0,
         		"suspend-acct":0,
         		"manage-dns-records":0,
         		"generate-email-config":0,
         		"mysql-info":0,
         		"upgrade-account":1,
         		"allow-shell":0,
         		"basic-whm-functions":0,
         		"manage-api-tokens":0,
         		"acct-summary":0,
         		"resftp":0,
         		"digest-auth":0,
         		"ns-config":0,
         		"demo-setup":0,
         		"list-accts":0,
         		"edit-account":0,
         		"create-user-session":0,
         		"clustering":0,
         		"create-dns":0,
         		"cpanel-integration":0,
         		"ssl-buy":0,
         		"passwd":0,
         		"status":0,
         		"restart":0,
         		"ssl":0,
				"cpanel-api":0
         		"park-dns":0,
         		"locale-edit":0,
         		"all":1,
         		"mailcheck":0,
         		"edit-mx":0,
         		"edit-pkg":0,
         		"show-bandwidth":0,
         		"quota":0,
         		"edit-dns":0,
         		"create-acct":0,
         		"ssl-gencrt":0,
         		"thirdparty":0,
         		"stats":0,
         		"allow-parkedcreate":0,
         		"rearrange-accts":0,
         		"add-pkg-ip":0,
         		"kill-dns":0,
         		"cors-proxy-get":0,
         		"manage-styles":0,
         		"kill-acct":0,
         		"ssl-info":0,
         		"allow-unlimited-bw-pkgs":0,
         		"viewglobalpackages":0,
         		"add-pkg":0,
         		"manage-oidc":0,
         		"allow-emaillimits-pkgs":0,
         		"allow-addoncreate":0,
         		"track-email":0
            },
            "name":"acl1"
         },
      ]
   },
   "metadata":{  
      "version":1,
      "reason":"OK",
      "result":1,
      "command":"listacls"
   }
}
 Output (XML)
<result>
    <data>
        <acl>
            <privileges>
                <suspend-acct>0</suspend-acct>
                <list-accts>1</list-accts>
                <mailcheck>0</mailcheck>
                <resftp>0</resftp>
                <kill-dns>0</kill-dns>
                <allow-addoncreate>0</allow-addoncreate>
                <ssl-gencrt>0</ssl-gencrt>
                <create-dns>0</create-dns>
                <allow-unlimited-bw-pkgs>0</allow-unlimited-bw-pkgs>
                <edit-account>0</edit-account>
                <clustering>0</clustering>
                <limit-bandwidth>0</limit-bandwidth>
                <allow-emaillimits-pkgs>0</allow-emaillimits-pkgs>
                <kill-acct>0</kill-acct>
                <quota>0</quota>
                <add-pkg>0</add-pkg>
                <edit-pkg>0</edit-pkg>
                <status>0</status>
                <create-acct>0</create-acct>
                <edit-dns>0</edit-dns>
                <allow-unlimited-pkgs>0</allow-unlimited-pkgs>
                <all>0</all>
                <ssl-buy>0</ssl-buy>
                <show-bandwidth>0</show-bandwidth>
                <viewglobalpackages>1</viewglobalpackages>
                <restart>0</restart>
                <add-pkg-shell>0</add-pkg-shell>
                <rearrange-accts>0</rearrange-accts>
                <ssl>0</ssl>
                <allow-parkedcreate>0</allow-parkedcreate>
                <stats>0</stats>
                <allow-unlimited-disk-pkgs>0</allow-unlimited-disk-pkgs>
                <add-pkg-ip>0</add-pkg-ip>
                <locale-edit>0</locale-edit>
                <passwd>0</passwd>
                <demo-setup>0</demo-setup>
                <thirdparty>0</thirdparty>
				<cpanel-api>0</cpanel-api>
                <upgrade-account>0</upgrade-account>
                <park-dns>0</park-dns>
                <news>0</news>
                <edit-mx>0</edit-mx>
                <allow-shell>1</allow-shell>
	    		<acct-summary>0</acct-summary>
	    		<basic-whm-functions>0</basic-whm-functions>
	    		<create-user-session>0</create-user-session>
        		<digest-auth>0</digest-auth>
	   		 	<cors-proxy-get>0</cors-proxy-get>
	    		<generate-email-config>0</generate-email-config>
				<manage-oidc>0</manage-oidc>
				<cpanel-integration>0</cpanel-integration>
				<manage-styles>0</manage-styles>
				<basic-system-info>0</basic/system-info>
				<list-pkgs>0</list-pkgs>
				<track-email>0</track-email>
				<mysql-info>0</mysql-info>
				<ssl-info>0</ssl-info>
				<manage-api-tokens>0</manage-api-tokens>
				<manage-dns-records>0</manage-dns-records>
				<ns-config>0</ns-config>
            </privileges>
            <name>acl1</name>
        </acl>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>listacls</command>
    </metadata>
</result>


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

acl

array of hashes

An array of hashes of ACL settings.

This hash includes the name parameter and the privileges hash.username

name

string

The ACL's name.

The function returns this value in the acl hash.

A valid string.

 

acl1

privileges

hash

A hash of ACL privileges.

The function returns this hash in the acl hash.

This hash

includes one or more of the following returns:

  • acct-summary
  • add-pkg
  • add-pkg-ip
  • add-pkg-shell
  • all
  • allow-addoncreate
  • allow-parkedcreate
  • allow-unlimited-bw-pkgs
  • allow-unlimited-disk-pkgs
  • allow-unlimited-pkgs
  • allow-shell
  • basic-system-info
  • basic-whm-functions
  • clustering
  • cors-proxy-get
  • cpanel-api
  • cpanel-integration
  • create-acct create-dns
  • create-user-session
  • demo-setup
  • digest-auth
  • edit-account
  • edit-dns
  • edit-mx
  • edit-pkg
  • frontpage
  • generate-email-config
  • kill-act
  • kill-dns
  • list-accts
  • list-pkgs
  • locale-edit
  • limit-bandwidth mailcheck
  • manage-api-tokens
  • manage-dns-records
  • manage-oidc
  • manage-dns-records
  • manage-styles
  • mysql-info
  • news
  • ns-config
  • park-dns
  • passwd
  • quota
  • rearrange-accts
  • rearrange-accts
  • resftp
  • restart
  • show-bandwidth
  • ssl
  • ssl-buy
  • ssl-gencrt
  • ssl-info
  • stats
  • status
  • suspend-acct
  • thirdparty
  • track-email
  • upgrade-account
  • viewglobalpackages.

This hash also includes any third-party ACL privileges that exist for the user.

 

edit-pkg

Boolean

Whether to allow the reseller to edit hosting plans (packages).

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

add-pkg

Boolean

Whether to allow the reseller to add and remove hosting plans (packages).

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

mailcheck

Boolean

Whether to allow the reseller to troubleshoot mail delivery.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

acct-summary

Boolean

Whether to allow the reseller to view an account summary.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

basic-system-info

Boolean

Whether to allow the user to retrieve basic system information.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

basic-whm-functions


 Boolean

Whether to allow the reseller to access basic cPanel & WHM options.

The function r eturns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.

  • 1 — Allow.
  • 0 — Do not allow.
 1

cors-proxy-get

Boolean

Whether to allow the reseller to perform Cross-Origin Resource Sharing (CORS) HTTP requests.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

show-bandwidth

Boolean

Whether to allow the reseller to view account bandwidth usage.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

list-accts

Boolean

Whether to allow the reseller to view the list of accounts.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

clustering

Boolean

Whether to allow the reseller to use DNS clusters.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

cpanel-api

Boolean
Whether to allow the reseller to execute cPanel API 1, cPanel API 2 and UAPI functions via WHM.

The function returns this value in the privileges hash.

Note:

We added this return in cPanel & WHM version 68.

  • 1 — Allow.
  • 0 — Do not allow.
1

cpanel-integration

Boolean

Whether to allow the reseller to manage cPanel integration links.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.

  • 1 — Allow.
  • 0 — Do not allow.
1

create-user-session

Boolean

Whether to allow the reseller to create a new temporary user session for a specified service.

The function returns this value in the privileges hash .

Notes:

  • This ACL privilege allows an API token user to bypass any restrictions that you set on the API token. For more information, read our Manage API Tokens documentation.
  • We added this parameter in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

news

Boolean

Whether to allow the reseller to modify the server's news.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

thirdparty

Boolean

Whether to allow the reseller to manage third-party services.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

kill-dns

Boolean

Whether to allow the reseller to remove DNS zones.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

digest-auth

Boolean

Whether to allow the reseller to manage Digest Authentication.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

edit-dns

Boolean

Whether to allow the reseller to edit DNS zones.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

park-dns

Boolean

Whether to allow the reseller to park DNS zones.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

create-dns

Boolean

Whether to allow the reseller to add DNS zones.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

generate-email-config

Boolean

Whether to allow the reseller to generate a mobile configuration profile for an email account.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
 1

ssl

Boolean

Whether to allow the reseller to perform SSL site management.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

create-acct

Boolean

Whether to allow the reseller to create accounts.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

list-pkgs

Boolean

Whether to allow the reseller to view existing hosting plans.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
 1

suspend-acct

Boolean

Whether to allow the reseller to suspend or unsuspend accounts.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

res-cart

Boolean

Whether to allow the reseller to reset the Interchange shopping cart.

The function returns this value in the privileges hash.

Important:

  • We removed this return in cPanel & WHM version 11.46
  • Do not use this privilege in cPanel & WHM version 11.38 or later.
  • 1 — Allow.
  • 0 — Do not allow.
1

locale-edit


Boolean

Whether to allow the reseller to create and modify locales on the server.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

passwd

Boolean

Whether to allow the reseller to change passwords.

The function returns this value in the privileges hash.

Note:

This privilege allows an API token user to change account passwords and log in with a new password. For more information, read our Manage API Tokens documentation.


  • 1 — Allow.
  • 0 — Do not allow.
1

ssl-buy

Boolean

Whether to allow the reseller to purchase SSL certificates.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

frontpage

Boolean

Whether to allow the reseller to manage Microsoft® FrontPage® Extensions.

The function returns this value in the privileges hash.

Note:

cPanel & WHM will ignore all Microsoft FrontPage settings and parameters if either of the following statements are true:

  • Your server runs cPanel & WHM version 11.44 and FrontPage extensions are not installed on your server.
  • Your server runs cPanel & WHM version 11.46 or later.
  • 1 — Allow.
  • 0 — Do not allow.
1

manage-api-tokens


Boolean

Whether to allow the reseller to manage API tokens.

The function returns this value in the privileges hash .

Notes:

  • This ACL privilege allows an API token user to bypass any restrictions that you set on the API token. For more information, read our Manage API Tokens documentation.
  • We added this parameter in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

manage-dns-records


Boolean

Whether to allow the reseller to manage DNS records.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.

  • 1 — Allow.
  • 0 — Do not allow.
1

manage-oidc


Boolean

Whether to allow the reseller to manage external authentication for their accounts.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.

  • 1 — Allow.
  • 0 — Do not allow.
1

manage-styles


Boolean

Whether to allow the reseller to manage their server's cPanel styles.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

upgrade-account

Boolean

Whether to allow the reseller to upgrade or downgrade accounts.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

ssl-gencrt

Boolean

Whether to allow the reseller to generate SSL certificates.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

edit-mx

Boolean

Whether to allow the reseller to edit MX entries.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

kill-acct

Boolean

Whether to allow the reseller to terminate accounts.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

mysql-info

Boolean

Whether to allow the reseller to retrieve MySQL® database and user data.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.

  • 1 — Allow.
  • 0 — Do not allow.
1 

viewglobalpackages

Boolean

Whether to allow the reseller to use all global packages. For more information, read our reseller packages documentation.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

allow-shell

Boolean

Whether to allow the reseller to create accounts with shell access.

The function returns this value in the privileges hash.

Note:

We added this return in cPanel & WHM version 68.


  • 1 — Allow.
  • 0 — Do not allow.
1

ns-config

Boolean

Whether to allow the reseller to manage nameserver records.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.

  • 1 — Do not allow.
  • 0 — Allow.
1

add-pkg-shell

Boolean

Whether to allow the reseller to create packages with shell access.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

ssl-info

Boolean

Whether to allow the reseller to view their server's SSL information.

The function returns this value in the privileges hash .

Note:

We added this return in cPanel & WHM version 68.

  • 1 — Allow.
  • 0 — Do not allow.
1

allow-addoncreate

Boolean

Whether to allow the reseller to create packages with addon domains.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

allow-parkedcreate

Boolean

Whether to allow the reseller to create packages with parked domains (aliases).

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

allow-unlimited-disk-pkgs

Boolean

Whether to allow the reseller to create packages with unlimited disk space.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

allow-unlimited-pkgs

Boolean

Whether to allow the reseller to create packages with unlimited features.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

allow-unlimited-bw-pkgs

Boolean

Whether to allow the reseller to create packages with unlimited bandwidth.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

add-pkg-ip

Boolean

Whether to allow the reseller to create packages with a dedicated IP address.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

resftp

Boolean

Whether to allow the reseller to resync FTP passwords.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

restart

Boolean

Whether to allow the reseller to restart services.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

status

Boolean

Whether to allow the reseller to view the server's status.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

stats

Boolean

Whether to allow the reseller to view server information.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

quota

Boolean

Whether to allow the reseller to modify quotas.

The function returns this value in the privileges hash.

Warning:

If you do not use resource limits, a value of 1 allows resellers to circumvent package limits for disk space. 


  • 1 — Allow.
  • 0 — Do not allow.
1

disallow-shell

Boolean

Whether to allow the reseller to create accounts that possess shell access.

Note:

We removed this return in cPanel & WHM version 68. 

  • 1 — Do not allow.
  • 0 — Allow.
1

demo-setup

Boolean

Whether to allow the reseller to enable demo mode for accounts.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

edit-account

Boolean

Whether to allow the reseller to edit accounts.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

limit-bandwidth

Boolean

Whether to allow the reseller to modify bandwidth limits (quotas).

The function returns this value in the privileges hash.

Warning:

If you do not use resource limits, a value of 1 allows resellers to circumvent package limits for disk space. 


  • 1 — Allow.
  • 0 — Do not allow.
1

rearrange-accts

Boolean

Whether to allow the reseller to rearrange accounts.

The function returns this value in the privileges hash.

  • 1 — Allow.
  • 0 — Do not allow.
1

track-email

Boolean

Whether to allow resellers to view reports about email message delivery attempts from their account.

The function returns this value in the privileges hash.

Note:

We added this return in cPanel & WHM version 68. 

  • 1 — Allow.
  • 0 — Do not allow.
1

all

Boolean

Whether to grant the reseller all ACL privileges.

The function returns this value in the privileges hash.

Warning:

A value of 1 grants root-level privileges to the reseller.


  • 1 — Allow.
  • 0 — Do not allow.
1