Child pages
  • cPanel API 2 Functions - Logaholic::processstats

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

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

Include Page
LIB:_cPanelAPI2NoEquivalent
LIB:_cPanelAPI2NoEquivalent

Include Page
LIB:_LogaholicRemovedWarning
LIB:_LogaholicRemovedWarning

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleWHM API (JSON)
Code Block
languagetext
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

Include Page
LIB:_CallFromWHMAPILink
LIB:_CallFromWHMAPILink

Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$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', 
    ) 
);

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

 

Expand
titleLiveAPI Perl Module
Code Block
languageperl
linenumberstrue
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', 
    }
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelAPI2cPanelTagsWarning
LIB:_cPanelAPI2cPanelTagsWarning

Expand
titleCommand Line
Warning
titleImportant:

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

Expand
titleOutput (JSON)
Code Block
linenumberstrue
{
  "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"
  }
}

Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote

   

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.
Expand
titleClick to view...
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.
Expand
titleClick to view...
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