主题
通用代理(自定义配置)-前台
产品列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品列表 |
| 接口地址 | /console/v1/reidcsmart_common/host |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| page | int | 1 | - | 页数 |
| limit | int | - | - | 每页条数 |
| orderby | string | - | - | 排序(id,due_time,status) |
| sort | string | - | - | 升/降序 |
| keywords | string | - | - | 关键字搜索主机名 |
| status | string | - | - | 产品状态(Unpaid=未付款,Pending=开通中,Active=已开通,Suspended=已暂停,Deleted=已删除) |
| tab | string | - | - | 状态using使用中expiring即将到期overdue已逾期deleted已删除 |
| m | int | - | - | 菜单ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| 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[].first_payment_amount | string | - | 首付金额 |
| list[].renew_amount | string | - | 续费金额 |
| list[].billing_cycle | string | - | 计费方式 |
| list[].billing_cycle_name | string | - | 周期名称 |
| list[].product_name | string | - | 商品名称 |
| list[].client_notes | string | - | 备注 |
| 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 | - | 全部产品数量 |
| 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/idcsmart_common/product/:product_id/configoption |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| product_id | int | - | require | 商品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| common_product | object | - | 商品基础信息 |
| common_product.name | string | - | 商品名称 |
| common_product.order_page_description | string | - | 订购页面html |
| common_product.allow_qty | string | - | 是否允许选择数量:1是,0否默认 |
| common_product.pay_type | string | - | 付款类型(免费free,一次onetime,周期先付recurring_prepayment,周期后付recurring_postpaid |
| common_product.product_id | int | - | - |
| configoptions | array | - | 配置项信息 |
| configoptions[].id | int | - | 配置项ID |
| configoptions[].product_id | int | - | 商品ID |
| configoptions[].option_name | string | - | 配置项名称 |
| configoptions[].option_type | string | - | 配置项类型:select下拉单选,multi_select下拉多选,radio点击单选,quantity数量输入,quantity_range数量拖动,yes_no是否,area区域,cascade级联 |
| configoptions[].qty_min | int | - | 数量时最小值 |
| configoptions[].qty_max | int | - | 数量时最大值 |
| configoptions[].unit | string | - | 单位 |
| configoptions[].allow_repeat | int | - | 数量类型时:是否允许重复:开启后,前台购买时,可通过点击添加按钮,自动创建一个新的配置项,取名如bw1 |
| configoptions[].max_repeat | int | - | 最大允许重复数量 |
| configoptions[].description | string | - | 说明 |
| configoptions[].qty_change | int | - | 数量变化值 |
| configoptions[].subs | array | - | 子项信息 |
| configoptions[].subs[].id | int | - | 子项ID |
| configoptions[].subs[].option_name | string | - | 子项名称 |
| configoptions[].subs[].qty_min | int | - | 子项最小值 |
| configoptions[].subs[].qty_max | int | - | 子项最大值 |
| configoptions[].tree | array | - | 级联配置项的树形结构数据(仅当option_type为cascade时返回) |
| configoptions[].tree[].item_id | int | - | 级联项ID |
| configoptions[].tree[].item_name | string | - | 级联项名称 |
| configoptions[].tree[].fee_type | string | - | 计费类型 |
| configoptions[].tree[].group_id | int | - | 级联组ID |
| configoptions[].tree[].is_leaf | int | - | 是否为末端项:1是,0否 |
| configoptions[].tree[].order | int | - | 排序 |
| configoptions[].tree[].hidden | int | - | 是否隐藏:1是,0否 |
| configoptions[].tree[].children | array | - | 子级联项(递归结构) |
| configoptions[].tree[].price | array | - | 价格信息(仅末端项有此字段) |
| configoptions[].cascade_group | array | - | 级联组信息(仅当option_type为cascade时返回) |
| configoptions[].cascade_group[].id | int | - | 级联组ID |
| configoptions[].cascade_group[].group_name | string | - | 级联组名称 |
| cycles | object | - | 周期({"onetime":1.00}) |
| custom_cycles | array | - | 自定义周期 |
| custom_cycles[].id | int | - | 自定义周期ID |
| custom_cycles[].name | string | - | 自定义周期名称 |
| custom_cycles.cycle_time | int | - | 自定义周期时长 |
| custom_cycles[].cycle_unit | string | - | 自定义周期单位 |
| custom_cycles[].amount | string | - | 商品自定义周期金额 |
| custom_cycles[].cycle_amount | string | - | (商品+配置项)自定义周期金额 |
| custom_cycles[].amount_client_level_discount | string | - | 商品自定义周期金额等级折扣 |
| custom_cycles[].cycle_amount_client_level_discount | string | - | (商品+配置项)自定义周期金额等级折扣 |
前台商品配置信息计算价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 前台商品配置信息计算价格 |
| 接口地址 | /console/v1/reidcsmart_common/product/:product_id/configoption/calculate |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| configoption | object | - | require | 配置信息 |
| cascade_configoption | object | - | optional | 级联配置项信息{169:{item_id:12,quantity:2}} |
响应参数
| name | type | default | desc |
|---|---|---|---|
| cycles | object | - | 周期({"onetime":1.00}) |
| custom_cycles | array | - | 自定义周期 |
| custom_cycles[].id | int | - | 自定义周期ID |
| custom_cycles[].name | string | - | 自定义周期名称 |
| custom_cycles[].cycle_time | int | - | 自定义周期时长 |
| custom_cycles[].cycle_unit | string | - | 自定义周期单位 |
| custom_cycles[].amount | string | - | 商品自定义周期金额 |
| custom_cycles[].cycle_amount | string | - | (商品+配置项)自定义周期金额 |
| custom_cycles[].amount_client_level_discount | string | - | 商品自定义周期金额等级折扣 |
| custom_cycles[].cycle_amount_client_level_discount | string | - | (商品+配置项)自定义周期金额等级折扣 |
前台产品内页
| 项目 | 内容 |
|---|---|
| 接口描述 | 前台产品内页 |
| 接口地址 | /console/v1/reidcsmart_common/host/:host_id/configoption |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| host | object | - | 财务信息 |
| host.id | int | - | 产品ID |
| host.order_id | int | - | 订单ID |
| host.product_id | int | - | 商品ID |
| host.create_time | int | - | 订购时间 |
| host.due_time | int | - | 到期时间 |
| host.billing_cycle | string | - | 计费方式:计费周期免费free,一次onetime,周期先付recurring_prepayment,周期后付recurring_postpaid |
| host.billing_cycle_name | string | - | 模块计费周期名称 |
| host.billing_cycle_time | int | - | 模块计费周期时间,秒 |
| host.renew_amount | string | - | 续费金额 |
| host.first_payment_amount | string | - | 首付金额 |
| host.name | string | - | 商品名称 |
| host.status | string | - | 产品状态 |
| host.host_name | string | - | 产品标识 |
| host.client_notes | string | - | 用户备注 |
| host.dedicatedip | string | - | 独立ip |
| host.assignedips | string | - | 分配ip,逗号分隔 |
| host.username | string | - | 用户名 |
| host.password | string | - | 密码 |
| host.bwlimit | int | - | 流量限制 |
| host.os | string | - | 操作系统,后台未配置时显示远程操作系统模板ID |
| host.bwusage | string | - | 流量使用 |
| configoptions | array | - | 配置项信息 |
| configoptions[].id | int | - | 配置项ID |
| configoptions[].option_name | string | - | 配置项名称 |
| configoptions[].option_type | string | - | 配置项类型:select下拉单选,multi_select下拉多选,radio点击单选,quantity数量输入,quantity_range数量拖动,yes_no是否,area区域,os操作系统 |
| configoptions[].unit | string | - | 单位 |
| configoptions[].qty | int | - | 数量(当类型为数量时,显示此值) |
| configoptions[].repeat | int | - | - |
| configoptions[].subs | array | - | - |
| configoptions[].subs[].option_name | string | - | 子项名称 |
| configoptions[].subs[].country | string | - | 子项名称 |
| chart | array | - | 图表tab |
| chart[].type | string | - | 类型 |
| chart[].title | string | - | 标题 |
| chart[].select | array | - | 下拉选择 |
| chart[].select[].name | string | - | 名称 |
| chart[].select[].value | string | - | 值 |
| client_area | array | - | 客户自定义tab区域 |
| client_area[].key | string | - | 键 |
| client_area[].name | string | - | 名称标题 |
| client_button | array | - | 管理按钮区域(默认模块操作) |
| client_button.console | array | - | 控制台 |
| client_button.console[].func | string | - | 模块(调模块动作传此值) |
| client_button.console[].name | string | - | 操作名称 |
| client_button.console[].type | string | - | 类型 |
| client_button.control | array | - | 下拉管理 |
| client_button.control[].func | string | - | 模块(调模块动作传此值) |
| client_button.control[].name | string | - | 操作名称 |
| client_button.control[].type | string | - | 类型 |
| os | object | - | 操作系统 |
| os.id | int | - | 配置项ID |
| os.option_name | string | - | 配置项名称 |
| os.option_type | string | - | 配置项类型 |
| os.subs | array | - | 子项 |
| os.subs[].os | string | - | 操作系统 |
| os.subs[].version | array | - | 操作系统详细版本 |
| os.subs[].version[].id | int | - | 子项ID |
| os.subs[].version[].option_name | string | - | 名称 |
| os.subs[].version[].option_param | string | - | - |
前台产品内页自定义页面输出
| 项目 | 内容 |
|---|---|
| 接口描述 | 前台产品内页自定义页面输出 |
| 接口地址 | /console/v1/reidcsmart_common/host/:host_id/configoption/area |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
| key | string | - | require | snapshot快照等 |
| api_url | string | - | - | 替换原来模板内的接口地址 |
响应参数
无
前台产品内页图表页面
| 项目 | 内容 |
|---|---|
| 接口描述 | 前台产品内页图表页面 |
| 接口地址 | /console/v1/reidcsmart_common/host/:host_id/configoption/chart |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
| chart | object | - | require | 图表数据 |
| chart.start | int | - | require | 开始时间 |
| chart.type | string | - | require | 类型:cpu/disk/flow |
| chart.select | string | - | require | select的value值 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| unit | string | - | 单位 |
| chart_type | string | - | 图表类型(line=折线图) |
| list | array | - | 每条线的数据 |
| list[][].time | string | - | 时间(YYYY-MM-DD |
| list[][].value | string | - | 数值 |
| label | array | - | 图表label |
执行子模块方法
| 项目 | 内容 |
|---|---|
| 接口描述 | 执行子模块方法 |
| 接口地址 | /console/v1/reidcsmart_common/host/:host_id/provision/:func |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
| func | string | - | require | 模块方法:on=开机,off=关机,reboot=重启,hard_off=硬关机,hard_reboot=硬重启,crack_pass=重置密码 |
| password | string | - | requireIf,func=crack_pass | 密码 |
响应参数
无
执行子模块方法(解决操作密码不好统一处理的问题)
| 项目 | 内容 |
|---|---|
| 接口描述 | 执行子模块方法 |
| 接口地址 | /console/v1/reidcsmart_common/host/:host_id/provision/status |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
| func | string | - | require | 模块方法:on=开机,off=关机,reboot=重启,hard_off=硬关机,hard_reboot=硬重启,crack_pass=重置密码 |
| password | string | - | requireIf,func=crack_pass | 密码 |
响应参数
无
执行子模块自定义方法
| 项目 | 内容 |
|---|---|
| 接口描述 | 执行子模块自定义方法 |
| 接口地址 | /console/v1/reidcsmart_common/host/:host_id/custom/provision |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
| func | string | - | require | 自定义方法 |
| custom_fields | array | - | - | 自定义字段 |
响应参数
无
产品配置升降级页面
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品配置升降级页面 |
| 接口地址 | /console/v1/reidcsmart_common/host/:host_id/upgrade_config |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| host | object | - | 产品信息 |
| host.id | int | - | 产品ID |
| host.product_id | int | - | 商品ID |
| host.name | string | - | 商品名称 |
| host.first_payment_amount | string | - | 金额 |
| host.billing_cycle_name | string | - | 周期 |
| configoptions | array | - | 配置 |
| configoptions[].id | int | - | 配置ID |
| configoptions[].option_type | string | - | 配置类型 |
| configoptions[].option_name | string | - | 名称 |
| configoptions[].sub_name | string | - | 子项名称 |
| configoptions[].qty | int | - | 数量(类型为数量时,显示此值) |
| configoptions[].configoption_sub_id | int | - | 子项ID |
| configoptions[].tree | array | - | 级联配置项的树形结构数据(仅当option_type为cascade时返回) |
| configoptions[].tree[].item_id | int | - | 级联项ID |
| configoptions[].tree[].item_name | string | - | 级联项名称 |
| configoptions[].tree[].fee_type | string | - | 计费类型 |
| configoptions[].tree[].group_id | int | - | 级联组ID |
| configoptions[].tree[].is_leaf | int | - | 是否为末端项:1是,0否 |
| configoptions[].tree[].order | int | - | 排序 |
| configoptions[].tree[].hidden | int | - | 是否隐藏:1是,0否 |
| configoptions[].tree[].children | array | - | 子级联项(递归结构) |
| configoptions[].tree[].price | array | - | 价格信息(仅末端项有此字段) |
| configoptions[].cascade_group | array | - | 级联组信息(仅当option_type为cascade时返回) |
| configoptions[].cascade_group[].id | int | - | 级联组ID |
| configoptions[].cascade_group[].group_name | string | - | 级联组名称 |
| configoptions[].current_cascade_item_id | int | - | 当前选择的级联项ID(仅当option_type为cascade时返回) |
| upgrade_configoptions | array | - | 可升降级配置项 |
| upgrade_configoptions[].id | int | - | 配置项ID |
| upgrade_configoptions[].option_name | string | - | 配置项名称 |
| upgrade_configoptions[].option_type | string | - | 配置类型:select下拉单选,multi_select下拉多选,radio点击单选,quantity数量输入,quantity_range数量拖动,yes_no是否,area区域,cascade级联 |
| upgrade_configoptions[].option_param | string | - | 配置参数 |
| upgrade_configoptions[].qty_min | int | - | 数量时最小值 |
| upgrade_configoptions[].qty_max | int | - | 数量时最大值 |
| upgrade_configoptions[].order | int | - | 排序 |
| upgrade_configoptions[].unit | string | - | 单位 |
| upgrade_configoptions[].allow_repeat | int | - | 数量类型时:是否允许重复:开启后,前台购买时,可通过点击添加按钮,自动创建一个新的配置项,取名如bw1 |
| upgrade_configoptions[].max_repeat | int | - | 最大允许重复数量 |
| upgrade_configoptions[].fee_type | string | - | 计费类型 |
| upgrade_configoptions[].description | string | - | 说明 |
| upgrade_configoptions[].subs | array | - | 配置子项数据 |
| upgrade_configoptions[].subs[].id | int | - | 子项ID |
| upgrade_configoptions[].subs[].product_configoption_id | int | - | 配置项ID |
| upgrade_configoptions[].subs[].option_name | string | - | 子项名称 |
| upgrade_configoptions[].subs[].option_param | string | - | 子项参数 |
| upgrade_configoptions[].subs[].qty_min | int | - | 数量时最小值 |
| upgrade_configoptions[].subs[].qty_max | int | - | 数量时最大值 |
| upgrade_configoptions[].subs[].order | int | - | 排序 |
| upgrade_configoptions[].subs[].hidden | int | - | 是否隐藏 |
| upgrade_configoptions[].subs[].country | string | - | 国家代码 |
| upgrade_configoptions[].subs[].qty_change | int | - | 数量变化值 |
| upgrade_configoptions[].tree | array | - | 级联配置项的树形结构数据(仅当option_type为cascade时返回) |
| upgrade_configoptions[].tree[].item_id | int | - | 级联项ID |
| upgrade_configoptions[].tree[].item_name | string | - | 级联项名称 |
| upgrade_configoptions[].tree[].fee_type | string | - | 计费类型 |
| upgrade_configoptions[].tree[].group_id | int | - | 级联组ID |
| upgrade_configoptions[].tree[].is_leaf | int | - | 是否为末端项:1是,0否 |
| upgrade_configoptions[].tree[].order | int | - | 排序 |
| upgrade_configoptions[].tree[].hidden | int | - | 是否隐藏:1是,0否 |
| upgrade_configoptions[].tree[].children | array | - | 子级联项(递归结构) |
| upgrade_configoptions[].tree[].price | array | - | 价格信息(仅末端项有此字段) |
| upgrade_configoptions[].cascade_group | array | - | 级联组信息(仅当option_type为cascade时返回) |
| upgrade_configoptions[].cascade_group[].id | int | - | 级联组ID |
| upgrade_configoptions[].cascade_group[].group_name | string | - | 级联组名称 |
产品配置升降级异步获取升降级价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品配置升降级异步获取升降级价格 |
| 接口地址 | /console/v1/reidcsmart_common/host/:host_id/sync_upgrade_config_price |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
| configoption | object | - | - | "configoption": |
| cascade_configoption | object | - | optional | 级联配置项信息{169:{item_id:12,quantity:2}} |
响应参数
| 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/reidcsmart_common/host/:host_id/upgrade_config |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| host_id | int | - | require | 产品ID |
| configoption | object | - | require | "configoption": |
| cascade_configoption | object | - | optional | 级联配置项信息{169:{item_id:12,quantity:2}} |
| customfield | object | - | - | 自定义参数 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| id | int | - | 订单ID |
日志
| 项目 | 内容 |
|---|---|
| 接口描述 | 日志 |
| 接口地址 | /console/v1/reidcsmart_common/: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 | - | 系统日志总数 |