智简魔方文档

GET 产品详情

接口概览

项目内容
文档类型前台接口
请求方式GET
接口地址/console/v1/host/{id}
所属业务产品管理
来源模块/系统产品管理
认证方式Bearer Token(用户令牌)

完整请求

请求

bash
正在加载示例…

失败请求

bash
正在加载示例…

接口说明

产品详情

请求参数

名称位置类型必选说明
idpathinteger(int32)产品ID

成功响应

json
正在加载示例…

失败响应 400:请求参数或业务校验失败

json
正在加载示例…

失败响应 401:未认证或登录已失效

json
正在加载示例…

失败响应 403:无权执行当前操作

json
正在加载示例…

失败响应 404:接口或业务资源不存在

json
正在加载示例…

失败响应 500:服务器内部错误

json
正在加载示例…

响应状态

状态码状态码含义说明数据模型
200OK成功响应内联对象
400Bad Request请求参数或业务校验失败内联对象
401Unauthorized未认证或登录已失效内联对象
403Forbidden无权执行当前操作内联对象
404Not Found接口或业务资源不存在内联对象
500Internal Server Error服务器内部错误内联对象

响应参数

状态码 200

名称类型必选约束中文名说明
statusinteger(int32)状态码
msgstring提示信息
dataobject
data.hostobject产品
data.host.idinteger(int32)产品ID
data.host.order_idinteger(int32)订单ID
data.host.product_idinteger(int32)商品ID
data.host.namestring标识
data.host.first_payment_amountstring订购金额
data.host.renew_amountstring续费金额
data.host.billing_cyclestring计费周期
data.host.billing_cycle_namestring模块计费周期名称
data.host.billing_cycle_timestring模块计费周期时间,秒
data.host.active_timeinteger(int32)开通时间
data.host.due_timeinteger(int32)到期时间
data.host.statusstring状态Unpaid未付款Pending开通中Active已开通Suspended已暂停Deleted已删除Failed开通失败
data.host.suspend_typestring暂停类型,overdue到期暂停,overtraffic超流暂停,certification_not_complete实名未完成,other其他
data.host.suspend_reasonstring暂停原因
data.host.ratio_renewinteger(int32)是否开启比例续费:0否,1是
data.host.base_pricestring购买周期原价
data.host.product_namestring商品名称
data.host.agentinteger(int32)代理产品0否1是
data.host.upstream_host_idstring上游产品ID
data.host.base_infostring产品基础信息
data.host.auto_release_timeinteger(int32)自动释放时间(0=未设置过)
data.host.keep_time_pricestring保留期价格
data.host.on_demand_flow_pricestring按需流量价格
data.host.on_demand_billing_cycle_unitstring出账周期单位(hour=每小时,day=每天,month=每月)
data.host.on_demand_billing_cycle_dayinteger(int32)出账周期号数
data.host.on_demand_billing_cycle_pointstring出账周期时间点(如00:00)
data.host.change_billing_cycle_idinteger(int32)是否申请了到期转按需(0=否,>0是,申请了不能执行续费/升降级操作)
data.host.additionobject
data.host.addition.country_idinteger(int32)国家ID
data.host.addition.citystring城市
data.host.addition.areastring区域
data.host.addition.image_iconstring镜像图标(Windows,CentOS,Ubuntu,Debian,ESXi,XenServer,FreeBSD,Fedora,ArchLinux,Rocky,AlmaLinux,OpenEuler,RedHat,其他)
data.host.addition.image_namestring镜像名称
data.host.addition.usernamestring实例用户名
data.host.addition.passwordstring实例密码
data.host.addition.portinteger(int32)端口
data.host.product_on_demandobject
data.host.product_on_demand.client_auto_deleteinteger(int32)允许用户设置自动释放(0=否,1=是)
data.host.product_on_demand.on_demand_to_durationinteger(int32)允许按需转包年包月(0=否,1=是)
data.host.product_on_demand.duration_to_on_demandinteger(int32)允许包年包月/试用转按需(0=否,1=是)
data.host.renew_forbiddeninteger(int32)是否禁止续费 0允许 1禁止
data.notesstring备注
data.self_defined_field[object]
data.self_defined_field[].idinteger(int32)自定义字段ID
data.self_defined_field[].field_namestring字段名称
data.self_defined_field[].field_typestring字段类型(text=文本框,link=链接,password=密码,dropdown=下拉,checkbox=勾选框,textarea=文本区)
data.self_defined_field[].valuestring当前值

失败状态码 400、401、403、404、500 共用以下结构:

名称类型必选约束中文名说明
statusinteger(int32)错误状态码
msgstring错误提示