jameswestnz / serverpilot-api-php
该软件包最新版本(dev-master)的许可证信息不可用。
PHP的ServerPilot API包装器
dev-master
2016-04-13 22:30 UTC
Requires
- php: >=5.2
- ext-curl: *
- ext-json: *
This package is not auto-updated.
Last update: 2024-09-20 18:08:21 UTC
README
创建ServerPilot客户端
include_once 'serverpilot-api-php/Client.php'; $ServerPilot = new \ServerPilot\Client('CLIENT_ID', 'API_KEY');
资源
服务器
列出所有服务器
$servers = $ServerPilot->Servers()->listAll();
系统用户
列出所有sysusers
$sysusers = $ServerPilot->SystemUsers()->listAll($server_id=null);
创建sysuser
$app = $ServerPilot->SystemUsers()->create($serverid, $username, $password);
应用
列出所有应用
$apps = $ServerPilot->Apps()->listAll($server_id=null);
创建应用
$app = $ServerPilot->Apps()->create($name, $sysuser_id, $runtime='php5.4', $domains=array());
数据库
列出所有数据库
$databases = $ServerPilot->Databases()->listAll($server_id=null, $app_id=null);
创建数据库
$database = $ServerPilot->Databases()->create($app_id, $name, $username, $password);
动作
获取动作状态
$action = $ServerPilot->Actions()->getStatus($action_id);