主题
魔方DCIM代理(自定义配置)-前台
获取订购页面配置
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取订购页面配置 |
| 接口地址 | /console/v1/product/:id/remf_dcim/order_page |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 商品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| data_center[].id | int | - | 国家ID |
| data_center[].iso | string | - | 图标 |
| data_center[].name | string | - | 名称 |
| data_center[].city[].name | string | - | 城市 |
| data_center[].city[].area[].id | int | - | 数据中心ID |
| data_center[].city[].area[].name | string | - | 区域 |
| data_center[].city[].area[].line[].id | int | - | 线路ID |
| data_center[].city[].area[].line[].name | string | - | 线路名称 |
| data_center[].city[].area[].line[].data_center_id | int | - | 数据中心ID |
| data_center[].city[].area[].line[].bill_type | string | - | 计费类型(bw=带宽计费,flow=流量计费) |
| model_config[].id | int | - | 型号配置ID |
| model_config[].name | string | - | 型号配置名称 |
| model_config[].cpu | string | - | 处理器 |
| model_config[].cpu_param | string | - | 处理器参数 |
| model_config[].memory | string | - | 内存 |
| model_config[].disk | string | - | 硬盘 |
| model_config[].support_optional | int | - | 允许增值选配(0=不允许,1=允许) |
| model_config[].optional_only_for_upgrade | int | - | 增值仅用于升降级(0=关闭,1=开启) |
| model_config[].leave_memory | int | - | 剩余内存 |
| model_config[].max_memory_num | int | - | 可增加内存数量 |
| model_config[].max_disk_num | int | - | 可增加硬盘数量 |
| model_config[].gpu | string | - | 显卡 |
| model_config[].max_gpu_num | int | - | 可增加显卡数量 |
| model_config[].optional_memory[].id | int | - | 选配内存配置ID |
| model_config[].optional_memory[].value | string | - | 选配内存配置名称 |
| model_config[].optional_memory[].other_config.memory | int | - | 选配内存大小 |
| model_config[].optional_memory[].other_config.memory_slot | int | - | 选配内存插槽 |
| model_config[].optional_disk[].id | int | - | 选配硬盘配置ID |
| model_config[].optional_disk[].value | string | - | 选配硬盘配置名称 |
| model_config[].optional_gpu[].id | int | - | 选配显卡配置ID |
| model_config[].optional_gpu[].value | string | - | 选配显卡配置名称 |
| config_limit[].data_center_id | int | - | 数据中心ID |
| config_limit[].line_id | int | - | 线路ID |
| config_limit[].min_bw | string | - | 带宽最小值 |
| config_limit[].max_bw | string | - | 带宽最大值 |
| config_limit[].min_flow | string | - | 流量最小值 |
| config_limit[].max_flow | string | - | 流量最大值 |
| config_limit[].model_config_id | array | - | 型号配置ID |
获取操作系统列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取操作系统列表 |
| 接口地址 | /console/v1/product/:id/remf_dcim/image |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 商品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list[].id | int | - | 操作系统分类ID |
| list[].name | string | - | 操作系统分类名称 |
| list[].icon | string | - | 操作系统分类图标 |
| list[].image[].id | int | - | 操作系统ID |
| list[].image[].image_group_id | int | - | 操作系统分类ID |
| list[].image[].name | string | - | 操作系统名称 |
| list[].image[].charge | int | - | 是否收费(0=否,1=是) |
| list[].image[].price | string | - | 价格 |
| list[].image[].price_client_level_discount | string | - | 价格等级折扣 |
获取商品配置所有周期价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取商品配置所有周期价格 |
| 接口地址 | /console/v1/product/:id/remf_dcim/duration |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 商品ID |
| model_config_id | int | - | - | 型号配置ID |
| optional_memory | object | - | - | 选配内存(如{"5":"12"},5是选配内存配置ID,12是数量) |
| optional_disk | object | - | - | 选配硬盘(如{"5":"12"},5是选配硬盘配置ID,12是数量) |
| optional_gpu | object | - | - | 选配显卡(如{"5":"12"},5是选配显卡配置ID,12是数量) |
| image_id | int | - | - | 镜像ID |
| line_id | int | - | - | 线路ID |
| bw | int | - | - | 带宽(带宽线路) |
| flow | int | - | - | 流量(流量线路) |
| ip_num | int | - | - | 公网IP数量 |
| peak_defence | int | - | - | 防御峰值 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| [].id | int | - | 周期ID |
| [].name | string | - | 周期名称 |
| [].price | string | - | 周期总价 |
| [].discount | float | - | 折扣(0=没有折扣) |
| [].num | int | - | 周期时长 |
| [].unit | string | - | 单位(hour=小时,day=天,month=月) |
| [].client_level_discount | string | - | 用户等级折扣 |
| [].price_client_level_discount | string | - | 价格用户等级折扣 |
获取线路配置
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取线路配置 |
| 接口地址 | /console/v1/product/:id/remf_dcim/line/:line_id |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 商品ID |
| line_id | int | - | require | 线路ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| bill_type | string | - | 计费类型(bw=带宽,flow=流量) |
| bw[].type | string | - | 配置方式(radio=单选,step=阶梯,total=总量) |
| bw[].value | string | - | 带宽 |
| bw[].min_value | int | - | 最小值 |
| bw[].max_value | int | - | 最大值 |
| bw[].step | int | - | 步长 |
| flow[].value | string | - | 流量(流量线路) |
| defence[].value | string | - | 防御 |
| ip[].value | string | - | 公网IP值 |
| ip[].desc | string | - | 公网IP显示 |
产品列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品列表 |
| 接口地址 | /console/v1/remf_dcim |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| page | int | 1 | - | 页数 |
| limit | int | - | - | 每页条数 |
| orderby | string | - | - | 排序(id,due_time,status) |
| sort | string | - | - | 升/降序 |
| keywords | string | - | - | 关键字搜索:商品名称/产品名称/IP |
| country_id | int | - | - | 搜索:国家ID |
| city | string | - | - | 搜索:城市 |
| area | string | - | - | 搜索:区域 |
| status | string | - | - | 产品状态(Unpaid=未付款,Pending=开通中,Active=已开通,Suspended=已暂停,Deleted=已删除) |
| tab | string | - | - | 状态using使用中expiring即将到期overdue已逾期deleted已删除 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | 列表数据 |
| list[].id | int | - | 产品ID |
| list[].product_id | int | - | 商品ID |
| list[].name | string | - | 产品标识 |
| list[].status | string | - | 产品状态(Unpaid=未付款,Pending=开通中,Active=已开通,Suspended=已暂停,Deleted=已删除) |
| list[].active_time | int | - | 开通时间 |
| list[].due_time | int | - | 到期时间 |
| list[].client_notes | string | - | 用户备注 |
| list[].product_name | string | - | 商品名称 |
| list[].country | string | - | 国家 |
| list[].country_code | string | - | 国家代码 |
| list[].country_id | int | - | 国家ID |
| list[].city | string | - | 城市 |
| list[].area | string | - | 区域 |
| list[].power_status | string | - | 电源状态(on=开机,off=关机,operating=操作中,fault=故障) |
| list[].image_name | string | - | 镜像名称 |
| list[].image_icon | string | - | 镜像图标(Windows,CentOS,Ubuntu,Debian,ESXi,XenServer,FreeBSD,Fedora,ArchLinux,Rocky,AlmaLinux,OpenEuler,RedHat,其他) |
| list[].ip_num | int | - | IP数量 |
| list[].dedicate_ip | string | - | 主IP |
| list[].assign_ip | string | - | 附加IP(英文逗号分隔) |
| list[].self_defined_field | object | - | 自定义字段值(键是自定义字段ID,值是填的内容) |
| list[].is_auto_renew | int | - | 是否自动续费(0=否,1=是) |
| count | int | - | 总条数 |
| using_count | int | - | 使用中产品数量 |
| expiring_count | int | - | 即将到期产品数量 |
| overdue_count | int | - | 已逾期产品数量 |
| deleted_count | int | - | 已删除产品数量 |
| all_count | int | - | 全部产品数量 |
| data_center[].country_id | int | - | 国家ID |
| data_center[].city | string | - | 城市 |
| data_center[].area | string | - | 区域 |
| data_center[].country_name | string | - | 国家 |
| data_center[].country_code | string | - | 国家代码 |
| self_defined_field[].id | int | - | 自定义字段ID |
| self_defined_field[].field_name | string | - | 自定义字段名称 |
| self_defined_field[].field_type | string | - | 字段类型(text=文本框,link=链接,password=密码,dropdown=下拉,tickbox=勾选框,textarea=文本区) |
获取DCIM产品详情
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取DCIM产品详情 |
| 接口地址 | /console/v1/remf_dcim/:id |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| order_id | int | - | 订单ID |
| ip | string | - | IP地址 |
| additional_ip | string | - | 附加IP(英文分号分割) |
| power_status | string | - | 电源状态(on=开机,off=关机,operating=操作中,fault=故障) |
| model_config.id | int | - | 型号配置ID |
| model_config.name | string | - | 型号配置名称 |
| model_config.cpu | string | - | 处理器 |
| model_config.cpu_param | string | - | 处理器参数 |
| model_config.memory | string | - | 内存 |
| model_config.disk | string | - | 硬盘 |
| model_config.gpu | string | - | 显卡 |
| model_config.optional_memory[].id | int | - | 可选配内存配置ID |
| model_config.optional_memory[].value | string | - | 名称 |
| model_config.optional_memory[].other_config.memory_slot | int | - | 槽位 |
| model_config.optional_memory[].other_config.memory | int | - | 内存大小(GB) |
| model_config.optional_disk[].id | int | - | 可选配硬盘配置ID |
| model_config.optional_disk[].value | string | - | 名称 |
| model_config.optional_gpu[].id | int | - | 可选配显卡配置ID |
| model_config.optional_gpu[].value | string | - | 名称 |
| model_config.leave_memory | int | - | 当前机型剩余内存大小(GB) |
| model_config.max_memory_num | int | - | 当前机型可增加内存数量 |
| model_config.max_disk_num | int | - | 当前机型可增加硬盘数量 |
| model_config.max_gpu_num | int | - | 当前机型可增加显卡数量 |
| line.id | int | - | 线路 |
| line.name | string | - | 线路名称 |
| line.bill_type | string | - | 计费类型(bw=带宽,flow=流量) |
| bw | string | - | 带宽(0表示没有) |
| ip_num | string | - | IP数量 |
| peak_defence | string | - | 防御峰值 |
| username | string | - | 用户名 |
| password | string | - | 密码 |
| data_center.id | int | - | 数据中心ID |
| data_center.city | string | - | 城市 |
| data_center.area | string | - | 区域 |
| data_center.country | string | - | 国家 |
| data_center.iso | string | - | 国家代码 |
| image.id | int | - | 镜像ID |
| image.name | string | - | 镜像名称 |
| image.image_group_name | string | - | 镜像分类 |
| image.icon | string | - | 图标 |
| config.reinstall_sms_verify | int | - | 重装短信验证(0=不启用,1=启用) |
| config.reset_password_sms_verify | int | - | 重置密码短信验证(0=不启用,1=启用) |
| config.manual_resource | int | - | 是否手动资源(0=不启用,1=启用) |
| optional_memory | object | - | 当前机器已添加内存配置({"5":1},5是ID,1是数量) |
| optional_disk | object | - | 当前机器已添加硬盘配置({"5":1},5是ID,1是数量) |
| optional_gpu | object | - | 当前机器已添加显卡配置({"5":1},5是ID,1是数量) |
获取部分详情
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取部分详情 |
| 接口地址 | /console/v1/remf_dcim/:id/part |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| data_center.id | int | - | 数据中心ID |
| data_center.city | string | - | 城市 |
| data_center.area | string | - | 区域 |
| data_center.country | string | - | 国家 |
| data_center.iso | string | - | 图标 |
| ip | string | - | IP地址 |
| power_status | string | - | 电源状态(on=开机,off=关机,operating=操作中,fault=故障) |
| image.id | int | - | 镜像ID |
| image.name | string | - | 镜像名称 |
| image.image_group_name | string | - | 镜像分类 |
| image.icon | string | - | 图标 |
开机
| 项目 | 内容 |
|---|---|
| 接口描述 | 开机 |
| 接口地址 | /console/v1/remf_dcim/:id/on |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
关机
| 项目 | 内容 |
|---|---|
| 接口描述 | 关机 |
| 接口地址 | /console/v1/remf_dcim/:id/off |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
重启
| 项目 | 内容 |
|---|---|
| 接口描述 | 重启 |
| 接口地址 | /console/v1/remf_dcim/:id/reboot |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
批量操作
| 项目 | 内容 |
|---|---|
| 接口描述 | 批量操作 |
| 接口地址 | /console/v1/remf_dcim/batch_operate |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | array | - | require | 产品ID |
| action | string | - | require | 动作on开机off关机reboot重启 |
响应参数
无
获取控制台地址
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取控制台地址 |
| 接口地址 | /console/v1/remf_dcim/:id/vnc |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| more | int | 0 | - | 获取更多信息(0=否,1=是) |
响应参数
| name | type | default | desc |
|---|---|---|---|
| url | string | - | 控制台地址 |
| vnc_url | string | - | 控制台websocket地址(more=1返回) |
| vnc_pass | string | - | vnc密码(more=1返回) |
| password | string | - | 机器密码(more=1返回) |
| token | string | - | 控制台页面令牌(more=1返回) |
控制台页面
| 项目 | 内容 |
|---|---|
| 接口描述 | 控制台页面 |
| 接口地址 | /console/v1/remf_dcim/:id/vnc |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| tmp_token | string | - | require | 控制台页面令牌 |
响应参数
无
重启VNC
| 项目 | 内容 |
|---|---|
| 接口描述 | 重启VNC |
| 接口地址 | /console/v1/remf_dcim/:id/vnc/restart |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
获取实例状态
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取实例状态 |
| 接口地址 | /console/v1/remf_dcim/:id/status |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| data.status | string | - | 实例状态(on=开机,off=关机,operating=操作中,fault=故障) |
| data.desc | string | - | 实例状态描述 |
重置密码
| 项目 | 内容 |
|---|---|
| 接口描述 | 重置密码 |
| 接口地址 | /console/v1/remf_dcim/:id/reset_password |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| password | string | - | require | 新密码 |
响应参数
无
救援模式
| 项目 | 内容 |
|---|---|
| 接口描述 | 救援模式 |
| 接口地址 | /console/v1/remf_dcim/:id/rescue |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| type | int | - | require | 指定救援系统类型(1=windows,2=linux) |
响应参数
无
退出救援模式
| 项目 | 内容 |
|---|---|
| 接口描述 | 退出救援模式 |
| 接口地址 | /console/v1/remf_cloud/:id/rescue/exit |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| client_operate_password | string | - | - | 操作密码,需要验证时传 |
响应参数
无
重装系统
| 项目 | 内容 |
|---|---|
| 接口描述 | 重装系统 |
| 接口地址 | /console/v1/remf_dcim/:id/reinstall |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| image_id | int | - | require | 镜像ID |
| password | string | - | require | 密码 |
| port | int | - | require | 端口 |
| part_type | int | - | require | 分区类型0全盘格式化1第一分区格式化 |
响应参数
无
获取图表数据
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取图表数据 |
| 接口地址 | /console/v1/remf_dcim/:id/chart |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| start_time | int | - | - | 开始秒级时间 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | 图表数据 |
| list[].time | int | - | 时间(秒级时间戳) |
| list[].in_bw | float | - | 进带宽 |
| list[].out_bw | float | - | 出带宽 |
| unit | string | - | 当前单位 |
获取网络流量
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取网络流量 |
| 接口地址 | /console/v1/remf_dcim/:id/flow |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| total | string | -总流量 | - |
| used | string | -已用流量 | - |
| leave | string | - | 剩余流量 |
| reset_flow_date | string | - | 流量归零时间 |
日志
| 项目 | 内容 |
|---|---|
| 接口描述 | 日志 |
| 接口地址 | /console/v1/remf_dcim/:id/log |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | - | 产品ID |
| keywords | string | - | - | 关键字 |
| page | int | - | - | 页数 |
| limit | int | - | - | 每页条数 |
| orderby | string | - | id,description,create_time,ip | 排序 |
| sort | string | - | asc,desc | 升/降序 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | 系统日志 |
| list[].id | int | - | 系统日志ID |
| list[].description | string | - | 描述 |
| list[].create_time | string | - | 时间 |
| list[].ip | int | - | IP |
| count | int | - | 系统日志总数 |
获取DCIM远程信息
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取DCIM远程信息 |
| 接口地址 | console/v1/remf_dcim/:id/remote_info |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| username | string | - | 远程用户名 |
| password | string | - | 远程密码 |
| port | string | - | 远程端口 |
| ip_num | int | - | IP数量 |
获取IP列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取IP列表 |
| 接口地址 | /console/v1/remf_dcim/:id/ip |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | - | 产品ID |
| page | int | 1 | - | 页数 |
| limit | int | - | - | 每页条数 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list[].ip | int | - | IP |
| list[].subnet_mask | string | - | 掩码 |
| list[].gateway | string | - | 网关 |
| count | int | - | 总数 |
检查产品是够购买过镜像
| 项目 | 内容 |
|---|---|
| 接口描述 | 检查产品是够购买过镜像 |
| 接口地址 | /console/v1/remf_dcim/:id/image/check |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| image_id | int | - | require | 镜像ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| price | string | - | 需要支付的金额(0.00表示镜像免费或已购买) |
| description | string | - | 描述 |
| price_client_level_discount | string | - | 价格等级折扣 |
生成购买镜像订单
| 项目 | 内容 |
|---|---|
| 接口描述 | 生成购买镜像订单 |
| 接口地址 | /console/v1/remf_dcim/:id/image/order |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| image_id | int | - | require | 镜像ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| id | string | - | 订单ID |
计算产品配置升级价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 计算产品配置升级价格 |
| 接口地址 | /console/v1/remf_dcim/:id/common_config |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| ip_num | int | - | - | 公网IP数量 |
| bw | int | - | - | 带宽 |
| flow | int | - | - | 流量包 |
| peak_defence | int | - | - | 防御峰值 |
| optional_memory | object | - | - | 变更后的内存({"5":1},5是ID,1是数量) |
| optional_disk | object | - | - | 变更后的硬盘({"5":1},5是ID,1是数量) |
| optional_gpu | object | - | - | 变更后的硬盘({"5":1},5是ID,1是数量) |
响应参数
| name | type | default | desc |
|---|---|---|---|
| price | string | - | 价格 |
| description | string | - | 生成的订单描述 |
| price_difference | string | - | 差价 |
| renew_price_difference | string | - | 续费差价 |
| discount | string | - | 用户等级折扣 |
| price_client_level_discount | string | - | 价格等级折扣 |
| price_difference_client_level_discount | string | - | 差价等级折扣 |
| renew_price_difference_client_level_discount | string | - | 续费差价等级折扣 |
生成产品配置升级订单
| 项目 | 内容 |
|---|---|
| 接口描述 | 生成产品配置升级订单 |
| 接口地址 | /console/v1/remf_dcim/:id/common_config/order |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| ip_num | int | - | - | 公网IP数量 |
| bw | int | - | - | 带宽 |
| flow | int | - | - | 流量包 |
| peak_defence | int | - | - | 防御峰值 |
| optional_memory | object | - | - | 变更后的内存({"5":1},5是ID,1是数量) |
| optional_disk | object | - | - | 变更后的硬盘({"5":1},5是ID,1是数量) |
| optional_gpu | object | - | - | 变更后的硬盘({"5":1},5是ID,1是数量) |
响应参数
| name | type | default | desc |
|---|---|---|---|
| id | string | - | 订单ID |
获取升级防御配置
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取升级防御配置 |
| 接口地址 | /console/v1/remf_dcim/:id/upgrade_defence_config |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| ip | string | - | require | IP |
响应参数
| name | type | default | desc |
|---|---|---|---|
| defence[].value | string | - | 防御 |
| defence[].desc | string | - | 防御显示 |
| current_defence | string | - | IP当前防御 |
计算升级防御价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 计算升级防御价格 |
| 接口地址 | /console/v1/remf_dcim/:id/upgrade_defence/price |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| ip | string | - | require | IP |
| peak_defence | string | - | require | 防御峰值 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| price | string | - | 价格 |
| description | string | - | 描述 |
| price_difference | string | - | 差价 |
| renew_price_difference | string | - | 续费差价 |
| base_price | string | - | 基础价格 |
| price_client_level_discount | string | - | 价格等级折扣 |
| price_difference_client_level_discount | string | - | 差价等级折扣 |
| renew_price_difference_client_level_discount | string | - | 续费差价等级折扣 |
生成升级防御订单
| 项目 | 内容 |
|---|---|
| 接口描述 | 生成升级防御订单 |
| 接口地址 | /console/v1/remf_dcim/:id/upgrade_defence/order |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| ip | string | - | require | IP |
| peak_defence | string | - | require | 防御峰值 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| id | int | - | 订单ID |
| amount | string | - | 订单价格 |
其他文档字段
json
{
"时间": "2025-01-13"
}获取重装状态
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取重装状态 |
| 接口地址 | /console/v1/remf_dcim/:id/reinstall_status |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| status | int | - | 状态码(200=成功,400=失败) |
| msg | string | - | 提示信息 |
| data | array | - | 状态数据 |
| data.task_type | int | - | 任务类型(0=重装中) |
验证下单
| 项目 | 内容 |
|---|---|
| 接口描述 | 验证下单 |
| 接口地址 | /console/v1/product/:id/remf_dcim/validate_settle |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 商品ID |
| custom.duration_id | int | - | require | 周期ID |
| custom.data_center_id | int | - | require | 数据中心ID |
| custom.model_config_id | int | - | require | 型号配置ID |
| custom.optional_memory | object | - | - | 变更后的内存({"5":1},5是ID,1是数量) |
| custom.optional_disk | object | - | - | 变更后的硬盘({"5":1},5是ID,1是数量) |
| custom.optional_gpu | object | - | - | 变更后的硬盘({"5":1},5是ID,1是数量) |
| custom.image_id | int | - | - | 镜像ID |
| custom.bw | string | - | - | 带宽 |
| custom.flow | string | - | - | 流量 |
| custom.ip_num | string | - | - | 公网IP数量 |
| custom.peak_defence | int | - | - | 防御峰值(G) |
响应参数
| name | type | default | desc |
|---|---|---|---|
| price | string | - | 价格 |
| renew_price | string | - | 续费价格 |
| billing_cycle | string | - | 周期 |
| duration | int | - | 周期时长 |
| description | string | - | 订单子项描述 |
| base_price | string | - | 基础价格 |
| preview[].name | string | - | 配置项名称 |
| preview[].value | string | - | 配置项值 |
| preview[].price | string | - | 配置项价格 |
| discount | string | - | 用户等级折扣 |
| order_item[].type | string | - | 订单子项类型(addon_idcsmart_client_level=用户等级) |
| order_item[].rel_id | int | - | 关联ID |
| order_item[].amount | float | - | 子项金额 |
| order_item[].description | string | - | 子项描述 |