主题
产品管理
产品列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品列表 |
| 接口地址 | /console/v1/host |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| keywords | string | - | 搜索范围产品ID商品名称标识validate:optional | desc:关键字 |
| status | string | - | Unpaid未付款Pending开通中Active已开通Suspended已暂停Deleted已删除validate:optional | desc:状态 |
| tab | string | - | using使用中expiring即将到期overdue已逾期deleted已删除validate:optional | desc:状态 |
| page | int | - | validate:optional | desc:页数 |
| limit | int | - | validate:optional | desc:每页条数 |
| orderby | string | - | idactive_timedue_timevalidate:optional | desc:排序字段 |
| sort | string | - | ascdescvalidate:optional | desc:升降序 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:产品列表 |
| list[].id | int | - | desc:产品ID |
| list[].product_id | int | - | desc:商品ID |
| list[].product_name | string | - | desc:商品名称 |
| list[].name | string | - | desc:标识 |
| list[].active_time | int | - | desc:开通时间 |
| list[].due_time | int | - | desc:到期时间 |
| list[].first_payment_amount | string | - | desc:金额 |
| list[].billing_cycle | string | - | desc:周期 |
| list[].status | string | - | desc:状态 |
| list[].renew_amount | string | - | desc:续费金额 |
| list[].client_notes | string | - | desc:用户备注 |
| list[].ip_num | int | - | desc:IP数量 |
| count | int | - | desc:产品总数 |
会员中心已订购产品列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 会员中心已订购产品列表 |
| 接口地址 | /console/v1/client/host |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| keywords | string | - | 商品名称产品名称IPvalidate:optional | desc:关键字搜索 |
| status | string | - | Unpaid未付款Pending开通中Active已开通Suspended已暂停Deleted已删除validate:optional | desc:产品状态 |
| tab | string | - | using使用中expiring即将到期overdue已逾期deleted已删除validate:optional | desc:状态 |
| page | int | - | validate:optional | desc:页数 |
| limit | int | - | validate:optional | desc:每页条数 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:产品列表 |
| list[].id | int | - | desc:产品ID |
| list[].product_id | int | - | desc:商品ID |
| list[].product_name | string | - | desc:商品名称 |
| list[].name | string | - | desc:标识 |
| list[].create_time | int | - | desc:订购时间 |
| list[].due_time | int | - | desc:到期时间 |
| list[].status | string | - | desc:状态 |
| list[].client_notes | string | - | desc:用户备注 |
| list[].type | string | - | desc:类型 |
| list[].ip | string | - | desc:IP |
| count | int | - | desc:产品总数 |
| using_count | int | - | desc:使用中产品数量 |
| expiring_count | int | - | desc:即将到期产品数量 |
| overdue_count | int | - | desc:已逾期产品数量 |
| deleted_count | int | - | desc:已删除产品数量 |
| all_count | int | - | desc:全部产品数量 |
自定义导航产品列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 自定义导航产品列表 |
| 接口地址 | /console/v1/menu/:id/host |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:导航ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| data.content | string | - | desc:模块输出内容 |
前台产品列表(跨模块)
| 项目 | 内容 |
|---|---|
| 接口描述 | 前台产品列表(跨模块) |
| 接口地址 | /console/v1/home/host |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| m | int | - | - | desc:导航ID |
| page | int | - | - | desc:页数 |
| limit | int | - | - | desc:每页条数 |
| orderby | string | - | - | desc:排序(id,due_time,status) |
| sort | string | - | - | desc:升/降序 |
| keywords | string | - | - | desc:关键字搜索:商品名称/产品名称/IP |
| country_id | int | - | - | desc:搜索:国家ID |
| city | string | - | - | desc:搜索:城市 |
| area | string | - | - | desc:搜索:区域 |
| status | string | - | - | desc:产品状态(Unpaid=未付款,Pending=开通中,Active=已开通,Suspended=已暂停,Deleted=已删除) |
| tab | string | - | - | desc:状态using使用中expiring即将到期overdue已逾期deleted已删除 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:列表数据 |
| list[].id | int | - | desc:产品ID |
| list[].product_id | int | - | desc:商品ID |
| list[].name | string | - | desc:产品标识 |
| list[].status | string | - | desc:产品状态(Unpaid=未付款,Pending=开通中,Active=已开通,Suspended=已暂停,Deleted=已删除) |
| list[].active_time | int | - | desc:开通时间 |
| list[].due_time | int | - | desc:到期时间 |
| list[].client_notes | string | - | desc:用户备注 |
| list[].product_name | string | - | desc:商品名称 |
| list[].country | string | - | desc:国家 |
| list[].country_code | string | - | desc:国家代码 |
| list[].country_id | int | - | desc:国家ID |
| list[].city | string | - | desc:城市 |
| list[].area | string | - | desc:区域 |
| list[].power_status | string | - | desc:电源状态(on=开机,off=关机,operating=操作中,fault=故障) |
| list[].image_name | string | - | desc:镜像名称 |
| list[].image_icon | string | - | desc:镜像图标(Windows,CentOS,Ubuntu,Debian,ESXi,XenServer,FreeBSD,Fedora,ArchLinux,Rocky,AlmaLinux,OpenEuler,RedHat,其他) |
| list[].ip_num | int | - | desc:IP数量 |
| list[].dedicate_ip | string | - | desc:主IP |
| list[].assign_ip | string | - | desc:附加IP(英文逗号分隔) |
| list[].base_info | string | - | desc:产品基础信息 |
| - | array | - | - |
| list[].show_base_info | int | - | desc:产品列表是否展示基础信息:1是默认,0否 |
| list[].is_auto_renew | int | - | desc:是否自动续费(0=否,1=是) |
| list[].billing_cycle | int | - | desc:计费方式(free=免费,onetime=一次性,recurring_prepayment=周期先付,on_demand=按需) |
| count | int | - | desc:总条数 |
| using_count | int | - | desc:使用中产品数量 |
| expiring_count | int | - | desc:即将到期产品数量 |
| overdue_count | int | - | desc:已逾期产品数量 |
| deleted_count | int | - | desc:已删除产品数量 |
| all_count | int | - | desc:全部产品数量 |
| data_center[].country_id | int | - | desc:国家ID |
| data_center[].city | string | - | desc:城市 |
| data_center[].area | string | - | desc:区域 |
| data_center[].country_name | string | - | desc:国家 |
| data_center[].country_code | string | - | desc:国家代码 |
| data_center[].customfield.multi_language.city | string | - | desc:城市多语言 |
| data_center[].customfield.multi_language.city | string | - | desc:区域多语言 |
| self_defined_field[].id | int | - | desc:自定义字段ID |
| self_defined_field[].field_name | string | - | desc:自定义字段名称 |
| self_defined_field[].field_type | string | - | desc:字段类型(text=文本框,link=链接,password=密码,dropdown=下拉,tickbox=勾选框,textarea=文本区) |
产品详情
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品详情 |
| 接口地址 | /console/v1/host/:id |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| host | object | - | desc:产品 |
| host.id | int | - | desc:产品ID |
| host.order_id | int | - | desc:订单ID |
| host.product_id | int | - | desc:商品ID |
| host.name | string | - | desc:标识 |
| notes | string | - | desc:备注 |
| host.first_payment_amount | string | - | desc:订购金额 |
| host.renew_amount | string | - | desc:续费金额 |
| host.billing_cycle | string | - | desc:计费周期 |
| host.billing_cycle_name | string | - | desc:模块计费周期名称 |
| host.billing_cycle_time | string | - | desc:模块计费周期时间,秒 |
| host.active_time | int | - | desc:开通时间 |
| host.due_time | int | - | desc:到期时间 |
| host.status | string | - | desc:状态Unpaid未付款Pending开通中Active已开通Suspended已暂停Deleted已删除Failed开通失败 |
| host.suspend_type | string | - | desc:暂停类型,overdue到期暂停,overtraffic超流暂停,certification_not_complete实名未完成,other其他 |
| host.suspend_reason | string | - | desc:暂停原因 |
| host.ratio_renew | int | - | desc:是否开启比例续费:0否,1是 |
| host.base_price | string | - | desc:购买周期原价 |
| host.product_name | string | - | desc:商品名称 |
| host.agent | int | - | desc:代理产品0否1是 |
| host.upstream_host_id | string | - | desc:上游产品ID |
| host.base_info | string | - | desc:产品基础信息 |
| host.auto_release_time | int | - | desc:自动释放时间(0=未设置过) |
| host.keep_time_price | string | - | desc:保留期价格 |
| host.on_demand_flow_price | string | - | desc:按需流量价格 |
| host.on_demand_billing_cycle_unit | string | - | desc:出账周期单位(hour=每小时,day=每天,month=每月) |
| host.on_demand_billing_cycle_day | int | - | desc:出账周期号数 |
| host.on_demand_billing_cycle_point | string | - | desc:出账周期时间点(如00:00) |
| host.change_billing_cycle_id | int | - | desc:是否申请了到期转按需(0=否,>0是,申请了不能执行续费/升降级操作) |
| host.addition.country_id | int | - | desc:国家ID |
| host.addition.city | string | - | desc:城市 |
| host.addition.area | string | - | desc:区域 |
| host.addition.image_icon | string | - | desc:镜像图标(Windows,CentOS,Ubuntu,Debian,ESXi,XenServer,FreeBSD,Fedora,ArchLinux,Rocky,AlmaLinux,OpenEuler,RedHat,其他) |
| host.addition.image_name | string | - | desc:镜像名称 |
| host.addition.username | string | - | desc:实例用户名 |
| host.addition.password | string | - | desc:实例密码 |
| host.addition.port | int | - | desc:端口 |
| host.product_on_demand.client_auto_delete | int | - | desc:允许用户设置自动释放(0=否,1=是) |
| host.product_on_demand.on_demand_to_duration | int | - | desc:允许按需转包年包月(0=否,1=是) |
| host.product_on_demand.duration_to_on_demand | int | - | desc:允许包年包月/试用转按需(0=否,1=是) |
| self_defined_field[].id | int | - | desc:自定义字段ID |
| self_defined_field[].field_name | string | - | desc:字段名称 |
| self_defined_field[].field_type | string | - | desc:字段类型(text=文本框,link=链接,password=密码,dropdown=下拉,checkbox=勾选框,textarea=文本区) |
| self_defined_field[].value | string | - | desc:当前值 |
获取产品内页
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取产品内页 |
| 接口地址 | /console/v1/host/:id/view |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| content | string | - | desc:模块输出内容 |
修改产品备注
| 项目 | 内容 |
|---|---|
| 接口描述 | 修改产品备注 |
| 接口地址 | /console/v1/host/:id/notes |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
| notes | string | - | validate:optional | desc:备注 |
响应参数
无
批量修改产品备注
| 项目 | 内容 |
|---|---|
| 接口描述 | 批量修改产品备注 |
| 接口地址 | /console/v1/host/notes/batch |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| ids | array | - | validate:required | desc:产品ID数组 |
| notes | string | - | validate:optional | desc:备注 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| success_count | int | - | desc:成功数量 |
| fail_count | int | - | desc:失败数量 |
| total | int | - | desc:总数 |
获取用户所有产品
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取用户所有产品 |
| 接口地址 | /console/v1/host/all |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:产品 |
| list[].id | int | - | desc:产品ID |
| list[].product_id | int | - | desc:商品ID |
| list[].product_name | string | - | desc:商品名称 |
| list[].name | string | - | desc:标识 |
| list[].status | string | - | desc:状态 |
| count | int | - | desc:产品总数 |
模块暂停
| 项目 | 内容 |
|---|---|
| 接口描述 | 模块暂停 |
| 接口地址 | /console/v1/host/:id/module/suspend |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
| suspend_type | string | - | overdue到期暂停overtraffic超流暂停certification_not_complete实名未完成other其他validate:required | desc:暂停类型 |
| suspend_reason | string | - | validate:optional | desc:暂停原因 |
响应参数
无
模块解除暂停
| 项目 | 内容 |
|---|---|
| 接口描述 | 模块解除暂停 |
| 接口地址 | /console/v1/host/:id/module/unsuspend |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
无
产品IP详情
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品IP详情 |
| 接口地址 | /console/v1/host/:id/ip |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| dedicate_ip | string | - | desc:主IP |
| assign_ip | string | - | desc:附加IP(英文逗号分隔) |
| ip_num | int | - | desc:IP数量 |
获取产品具体信息
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取产品具体信息,目前用于续费开关 |
| 接口地址 | /console/v1/host/:id/specific_info |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| id | int | - | desc:产品ID |
| name | string | - | desc:产品标识 |
| renew_amount | string | - | desc:续费金额 |
| billing_cycle_name | string | - | desc:模块计费周期名称 |
| due_time | int | - | desc:到期时间 |
| ip_num | int | - | desc:IP数量 |
| dedicate_ip | string | - | desc:主IP |
| assign_ip | string | - | desc:附加IP(英文逗号分隔) |
| country | string | - | desc:国家 |
| country_code | string | - | desc:国家代码 |
| country_id | int | - | desc:国家ID |
| city | string | - | desc:城市 |
| area | string | - | desc:区域 |
其他文档字段
json
{
"时间": "2024-12-09"
}修改自动释放时间
| 项目 | 内容 |
|---|---|
| 接口描述 | 修改自动释放时间 |
| 接口地址 | /console/v1/host/:id/auto_release_time |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
| auto_release_time | int | - | validate:required | desc:自动释放时间戳 |
响应参数
无
获取产品按需转包年包月周期价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取产品按需转包年包月周期价格 |
| 接口地址 | /console/v1/host/:id/on_demand_to_recurring_prepayment |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| duration[].id | int | - | desc:周期ID |
| duration[].price | string | - | desc:周期价格 |
| duration[].name_show | string | - | desc:周期显示名称 |
| duration[].client_level_discount | string | - | desc:用户等级折扣 |
| duration[].discount_renew_price | string | - | desc:续费可折扣部分 |
| duration[].discount_order_price | string | - | desc:订购可折扣部分 |
产品按需转包年包月
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品按需转包年包月 |
| 接口地址 | /console/v1/host/:id/on_demand_to_recurring_prepayment |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
| duration_id | int | - | validate:required | desc:周期ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| id | string | - | desc:订单ID |
| amount | string | - | desc:金额 |
获取产品包年包月转按需价格
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取产品包年包月转按需价格 |
| 接口地址 | /console/v1/host/:id/recurring_prepayment_to_on_demand |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| on_demand_price | string | - | desc:按需出账价格,可能已经折扣了 |
| base_renew_price | string | - | desc:按需出账原价 |
| keep_time_price | string | - | desc:保留期价格 |
| billing_cycle_name | string | - | desc:周期名称 |
产品包年包月转按需
| 项目 | 内容 |
|---|---|
| 接口描述 | 产品包年包月转按需 |
| 接口地址 | /console/v1/host/:id/recurring_prepayment_to_on_demand |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
无
取消产品包年包月转按需
| 项目 | 内容 |
|---|---|
| 接口描述 | 取消产品包年包月转按需 |
| 接口地址 | /console/v1/host/:id/recurring_prepayment_to_on_demand |
| 请求方式 | DELETE |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:产品ID |
响应参数
无