{
  "info": {
    "_postman_id": "56dd4401-fdb1-439d-b145-f4d7619f925b",
    "name": "aiot open api",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "5072080"
  },
  "item": [
    {
      "name": "登录接口",
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "var jsonData =JSON.parse(responseBody);\n\npostman.setGlobalVariable(\"token\",jsonData.access_token);"
            ]
          }
        }
      ],
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\"authorization\":\"Basic ZWNpYzo1MzZmN2VkNGE1MTNiODMzMTI3N2IwMzVkZDE2ODExZg==\",\"clientId\":3,\"mobile\":\"smzz\",\"password\":\"HLhaiv3!\"}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/openapi/v1/user/user/login",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "user",
            "user",
            "login"
          ]
        }
      },
      "response": []
    },
    {
      "name": "分页获取设备信息",
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      },
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/openapi/v1/openapi/devices?page_size=1&current_page=10",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "openapi",
            "devices"
          ],
          "query": [
            {
              "key": "page_size",
              "value": "1"
            },
            {
              "key": "current_page",
              "value": "10"
            },
            {
              "key": "",
              "value": "",
              "disabled": true
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "分页获取设备信息",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/openapi/v1/openapi/devices",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "openapi",
            "devices"
          ],
          "query": [
            {
              "key": "page_size",
              "value": "11",
              "disabled": true
            },
            {
              "key": "current_page",
              "value": "1",
              "disabled": true
            },
            {
              "key": "",
              "value": "",
              "disabled": true
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取单个设备信息",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/openapi/v1/openapi/device?udid=b1ef9e0f1edd262c21a2abae00f28253",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "openapi",
            "device"
          ],
          "query": [
            {
              "key": "udid",
              "value": "b1ef9e0f1edd262c21a2abae00f28253"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取建筑区域映射关系",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/openapi/v1/base/region/buildingRegionRoomTree",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "base",
            "region",
            "buildingRegionRoomTree"
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取区域下设备类型",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\"id\":3,\"type\":1}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/openapi/v1/base/device/type/find/by/id",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "base",
            "device",
            "type",
            "find",
            "by",
            "id"
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取区域下设备",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\"id\":10006,\"type\":3,\"deviceTypeId\":10023}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/openapi/v1/base/building/find/devices/by/id",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "base",
            "building",
            "find",
            "devices",
            "by",
            "id"
          ]
        }
      },
      "response": []
    },
    {
      "name": "以天为单位获取历史数据",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\"start_time_stamp\":1604160000,\"end_time_stamp\":1606752000,\"ids\":[{\"udid\":\"04f7486818f6bf6f11fa2a3782711742\",\"devices_type_id\":10022},{\"udid\":\"830d69d2a3022477e960d4e5c3ff12f0\",\"devices_type_id\":10022}]}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/openapi/v1/openapi/device/day/his",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "openapi",
            "device",
            "day",
            "his"
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取设备用量",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\"start_time_stamp\":1604160000,\"end_time_stamp\":1606752000,\"ids\":[{\"udid\":\"04f7486818f6bf6f11fa2a3782711742\",\"devices_type_id\":10022},{\"udid\":\"830d69d2a3022477e960d4e5c3ff12f0\",\"devices_type_id\":10022}]}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/openapi/v1/openapi/device/his",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v1",
            "openapi",
            "device",
            "his"
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取设备离线报警信息",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\"pageSize\":100,\"currentPage\":1}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/openapi/v3/openapi/device/offline/alarm",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v3",
            "openapi",
            "device",
            "offline",
            "alarm"
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取报警列表",
      "request": {
        "auth": {
          "type": "bearer",
          "bearer": [
            {
              "key": "token",
              "value": "{{token}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [
          {
            "key": "Grpc-Metadata-Access-Code",
            "value": "{{access_code}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\"pageSize\":100,\"currentPage\":1}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/openapi/v2/maintain/alarm/message/find",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "openapi",
            "v2",
            "maintain",
            "alarm",
            "message",
            "find"
          ]
        }
      },
      "response": []
    }
  ]
}