阿帕云-云服务器API文档
调用方式
请求地址
http://您阿帕云引擎域名/api
请求方法
请求方法:POST Content-Type 类型:application/x-www-form-urlencoded
公共参数
说明:公共请求参数与返回数据说明,再具体接口中不再重复列出和说明。
参数 |
必选 |
类型/长度 |
示例值 |
说明 |
module |
是 |
string |
server |
业务类型 |
action |
是 |
string |
getzones |
操作名称,后续接口中,替换此参数 |
userid |
是 |
int |
1 |
会员ID |
time |
是 |
int |
1471331587 |
当前UNIX时间戳 |
sign |
是 |
string |
ebb198fa8f884f9544b94bb16e8e3af3 |
权限令牌,生成规则如下: sign(大陆版) = md5(module+ 'zkeys.api@2019'+action + userid + 接口密钥 + time) |
taskid |
是 |
int |
12 |
您本地请求的任务编号,异步回调时返回会携带该参数 |
dataType |
否 |
string |
json |
返回格式,XML/JSON(可选),默认json |
version |
是 |
string |
6.0.1 |
阿帕云引擎版本,如自行对接,可固定:9.9.9 |
system_type |
是 |
string |
zkeys_web |
阿帕云引擎类型,如自行对接,可固定:zkeys_web |
vtime |
是 |
string |
20220303 |
当天日期,格式:YYYYMMDD |
auth_name |
是 |
string |
业务操作接口传递,终端客户实名姓名 |
张三 |
auth_mobile |
是 |
string |
业务操作接口传递,终端客户实名手机号码 |
13111111111 |
auth_idnum |
是 |
string |
业务操作接口传递,终端客户实名身份证号码 |
430111199002122222 |
auth_bank_account |
否 |
string |
业务操作接口传递,终端客户实名银行卡号 |
411211199104151214 |
auth_from_ip |
是 |
string |
业务操作接口传递,终端客户最后登录IP |
192.168.1.1 |
auth_client_user_id |
是 |
string |
业务操作接口传递,终端客户用户id |
1 |
同步数据
同步可用区
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
getzones |
接口名称 |
返回示例
{
"code": 0,
"message": "success",
"data": {
"zones": [
{
"guid": "1625139389577044",
"name": "Hyper-V 2",
"max_year": "3",
"identityStatus": "1",
"whiteListStatus": "0",
"icp_status": "0"
},
{
"guid": "1650521653823448",
"name": "\u4e2d\u56fd\u5185\u8499",
"max_year": "3",
"identityStatus": "1",
"whiteListStatus": "1",
"icp_status": "1"
}
]
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
json |
json |
返回的可用区结构体 |
data.zones |
array |
可用区数据 |
可用区数据 |
data.zones.guid |
string |
1625139389577044 |
可用区GUID |
data.zones.name |
string |
深圳一区 |
可用区名称 |
data.zones.max_year |
string |
3 |
可用区下业务最大购买时长 |
data.zones.identityStatus |
string |
1 |
本可用区强制实名认证 1:是 0:否 |
data.zones.whiteListStatus |
string |
1 |
本可用区强制提交白名单 1:是 0:否 |
data.zones.icp_status |
string |
1 |
本可用区支持提交备案 1:是 0:否 |
同步线路
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
getlines |
接口名称 |
type |
是 |
string |
server_line |
类型 获取线路 |
返回示例
{
"code": 0,
"message": "success",
"data": {
"lines": [
{
"guid": "1628966421344185",
"line_guid": "1625139389577044",
"line_type": "local",
"line_auth": "0",
"name": "Hyper-V\u7ebf\u8def2-150",
"descript": "190\u5bbf\u4e3b\u673a",
"introUrl": "http:\/\/www.baidu.com",
"buyStatus": "1",
"upgradeStatus": "1",
"renewStatus": "1",
"harddiskMinNum": "1",
"harddiskMaxNum": "5",
"harddiskMinSize": "10",
"harddiskMaxSize": "1000",
"harddiskStep": "10",
"harddiskPrice": 10,
"bandwidthMinSize": "30",
"bandwidthMaxSize": "300",
"bandwidth_free_size": "0",
"bandwidth_in_type": "2",
"bandwidth_in_value": "10",
"bandwidth1Price": 1,
"bandwidth2Price": 2,
"bandwidth3Price": 3,
"bandwidth4Price": 5,
"bandwidth5Price": 6,
"bandwidth6Price": 9,
"defenseMinSize": "5",
"defenseMaxSize": "300",
"defenseFreeSize": "0",
"defensePrice": 10,
"defense_size": "5,10,20,30,50,100,200,300",
"lifeTime": null,
"months": "1,2,3,4,5,6,7,8,9,12,24,36",
"functions": "createsnapshot,revertsnapshot,removesnapshot,renewsnapshot,setvnc,resource_display,reset_vnc_password,security_policy",
"sortID": "22",
"snap_price_type": "0",
"snap_price_buy_day": "-1.00",
"snap_price_buy_month": "1.00",
"snap_open_max": "0",
"snap_open_days": "",
"backup_price_type": "0",
"backup_price_buy_day": "-1.00",
"backup_price_buy_month": "-1.00",
"backup_open_days": "",
"day_for_month": "1",
"remark": "150",
"temp_upgrade_status": "0",
"renew_degrade_status": "1",
"temp_upgrade_times_limit": "0",
"temp_upgrade_bandwidth_price": "0.00",
"temp_upgrade_min_hours": "0",
"vnc_status": "0",
"auto_dns": "114.114.114.114",
"api_migration_status": "0",
"api_migration_line_id": "0",
"move_status": "0",
"vnc_url": "",
"retention_days": "3",
"max_open_num": "20",
"append_ip_status": "1",
"append_ip_price": "1.11",
"resources_type": "0",
"win_linux_switch": "1",
"sync_buy_status": "1",
"core_price_data": [
{
"name": "1H1G",
"cpu": "1",
"ram": "1",
"price": 95,
"windows_price": 95,
"recommend_status": "0",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":10,\"defense\":10}"
},
{
"name": "2H2G",
"cpu": "2",
"ram": "2",
"price": 190,
"windows_price": 190,
"recommend_status": "0",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":10,\"defense\":5}"
},
{
"name": "3",
"cpu": "3",
"ram": "3",
"price": 30,
"windows_price": 30,
"recommend_status": "0",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "4H4G",
"cpu": "4",
"ram": "4",
"price": 380,
"windows_price": 380,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "8484",
"cpu": "8",
"ram": "4",
"price": 21,
"windows_price": 21,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "128H128G",
"cpu": "50",
"ram": "50",
"price": 100,
"windows_price": 100,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "99H1024G",
"cpu": "99",
"ram": "1024",
"price": 3000,
"windows_price": 2900,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "3",
"cpu": "64",
"ram": "64",
"price": 2000,
"windows_price": 1900,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "4",
"cpu": "64",
"ram": "100",
"price": 2100,
"windows_price": 2000,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "5",
"cpu": "64",
"ram": "156",
"price": 2200,
"windows_price": 2100,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "6",
"cpu": "64",
"ram": "180",
"price": 2300,
"windows_price": 2200,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
},
{
"name": "7",
"cpu": "64",
"ram": "200",
"price": 2500,
"windows_price": 2400,
"recommend_status": "1",
"recommend_content": "{\"harddisk\":10,\"bandwidth\":1,\"defense\":5}"
}
]
}
],
"version": 1
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
json |
json |
返回的可用区结构体 |
data.lines |
array |
可用区数据 |
可用区数据 |
data.lines.guid |
string |
1628966421344185 |
线路GUID |
data.lines.line_type |
string |
local |
线路类型 local自产线路,zkeys 大陆线路,niaoyun鸟云线路,zkeys_intl 国际线路 |
data.lines.line_auth |
string |
0 |
线路权限 0 不限制,1 仅本站会员使用 2 仅代理用户使用 |
data.lines.name |
string |
深圳一区 |
线路名称 |
data.lines.descript |
string |
深圳一区 |
线路描述 |
data.lines.introUrl |
string |
www.zkeys.com |
机房介绍链接 |
data.lines.buyStatus |
string |
1 |
购买状态 1:开放购买 0:关闭购买 |
data.lines.upgradeStatus |
string |
1 |
升级状态 1:开放升级 0:关闭升级 |
data.lines.renewStatus |
string |
1 |
续费状态 1:开放续费 0:关闭续费 |
data.lines.harddiskMinNum |
string |
1 |
磁盘可挂载数量的最小值 |
data.lines.harddiskMaxNum |
string |
5 |
磁盘可挂载数量的最大值 |
data.lines.harddiskMinSize |
string |
10 |
磁盘最小容量 10G |
data.lines.harddiskMaxSize |
string |
1000 |
磁盘最大容量 1000G |
data.lines.harddiskStep |
string |
10 |
磁盘容量步长 |
data.lines.harddiskPrice |
string |
10 |
磁盘单价 1G 10 RMB |
data.lines.bandwidthMinSize |
string |
10 |
带宽最小值 10M |
data.lines.bandwidthMaxSize |
string |
300 |
带宽最大值 300M |
data.lines.bandwidth_free_size |
string |
0 |
赠送带宽 0M |
data.lines.bandwidth_in_type |
string |
1 |
带宽下行限制类型 1,固定值 2,对等阈值 说明: 选择固定值时,根据带宽下行限制设置的值限制最大下行,如设置10M,则业务购买1M带宽或20M带宽,带宽下行最大都为10M;选择对等筏值时,会根据带宽下行限制值去限制下行,如限制值为10,则该线路下的业务带宽低于10M时,最大下行为10M,高于10M带宽时,下行与上行带宽值对等,注:Hyper-V不支持下行限制 |
data.lines.bandwidth_in_value |
string |
10 |
带宽下行限制值 10M |
data.lines.bandwidth1Price |
string |
1 |
设置 0-1M 带宽的价格,单位:元/月 带宽阶梯计算价格 |
data.lines.bandwidth2Price |
string |
2 |
设置 1-2M 带宽的价格,单位:元/月 |
data.lines.bandwidth3Price |
string |
3 |
设置 2-3M 带宽的价格,单位:元/月 |
data.lines.bandwidth4Price |
string |
4 |
设置 3-4M 带宽的价格,单位:元/月 |
data.lines.bandwidth5Price |
string |
5 |
设置 4-5M 带宽的价格,单位:元/月 |
data.lines.bandwidth6Price |
string |
6 |
设置 5-6M 带宽的价格,单位:元/月 |
data.lines.defenseMinSize |
string |
5 |
防御最小值 5G |
data.lines.defenseMaxSize |
string |
300 |
防御最大值 300G |
data.lines.defenseFreeSize |
string |
0 |
免费防御值 0G |
data.lines.defensePrice |
string |
0 |
防御的价格 |
data.lines.defense_size |
string |
5,10,20,30,50,100,200,300 |
防御值可选集合 |
data.lines.lifeTime |
string |
10 |
存活时长 单位年 |
data.lines.months |
string |
1 |
可购买月份数 1,2,3,4,5,6,7,8,9,12,24,36 单位月 |
data.lines.functions |
string |
setvnc |
线路开放的功能 createsnapshot,revertsnapshot,removesnapshot,renewsnapshot,setvnc,resource_display,reset_vnc_password,security_policy |
data.lines.sortID |
string |
1 |
排序数字(数值越小越靠前) |
data.lines.snap_price_type |
string |
0 |
快照开放状态:0全开放 |
data.lines.snap_price_buy_day |
string |
0 |
快照按天计费单价,单位:元/天/G |
data.lines.snap_price_buy_month |
string |
0 |
快照按月计费单价,单位:元/月/G |
data.lines.snap_open_max |
string |
5 |
单台机器最大可开通快照数量 |
data.lines.snap_open_days |
string |
5 |
快照支持按天购买的天数 |
data.lines.backup_price_type |
string |
5 |
备份开放状态:0全开放 |
data.lines.backup_price_buy_day |
string |
5 |
备份按天计费单价,单位:元/天/G |
data.lines.backup_price_buy_month |
string |
5 |
备份按月计费单价,单位:元/月/G |
data.lines.backup_open_days |
string |
5 |
备份支持按天购买的天数 |
data.lines.day_for_month |
string |
25 |
每月天数(月计费天数) |
data.lines.remark |
string |
深圳一区 |
线路备注 |
data.lines.temp_upgrade_status |
string |
0 |
是否允许临时升级:0否 |
data.lines.renew_degrade_status |
string |
0 |
是否允许续费降配:0否 |
data.lines.temp_upgrade_times_limit |
string |
0 |
允许临时升级重叠次数:0不允许 |
data.lines.temp_upgrade_bandwidth_price |
string |
1 |
临时升级带宽单价,单位:元/M/小时 |
data.lines.temp_upgrade_min_hours |
string |
0 |
临时升级最短时长,0则不限制 |
data.lines.vnc_status |
string |
0 |
是否支持VNC:0不支持 1支持 |
data.lines.auto_dns |
string |
0 |
客户机DNS |
data.lines.api_migration_status |
string |
0 |
当前线路是否支持API申请迁移,0不支持 |
data.lines.api_migration_line_id |
string |
0 |
当前线路允许迁移到哪些线路,多个用半角逗号隔开 |
data.lines.move_status |
string |
0 |
是否已迁移 |
data.lines.vnc_url |
string |
http://www.vnc.com |
VNC地址 |
data.lines.retention_days |
string |
5 |
到期候保留时长 |
data.lines.max_open_num |
string |
20 |
单次可开通的机器数量最大值 |
data.lines.append_ip_status |
string |
0 |
弹性IP开关: 0关闭 1开启 |
data.lines.append_ip_price |
string |
10 |
增加弹性IP价格:单位 元/个/月 |
data.lines.resources_type |
string |
0 |
资源类型:0ZKEYS、1小鸟云、2百度云、3腾讯云、4华为云、5京东云 |
data.lines.win_linux_switch |
string |
0 |
是否允许win linux互相切换:0否、1是 |
data.lines.sync_buy_status |
string |
0 |
同步上级状态 |
data.lines.core_price_data |
array |
[] |
核心配置 |
data.lines.core_price_data.name |
string |
1H1G |
核心配置名称 1H1G |
data.lines.core_price_data.cpu |
string |
1 |
CPU 1核 |
data.lines.core_price_data.ram |
string |
1 |
内存 1G |
data.lines.core_price_data.price |
string |
1 |
linux价格 元 |
data.lines.core_price_data.windows_price |
string |
1 |
windows价格 元 |
data.lines.core_price_data.recommend_status |
string |
1 |
是否推荐 0不推荐(默认) 1推荐 |
data.lines.core_price_data.recommend_content |
string |
1 |
推荐配置,为json结构 ,如{"bandwidth":1,"harddisk":10,"defense":0} |
version |
string |
1 |
版本 |
同步操作系统
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
getsystems |
接口名称 |
page_mode |
是 |
string |
1 |
页码 |
page_length |
是 |
string |
50 |
单页的数量 |
返回示例
{
"code": 0,
"message": "success",
"data": {
"zones": [
{
"guid": "1625139389577044",
"name": "Hyper-V 2",
"max_year": "3",
"identityStatus": "1",
"whiteListStatus": "0",
"icp_status": "0"
},
{
"guid": "1650521653823448",
"name": "\u4e2d\u56fd\u5185\u8499",
"max_year": "3",
"identityStatus": "1",
"whiteListStatus": "1",
"icp_status": "1"
}
]
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
json |
json |
返回的可用区结构体 |
data.pages |
int |
1 |
页码数 |
data.items |
int |
116 |
总数 |
data.systems |
array |
[] |
操作系统信息 |
data.systems.distinct_id |
string |
1 |
特殊id |
data.systems.id |
string |
1 |
特殊id |
data.systems.guid |
string |
1695196885222115 |
操作系统GUID |
data.systems.class_guid |
string |
1666193469952094 |
操作系统类型GUID |
data.systems.name |
string |
6.8 64位 |
操作系统名称 |
data.systems.login_name |
string |
root |
操作系统登陆名称 |
data.systems.port |
string |
22 |
操作系统登陆端口 |
data.systems.mirror_name |
string |
root |
镜像名称 |
data.systems.cpu_limit |
string |
0 |
cpu限制 购买业务时 会判断购买的业务的配置是否符合操作系统的最低限制 0 限制 |
data.systems.ram_limit |
string |
0 |
内存限制 购买业务时 会判断购买的业务的配置是否符合操作系统的最低限制 0 限制 |
data.systems.type |
string |
create |
支持的类型 create 创建,install重装 |
data.systems.system_harddisk |
string |
30 |
系统盘大小 |
data.systems.support |
string |
server |
支持的业务类型 server 云服务器,idc托管,baremetal裸金属 |
data.systems.boot_menu_contents |
json |
{"19":"","250":""} |
引导菜单内容 |
data.systems.ghost_url |
json |
{"19":"","250":""} |
ghost文件网络存储位置 |
data.systems.lines |
array |
["1683665299911682"] |
线路GUID 操作系统关联的线路 |
同步单个业务
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
getserver |
获取单个业务 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": {
"need_reset_vnc": "0",
"line_guid": "1652433150648938",
"lineID": "1060",
"systemID": "1693649208369344",
"ip": "11.23.35.3",
"cpu": "1",
"memory": "1",
"harddisks": "10",
"bandwidth": "1",
"defense": "10",
"loginName": "root",
"buyTime": "2021-08-16 11:06:30",
"endTime": "2021-09-16 11:06:30",
"orderStatus": "1",
"runStatus": "1",
"actStatus": "0",
"syncStatus": "1",
"snapStatus": "0",
"backStatus": "0",
"backSystem": "0",
"backDisk": "0",
"backSystemTime": null,
"backSystemID": null,
"backDiskTime": null,
"isInstallMonitor": "1",
"blackHoleStatus": "0",
"blockStatus": "0",
"vps_guid": null,
"vnc_port": "59003",
"share_type": "0",
"login_port": "80",
"in_bandwidth": "10",
"guid": "1708217536092719",
"master_id": "83",
"is_cdn_bind": "0",
"cdn_cname_domain": null,
"cdn_domain_max_num": "0",
"pppoe_account": null,
"share_ip": "11.23.35.3:80",
"system_guid": "1693649208369344",
"back_system_guid": "",
"sid": "9527",
"localIP": "10.23.35.3",
"append_ip": [],
"securityPolicyList": [],
"port":[
{
"id":"1032",
"public_ip":"172.23.8.151",
"public_port":"10031",
"local_ip":"152.152.1.3",
"local_port":"22",
"protocol":"tcp,udp",
"create_time":"2021-08-11 14:35:35",
"is_deleted":"0",
"is_used":"1",
"guid":"d1424916-613d-43a9-9754-1029e74975ad",
"service_id":"9519",
"service_type":"1",
"controller_guid":"1695712043844187",
"remark":"\u8fdc\u7a0b\u767b\u9646\u7aef\u53e3"
}
],
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
json |
json |
返回的可用区结构体 |
data.need_reset_vnc |
string |
0 |
是否需要重置vnc |
data.line_guid |
string |
1652433150648938 |
线路guid |
data.lineID |
string |
1000 |
特殊线路id |
data.systemID |
string |
1693649208369344 |
操作系统GUID |
data.ip |
string |
11.23.35.3 |
业务ip |
data.cpu |
string |
1 |
业务CPU 1核 |
data.memory |
string |
1 |
内存 1G |
data.harddisks |
string |
10 |
磁盘大小 |
data.bandwidth |
string |
1 |
带宽1M |
data.defense |
string |
10 |
防御 10G |
data.loginName |
string |
root |
远程登陆用户名称 |
data.buyTime |
string |
2021-08-16 11:06:30 |
购买日期 |
data.endTime |
string |
2021-09-16 11:06:30 |
业务结束日期 |
data.orderStatus |
string |
1 |
业务状态:-2 已删除;-1 已回收;0 开通中;1 正常;2 过户中(针对代理平台,过户中的机器不可以做任何操作);3 已过期 ;4 已退款(针对代理平台) |
data.runStatus |
string |
1 |
运行状态:-2 已锁定(关机状态,不能自行启动,用于过期、管理员锁定,可设置几天后自动解锁);-1 已关机;1 运行中 |
data.actStatus |
string |
0 |
操作状态:-9 密码重设失败;-5 重启失败(软重启);-4 关机失败(软关机);-3 启动失败;-2 VNC重设失败;0 正常;2 VNC重设中;3 启动中;4 关机中;5 重启中;6 升级中;7 续费中;8 重装中;9 密码重设中;11 降配中 |
data.syncStatus |
string |
1 |
同步状态 0未同步 1已同步 |
data.snapStatus |
string |
0 |
快照状态 快照状态 0正常 1快照中 2恢复中 3删除中 |
data.blackHoleStatus |
string |
1 |
IP异常状态:0正常 , 1异常 |
data.blockStatus |
string |
1 |
黑洞状态:0 正常 , 1黑洞中 |
data.vps_guid |
string |
6d59fe47-2e8c-4228-893c-9a02c2eb7b82 |
宿主机中唯一性的id,hyper为标准36位guid格式 |
data.vnc_port |
string |
59003 |
vnc端口 |
data.share_type |
string |
0 |
共享类型 1共享 0 独享 |
data.login_port |
string |
80 |
远程登陆端口 |
data.in_bandwidth |
string |
10 |
下行带宽值 10M |
data.guid |
string |
10 |
业务GUID |
data.master_id |
string |
83 |
内部特殊id |
data.is_cdn_bind |
string |
0 |
是否支持cdn控制器绑定域名 0.不支持 1.支持' |
data.cdn_cname_domain |
string |
www.zkeys.com |
cdn绑定域名的名称 |
data.cdn_domain_max_num |
string |
1 |
最多可绑定域名个数 |
data.pppoe_account |
string |
zkeys_pppoe |
拨号用户名称(共享业务专用) |
data.share_ip |
string |
11.23.35.3:80 |
下级IP使用 如果线路开启别称或者为共享时 则使用该字段显示公网ip |
data.system_guid |
string |
1693649208369344 |
操作系统GUID |
data.sid |
string |
9527 |
别称id |
data.localIP |
string |
10.23.35.3 |
内网ip |
data.append_ip |
array |
[] |
附加ip 可能存在多个 |
data.append_ip.ip |
string |
192.168.1.75 |
附加ip |
data.append_ip.create_time |
string |
192.168.1.75 |
附加ip创建时间 |
data.append_ip.delete_time |
string |
192.168.1.75 |
附加ip删除时间 |
data.securityPolicyList |
array |
[] |
安全策略信息 可能存在多个 |
data.securityPolicyList.id |
string |
1 |
特殊id |
data.securityPolicyList.name |
string |
流入80端口 |
自定义规则名称 |
data.securityPolicyList.guid |
string |
1707763642659694 |
guid 单条记录的唯一表示 |
data.securityPolicyList.weight |
string |
7 |
权重优先级,必须数字,数字大的优先执行,不可重复 |
data.securityPolicyList.direction |
enum |
Both |
方向:[入方向 Inbound/出方向 Outbound/双方向 Both] |
data.securityPolicyList.action |
enum |
Allow |
行为: [拒绝 Deny/允许 Allow] |
data.securityPolicyList.protocol |
string |
tcp |
协议类型 TCP、UDP、ICMP、自定义 (不限制大小写) |
data.securityPolicyList.remote_ip |
string |
155.25.2.0/24 |
远程IP地址 默认为空可以为单个IP也可以为IP网段 |
data.securityPolicyList.local_port |
string |
0 |
本地端口 默认值为0 ,0表示所有,也可以 5-15的格式 |
data.securityPolicyList.switch_name |
string |
0 |
网卡名称 默认为空 |
data.securityPolicyList.service_type |
string |
server |
服务类型 server云服务器 |
data.securityPolicyList.service_id |
string |
9461 |
服务器id |
data.securityPolicyList.create_time |
string |
2021-08-11 10:52:04 |
规则创建日期 |
data.securityPolicyList.status |
string |
1 |
状态值 1 正常 0 异常 -1删除 |
data.securityPolicyList.strategy_type |
string |
1 |
策略类型:1,普通策略;2,预设策略' |
data.securityPolicyList.master_strategy_id |
string |
1 |
预设策略id |
data.securityPolicyList.message |
string |
|
策略创建信息时返回的信息 默认为空 |
data.securityPolicyList.is_agent |
string |
1 |
是否api创建 1 是 0 不是 |
data.port |
array |
[] |
共享业务的端口转发记录 可能存在多个 |
data.port.id |
string |
123 |
端口转发的特殊id |
data.port.public_ip |
string |
172.23.8.151 |
公网ip |
data.port.public_port |
string |
10031 |
公网端口 |
data.port.local_ip |
string |
152.152.1.3 |
内网ip |
data.port.local_ip |
string |
152.152.1.3 |
内网ip |
data.port.local_port |
string |
8080 |
内网开放端口 |
data.port.protocol |
string |
tcp,udp |
端口协议 |
data.port.create_time |
string |
2021-08-16 17:42:04 |
端口创建时间 |
data.port.is_deleted |
string |
0 |
是否被删除 1,删除 0 未删除 |
data.port.is_used |
string |
1 |
是否被使用 1,被使用 0,未被使用 |
data.port.guid |
string |
3045ac3d-3cd8-480e-872f-778900c46dad |
端口转发记录的唯一Guid |
data.port.remark |
string |
端口80 |
备注 |
data.port.service_id |
string |
9519 |
服务特殊id |
批量同步业务
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
getservers |
获取单个业务 |
page |
是 |
int |
1 |
页码数 默认单页50条数据 |
返回示例
{
"code": 0,
"message": "success",
"data": {
"pages": 1,
"items": "338",
"servers": {
"0": {
"need_reset_vnc": "0",
"lineID": "1060",
"guid": "1703155535615617",
"ip": "198.168.0.57",
"id": "9406",
"share_type": "0",
"master_id": "14",
"cpu": "1",
"memory": "1",
"harddisks": "10",
"bandwidth": "1",
"defense": "5",
"systemID": "744",
"loginName": "administrator",
"buyTime": "2021-06-21 14:08:11",
"endTime": "2021-07-21 14:08:11",
"orderStatus": "-2",
"runStatus": "-1",
"actStatus": "0",
"apiLockStatus": "0",
"snapStatus": "0",
"snapId": "0",
"backStatus": "0",
"backSystem": "0",
"backDisk": "0",
"backSystemTime": null,
"backDiskTime": null,
"backSystemID": null,
"blockStatus": "0",
"isInstallMonitor": "1",
"apiLockReason": "",
"apiUnLockTime": null,
"vnc_port": "59057",
"login_port": "7798",
"in_bandwidth": "10",
"pppoe_account": null,
"share_ip": null,
"is_cdn_bind": "0",
"cdn_cname_domain": null,
"cdn_domain_max_num": "0",
"line_guid": "1652433150648938",
"localIP": "10.168.0.57",
"system_guid": "1656209674537609",
"system_back_guid": "",
"append_ip": [],
"securityPolicyList": [
{
"id": "756",
"name": "\u9884\u8bbe\u4e0d\u53ef\u5220\u96642",
"guid": "1703156006669390",
"weight": "7",
"direction": "Outbound",
"action": "Deny",
"protocol": "icmp",
"remote_ip": "",
"local_port": "",
"switch_name": "public_net",
"service_type": "server",
"service_id": "9406",
"create_time": "2021-06-21 14:15:40",
"status": "1",
"strategy_type": "2",
"master_strategy_id": "66",
"message": "\u88ab\u63a7\u6570\u636e\u683c\u5f0f\u5f02\u5e38",
"is_agent": "0"
}
],
"port":[
{
"id":"1032",
"public_ip":"172.23.8.151",
"public_port":"10031",
"local_ip":"152.152.1.3",
"local_port":"22",
"protocol":"tcp,udp",
"create_time":"2021-08-11 14:35:35",
"is_deleted":"0",
"is_used":"1",
"guid":"d1424916-613d-43a9-9754-1029e74975ad",
"service_id":"9519",
"service_type":"1",
"controller_guid":"1695712043844187",
"remark":"\u8fdc\u7a0b\u767b\u9646\u7aef\u53e3"
}
]
}
}
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
json |
json |
返回的可用区结构体 |
data.pages |
string |
1 |
页码数 |
data.items |
string |
300 |
总条数 |
data.servers |
json |
{} |
业务信息的集合 可能存在多个数据,下标从0开始 |
data.servers.line_guid |
string |
1652433150648938 |
线路guid |
data.servers.lineID |
string |
1000 |
特殊线路id |
data.servers.systemID |
string |
1693649208369344 |
操作系统GUID |
data.servers.ip |
string |
11.23.35.3 |
业务ip |
data.servers.cpu |
string |
1 |
业务CPU 1核 |
data.servers.memory |
string |
1 |
内存 1G |
data.servers.harddisks |
string |
10 |
磁盘大小 |
data.servers.bandwidth |
string |
1 |
带宽1M |
data.servers.defense |
string |
10 |
防御 10G |
data.servers.loginName |
string |
root |
远程登陆用户名称 |
data.servers.buyTime |
string |
2021-08-16 11:06:30 |
购买日期 |
data.servers.endTime |
string |
2021-09-16 11:06:30 |
业务结束日期 |
data.servers.orderStatus |
string |
1 |
业务状态:-2 已删除;-1 已回收;0 开通中;1 正常;2 过户中(针对代理平台,过户中的机器不可以做任何操作);3 已过期 ;4 已退款(针对代理平台) |
data.servers.runStatus |
string |
1 |
运行状态:-2 已锁定(关机状态,不能自行启动,用于过期、管理员锁定,可设置几天后自动解锁);-1 已关机;1 运行中 |
data.servers.actStatus |
string |
0 |
操作状态:-9 密码重设失败;-5 重启失败(软重启);-4 关机失败(软关机);-3 启动失败;-2 VNC重设失败;0 正常;2 VNC重设中;3 启动中;4 关机中;5 重启中;6 升级中;7 续费中;8 重装中;9 密码重设中;11 降配中 |
data.servers.syncStatus |
string |
1 |
同步状态 0未同步 1已同步 |
data.servers.snapStatus |
string |
0 |
快照状态 快照状态 0正常 1快照中 2恢复中 3删除中 |
data.servers.blackHoleStatus |
string |
1 |
IP异常状态:0正常 , 1异常 |
data.servers.blockStatus |
string |
1 |
黑洞状态:0 正常 , 1黑洞中 |
data.servers.vps_guid |
string |
6d59fe47-2e8c-4228-893c-9a02c2eb7b82 |
宿主机中唯一性的id,hyper为标准36位guid格式 |
data.servers.vnc_port |
string |
59003 |
vnc端口 |
data.servers.share_type |
string |
0 |
共享类型 1共享 0 独享 |
data.servers.login_port |
string |
80 |
远程登陆端口 |
data.servers.in_bandwidth |
string |
10 |
下行带宽值 10M |
data.servers.guid |
string |
10 |
业务GUID |
data.servers.master_id |
string |
83 |
内部特殊id |
data.servers.is_cdn_bind |
string |
0 |
是否支持cdn控制器绑定域名 0.不支持 1.支持' |
data.servers.cdn_cname_domain |
string |
www.zkeys.com |
cdn绑定域名的名称 |
data.servers.cdn_domain_max_num |
string |
1 |
最多可绑定域名个数 |
data.servers.pppoe_account |
string |
zkeys_pppoe |
拨号用户名称(共享业务专用) |
data.servers.share_ip |
string |
11.23.35.3:80 |
下级IP使用 如果线路开启别称或者为共享时 则使用该字段显示公网ip |
data.servers.system_guid |
string |
1693649208369344 |
操作系统GUID |
data.servers.sid |
string |
9527 |
别称id |
data.servers.localIP |
string |
10.23.35.3 |
内网ip |
data.servers.append_ip |
array |
[] |
附加ip 可能存在多个 |
data.servers.append_ip.ip |
string |
192.168.1.75 |
附加ip |
data.servers.append_ip.create_time |
string |
192.168.1.75 |
附加ip创建时间 |
data.servers.append_ip.delete_time |
string |
192.168.1.75 |
附加ip删除时间 |
data.servers.securityPolicyList |
array |
[] |
安全策略信息 可能存在多个 |
data.servers.securityPolicyList.id |
string |
1 |
特殊id |
data.servers.securityPolicyList.name |
string |
流入80端口 |
自定义规则名称 |
data.servers.securityPolicyList.guid |
string |
1707763642659694 |
guid 单条记录的唯一表示 |
data.servers.securityPolicyList.weight |
string |
7 |
权重优先级,必须数字,数字大的优先执行,不可重复 |
data.servers.securityPolicyList.direction |
enum |
Both |
方向:[入方向 Inbound/出方向 Outbound/双方向 Both] |
data.servers.securityPolicyList.action |
enum |
Allow |
行为: [拒绝 Deny/允许 Allow] |
data.servers.securityPolicyList.protocol |
string |
tcp |
协议类型 TCP、UDP、ICMP、自定义 (不限制大小写) |
data.servers.securityPolicyList.remote_ip |
string |
155.25.2.0/24 |
远程IP地址 默认为空可以为单个IP也可以为IP网段 |
data.servers.securityPolicyList.local_port |
string |
0 |
本地端口 默认值为0 ,0表示所有,也可以 5-15的格式 |
data.servers.securityPolicyList.switch_name |
string |
0 |
网卡名称 默认为空 |
data.servers.securityPolicyList.service_type |
string |
server |
服务类型 server云服务器 |
data.servers.securityPolicyList.service_id |
string |
9461 |
服务器id |
data.servers.securityPolicyList.create_time |
string |
2021-08-11 10:52:04 |
规则创建日期 |
data.servers.securityPolicyList.status |
string |
1 |
状态值 1 正常 0 异常 -1删除 |
data.servers.securityPolicyList.strategy_type |
string |
1 |
策略类型:1,普通策略;2,预设策略' |
data.servers.securityPolicyList.master_strategy_id |
string |
1 |
预设策略id |
data.servers.securityPolicyList.message |
string |
|
策略创建信息时返回的信息 默认为空 |
data.servers.securityPolicyList.is_agent |
string |
1 |
是否api创建 1 是 0 不是 |
data.servers.port |
array |
[] |
共享业务的端口转发记录 |
data.servers.port.id |
string |
123 |
端口转发的特殊id |
data.servers.port.public_ip |
string |
172.23.8.151 |
公网ip |
data.servers.port.public_port |
string |
10031 |
公网端口 |
data.servers.port.local_ip |
string |
152.152.1.3 |
内网ip |
data.servers.port.local_ip |
string |
152.152.1.3 |
内网ip |
data.servers.port.local_port |
string |
8080 |
内网开放端口 |
data.servers.port.protocol |
string |
tcp,udp |
端口协议 |
data.servers.port.create_time |
string |
2021-08-16 17:42:04 |
端口创建时间 |
data.servers.port.is_deleted |
string |
0 |
是否被删除 1,删除 0 未删除 |
data.servers.port.is_used |
string |
1 |
是否被使用 1,被使用 0,未被使用 |
data.servers.port.guid |
string |
3045ac3d-3cd8-480e-872f-778900c46dad |
端口转发记录的唯一Guid |
data.servers.port.remark |
string |
端口80 |
备注 |
data.servers.port.service_id |
string |
9519 |
服务特殊id |
业务操作
创建
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
create_new |
接口名称 |
lineid |
是 |
string |
28 |
线路GID 可以在获取线路接口得到 |
cpu |
是 |
string |
4 |
CPU大小,单位核,共5个值可选:1/2/4/8/16 |
memory |
是 |
string |
8 |
内存大小,单位GB,根据CPU值不同可选值不同,1/2/4/8/16/32/64 |
harddisks |
是 |
string |
10,20 |
磁盘大小,多个磁盘用半角逗号分隔。 |
bandwidth |
是 |
string |
2 |
带宽大小,单位M |
defense |
是 |
string |
20 |
防御大小,单位G |
systemID |
是 |
string |
1665904693989817 |
操作系统的GUID,可以在同步操作系统接口中获取,16位字符串 |
password |
否 |
string |
d3d3Lm5pYW95dW4uY29t |
由BASE64编码 1,(zkeys与niaoyun线路)必须包含字母及数字,长度为8-30位,可包含特殊字符()`!@#$%^-+={}[]:;,.?/;2,(baidu下线路)密码长度8-15位,由英文字母、数字和特殊符号组成,且必须包含字母、数字及特殊符号,特殊符号支持如下:!@#$%^();3,(腾讯云线路)密码长度12-30位,由英文字母、数字和特殊符号组成,且必须包含大小写字母、数字及特殊符号,特殊符号支持如下:()`!@#$%^&*-+= |
months |
是 |
string |
12 |
购买月数,1/2/3/4/5/6/7/8/9/12/24/36 |
num |
是 |
string |
1 |
购买数量 |
clientUserID |
是 |
string |
10 |
终端用户ID |
clientOrderNo |
是 |
string |
790528221561598011 |
合作订单号,小于等于20位 |
clientPrice |
否 |
string |
11 |
(可选)终端用户的购买价格,当此价格低于API结算价格时返回错误 |
返回JSON示例
{
"code": 0,
"message": "success",
"data": {
"servers": [
{
"guid": "1708214641590230",
"ip": "192.23.18.15",
"localIP": "10.23.18.15",
"cpu": 1,
"memory": 1,
"harddisks": "10",
"bandwidth": "1",
"defense": "0",
"buyTime": "2021-08-16 10:20:29",
"endTime": "2021-09-16 10:20:29",
"pppoe_account": "",
"pppoe_password": "",
"share_type": 0,
"login_port": "22",
"is_cdn_bind": 0,
"cdn_cname_domain": "",
"cdn_domain_max_num": 0,
"share_ip": "",
"c_path": "dm9sdW1lcy1wb29sL2t2bTU5NS5yYXc=",
"c_maxiops": "0",
"disks_path": "dm9sdW1lcy1wb29sL2t2bTU5NS0yLnJhdw==",
"disks_maxiops": "0",
"cpu_limit": "100",
"ram_start": "0",
"memory_dynamic": "0"
}
]
}
}
返回值
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
json |
json |
返回的可用区结构体 |
data.servers |
array |
[] |
业务实例对象,同时开通多个业务时,返回多个对象 |
data.servers.guid |
string |
1708214641590230 |
业务GUID |
data.servers.ip |
string |
192.23.18.15 |
业务ip |
data.servers.cpu |
int |
1 |
cpu 1核 |
data.servers.memory |
int |
1 |
内存 1G |
data.servers.harddisks |
string |
10 |
磁盘10G ,多块磁盘用逗号隔开 |
data.servers.bandwidth |
string |
1 |
带宽 1M |
data.servers.defense |
string |
0 |
防御 单位G |
data.servers.buyTime |
string |
2021-08-16 10:20:29 |
购买日期 |
data.servers.endTime |
string |
2021-09-16 10:20:29 |
业务到期日期 |
data.servers.pppoe_account |
string |
zkeys_pppoe |
拨号用户名称(共享业务专用) |
data.servers.pppoe_password |
string |
a123456 |
拨号用户密码(共享业务专用) |
data.servers.share_type |
string |
0 |
共享类型 0 独享 1共享 |
data.servers.login_port |
string |
22 |
业务的远程登陆端口 |
data.servers.is_cdn_bind |
string |
0 |
是否支持cdn控制器绑定域名 0.不支持 1.支持' |
data.servers.cdn_cname_domain |
string |
www.zkeys.com |
cdn绑定域名的名称 |
data.servers.cdn_domain_max_num |
string |
1 |
最多可绑定域名个数 |
data.servers.share_ip |
string |
www.zkeys.com:8888 |
共享业务时,使用的公网ip:端口 |
data.servers.c_path |
string |
dm9sdW1lcy1wb29sL2t2bTU5NS5yYXc= |
系统盘的路径,返回base64之后数据 |
data.servers.c_maxiops |
string |
0 |
系统磁盘的IOPS最大值,无需单位,0为不限制 |
data.servers.disks_path |
string |
dm9sdW1lcy1wb29sL2t2bTU5NS0yLnJhdw== |
系统盘路径,多个用逗号隔开,返回base64之后数据 |
data.servers.disks_maxiops |
string |
0 |
数据盘磁盘的IOPS设置,0为不限制,多个磁盘用半角逗号隔开,数量与harddisks对应 |
data.servers.cpu_limit |
string |
100 |
CPU限制 0或100为不限制 |
data.servers.ram_start |
string |
100 |
内存限制 0或100为不限制 |
data.servers.memory_dynamic |
string |
0 |
动态内存 0否 1是 |
关机
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
stop |
软关机 处于关机中时,禁止其它操作; 关机状态下 禁止关机,重启,过户操作 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
硬关机
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
stop_h |
强制关机 处于关机中时,禁止其它操作;关机状态下 禁止关机,重启,过户操作 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
启动
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
start |
启动 处于启动中时,禁止其它操作 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
重启
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
restart |
软启动 处于启动中时,禁止其它操作 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
硬重启
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
restart_h |
强制启动 处于启动中时,禁止其它操作 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
获取VNC地址
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
getvncurl |
获取vnc地址,可以远程登陆使用 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": {
"url": "https://vnc.zkeys.com/vnc.php?sign=xxxxxxxxx"
}
}
返回值:
重置密码
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
setpsw |
设置远程登陆密码 |
password |
是 |
string |
setpsw |
base64_encode 之后的数据 密码规则参考购买 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
重置VNC密码
特殊说明
- 1,只有鸟云线路和zkeys线路允许该操作; 通过线路表中的 resources_type判断属于什么线路 2,查看当前线路是否开放改操作 reset_vnc_password; 3,orderstatus状态正常,才允许操作; 4,actstatus状态正常,才允许操作; 5,runstatus状态非锁定,才允许操作; 6,snapstatus快照状态正常,才允许操作;
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
setvnc |
设置vnc密码 |
password |
是 |
string |
setpsw |
base64_encode 之后的数据 密码规则参考购买 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
重装
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
install |
重装 重装中的业务 不能进行其它操作,存在快照的情况下,不允许重装 |
systemID |
是 |
string |
2208417546192729 |
操作系统GUID |
password |
是 |
string |
setpsw |
base64_encode 之后的数据 密码规则参考购买 |
guid |
是 |
1708217536092719 |
1 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
获取快照列表
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
listsnapshot |
获取快照 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": {
"snapshottree": "=twqag,twqag=yegta",
"snapshotlist": [
{
"name": "twqag",
"create_time": "2021-08-16 16:17:23",
"end_time": "2021-08-23 16:17:23",
"status": "1",
"current": 0,
"parent_name": ""
},
{
"name": "yegta",
"create_time": "2021-08-16 16:38:00",
"end_time": "2021-08-23 16:38:00",
"status": "1",
"current": 1,
"parent_name": "twqag"
}
]
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
data.snapshottree |
string |
=twqag,twqag=yegta |
快照树名称 =twqag 表示顶级,没有上级 twqag=yegta 表示twqag是yegta的上级 |
data.snapshotlist |
array |
[]] |
列表数据 |
data.snapshotlist.name |
string |
yegta |
快照名称 |
data.snapshotlist.create_time |
string |
2021-08-16 16:38:00 |
开始时间 |
data.snapshotlist.end_time |
string |
2021-08-23 16:38:00 |
结束时间 |
data.snapshotlist.status |
string |
1 |
表示正常 |
data.snapshotlist.current |
string |
1 |
0 表示顶级 1表示下一级 |
data.snapshotlist.parent_name |
string |
twqag |
父类的名称 |
创建快照
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
createsnapshot |
创建快照 |
agent_order_no |
是 |
string |
650682444529030123 |
客户端订单号 |
days |
是 |
string |
7 |
快照天数 |
months |
是 |
string |
1 |
快照月份数 与days二选一 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": {
"snapshotname": "ujerm",
"createtime": "2021-08-16 15:55:29",
"endtime": "2021-08-23 15:55:29"
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
data.snapshotname |
string |
ujerm |
快照名称 |
data.createtime |
string |
2021-08-16 15:55:29 |
快照创建日期 |
data.endtime |
string |
2021-08-23 15:55:29 |
快照结束日期 |
还原快照
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
revertsnapshot |
恢复快照 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
snapshotname |
是 |
string |
yegta |
快照名称 |
返回示例
{
"code":0,
"message":"success",
"data":{
"snapshotname":"yegta"
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
data.snapshotname |
string |
yegta |
恢复的快照名称 |
续费快照
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
renewsnapshot |
续费快照 |
agent_order_no |
是 |
string |
650682444529030123 |
客户端订单号 |
snapshotname |
是 |
string |
yegta |
续费快照名称 |
days |
是 |
string |
7 |
快照天数 |
months |
是 |
string |
1 |
快照月份数 与days二选一 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": {
"snapshotname": "ujerm",
"createtime": "2021-08-16 15:55:29",
"endtime": "2021-08-23 15:55:29"
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
data.snapshotname |
string |
ujerm |
快照名称 |
data.createtime |
string |
2021-08-16 15:55:29 |
快照创建日期 |
data.endtime |
string |
2021-08-23 15:55:29 |
快照结束日期 |
删除快照
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
removesnapshot |
删除快照 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
snapshotname |
是 |
string |
yegta |
快照名称 |
返回示例
{
"code":0,
"message":"success",
"data":{
"snapshotname":"yegta"
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
data.snapshotname |
string |
yegta |
恢复的快照名称 |
升级
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
upgrade |
升级 |
password |
是 |
string |
setpsw |
base64_encode 之后的数据 密码规则参考购买 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
cpu |
是 |
string |
2 |
升级后的cpu配置 |
memory |
是 |
string |
2 |
升级后的内存配置 |
harddisks |
是 |
string |
10,10 |
升级后的磁盘配置 原磁盘一块 10G , 10,10表示新增一块磁盘为10G的磁盘,如果在第一块上的磁盘大小上新增10G ,请求参数应该是20,10 |
bandwidth |
是 |
string |
2 |
升级后的带宽配置 |
defense |
是 |
string |
10 |
升级后的防御配置 |
clientOrderNo |
是 |
string |
980682449503309004 |
客户端订单号 |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
续费降配
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
renew_for_rd |
预约降配 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
cpu |
是 |
string |
2 |
降配后的cpu配置 |
memory |
是 |
string |
2 |
降配后的内存配置 |
bandwidth |
是 |
string |
2 |
降配后的带宽配置 |
defense |
是 |
string |
10 |
降配后的防御配置 |
clientOrderNo |
是 |
string |
980682449503309004 |
客户端订单号 |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
申请端口(共享业务专用)
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
create_port |
申请端口 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
remark |
是 |
string |
申请8080端口 |
申请备注 |
local_port |
是 |
string |
8080 |
开通的内网端口 范围:1,65535之间 |
service_type |
是 |
string |
1 |
类型 1云服务器 |
form |
是 |
string |
default |
来源 |
port_type |
是 |
string |
1 |
端口分配类型 1 不对等分配 2,对等分配 ;说明:对等分配表示公网随机端口与服务开放端口保持一致;不对等分配,就是公网端口随机 |
返回示例
{
"code":0,
"message":"success",
"data":{
"port_info":{
"id":"1036",
"public_ip":"172.23.8.151",
"public_port":"10033",
"local_ip":"152.152.1.3",
"local_port":"8080",
"protocol":"tcp,udp",
"create_time":"2021-08-16 17:42:04",
"is_deleted":"0",
"is_used":"1",
"guid":"3045ac3d-3cd8-480e-872f-778900c46dad",
"service_id":"9519",
"service_type":"1",
"controller_guid":"1695712043844187",
"remark":"\u7533\u8bf7\u516c\u7f51\u7aef\u53e3"
},
"share_ip":"putianyun.com"
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
data.port_info |
json |
{} |
开通的端口信息 |
data.port_info.id |
string |
1036 |
特殊id |
data.port_info.public_ip |
string |
172.23.8.151 |
公网ip |
data.port_info.public_port |
string |
10033 |
公网端口 |
data.port_info.local_ip |
string |
152.152.1.3 |
内网ip |
data.port_info.local_port |
string |
8080 |
内网开放端口 |
data.port_info.protocol |
string |
tcp,udp |
端口协议 |
data.port_info.create_time |
string |
2021-08-16 17:42:04 |
端口创建时间 |
data.port_info.is_deleted |
string |
0 |
是否被删除 1,删除 0 未删除 |
data.port_info.is_used |
string |
1 |
是否被使用 1,被使用 0,未被使用 |
data.port_info.guid |
string |
3045ac3d-3cd8-480e-872f-778900c46dad |
端口转发记录的唯一Guid |
data.port_info.share_ip |
string |
1 |
公网ip或者域名 |
删除端口(共享业务专用)
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
delete_port |
删除端口 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
port_guid |
是 |
string |
30298762-2b21-45e2-b547-06c2e17b44ca |
端口记录guid |
service_type |
是 |
string |
1 |
类型 1云服务器 |
form |
是 |
string |
default |
来源 |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
新增安全组
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
add_hardpolicy |
新增安全组 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
weight |
是 |
string |
1 |
权重 权重级别不能重复 |
name |
是 |
string |
开放3389端口 |
安全组名称 |
direction |
是 |
enum |
Inbound |
方向:[入方向 Inbound/出方向 Outbound/双方向 Both] |
protocol |
是 |
string |
tcp |
协议类型 TCP、UDP、ICMP、自定义 |
operation |
是 |
enum |
Allow |
行为: [拒绝 Deny/允许 Allow] |
remote_ip |
否 |
string |
127.0.0.1 |
远程IP地址 可以为单个IP也可以为IP网段 |
local_port |
否 |
string |
3389 |
本地端口 ,0表示所有,也可以 5-15的格式 |
返回示例
{
"code":0,
"message":"success",
"data":{
"policy_info":{
"id":"825",
"name":"\u5b89\u5168\u7ec41",
"guid":"1708300552317770",
"weight":"1",
"direction":"Inbound",
"action":"Allow",
"protocol":"tcp",
"remote_ip":"127.0.0.1",
"local_port":"3389",
"switch_name":"private_net",
"service_type":"server",
"service_id":"9519",
"create_time":"2021-08-17 09:06:01",
"status":"1",
"strategy_type":"1",
"master_strategy_id":"0",
"message":"",
"is_agent":"0"
}
}
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
data.policy_info |
json |
{} |
开通的端口信息 |
data.policy_info.id |
string |
1036 |
特殊id |
data.policy_info.name |
string |
开放3389端口 |
安全组名称 |
data.policy_info.weight |
string |
1 |
安全组权重 |
data.policy_info.direction |
enum |
Inbound |
方向:[入方向 Inbound/出方向 Outbound/双方向 Both] |
data.policy_info.action |
enum |
Allow |
行为: [拒绝 Deny/允许 Allow] |
data.policy_info.protocol |
string |
tcp,udp |
端口协议 |
data.policy_info.remote_ip |
string |
127.0.0.1 |
远程ip |
data.policy_info.local_port |
string |
3389 |
本地端口 |
data.policy_info.switch_name |
string |
private_net |
网卡名称 |
data.policy_info.service_type |
string |
server |
业务类型 |
data.policy_info.service_id |
string |
9519 |
业务id,本地需要替换成自己的业务id |
data.policy_info.create_time |
string |
2021-08-17 09:06:01 |
创建日期 |
data.policy_info.status |
string |
1 |
状态值 1 正常 0 异常 -1删除 |
data.policy_info.strategy_type |
string |
1 |
策略类型:1,普通策略;2,预设策略 |
data.policy_info.master_strategy_id |
string |
0 |
下级可忽略 |
data.policy_info.message |
string |
0 |
策略创建信息 |
data.policy_info.is_agent |
string |
0 |
是否api请求 |
删除安全组
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
del_hardpolicy |
删除安全组 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
policy_guid |
是 |
string |
1708300552317770 |
安全组GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
|
续费
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
renew |
续费 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
months |
是 |
string |
1 |
续费的月份数 |
client_end_time |
是 |
string |
2021-09-11 14:35:34 |
续费后到期时间 |
clientOrderNo |
是 |
string |
800682511569178001 |
客户端订单号 |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |
退款
请求参数
参数 |
必选 |
类型 |
示例值 |
说明 |
action |
是 |
string |
refund |
退款 |
guid |
是 |
string |
1708217536092719 |
业务GUID |
返回示例
{
"code": 0,
"message": "success",
"data": []
}
返回值:
参数 |
类型/长度 |
示例值 |
说明 |
code |
int |
0 |
返回状态 0:成功 , 1:失败 |
message |
string |
success |
反馈信息 |
data |
array |
array |
一般为空 |