智简魔方文档

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是——错误提示