{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"Authentication":{"description":"鉴权","example":{"password":"*************","user_name":"4MjxbCl4q461"},"properties":{"password":{"description":"一型一密/一机一密的密码,输入要求:至少1个数字,1个大写字母,1个小写字母,1个特殊字符(~!@#$%^&*()-_=+|[{}];:<>/?),长度8-32个字符","maxLength":64,"minLength":0,"type":"string"},"user_name":{"description":"一型一密/一机一密的用户名","maxLength":64,"minLength":0,"type":"string"}}},"CreateProductRequestBody":{"example":{"appid":"ef3845be-091a-4ab5-869a-9de0025e2165","device_type":"Default","manufacturer_id":10001,"manufacturer_name":"Huawei","model":"mate30pro","name":"设备名称A","product_type":0},"properties":{"app_id":{"description":"应用ID","maxLength":36,"minLength":0,"type":"string"},"data_format":{"default":0,"description":"产品的数据格式 0-JSON 1-USER_DEFINED","enum":[0,1],"format":"int32","maximum":10,"minimum":0,"type":"integer"},"description":{"description":"产品描述,长度0-200","maxLength":200,"minLength":0,"type":"string"},"device_type":{"description":"产品的设备类型(默认Default)","maxLength":32,"minLength":0,"type":"string"},"manufacturer_id":{"description":"产品供应商ID","maxLength":64,"minLength":0,"type":"string"},"manufacturer_name":{"description":"厂商名称","maxLength":64,"minLength":0,"type":"string"},"model":{"description":"产品型号","maxLength":64,"minLength":0,"type":"string"},"name":{"description":"产品名称,创建产品时租户内唯一,长度最大64,仅支持中文,英文字母,数字,下划线和中划线","maxLength":64,"minLength":0,"type":"string"},"product_type":{"description":"产品类型,0-普通产品(不支持子设备) 1-网关产品","enum":[0,1],"format":"int32","maximum":10,"minimum":0,"type":"integer"},"protocol_type":{"description":"产品的协议类型 0-mqtt 2-modbus 4-opcua","enum":[0,2,4],"format":"int32","maximum":10,"minimum":0,"type":"integer"},"template_id":{"description":"关联产品模板ID(使用产品模板创建产品时使用,否则为空),自动向下取整","maximum":999999999999999999,"minimum":1,"type":"integer"},"version":{"description":"模型版本","maxLength":32,"minLength":0,"type":"string"}},"required":["app_id","name","manufacturer_id","manufacturer_name","model","product_type","protocol_type"]},"CreatedUser":{"description":"创建时的用户","example":{"user_id":"6546435432432","user_name":"user1"},"properties":{"user_id":{"description":"用户ID","maxLength":64,"minLength":0,"type":"string"},"user_name":{"description":"用户名","maxLength":64,"minLength":0,"type":"string"}}},"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"}}},"LastUpdatedUser":{"description":"最后更新时的用户","example":{"user_id":"6546435432432","user_name":"user1"},"properties":{"user_id":{"description":"用户ID","maxLength":64,"minLength":0,"type":"string"},"user_name":{"description":"用户名","maxLength":64,"minLength":0,"type":"string"}}},"Permissions":{"description":"权限","items":{"description":"权限","maxLength":10,"type":"string"},"maxItems":9999,"minItems":0,"type":"array"},"Product":{"example":{"app_id":"a1503e51-46f7-4d23-8617-7cb2d28dde98","app_name":"app-link","authentication":{"password":"********","user_name":"4MjxbCl4q461"},"created_datetime":1607481372416,"created_user":{"user_id":"6546435432432","user_name":"user1"},"data_format":0,"description":"opcua product","device_type":"default","id":120671,"last_updated_user":{"user_id":"6546435432432","user_name":"user1"},"manufacturer_id":"pro-opcua","manufacturer_name":"pro-opcua","model":"pro-opcua","name":"pro-opcua","permissions":["read","access","delete","modify"],"product_serial":"Dd1bRt122894","product_type":0,"protocol_type":4,"version":"version"},"properties":{"app_id":{"description":"应用ID","maxLength":64,"minLength":0,"type":"string"},"app_name":{"description":"应用名称","maxLength":256,"minLength":0,"type":"string"},"authentication":{"$ref":"#/definitions/Authentication"},"created_datetime":{"description":"创建时间,timestamp(ms),使用UTC时区","format":"int64","maximum":999999999999999999,"minimum":1,"type":"integer"},"created_user":{"$ref":"#/definitions/CreatedUser"},"data_format":{"description":"data_format 0-JSON 1-USER_DEFINED","maximum":999999999999999999,"minimum":1,"type":"integer"},"description":{"description":"产品描述,长度0-200","maxLength":200,"minLength":0,"type":"string"},"device_type":{"description":"产品的设备类型(默认Default)","maxLength":64,"minLength":0,"type":"string"},"id":{"description":"产品ID","maximum":999999999999999999,"minimum":1,"type":"integer"},"last_updated_user":{"$ref":"#/definitions/LastUpdatedUser"},"manufacturer_id":{"description":"产品供应商ID","maxLength":64,"minLength":0,"type":"string"},"manufacturer_name":{"description":"厂商名称","maxLength":64,"minLength":0,"type":"string"},"model":{"description":"产品型号","maxLength":64,"minLength":0,"type":"string"},"name":{"description":"产品名称,创建产品时租户内唯一,长度最大64,仅支持中文,英文字母,数字,下划线和中划线","maxLength":64,"minLength":0,"type":"string"},"permissions":{"$ref":"#/definitions/Permissions"},"product_serial":{"description":"产品唯一序列(系统唯一值,用于MQS的TOPIC中标记产品)","maxLength":64,"minLength":0,"type":"string"},"product_type":{"description":"产品类型,0-普通产品(不支持子设备) 1-网关产品","enum":[0,1],"format":"int32","maximum":10,"minimum":0,"type":"integer"},"protocol_type":{"description":"产品的协议类型 0-mqtt 2-modbus 4-opcua","enum":[0,2,4],"format":"int32","maximum":10,"minimum":0,"type":"integer"},"version":{"description":"产品版本","maxLength":64,"minLength":0,"type":"string"}}}},"description":null,"group_id":"025d125ee4da4956af037c3315e94b30","host":"roma.cn-north-4.myhuaweicloud.com","id":"e64837fe55534229a0277d5838a08a01","info_version":"v2","method":"post","name":"CreateProduct","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}/products":{"post":{"description":"创建产品","operationId":"CreateProduct","parameters":[{"$ref":"#/parameters/project_id"},{"$ref":"#/parameters/instance_id"},{"description":"创建产品请求对象","in":"body","name":"CreateProductRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateProductRequestBody"}}],"produces":["application/json"],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/Product"}},"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"}