更新服务
PUT
/api/v1/service请求参数
Body 参数application/json
id
string
服务id
service_config
string
服务配置
json格式
接入协议 service_config JSON 结构体
{
"device_type": 1, // 设备类型: 1-设备, 2-网关 (必填)
"access_address": "http://example.com/access", // 接入地址 (可选)
"http_address": "http://example.com/service", // HTTP服务地址 (必填)
"sub_topic_prefix": "topic_prefix" // 服务订阅主题前缀 (必填)
}
接入服务 service_config JSON 结构体
{
"http_address": "http://example.com/service", // HTTP服务地址 (必填)
"sub_topic_prefix": "topic_prefix" // 服务订阅主题前缀 (必填)
}
name
string
服务名
service_identifier
string
服务标识
service_type
integer
服务类型
version
string
版本号
description
string
描述
remark
string
备注
示例
{
"id": "025e46d1-4643-2558-e905-1ef0d7c9aab0",
"service_config": "{\"service_config\":\"tttttt\"}",
"name": "服务测试",
"service_identifier": "服务标识",
"service_type": 1,
"version": "1.0.0",
"description": "描述",
"remark": "备注"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
object {0}
示例
{}
最后修改时间: 7 个月前