We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • UAPI Functions - CCS::list_users
Skip to end of metadata
Go to start of metadata

Description

This function lists all calendar users on the cPanel account.

Note:

You must install the Calendar and Contacts Server cPanel plugin to access this API function.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/CCS/list_users



Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List calendar users
$calendar_users = $cpanel->uapi(
    'CCS', 'list_users',
);


Note:

For more information, read our Guide to the LiveAPI System.

 

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# List calendar users
my $calendar_users = $cpliveapi->uapi(
    'CCS', 'list_users',
);


Note:

For more information, read our Guide to the LiveAPI System.

 Command Line
uapi --user=username CCS list_users


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)
{
	"messages": null,
	"errors": null,
	"warnings": null,
	"status": 1,
	"metadata": {},
	"data": {
			"user1@example.com":"0882362A-0B98-11E8-BAF5-D988266709C1",
      		"user2@example.com":"96F1EB2F-A501-11EA-A3EF-A553B2E4FFA8",
      		"user3@example.com":"195C8A51-E1B3-11E6-8715-F54FA4E00DDD",
      		"user4@example.com":"028F4AB1-0F1A-11E7-AEC7-E08FECEC8036"
		}
}


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

Parameters

This function does not accept parameters.

Returns

ParameterTypeDescriptionPossible valuesExample
accountstring

The user account's universally unique identifier (UUID).

Note:

The user account's name is the return's name.

A valid UUID for the cPanel account.

0882362A-0B98-11E8-BAF5-D988266709C1