私有网络列表

接口地址
https://api3.verycloud.cn/API/instance/networkList
HTTP请求方式
POST
请求参数
名称 类型 必须 说明
token string 密钥
id int 私有网络ID
nodeid int 数据中心ID
page int 页码
limit int 每页数量
请求示例
curl -i -X POST https://api3.verycloud.cn/API/instance/networkList 
 -H "Accept: application/json" 
 -H "Content-Type: application/json; charset=utf-8" 
 -d '{"token": "5d8531de68ae272eacb8670afe084d60", "limit": 30, "page": 1}'
响应示例
{
     "code": 1,
     "message": "操作完成",
     "data": [
         {
             "id": "1201258693",
             "vxnet_id": "vxnet-zn0q1cx2",
             "name": "测试名称",
             "uid": "6894145896",
             "username": "example_user",
             "node": {
                 "id": "1234569875",
                 "areaname": "江阴1区"
            },
             "tag": "716",
             "note": "对公司的风格",
             "num": "0",
             "createtime": "2015/03/18 12:03",
             "createtime_ago": "21小时前"
        }        
    ],
     "limit": 30,
     "page": 1,
     "total": 1,
     "totalpage": 1
}

创建私有网络

接口地址
https://api3.verycloud.cn/API/instance/networkAdd
HTTP请求方式
POST
请求参数
名称 类型 必须 说明
token string 密钥
nodeid int 数据中心ID
name string 名称
note string 备注
请求示例
curl -i -X POST https://api3.verycloud.cn/API/instance/networkAdd 
 -H "Accept: application/json" 
 -H "Content-Type: application/json; charset=utf-8" 
 -d '{"token": "5d8531de68ae272eacb8670afe084d60", "nodeid": 1234567890, "name": "测试", "note": "备注"}'
响应示例
{
     "code": 1,
     "message": "操作完成",
     "data": {
         "id": "1234567890",
         "nodeid": "1234567890",
         "name": "测试名称",
         "tag": "718",
         "note": "备注",
         "createtime": "1426731117",
         "vxnet_id": "vxnet-w4okkhcn"
    }    
}

更新私有网络

接口地址
https://api3.verycloud.cn/API/instance/networkUpdate
HTTP请求方式
POST
请求参数
名称 类型 必须 说明
token string 密钥
id int 私有网络ID
name string 名称
note string 备注
请求示例
curl -i -X POST https://api3.verycloud.cn/API/instance/networkUpdate 
 -H "Accept: application/json" 
 -H "Content-Type: application/json; charset=utf-8" 
 -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890, "name": "测试更新", "note": "备注"}'
响应示例
{
     "code": 1,
     "message": "操作完成",
     "data": {
         "id": "1234567890",
         "nodeid": "1234567890",
         "name": "测试更新",
         "tag": "718",
         "note": "备注",
         "createtime": "1426731117",
         "vxnet_id": "vxnet-w4okkhcn"
    }    
}

删除私有网络

接口地址
https://api3.verycloud.cn/API/instance/networkDelete
HTTP请求方式
POST
请求参数
名称 类型 必须 说明
token string 密钥
id int 私有网络ID
请求示例
curl -i -X POST https://api3.verycloud.cn/API/instance/networkDelete 
 -H "Accept: application/json" 
 -H "Content-Type: application/json; charset=utf-8" 
 -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890}'
响应示例
{
     "code": 1,
     "message": "操作完成",
     "data": {
         "vxnet_id": "vxnet-w4okkhcn"
    }    
}

加入私有网络

接口地址
https://api3.verycloud.cn/API/instance/joinVxnet
HTTP请求方式
POST
请求参数
名称 类型 必须 说明
token string 密钥
id int 私有网络ID
iid int 云主机ID
请求示例
curl -i -X POST https://api3.verycloud.cn/API/instance/joinVxnet 
 -H "Accept: application/json" 
 -H "Content-Type: application/json; charset=utf-8" 
 -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890, "iid": 1234567890}'
响应示例
{
     "code": 1,
     "message": "操作完成",
     "data": {
         "vxnet_id": "vxnet-zn0q1cx2",
         "instance_id": "i-nh0qseft"
    }    
}

移出私有网络

接口地址
https://api3.verycloud.cn/API/instance/leaveVxnet
HTTP请求方式
POST
请求参数
名称 类型 必须 说明
token string 密钥
id int 云主机ID
请求示例
curl -i -X POST https://api3.verycloud.cn/API/instance/leaveVxnet 
 -H "Accept: application/json" 
 -H "Content-Type: application/json; charset=utf-8" 
 -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890}'
响应示例
{
     "code": 1,
     "message": "操作完成",
     "data": {
         "vxnet_id": "vxnet-zn0q1cx2",
         "instance_id": "i-nh0qseft"
    }    
}