{
	"swagger": "2.0",
	"info": {
		"version": "v1",
		"title": "设备管理"
	},
	"tags": [],
	"basePath": "",
	"paths": {
		"/api/iot/v1/devices": {
			"get": {
				"summary": "获取单个设备信息",
				"description": "",
				"parameters": [{
					"name": "serial",
					"in": "query",
					"description": "设备序列号",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "productId",
					"description": "产品序列号",
					"required": false,
					"type": "string"
				}],
				"responses": {
					"200": {
						"description": "成功"
					},
					"400": {
						"description": "失败，请求不合法"
					},
					"422": {
						"description": "失败，请求参数不合法"
					},
					"444": {
						"description": "失败，出现了业务错误"
					}
				}
			}
		},
		"/api/iot/v1/devices/list": {
			"get": {
				"summary": "获取设备列表",
				"description": "",
				"parameters": [{
					"name": "serial",
					"in": "query",
					"description": "产品序列号",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "modelCode",
					"description": "设备类型",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "authority",
					"description": "设备属性",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "pageSize",
					"description": "分页大小",
					"required": false,
					"type": "integer",
					"format": "int32"
				},
				{
					"in": "query",
					"name": "pageNo",
					"description": "分页序号",
					"required": false,
					"type": "integer",
					"format": "int32"
				},
				{
					"in": "query",
					"name": "startTime",
					"description": "开始时间",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "endTime",
					"description": "结束时间",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "sort",
					"description": "排序",
					"required": false,
					"type": "string"
				}],
				"responses": {
					"200": {
						"description": "成功"
					},
					"400": {
						"description": "失败，请求不合法"
					},
					"422": {
						"description": "失败，请求参数不合法"
					},
					"444": {
						"description": "失败，出现了业务错误"
					}
				}
			}
		},
		"/api/iot/v1/devices/datastreams": {
			"post": {
				"summary": "向设备发送消息",
				"description": "",
				"parameters": [{
					"in": "body",
					"name": "body",
					"required": false,
					"schema": {
						"type": "object",
						"required": ["dataStreamInfo"],
						"properties": {
							"dataStreamInfo": {
								"type": "object",
								"required": ["productId",
								"serial",
								"dataStreams"],
								"properties": {
									"productId": {
										"type": "string",
										"description": "产品序列号"
									},
									"serial": {
										"type": "string",
										"description": "设备序列号"
									},
									"dataStreams": {
										"type": "array",
										"items": {
											"type": "object",
											"required": ["streamName",
											"streamValue"],
											"properties": {
												"streamName": {
													"type": "string",
													"description": "数据流名称"
												},
												"streamValue": {
													"type": "string",
													"description": "数据流值"
												}
											}
										}
									}
								}
							}
						}
					}
				}],
				"responses": {
					"201": {
						"description": "成功"
					},
					"400": {
						"description": "失败，请求不合法"
					},
					"422": {
						"description": "失败，请求参数不合法"
					},
					"444": {
						"description": "失败，出现了业务错误"
					}
				}
			},
			"get": {
				"summary": "查询设备历史数据",
				"description": "",
				"parameters": [{
					"in": "query",
					"name": "serial",
					"description": "设备序列号",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "dataStreamName",
					"description": "数据流能力名称",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "productId",
					"description": "产品序列号",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "pageSize",
					"description": "分页大小",
					"required": false,
					"type": "integer",
					"format": "int32"
				},
				{
					"in": "query",
					"name": "pageNo",
					"description": "分页序列号",
					"required": false,
					"type": "integer",
					"format": "int32"
				},
				{
					"in": "query",
					"name": "startTime",
					"description": "开始时间",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "endTime",
					"description": "结束时间",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "sort",
					"description": "排序",
					"required": false,
					"type": "string"
				}],
				"responses": {
					"200": {
						"description": "成功"
					},
					"400": {
						"description": "失败，请求不合法"
					},
					"422": {
						"description": "失败，请求参数不合法"
					},
					"444": {
						"description": "失败，出现了业务错误"
					}
				}
			}
		},
		"/api/iot/v1/devices/datastreams/state": {
			"get": {
				"summary": "查询消息是否下达到设备",
				"description": "",
				"parameters": [{
					"in": "query",
					"name": "serial",
					"description": "设备序列号",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "streamCinId",
					"description": "能力实例序列号",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "productId",
					"description": "产品序列号",
					"required": false,
					"type": "string"
				}],
				"responses": {
					"200": {
						"description": "成功"
					},
					"400": {
						"description": "失败，请求不合法"
					},
					"422": {
						"description": "失败，请求参数不合法"
					},
					"444": {
						"description": "失败，出现了业务错误"
					}
				}
			}
		},
		"/api/iot/v1/devices/events": {
			"get": {
				"summary": "查询事件历史数据",
				"description": "",
				"parameters": [{
					"in": "query",
					"name": "serial",
					"description": "设备序列号",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "dataStreamName",
					"description": "数据流能力名称",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "productId",
					"description": "产品序列号",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "pageSize",
					"description": "分页大小",
					"required": false,
					"type": "integer",
					"format": "int32"
				},
				{
					"in": "query",
					"name": "pageNo",
					"description": "分页序列号",
					"required": false,
					"type": "integer",
					"format": "int32"
				},
				{
					"in": "query",
					"name": "startTime",
					"description": "开始时间",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "endTime",
					"description": "结束时间",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "sort",
					"description": "排序",
					"required": false,
					"type": "string"
				}],
				"responses": {
					"200": {
						"description": "成功"
					},
					"400": {
						"description": "失败，请求不合法"
					},
					"422": {
						"description": "失败，请求参数不合法"
					},
					"444": {
						"description": "失败，出现了业务错误"
					}
				}
			}
		},
		"/api/iot/v1/devices/methods": {
			"post": {
				"summary": "向设备发送方法",
				"description": "",
				"parameters": [{
					"in": "body",
					"name": "body",
					"required": false,
					"schema": {
						"type": "object",
						"required": ["serial",
						"methodName",
						"inputData"],
						"properties": {
							"serial": {
								"type": "string",
								"description": "设备序列号"
							},
							"productId": {
								"type": "string",
								"description": "产品序列号"
							},
							"methodName": {
								"type": "string",
								"description": "方法名称"
							},
							"inputData": {
								"type": "object",
								"description": "方法参数"
							}
						}
					}
				}],
				"responses": {
					"201": {
						"description": "success"
					},
					"400": {
						"description": "error, request is invalid."
					},
					"422": {
						"description": "error, request parameter is invalid."
					},
					"444": {
						"description": "error, exception occurred."
					}
				}
			},
			"get": {
				"summary": "查询方法历史数据",
				"description": "",
				"parameters": [{
					"in": "query",
					"name": "serial",
					"description": "设备序列号",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "methodName",
					"description": "方法名称",
					"required": true,
					"type": "string"
				},
				{
					"in": "query",
					"name": "productId",
					"description": "产品序列号",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "pageSize",
					"description": "分页大小",
					"required": false,
					"type": "integer",
					"format": "int32"
				},
				{
					"in": "query",
					"name": "pageNo",
					"description": "分页序列号",
					"required": false,
					"type": "integer",
					"format": "int32"
				},
				{
					"in": "query",
					"name": "startTime",
					"description": "开始时间",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "endTime",
					"description": "结束时间",
					"required": false,
					"type": "string"
				},
				{
					"in": "query",
					"name": "sort",
					"description": "排序",
					"required": false,
					"type": "string"
				}],
				"responses": {
					"200": {
						"description": "成功"
					},
					"400": {
						"description": "失败，请求不合法"
					},
					"422": {
						"description": "失败，请求参数不合法"
					},
					"444": {
						"description": "失败，出现了业务错误"
					}
				}
			}
		}
		
	},
	"definitions": {}
}