Description

This function returns the number of server-wide notifications on an account.  

Examples 


https://hostname.example.com:2083/cpsess##########/execute/Notifications/get_notifications_count

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Get the number of notifications.
$get_notifications_count = $cpanel->uapi(
    'Notifications', 'get_notifications_count'
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Get the number of notifications.
my $get_notifications_count = $cpliveapi->uapi(
    'Notifications', 'get_notifications_count'
);

 

<!--  Get the number of notifications. -->
[% data = execute( 'Notifications', 'get_notifications_count' ); %]

 

uapi --user=username Notifications get_notifications_count

{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
    
  },
  "data": 3
}

   

Parameters

This function does not accept parameters. 

Returns

ReturnTypeDescriptionPossible valuesExample
dataintegerThe number of server-wide notifications.A positive integer.3