Description

This function processes statistics for a Logaholic user's profile.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Logaholic&cpanel_jsonapi_func=processstats&username=example&profile=fish.example.com

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
//  Process statistics for the "newprofile" profile owned by Logaholic user "example"
$process_stats = $cpanel->api2(
    'Logaholic', 'processstats', 
    array(
        'username'       => 'example', 
        'profile'        => 'subdomain.example.com', 
    ) 
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Process statistics for the "newprofile" profile owned by Logaholic user "example"
my $process_stats = $cpliveapi->api2(
    'Logaholic', 'processstats',
    { 
        'username'      => 'example', 
        'profile'       => 'subdomain.example.com', 
    }
);

 

Because we removed this function before we introduced this functionality, you cannot call this function via the command line. 

{
  "cpanelresult": {
    "apiversion": 2,
    "func": "processstats",
    "data": [
      {
        "reason": "Profile data for Logaholic user "example" was processed.",
        "result": 1,
        "profiles": {
          "profile": [
            {
              "details": "The Logaholic profile for site "subdomain.example.com" was processed.",
              "profile_name": "subdomain.example.com",
              "result": 1
            }
          ]
        }
      }
    ],
    "event": {
      "result": 1
    },
    "module": "Logaholic"
  }
}

   

Parameters

ReturnTypeDescriptionPossible valuesExample
usernamestring

Required

The Logaholic username.

A valid string.example
profilestringRequired

The Logaholic profile's name.

A valid string.subdomain.example.com

Returns

ReturnTypeDescriptionPossible valuesExample
reason string

The status message from the function.

  • Profile data for Logaholic user "example" was processed.
Profile data for Logaholic user "example" was processed.
resultboolean Whether the function succeeded.
  • 1 — The function succeeded.
  • 0 — The function failed.
 1
profileshashA hash that contains information about the profiles.This hash includes the profile hash for each user profile. 

profile

hash

A hash that contains information about an individual profile.

The function returns this hash in the profiles hash.

This hash includes the details, profile_name, and result parameters. 

details

string

Logaholic's response message.

The function returns this parameter in the profile hash.

A message of success or reason for failure.
The Logaholic profile for site "subdomain.example.com" was processed.

profile_name

string

The name of the Logaholic user's profile.

The function returns this parameter in the profile hash.

A valid string.subdomain.example.com

result

integer

Whether the function succeeded.

The function returns this parameter in the profile hash.

  • 1 — The function succeeded.
  • 0 — The function failed.
1