主题
V10代理魔方财务DCIM-前台
获取订购页面配置
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取订购页面配置 |
| 接口地址 | /console/v1/product/:id/remf_finance_dcim/order_page |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 商品ID |
响应参数
无
获取订购页面配置
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取订购页面配置(层级联动) |
| 接口地址 | /console/v1/product/:id/remf_finance_dcim/link |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 商品ID |
| cid | int | - | require | 配置项ID |
| sub_id | int | - | require | 子项ID |
响应参数
无
id:文件标题
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取实例详情 |
| 接口地址 | /console/v1/remf_finance_dcim/:id |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | - | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| - | host_data:基础数据@ | - | - |
| - | config_options:可配置选项@ | - | - |
| - | custom_field_data:自定义字段@ | - | - |
| - | download_data:可下载数据@ | - | - |
| - | module_button:模块按钮@ | - | - |
| - | module_client_area:模块页面输出 | - | - |
| - | hook_output:钩子在本页面的输出,数组,循环显示的html | - | - |
| - | dcim.flowpacket:当前产品可购买的流量包@ | - | - |
| - | dcim.auth:服务器各种操作权限控制(on有权限off没权限) | - | - |
| - | dcim.area_code:区域代码 | - | - |
| - | dcim.area_name:区域名称 | - | - |
| - | dcim.os_group:操作系统分组@ | - | - |
| - | dcim.os:操作系统数据@ | - | - |
| - | flow_packet_use_list:流量包使用情况@ | - | - |
| 取消请求数据,空对象 | host_cancel: | - | - |
其他文档字段
json
{
"host_data": "remark:备注",
"config_options": "sub_name:配置项值",
"custom_field_data": "value:字段值",
"download_data": "id:文件id",
"down_link": "id:下载链接",
"location": "id:文件名",
"module_button": "type:name:名称",
"dcim.flowpacket": "stock:库存(0不限)",
"dcim.os_group": "svg:分组svg号",
"dcim.os": "group_id:所属分组ID",
"flow_packet_use_list": "used:已用流量"
}开机
| 项目 | 内容 |
|---|---|
| 接口描述 | 开机 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/on |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
关机
| 项目 | 内容 |
|---|---|
| 接口描述 | 关机 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/off |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
重启
| 项目 | 内容 |
|---|---|
| 接口描述 | 重启 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/reboot |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
批量操作
| 项目 | 内容 |
|---|---|
| 接口描述 | 批量操作 |
| 接口地址 | /console/v1/remf_finance_dcim/batch_operate |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | array | - | require | 产品ID |
| action | string | - | require | 动作on开机off关机reboot重启 |
响应参数
无
重置BMC
| 项目 | 内容 |
|---|---|
| 接口描述 | 重置BMC |
| 接口地址 | /console/v1/remf_finance_dcim/:id/reset_bmc |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
获取控制台地址(TODO)
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取控制台地址 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/vnc |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| data.url | string | - | 控制台地址 |
控制台页面
| 项目 | 内容 |
|---|---|
| 接口描述 | 控制台页面 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/vnc |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
获取实例状态
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取实例状态 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/status |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| data.status | string | - | 实例状态(pending=开通中,on=开机,off=关机,operating=操作中,fault=故障) |
| data.desc | string | - | 实例状态描述 |
重置密码
| 项目 | 内容 |
|---|---|
| 接口描述 | 重置密码 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/reset_password |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| password | string | - | require | 新密码 |
响应参数
无
救援模式
| 项目 | 内容 |
|---|---|
| 接口描述 | 救援模式 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/rescue |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| type | int | - | require | 指定救援系统类型(1=windows,2=linux) |
响应参数
无
取消救援
| 项目 | 内容 |
|---|---|
| 接口描述 | 取消救援 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/cancel_task |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
无
重装系统
| 项目 | 内容 |
|---|---|
| 接口描述 | 重装系统 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/reinstall |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| os | int | - | require | 重装系统的操作系统id |
| password | string | - | require | 密码 |
| port | int | - | require | 端口 |
响应参数
无
获取模块图表数据
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取模块图表数据 |
| 接口地址 | /console/v1/remf_finance_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/product/:id/remf_finance_dcim/duration |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 商品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| duration | object | - | 周期 |
| duration.product_price | float | - | 价格 |
| duration.setup_fee | float | - | 初装费 |
| duration.billingcycle | string | - | 周期 |
| duration.billingcycle_zh | string | - | 周期 |
| duration.pay_ontrial_cycle | string | - | 试用 |
产品列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品列表 |
| 接口地址 | /console/v1/remf_finance_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=文本区) |
日志
| 项目 | 内容 |
|---|---|
| 接口描述 | 日志 |
| 接口地址 | /console/v1/remf_finance_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 | - | 系统日志总数 |
升降级配置页面
| 项目 | 内容 |
|---|---|
| 接口描述 | 升降级配置页面 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/upgrade_config |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| host | array | - | 配置数据 |
升降级配置计算价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 升降级配置计算价格 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/sync_upgrade_config_price |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| configoption | array | - | require | 配置信息 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| price | float | - | 价格 |
升降级配置结算
| 项目 | 内容 |
|---|---|
| 接口描述 | 升降级配置结算 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/upgrade_config |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| customfield | object | - | - | 自定义字段 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| id | int | - | 订单ID |
升降级商品
| 项目 | 内容 |
|---|---|
| 接口描述 | 升降级商品 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/upgrade_product |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| old_host | object | - | 原产品数据 |
| host | array | - | 可升降级的商品数组 |
| host[].pid | int | - | 商品ID |
| host[].host | string | - | 商品名称 |
| host[].cycle | array | - | 周期 |
| host[].cycle[].price | float | - | 价格 |
| host[].cycle[].billingcycle | string | - | 周期 |
| host[].cycle[].billingcycle_zh | string | - | 周期 |
升降级商品计算价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 升降级商品计算价格 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/sync_upgrade_product_price |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
| product_id | int | - | require | 新商品ID |
| cycle | string | - | require | 周期,传billingcycle的值 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| price | float | - | 价格 |
升降级商品结算
| 项目 | 内容 |
|---|---|
| 接口描述 | 升降级商品结算 |
| 接口地址 | /console/v1/remf_finance_dcim/:id/upgrade_product |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| id | int | - | 订单ID |