{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"CreateProductTopicRequestBody":{"example":{"description":"/v1/${deviceId}/datas","name":"datas","permission":0,"version":"v1"},"properties":{"description":{"description":"描述","maxLength":200,"minLength":0,"type":"string"},"name":{"description":"产品级主题名称<br>Topic类格式必须以“/”进行分层,区分每个类目。其中第一个为用户自定义的版本号;第二个已经规定好,为${deviceId}通配设备ID;第三个为用户自定义的topic类名(即本字段)。Topic类组成即为:/${version}/${deviceId}/${customizePart}。简单来说,Topic类:/v1/${deviceId}/customizePart是具体Topic:/v1/deviceid1/customizePart1和/v1/deviceid2/customizePart2等的集合。","maxLength":64,"minLength":0,"type":"string"},"permission":{"description":"主题权限 0-发布 1-订阅","enum":[0,1],"format":"int32","maximum":10,"minimum":0,"type":"integer"},"version":{"description":"版本号,输入2-50个字符。值以字母或数字开头和结尾。仅允许使用字母,数字,中划线和点号。","maxLength":64,"minLength":0,"type":"string"}},"required":["name","permission","version"]},"Error":{"properties":{"error_code":{"description":"系统错误码,针对4xx和5xx类HTTP错误码的详细错误码","maxLength":64,"minLength":0,"type":"string"},"error_msg":{"description":"错误描述","maxLength":200,"minLength":0,"type":"string"},"request_id":{"description":"消息ID","maxLength":64,"minLength":0,"type":"string"}}},"ProductTopic":{"example":{"permission":1,"product_id":122888,"topic_id":17,"topic_name":"/3.0/${deviceId}/t1","version":3.0},"properties":{"description":{"description":"描述","maxLength":200,"minLength":0,"type":"string"},"permission":{"description":"主题权限 0-发布 1-订阅","enum":[0,1],"format":"int32","maximum":10,"minimum":0,"type":"integer"},"product_id":{"description":"归属产品ID","maximum":999999999999999999,"minimum":1,"type":"integer"},"topic_id":{"description":"产品主题ID","maxLength":99999999999999999,"minLength":1,"type":"string"},"topic_name":{"description":"主题名称","maxLength":64,"minLength":0,"type":"string"},"version":{"description":"版本号","maxLength":10,"minLength":0,"type":"string"}}}},"description":null,"group_id":"025d125ee4da4956af037c3315e94b30","host":"roma.cn-north-4.myhuaweicloud.com","id":"331417e182e44660a5d88a5a28dd7271","info_version":"v2","method":"post","name":"CreateProductTopic","parameters":{"instance_id":{"description":"实例ID","in":"path","maxLength":36,"minLength":0,"name":"instance_id","required":true,"type":"string"},"product_id":{"description":"产品ID","in":"path","maximum":1e23,"minimum":0,"name":"product_id","required":true,"type":"integer"},"project_id":{"description":"项目ID,获取方式请参见《ROMA Connect API参考》的“附录 > 获取项目ID”章节。","in":"path","maxLength":32,"minLength":0,"name":"project_id","required":true,"type":"string"}},"paths":{"/v2/{project_id}/link/instances/{instance_id}/products/{product_id}/topics":{"post":{"description":"添加产品主题","operationId":"CreateProductTopic","parameters":[{"$ref":"#/parameters/project_id"},{"$ref":"#/parameters/instance_id"},{"$ref":"#/parameters/product_id"},{"description":"创建产品主题请求对象","in":"body","name":"CreateProductTopicRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateProductTopicRequestBody"}}],"produces":["application/json"],"responses":{"200":{"description":"Created","schema":{"$ref":"#/definitions/ProductTopic"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"summary":"添加产品主题","tags":["产品管理"],"x-apigateway-request-type":"public","x-is-registered":"Y","x-support-sdk":"Y"}}},"product_short":"ROMA","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"添加产品主题","tags":"产品管理","uri":null,"version":"2.0"}