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

Description

This function retrieves the current user's privileges.note

Examples


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


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":{  
      "privileges":[  
         {  
            "allow-unlimited-disk-pkgs":0,
            "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":0,
            "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-api":0,
            "cpanel-integration":0,
            "ssl-buy":0,
            "passwd":0,
            "status":0,
            "restart":0,
            "ssl":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
         }
      ]
   },
   "metadata":{  
      "version":1,
      "reason":"OK",
      "command":"myprivs",
      "result":1
   }
}
 Output (XML)
<result>
    <data>
        <privileges>
            <suspend-acct>0</suspend-acct>
            <list-accts>0</list-accts>
            <mailcheck>0</mailcheck>
            <resftp>0</resftp>
            <kill-dns>0</kill-dns>
            <allow-addoncreate>0</allow-addoncreate>
            <ssl-gencrt>0</ssl-gencrt>
            <allow-unlimited-bw-pkgs>0</allow-unlimited-bw-pkgs>
            <create-dns>0</create-dns>
            <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>1</all>
            <ssl-buy>0</ssl-buy>
            <show-bandwidth>0</show-bandwidth>
            <viewglobalpackages>0</viewglobalpackages>
            <restart>0</restart>
            <rearrange-accts>0</rearrange-accts>
            <add-pkg-shell>0</add-pkg-shell>
            <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>
            <passwd>0</passwd>
            <locale-edit>0</locale-edit>
            <demo-setup>0</demo-setup>
            <frontpage>0</frontpage>
            <thirdparty>0</thirdparty>
            <park-dns>0</park-dns>
            <upgrade-account>0</upgrade-account>
            <news>0</news>
            <edit-mx>0</edit-mx>
            <allow-shell>0</allow-shell>
			<acct-summary>0</acct-summary>
			<basic-whm-functions>0</basic-whm-functions>
			<create-user-session>0</create-user-session>
			<cpanel-api>0</cpanel-api>
			<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>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>myprivs</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
privileges hashA hash of the privileges available to the user.

This hash includes the 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, and viewglobalpackages returns.

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

 

acct-summary

Boolean

Allows the user 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 — Enabled.
  • 0 — Disabled.
0

add-pkg

Boolean

Allows the user to create packages.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

add-pkg-ip

Boolean

Allows the user to create packages with dedicated IP addresses.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

add-pkg-shell

Boolean

Allows the user to create packages with shell access.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

all

Boolean

Provides all access privileges to the user.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.

Warning:

If this value is set to 1, the user has root access.

 0

allow-addoncreate

Boolean

Allows the user to create packages with addon domains.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-parkedcreate

Boolean

Allows the user to create packages with parked domains (aliases).

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-unlimited-bw-pkgs

Boolean

Allows the user to create packages with unlimited bandwidth.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-unlimited-disk-pkgs

Boolean

Allows the user to create packages with unlimited disk space quotas.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-unlimited-pkgs

Boolean

Allows the user to create packages with unlimited values for features (for example, unlimited email accounts).

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-shell

Boolean

Allows the user to create an account with shell access.

The function returns this value in the  privileges hash.

Note:

We added this return in cPanel & WHM version 68. 


  • 1 — Enabled.
  • 0 — Disabled.
 

basic-system-info

Boolean

Allows 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 — Enabled.
  • 0 — Disabled.
0

basic-whm-functions

Boolean

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

The function returns this value in the  privileges hash.

Note:

We added this return in cPanel & WHM version 68. 

  • 1 — Enabled.
  • 0 — Disabled.
0

clustering

Boolean

Allows the user to configure DNS clusters.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

cors-proxy-get

Boolean

Allows the user 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 — Enabled.
  • 0 — Disabled.
0

cpanel-api

Boolean

Allows the reseller to execute 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 — Enabled.
  • 0 — Disabled.
0 

cpanel-integration

Boolean

Allows the user to manage how their server and its services connect to other servers and services.

The function returns this value in the  privileges hash.

Note:

We added this return in cPanel & WHM version 68. 

  • 1 — Enabled.
  • 0 — Disabled.
0

create-acct

Boolean

Allows the user to create accounts.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

create-dns

Boolean

Allows the user to create DNS zones.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

create-user-session

Boolean

Allows the user to create a new temporary user session for a specified service.

The function returns this value in the  privileges hash.

Notes:

  • This 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 — Enabled.
  • 0 — Disabled.
0

demo-setup

Boolean

Allows the user to enable demo mode on accounts.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

digest-auth

Boolean

Allows the user to manage Digest Authentication support.

The function returns this value in the  privileges hash.

Note:

We added this return in cPanel & WHM version 68. 

  • 1 — Enabled.
  • 0 — Disabled.
0

disallow-shell

Boolean

Allows the reseller to create accounts that possess shell access.

The function returns this value in the  privileges hash.

Note:

We added this return in cPanel & WHM version 68. 

  • 1 — Enabled.
  • 0 — Disabled.
0

edit-account

Boolean

Allows the user to modify accounts.

The function returns this value in the privileges hash.

Warning:

This privilege allows circumvention of account creation limits, gives shell access unless explicitly disallowed, and provides access to dedicated IP addresses, among other features.
  • 1 — Enabled.
  • 0 — Disabled.
 0

edit-dns

Boolean

Allows the user to edit DNS zones.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

edit-mx

Boolean

Allows the user to edit MX entries.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

edit-pkg

Boolean

Allows the user to create and delete packages.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

frontpage

Boolean

Allows the user to manage Microsoft® FrontPage® Extensions for their domains.

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 — Enabled.
  • 0 — Disabled.
0

generate-email-config

Boolean

Allows the user 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 — Enabled.
  • 0 — Disabled.
0

kill-act

Boolean

Allows the user to delete his or her customers' accounts.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

kill-dns

Boolean

Allows the user to delete DNS zones.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

limit-bandwidth

Boolean

Allows the user to modify bandwidth limits on his or her accounts.

The function returns this value in the privileges hash.

Warning:

This will allow circumvention of account package limits if you do not use resource limits.

  • 1 — Enabled.
  • 0 — Disabled.
0

list-accts

Boolean

Allows the user to list owned accounts.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

list-pkgs

Boolean

Allows the user to view existing hosting plans (packages).

The function returns this value in the  privileges hash.

Note:

We added this return in cPanel & WHM version 68. 

  • 1 — Enabled.
  • 0 — Disabled.
 

locale-edit

Boolean

Allows the user to create and modify locales on the server.

The function returns this value in the  privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

mailcheck

Boolean

Allows the user to access WHM's Mail Troubleshooter interface (WHM >> Home >> Mail >> Mail Troubleshooter).

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

manage-api-tokens

Boolean

Allows the user 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.
  • We added this parameter in cPanel & WHM version 68.


  • 1 — Enabled.
  • 0 — Disabled.
0

manage-dns-records

Boolean

Allows the user to manage DNS records.

The function returns this value in the  privileges hash.

Note:

We added this return in cPanel & WHM version 68. 

  • 1 — Enabled.
  • 0 — Disabled.
0

manage-oidc

Boolean

Allows the user 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 — Enabled.
  • 0 — Disabled.
0

manage-styles

Boolean

Allows the user 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 — Enabled.
  • 0 — Disabled.
0

mysql-info

Boolean

Allows the user 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 — Enabled.
  • 0 — Disabled.
0

news

Boolean

Allows the user to send news messages to customers' accounts.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

ns-config

Boolean

Allows the user to manage nameservers.

The function returns this value in the  privileges hash.

Note:

We added this return in cPanel & WHM version 68. 

  • 1 — Enabled.
  • 0 — Disabled.
0

park-dns

Boolean

Allows the user to park domains within WHM.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

passwd

Boolean

Allows the user to modify passwords for customers' accounts.

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

  • 1 — Enabled.
  • 0 — Disabled.
0

quota

Boolean

Allows the user to modify disk space quotas for accounts.

The function returns this value in the privileges hash.

Warning:

This ACL privilege allows circumvention of account package limits if you do not use resource limits.
  • 1 — Enabled.
  • 0 — Disabled.
0

rearrange-accts

Boolean

Allows the user to rearrange the locations of customer accounts in order to free up disk space.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

res-cart

Boolean

Allows the user to reset shopping carts for their domain accounts.

The function returns this value in the privileges hash.

Note:

We removed this return in cPanel & WHM 11.46.

  • 1 — Enabled.
  • 0 — Disabled.
0

resftp

Boolean

Allows the user to re-sync FTP account passwords.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

restart

Boolean

Allows the user to restart services on the server, such as Apache or Exim.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

show-bandwidth

Boolean

Allows the user to view the bandwidth usage of accounts.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

ssl

Boolean

Allows the user to manage the SSL certificates installed on domains.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

ssl-buy

Boolean

Allows the user to use WHM's Purchase and Install an SSL Certificate interface (WHM >> Home >> SSL/TLS >> Purchase and Install an SSL Certificate).

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

ssl-gencrt

Boolean

Allows the user to use the SSL CSR/CRT generator.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

ssl-info

Boolean

Allows the user 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 — Enabled.
  • 0 — Disabled.
 0

stats

Boolean

Allows the user to view WHM's Server Information interface (Home >> Server Status >> Server Information).

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

status

Boolean

Allows the user to view WHM's Service Status interface (Home >> Server Status >> Service Status).

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

suspend-acct

Boolean

Allows the user to suspend customers' accounts.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

thirdparty

Boolean

Allows the user to manage third-party service offerings.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

track-email

Boolean

Allows the user 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 — Enabled.
  • 0 — Disabled.
0

upgrade-account

Boolean

Allows the user to upgrade and downgrade customers' domain accounts.

The function returns this value in the privileges hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

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 — Enabled.
  • 0 — Disabled.
0