Description
This function returns the number of server-wide notifications on an account.
Examples
cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Notifications/get_notifications_count
LiveAPI PHP Class
$cpanel
=
new
CPANEL();
$get_notifications_count
=
$cpanel
->uapi(
'Notifications'
,
'get_notifications_count'
);
LiveAPI Perl Module
my
$cpliveapi
= Cpanel::LiveAPI->new();
my
$get_notifications_count
=
$cpliveapi
->uapi(
'Notifications'
,
'get_notifications_count'
);
cPanel Template Toolkit
[% data = execute( 'Notifications', 'get_notifications_count' ); %]
Command Line
uapi --user=username Notifications get_notifications_count
|
Output (JSON)
{
"messages": null,
"errors": null,
"status": 1,
"metadata": {
},
"data": 3
}
Parameters
This function does not accept parameters.
Returns
Return
|
Type
|
Description
|
Possible values
|
Example
|
data
|
integer
|
The number of server-wide notifications.
|
A positive integer.
|
3
|