{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"CreateNotificationRequestBody":{"example":{"app_id":"ef3845be-091a-4ab5-869a-9de0025e2165","status":0,"topic":"online","type":0},"properties":{"app_id":{"description":"通知归属的应用ID","maxLength":36,"minLength":0,"type":"string"},"status":{"description":"启停状态 0-启用 1-停用","enum":[0,1],"format":"int32","maximum":10,"minimum":0,"type":"integer"},"topic":{"description":"通知发送的主题名,该主题需要在MQS存在","maxLength":64,"minLength":0,"type":"string"},"type":{"description":"通知类型 0-设备上线通知 1-设备下线通知 2-设备添加通知 3-设备删除通知 4-设备变更通知","enum":[0,1,2,3,4],"format":"int32","maximum":10,"minimum":0,"type":"integer"}},"required":["app_id","type","topic","status"]},"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"}}},"NotificationResponseBody":{"properties":{"app_id":{"description":"应用ID","maxLength":64,"minLength":0,"type":"string"},"instance_id":{"description":"实例ID","maxLength":20,"minLength":0,"type":"string"},"notification_id":{"description":"订阅ID","format":"int64","maximum":100,"minimum":0,"type":"integer"},"status":{"description":"订阅管理状态,0:启用,1:停用","enum":[0,1],"format":"int32","maximum":1,"minimum":0,"type":"integer"},"topic":{"description":"订阅的topic名称","maxLength":200,"minLength":3,"type":"string"},"type":{"description":"订阅类型, 0:设备上线通知类型, 1:设备下线通知类型, 2:设备添加通知类型, 3:设备删除通知类型, 4:设备变更通知类型","enum":[0,1,2,3,4],"format":"int32","maximum":4,"minimum":0,"type":"integer"}}}},"description":null,"group_id":"025d125ee4da4956af037c3315e94b30","host":"roma.cn-north-4.myhuaweicloud.com","id":"9b8124a21167402c910599d7b47abf23","info_version":"v2","method":"post","name":"CreateNotification","parameters":{"instance_id":{"description":"实例ID","in":"path","maxLength":36,"minLength":0,"name":"instance_id","required":true,"type":"string"},"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}/notifications":{"post":{"description":"该接口用于创建指定实例下对应的应用下的设备操作,订阅到指定的topic","operationId":"CreateNotification","parameters":[{"$ref":"#/parameters/project_id"},{"$ref":"#/parameters/instance_id"},{"description":"创建订阅管理请求对象","in":"body","name":"CreateNotificationRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateNotificationRequestBody"}}],"produces":["application/json"],"responses":{"200":{"description":"Created","schema":{"$ref":"#/definitions/NotificationResponseBody"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","examples":{"application/json":{"error_code":"ROMA.00110006","error_msg":"The resource does not exist. Check whether the resource ID 1 is correct.","requestId":"624c8be1-39b6-47b7-941d-c159aced368a-1619602544650-cnnorth7a-P-romalink-service01"}},"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-romaconnect-mode":"huaweicloud, on-premise","x-support-sdk":"Y"}}},"product_short":"ROMA","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建订阅管理","tags":"订阅管理操作","uri":null,"version":"2.0"}