Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

How call WHM API 1? I can call WHM API 0 (Deprecated), UAPI and cPanel API 2, but not WHM API 1 #19

Open
josenobile opened this issue Jan 9, 2017 · 2 comments

Comments

@josenobile
Copy link

Hello,

How call WHM API 1? I can call WHM API 0 (Deprecated), UAPI and cPanel API 2, but not WHM API 1. How to call it? https://documentation.cpanel.net/display/SDK/Guide+to+WHM+API+1

@henriqueccruz
Copy link

henriqueccruz commented Jan 14, 2017

It's simple, really.
All you have to do is define api.version inside arguments.

Example:
$arguments = array('api.version' => '1'); $mail_queue = $cpanel->fetch_mail_queue($arguments);

@ttouf
Copy link

ttouf commented Aug 17, 2018

to use API 1 with more parameters use this:
backup user account sample:
$accounts_json = $cpanel->start_background_pkgacct(["api.version" => 1, "user" => "username"]); $accounts = json_decode($accounts_json, true); echo "<pre>"; print_r($accounts); echo "</pre>";

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants