硅云帮助文档中心
搜索文档
热门搜索词:
产品简介
产品定价
入门指南
经典案例
常见问题
知识拓展
API参考
创建实例
创建实例,此接口会自动从用户余额中扣除创建实例所需的费用
/vhost-server/api/v1/host/create
POST
字段 | 类型 | 最大长度 | 参数位置 | 默认必填 | 描述 |
productId | string | 32 | RequestBody | 产品规格id | |
hostPass | string | RequestBody | 需要加密,加密规则参考通用说明,密码规则:4到14个数字和英文字母组合,数字字母需要同时存在 | ||
month | int | 10 | RequestBody | 购买月份数,一年传12 | |
idempotent | string | 64 | RequestBody | 选填 | 幂等Id,防止创建成功但超时的情况,当传递相同的idempotent时,无论调用多少次,只会创建成功一次,建议传递uuid,和续费,升级操作不隔离 |
POST /vhost-server/api/v1/host/create HTTP/1.1 Content-Type: application/json request_id: 2942183558593ffc9d75fb8e16793ff api_key: 1706006863049654272 signature: c11864d797c86d658a225f9276c08089caa1a463cafc2baf93c30b808e7af4b9 Content-Type: application/json { "productId":"hk-ph1x", "hostPass":"7qzmggdAVU9RZzKuEv2Qrw==", "month":1, "idempotent":"123" }
data返回虚拟主机实例,实际以真实返回结果为准
{ "status": 2000, "message": "success", "data": { "userAccount": "z8z87878", "productName": "香港普惠一型", "resourceId": "hk-node1", "resourceName": "香港节点一", "hostType": "hk-ph", "hostTypeName": "香港普惠型", "productId": "hk-ph1x", "areaName": "香港一区", "areaMark": "hk-1", "beginTime": 1589352288000, "endTime": 1594622688000, "status": "OK", "hostName": "cvh-3hdr7uz22s223", "latestOrderId": "1706556457795452929", "ipList": "192.168.32.2", "ipV6": "", "cnDomain": "test.cn.name", "autoRenew": false, "systemInfo": "Linux-PHP版", "supportNoReasonRefund": false, "refundStatus": "NONE", "configuration": "", "createTime": 1589352289658, "updateTime": 1589356803423, "id": "cvh-3hdr7uz22s223" } }
实例数据结构:
字段 | 类型 | 描述 |
id | string | 实例id |
userAccount | string | 用户名 |
status | string | 实例状态 |
ipList | string | ip |
cnDomain | string | 别名 |
您对该文档有什么建议?
本文导航