Page tree
Skip to end of metadata
Go to start of metadata

Description

This function retrieves the current user's WHM privileges.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/myprivs
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/myprivs
 Command Line
whmapi0 myprivs

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "privs":{
      "kill-dns":0,
      "edit-dns":0,
      "edit-mx":0,
      "add-pkg":0,
      "status":0,
      "suspend-acct":0,
      "add-pkg-shell":0,
      "viewglobalpackages":0,
      "resftp":0,
      "list-accts":0,
      "all":1,
      "passwd":0,
      "quota":0,
      "park-dns":0,
      "rearrange-accts":0,
      "allow-addoncreate":0,
      "demo":0,
      "news":0,
      "edit-account":0,
      "allow-unlimited-disk-pkgs":0,
      "allow-parkedcreate":0,
      "frontpage":0,
      "restart":0,
      "ssl-gencrt":0,
      "allow-unlimited-pkgs":0,
      "add-pkg-ip":0,
      "res-cart":0,
      "disallow-shell":0,
      "ssl-buy":0,
      "kill-acct":0,
      "allow-unlimited-bw-pkgs":0,
      "create-dns":0,
      "mailcheck":0,
      "clustering":0,
      "ssl":0,
      "edit-pkg":0,
      "show-bandwidth":0,
      "upgrade-account":0,
      "thirdparty":0,
      "limit-bandwidth":0,
      "create-acct":0,
      "demo-setup":0,
      "stats":0
   }
}
 Output (XML)
<myprivs>
     <privs>
        <add-pkg>1</add-pkg>
        <add-pkg-ip>1</add-pkg-ip>
        <add-pkg-shell>0</add-pkg-shell>
        <all>1</all>
        <allow-addoncreate>0</allow-addoncreate>
        <allow-parkedcreate>0</allow-parkedcreate>
        <allow-unlimited-bw-pkgs>1</allow-unlimited-bw-pkgs>
        <allow-unlimited-disk-pkgs>1</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>0</demo-setup>
        <disallow-shell>0</disallow-shell>
        <edit-account>1</edit-account>
        <edit-dns>1</edit-dns>
        <edit-mx>1</edit-mx>
        <edit-pkg>1</edit-pkg>
        <frontpage>0</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>0</quota>
        <rearrange-accts>0</rearrange-accts>
        <res-cart>1</res-cart>
        <resftp>0</resftp>
        <restart>0</restart>
        <show-bandwidth>1</show-bandwidth>
        <ssl>1</ssl>
        <ssl-buy>1</ssl-buy>
        <ssl-gencrt>1</ssl-gencrt>
        <stats>1</stats>
        <status>0</status>
        <suspend-acct>1</suspend-acct>
        <thirdparty>1</thirdparty>
        <upgrade-account>1</upgrade-account>
        <viewglobalpackages>1</viewglobalpackages>
   </privs>
</myprivs>

   

Parameters

This function does not accept parameters. 

Returns

ReturnTypeDescriptionPossible valuesExample
privs hash

A hash of the privileges that are available to the user.

This hash includes the returns below. 

add-pkg

Boolean

Allows the user to create packages.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

add-pkg-ip

Boolean

Allows the user to create packages with dedicated IP addresses.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

add-pkg-shell

Boolean

Allows the user to create packages with shell access.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

all

Boolean

Provides all access privileges to the user.

Warning:

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-addoncreate

Boolean

Allows the user to create packages with addon domains.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-parkedcreate

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-unlimited-bw-pkgs

Boolean

Allows the user to create packages with unlimited bandwidth.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

allow-unlimited-disk-pkgs

Boolean

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

This function returns this value in the privs 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).

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

clustering

Boolean

Allows the user to configure DNS clusters.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

create-acct

Boolean

Allows the user to create accounts.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

create-dns

Boolean

Allows the user to create DNS zones.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

demo

BooleanThis parameter is deprecated.  

demo-setup

Boolean

Allows the user to enable demo mode on accounts.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

disallow-shell

Boolean

Denies the user the ability to create packages with shell access.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

edit-account

Boolean

Allows the user to modify accounts.

Warning:

This privilege allows the user to circumvent account creation limits, give shell access unless explicitly disallowed, and provide access to dedicated IP addresses.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

edit-dns

Boolean

Allows the user to edit DNS zones.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
 0

edit-mx

Boolean

Allows the user to edit MX entries.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

edit-pkg

Boolean

Allows the user to create and delete packages.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

frontpage

Boolean

Allows the user to manage FrontPage Extensions for their domains.

Note:

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

  • The server runs cPanel & WHM version 11.44 and FrontPage extensions are not installed on the server.
  • The server runs cPanel & WHM version 11.46 or later.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

kill-act

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

kill-dns

Boolean

Allows the user to delete DNS zones.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

limit-bandwidth

Boolean

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

Warning:

This privilege allows the circumvention of account package limits if you do not use resource limits.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

list-accts

Boolean

Allows the user to list owned accounts.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

mailcheck

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

news

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

park-dns

Boolean

Allows the user to park domains within WHM.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

passwd

Boolean

Allows the user to modify passwords for customers' accounts.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

quota

Boolean

Allows the user to modify disk space quotas for accounts.

Warning:

This will allow 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.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

res-cart

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

resftp

Boolean

Allows the user to re-sync FTP account passwords.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

restart

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

show-bandwidth

Boolean

Allows the user to view the bandwidth usage of accounts.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

ssl

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

ssl-buy

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

ssl-gencrt

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

stats

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

status

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

suspend-acct

Boolean

Allows the user to suspend customers' accounts.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

thirdparty

Boolean

Allows the user to manage third-party service offerings.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

upgrade-account

Boolean

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

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0

viewglobalpackages

Boolean

Allows the user to access any package on the server that is not specifically assigned to a user.

Note:

This applies to any package except those with an underscore (_) in their names.

This function returns this value in the privs hash.

  • 1 — Enabled.
  • 0 — Disabled.
0