同步操作将从 MyEMS/MyEMS能源管理系统 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Providing REST API service for MyEMS components and third parties.
anytree
simplejson
mysql.connector
falcon
falcon_cors
gunicorn
openpyxl
In this step, you will install myems-api on Ubuntu for production or development.
For macOS developers, please refer to Installation on macOS (Chinese)
$ cd ~/tools
$ git clone https://github.com/c0fec0de/anytree.git
$ cd anytree
$ sudo python3 setup.py install
$ cd ~/tools
$ git clone https://github.com/simplejson/simplejson.git
$ cd simplejson
$ sudo python3 setup.py install
$ cd ~/tools
$ wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz
$ tar xzf mysql-connector-python-8.0.20.tar.gz
$ cd ~/tools/mysql-connector-python-8.0.20
$ sudo python3 setup.py install
Install Falcon,
if you are behind proxy, use --proxy parameter
Refer to
$ mkdir ~/tools/falcon && cd ~/tools/falcon
$ pip3 download cython falcon falcon-cors falcon-multipart
$ export LC_ALL="en_US.UTF-8"
$ export LC_CTYPE="en_US.UTF-8"
$ sudo dpkg-reconfigure locales
$ sudo pip3 install --upgrade --no-index --find-links ~/tools/falcon cython falcon falcon-cors falcon-multipart
$ mkdir ~/tools/gunicorn && cd ~/tools/gunicorn
$ pip3 download gunicorn
$ sudo pip3 install --no-index --find-links ~/tools/gunicorn gunicorn
Get the latest version of et_xmlfile from https://foss.heptapod.net/openpyxl/et_xmlfile
Get the latest version of jdcal from https://github.com/phn/jdcal
Get the latest version of openpyxl from https://foss.heptapod.net/openpyxl/openpyxl
$ cd ~/tools
$ wget https://foss.heptapod.net/openpyxl/et_xmlfile/-/archive/branch/default/et_xmlfile-branch-default.tar.gz
$ tar xzf et_xmlfile-branch-default.tar.gz
$ cd ~/tools/et_xmlfile-branch-default
$ sudo python3 setup.py install
$ cd ~/tools
$ git clone https://github.com/phn/jdcal.git
$ cd ~/tools/jdcal
$ sudo python3 setup.py install
$ mkdir ~/tools/pillow && cd ~/tools/pillow
$ pip3 download Pillow
$ sudo pip3 install --no-index --find-links ~/tools/pillow Pillow
$ cd ~/tools
$ wget https://foss.heptapod.net/openpyxl/openpyxl/-/archive/branch/3.0/openpyxl-branch-3.0.tar.gz
$ tar xzf openpyxl-branch-3.0.tar.gz
$ cd openpyxl-branch-3.0
$ sudo python3 setup.py install
$ cd ~
$ git clone https://github.com/MyEMS/myems.git
$ cd ~/myems/myems-api
$ sudo cp -R ~/myems/myems-api /myems-api
Check and change the config file if necessary:
$ sudo nano /myems-api/config.py
Change the listening port (default is 8000) in gunicorn.socket:
$ sudo nano /myems-api/myems-api.socket
ListenStream=0.0.0.0:8000
$ sudo ufw allow 8000
Setup systemd configure files:
$ sudo cp /myems-api/myems-api.service /lib/systemd/system/
$ sudo cp /myems-api/myems-api.socket /lib/systemd/system/
$ sudo cp /myems-api/myems-api.conf /usr/lib/tmpfiles.d/
Next enable the services so that they autostart at boot:
$ sudo systemctl enable myems-api.socket
$ sudo systemctl enable myems-api.service
Start the services :
$ sudo systemctl start myems-api.socket
$ sudo systemctl start myems-api.service
$ cd myems-api
$ sudo gunicorn -b 127.0.0.1:8000 app:api
View in Postman: import the file MyEMS.postman_collection.json with Postman
Meter | Virtual Meter | Offline Meter | Offline Meter File
Space | Tenant | Tenant Type | Store | Store Type | Shopfloor
Equipment | Combined Equipment
Distribution System | Distribution Circuit
Rule | [Email Message](#Email Message) | [Text Message](#Text Message) | [Web Message](#Web Message) | [Wechat Message](#Wechat Message)
[Email Server](#Email Server) | [GSM Modem](#GSM Modem)
User | Privilege | Contact | Notification
$ curl -i -X GET {{base_url}}/contacts/{id}
$ curl -i -X GET {{base_url}}/contacts
$ curl -i -X DELETE {{base_url}}/contacts/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"albert", "email":"albert@myems.io", "phone":"+8613888888888", "description":"contact description"}}' {{base_url}}/contacts
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"albert", "email":"albert@myems.io", "phone":"+8613888888899", "description":"contact description"}}' {{base_url}}/contacts/{id}
$ curl -i -X GET {{base_url}}/costcenters/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Cost Center ID |
name | string | Cost Center name |
uuid | string | Cost Center UUID |
external_id | string | Cost Center External ID ( For example, ID in SAP, ERP...) |
$ curl -i -X GET {{base_url}}/costcenters
$ curl -i -X DELETE {{base_url}}/costcenters/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"动力中心", "external_id":"21829198980001"}}' {{base_url}}/costcenters
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"动力中心2", "external_id":"21829198980002"}}' {{base_url}}/costcenters/{id}
$ curl -i -X GET {{base_url}}/costcenters/{id}/tariffs
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"tariff_id":"3"}}' {{base_url}}/costcenters/{id}/tariffs
$ curl -i -X DELETE {{base_url}}/costcenters/{id}/tariffs/{tid}
$ curl -i -X GET {{base_url}}/datasources/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Data Source ID |
name | string | Data Source name |
gateway | object | Gateway |
uuid | string | Data Source UUID |
protocol | string | Protocol Type Supported: 'modbus-tcp', 'modbus-rtu', 'bacnet-ip', 's7', 'profibus', 'profinet', 'opc-ua', 'lora', 'simulation', 'controllogix', 'weather' |
connection | json | Connection data in JSON. BACnet/IP example: {"host":"10.1.2.88"}, Modbus TCP example: {"host":"10.1.2.88", "port":502}, S7 example: {"host":"10.1.2.202", "port":102, "rack": 0, "slot": 2}, ControlLogix example: {"host":"10.1.2.88","port":44818,"processorslot":3} OPC UA example: {"url":"opc.tcp://10.1.2.5:49320/OPCUA/SimulationServer/"} |
last_seen_datetime | float | Indicates the last time when the data source was seen in a number of milliseconds since January 1, 1970, 00:00:00, universal time |
status | string | 'online' or 'offline' determined by last seen datetime |
$ curl -i -X GET {{base_url}}/datasources
$ curl -i -X DELETE {{base_url}}/datasources/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"Modbus1", "gateway_id":1, "protocol":"modbus-tcp", "connection":"{\"host\":\"10.1.2.88\", \"port\":502}"}}' {{base_url}}/datasources
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"Modbus1", "gateway_id":1, "protocol":"modbus-tcp", "connection":"{\"host\":\"10.1.2.99\", \"port\":502}"}}' {{base_url}}/datasources/{id}
$ curl -i -X GET {{base_url}}/datasources/{id}/points
$ curl -i -X GET {{base_url}}/distributioncircuits/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Distribution Circuit ID |
name | string | Distribution Circuit name |
uuid | string | Distribution Circuit UUID |
distribution_system | object | Distribution System Object |
distribution_room | string | Distribution Room |
switchgear | string | Switchgear |
peak_load | decimal(18,3) | Peak Load (KW) |
peak_current | decimal(18,3) | Peak Current (A) |
customers | string | Customers or users |
meters | string | Meters (output or next level) |
$ curl -i -X GET {{base_url}}/distributioncircuits
$ curl -i -X DELETE {{base_url}}/distributioncircuits/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"51W91", "distribution_system_id":1, "distribution_room":"EW1", "switchgear":"51AL9", "peak_load": 30, "peak_current": 53.6, "customers": "地下室应急照明", "meters": "ALE-1102, ALE-1082"}}' {{base_url}}/distributioncircuits
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"51W92", "distribution_system_id":1, "distribution_room":"EW1", "switchgear":"51AL9", "peak_load": 30, "peak_current": 53.6, "customers": "地下室应急照明", "meters": "ALE-1102, ALE-1082"}}' {{base_url}}/distributioncircuits/{id}
$ curl -i -X GET {{base_url}}/distributioncircuits/{id}/points
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"point_id":"3"}}' {{base_url}}/distributioncircuits/{id}/points
$ curl -i -X DELETE {{base_url}}/distributioncircuits/{id}/points/{pid}
$ curl -i -X GET {{base_url}}/distributionsystems/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Distribution System ID |
name | string | Distribution System name |
uuid | string | Distribution System UUID |
svg | string | SVG file in plain text |
description | string | Description (allow None) |
$ curl -i -X GET {{base_url}}/distributionsystems
$ curl -i -X DELETE {{base_url}}/distributionsystems/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"示例配电系统", "svg":"<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg width=\"5cm\" height=\"4cm\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><desc>Four separate rectangles</desc><rect x=\".5cm\" y=\".5cm\" width=\"2cm\" height=\"1cm\"/></svg>", "description":"demo description"}}' {{base_url}}/distributionsystems
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"示例配电系统", "svg":"<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg width=\"5cm\" height=\"4cm\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><desc>Four separate rectangles</desc><rect x=\".5cm\" y=\".5cm\" width=\"2cm\" height=\"1cm\"/></svg>", "description":"demo description"}}' {{base_url}}/distributionsystems/{id}
$ curl -i -X GET {{base_url}}/distributionsystems/{id}/distributioncircuits
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Email Message ID |
recipient_name | string | Recipient Name |
recipient_email | string | Recipient Email |
subject | string | Email Message Subject |
message | string | Email Message Body |
attachment_file_name | string | Email Attachment File Name |
create_datetime | float | Email Message Created Datetime (POSIX timestamp * 1000) |
scheduled_datetime | float | Email Message Scheduled Datetime (POSIX timestamp * 1000) |
status | string | Status ('new', 'sent', 'timeout' |
$ curl -i -X GET {{base_url}}/emailmessages/{id}
$ curl -i -X GET {{base_url}}/emailmessages/from/{startdate}/to/{enddate}
$ curl -i -X DELETE {{base_url}}/emailmessages/{id}
$ curl -i -X GET {{base_url}}/emailservers/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Email Server ID |
host | string | Email Server host |
port | integer | Email Server port |
requires_authentication | boolean | Indicates if the server requires authentication |
user_name | string | Email Server user name |
password | string | Email Server password |
from_addr | string | Indicates from which email address to send emails |
$ curl -i -X GET {{base_url}}/emailservers
$ curl -i -X DELETE {{base_url}}/emailservers/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"host":"smtp.163.com","port":25, "requires_authentication":true, "user_name":"myems" , "password":"!MyEMS1" , "from_addr":"myems@163.com"}}' {{base_url}}/emailservers
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"host":"smtp.myems.io","port":25, "requires_authentication":true, "user_name":"myems" , "password":"!MyEMS1" , "from_addr":"myems@myems.io"}}' {{base_url}}/emailservers/{id}
$ curl -i -X GET {{base_url}}/energycategories/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Energy Category ID |
name | string | Energy Category name |
uuid | string | Energy Category UUID |
unit_of_measure | string | Unit of measure |
kgce | string | KG coal equivalent |
kgco2e | string | KG Carbon dioxide equivalent |
$ curl -i -X GET {{base_url}}/energycategories
$ curl -i -X DELETE {{base_url}}/energycategories/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"电","unit_of_measure":"kWh", "kgce":0.1229 , "kgco2e":0.8825}}' {{base_url}}/energycategories
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"电","unit_of_measure":"kWh", "kgce":0.1329 , "kgco2e":0.9825}}' {{base_url}}/energycategories/{id}
$ curl -i -X GET {{base_url}}/energyflowdiagrams/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Equipment ID |
name | string | Equipment name |
uuid | string | Equipment UUID |
$ curl -i -X GET {{base_url}}/energyflowdiagrams
$ curl -i -X DELETE {{base_url}}/energyflowdiagrams/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"MyEMS Energy Flow"}}' {{base_url}}/energyflowdiagrams
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMS Energy Flow Diagram"}}' {{base_url}}/energyflowdiagrams/{id}
$ curl -i -X GET {{base_url}}/energyflowdiagrams/{id}/nodes
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"10KV#1"}}' {{base_url}}/energyflowdiagrams/{id}/nodes
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"10KV#2"}}' {{base_url}}/energyflowdiagrams/{id}/nodes/{nid}
$ curl -i -X DELETE {{base_url}}/energyflowdiagrams/{id}/nodes/{nid}
$ curl -i -X GET {{base_url}}/energyflowdiagrams/{id}/links
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"source_node_id":1, "target_node_id":3, "meter_uuid":"d806a78d-a31e-4833-b5c8-81261cfeb1f2"}}' {{base_url}}/energyflowdiagrams/{id}/links
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"source_node_id":1, "target_node_id":4, "meter_uuid":"d806a78d-a31e-4833-b5c8-81261cfeb1f2"}}' {{base_url}}/energyflowdiagrams/{id}/links/{lid}
$ curl -i -X DELETE {{base_url}}/energyflowdiagrams/{id}/links/{lid}
$ curl -i -X GET {{base_url}}/energyitems/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Energy Item ID |
name | string | Energy Item name |
uuid | string | Energy Item UUID |
Energy Category | object | Energy Category Object |
$ curl -i -X GET {{base_url}}/energyitems
$ curl -i -X DELETE {{base_url}}/energyitems/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"空调用电","energy_category_id":1}}' {{base_url}}/energyitems
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"动力用电","energy_category_id":1}}' {{base_url}}/energyitems/{id}
$ curl -i -X GET {{base_url}}/equipments/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Equipment ID |
name | string | Equipment name |
uuid | string | Equipment UUID |
is_input_counted | boolean | Indicates if the Equipment's energy input is counted for aggregating |
is_output_counted | boolean | Indicates if the Equipment's energy output is counted for aggregating |
cost_center | Object | Cost Center Object |
description | string | Equipment description |
$ curl -i -X GET {{base_url}}/equipments
$ curl -i -X DELETE {{base_url}}/equipments/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"MyEMS Chiller", "is_input_counted":true, "is_output_counted":false, "cost_center_id":1, "description":"equipment description"}}' {{base_url}}/equipments
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMS Chiller", "is_input_counted":true, "is_output_counted":true, "cost_center_id":1, "description":"equipment description"}}' {{base_url}}/equipments/{id}
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{}}' {{base_url}}/equipments/{id}
$ curl -i -X GET {{base_url}}/equipments/{id}/meters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"meter_id":1}}' {{base_url}}/equipments/{id}/meters
$ curl -i -X DELETE {{base_url}}/equipments/{id}/meters/{mid}
$ curl -i -X GET {{base_url}}/equipments/{id}/parameters
$ curl -i -X GET {{base_url}}/equipments/{id}/parameters/{pid}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Parameter ID |
name | string | Parameter name |
parameter_type | string | Parameter Type: constant, point, meter |
is_input_counted | boolean | Indicates if the equipment's energy input is counted for aggregating |
is_output_counted | boolean | Indicates if the equipment's energy output is counted for aggregating |
constant | string | Parameter constant value |
point | object | Parameter point object |
numerator_meter | object | Parameter numerator meter object |
denominator_meter | object | Parameter numerator meter object |
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test parameter", "parameter_type":"constant", "constant":"test constant", "point_id":null, "numerator_meter_uuid":null, "denominator_meter_uuid":null}}' {{base_url}}/equipments/{id}/parameters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test parameter", "parameter_type":"point", "constant":null, "point_id":1, "numerator_meter_uuid":null, "denominator_meter_uuid":null}}' {{base_url}}/equipments/{id}/parameters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test parameter", "parameter_type":"fraction", "constant":null, "point_id":null, "numerator_meter_uuid":"89ff5118-d0c2-4dd8-8098-a8698189b2ea", "denominator_meter_uuid":"5ca62d2a-908e-40c5-a6b5-a8e436d60db4"}}' {{base_url}}/equipments/{id}/parameters
$ curl -i -X DELETE {{base_url}}/equipments/{id}/parameters/{pid}
$ curl -i -X GET {{base_url}}/equipments/{id}/offlinemeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"offline_meter_id":1}}' {{base_url}}/equipments/{id}/offlinemeters
$ curl -i -X DELETE {{base_url}}/equipments/{id}/offlinemeters/{mid}
$ curl -i -X GET {{base_url}}/equipments/{id}/virtualmeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/equipments/{id}/virtualmeters
$ curl -i -X DELETE {{base_url}}/equipments/{id}/virtualmeters/{mid}
$ curl -i -X GET {{base_url}}/combinedequipments/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Combined Equipment ID |
name | string | Combined Equipment name |
uuid | string | Combined Equipment UUID |
is_input_counted | boolean | Indicates if the combined equipment's energy input is counted for aggregating |
is_output_counted | boolean | Indicates if the combined equipment's energy output is counted for aggregating |
cost_center | Object | Cost Center Object |
description | string | Combined Equipment description |
$ curl -i -X GET {{base_url}}/combinedequipments
$ curl -i -X DELETE {{base_url}}/combinedequipments/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"MyEMS Chiller Plant", "is_input_counted":true, "is_output_counted":false, "cost_center_id":1, "description":"equipment description"}}' {{base_url}}/combinedequipments
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMS Chiller Plant", "is_input_counted":true, "is_output_counted":true, "cost_center_id":1, "description":"equipment description"}}' {{base_url}}/combinedequipments/{id}
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{}}' {{base_url}}/combinedequipments/{id}
$ curl -i -X GET {{base_url}}/combinedequipments/{id}/equipments
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"equipment_id":1}}' {{base_url}}/combinedequipments/{id}/equipments
$ curl -i -X DELETE {{base_url}}/combinedequipments/{id}/equipments/{eid}
$ curl -i -X GET {{base_url}}/combinedequipments/{id}/meters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"meter_id":1}}' {{base_url}}/combinedequipments/{id}/meters
$ curl -i -X DELETE {{base_url}}/combinedequipments/{id}/meters/{mid}
$ curl -i -X GET {{base_url}}/combinedequipments/{id}/parameters
$ curl -i -X GET {{base_url}}/combinedequipments/{id}/parameters/{pid}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Parameter ID |
name | string | Parameter name |
parameter_type | string | Parameter Type: constant, point, meter |
is_input_counted | boolean | Indicates if the Combined Equipment's energy input is counted for aggregating |
is_output_counted | boolean | Indicates if the Combined Equipment's energy output is counted for aggregating |
constant | string | Parameter constant value |
point | object | Parameter point object |
numerator_meter | object | Parameter numerator meter object |
denominator_meter | object | Parameter numerator meter object |
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test parameter", "parameter_type":"constant", "constant":"test constant", "point_id":null, "numerator_meter_uuid":null, "denominator_meter_uuid":null}}' {{base_url}}/combinedequipments/{id}/parameters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test parameter", "parameter_type":"point", "constant":null, "point_id":1, "numerator_meter_uuid":null, "denominator_meter_uuid":null}}' {{base_url}}/combinedequipments/{id}/parameters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test parameter", "parameter_type":"fraction", "constant":null, "point_id":null, "numerator_meter_uuid":"89ff5118-d0c2-4dd8-8098-a8698189b2ea", "denominator_meter_uuid":"5ca62d2a-908e-40c5-a6b5-a8e436d60db4"}}' {{base_url}}/combinedequipments/{id}/parameters
$ curl -i -X DELETE {{base_url}}/combinedequipments/{id}/parameters/{pid}
$ curl -i -X GET {{base_url}}/combinedequipments/{id}/offlinemeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"offline_meter_id":1}}' {{base_url}}/combinedequipments/{id}/offlinemeters
$ curl -i -X DELETE {{base_url}}/combinedequipments/{id}/offlinemeters/{mid}
$ curl -i -X GET {{base_url}}/combinedequipments/{id}/virtualmeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/combinedequipments/{id}/virtualmeters
$ curl -i -X DELETE {{base_url}}/combinedequipments/{id}/virtualmeters/{mid}
$ curl -i -X GET {{base_url}}/gateways/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Gateway ID |
name | string | Gateway name |
uuid | string | Data Source UUID |
token | string | Data Source Token |
last_seen_datetime | float | Indicates the last time when the gateway was seen in a number of milliseconds since January 1, 1970, 00:00:00, universal time |
status | string | 'online' or 'offline' determined by last seen datetime |
$ curl -i -X GET {{base_url}}/gateways
$ curl -i -X DELETE {{base_url}}/gateways/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"MyEMS Gateway 1"}}' {{base_url}}/gateways
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMS Gateway #1"}}' {{base_url}}/gateways/{id}
$ curl -i -X GET {{base_url}}/gateways/{id}/datasources
$ curl -i -X GET {{base_url}}/gsmmodems/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | GSM Modem ID |
serial_port | string | GSM Modem serial port |
baud_rate | integer | GSM Modem baud rate |
$ curl -i -X GET {{base_url}}/gsmmodems
$ curl -i -X DELETE {{base_url}}/gsmmodems/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"serial_port":"/dev/ttyS0","baud_rate":115200}}' {{base_url}}/gsmmodems
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"serial_port":"/dev/ttyS0","baud_rate":115200}}' {{base_url}}/gsmmodems/{id}
$ curl -i -X GET {{base_url}}/knowledgefiles/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Knowledge File ID |
file_name | string | Knowledge File name |
uuid | string | Knowledge File UUID |
upload_datetime | float | the number of milliseconds since January 1, 1970, 00:00:00, universal time |
user_display_name | string | Upload user's display name |
file_object | BLOB | Knowledge File Object |
$ curl -i -X GET {{base_url}}/knowledgefiles
$ curl -i -X DELETE {{base_url}}/knowledgefiles/{id}
$ curl -i -H "Content-Type: application/TBD" -X POST -d 'file: (binary)' {{base_url}}/knowledgefiles
$ curl -i -X GET {{base_url}}/knowledgefiles/{id}/restore
$ curl -i -X GET {{base_url}}/meters/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Meter ID |
name | string | Meter name |
uuid | string | Meter UUID |
energy_category | Object | Energy Category Object |
is_counted | boolean | Meter is counted in associated unit |
hourly_low_limit | decimal(18,3) | Inclusive. Default is 0. If the meter has accuracy problems, set the value to a small positive value, such as 0.100 |
hourly_high_limit | decimal(18,3) | Inclusive. Maximum energy consumption per hour, Rated total active Power, Rated Flow, etc. |
cost_center | Object | Cost Center Object |
energy_item | Object | Energy Item Object |
master_meter | Object | Master Meter Object |
description | string | Meter description |
$ curl -i -X GET {{base_url}}/meters
$ curl -i -X DELETE {{base_url}}/meters/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"PM20", "energy_category_id":1, "hourly_low_limit":0.000, "hourly_high_limit":999.999, "is_counted":true, "cost_center_id":1, "energy_item_id":1, "master_meter_id":1, "description":"空调用电"}}' {{base_url}}/meters
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"PM20", "energy_category_id":1, "hourly_low_limit":0.000, "hourly_high_limit":999.999, "is_counted":true, "cost_center_id":1, "energy_item_id":1, "master_meter_id":1, "description":"空调用电"}}' {{base_url}}/meters/{id}
$ curl -i -X GET {{base_url}}/meters/{id}/submeters
$ curl -i -X GET {{base_url}}/meters/{id}/points
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"point_id":"3"}}' {{base_url}}/meters/{id}/points
$ curl -i -X DELETE {{base_url}}/meters/{id}/points/{pid}
NOTE: Login before call these APIs, and then update User-UUID and Token in Headers
$ curl -i -X GET {{base_url}}/notifications/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Notification ID |
created_datetime | string | Created Datetime |
status | string | Notification Status (unread, read, archived) |
subject | string | Notification Subject |
message | string | Notification Message |
url | string | Notification URL |
$ curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: 02f93023a39c98e1d1bc9f5197a83dfc5ddc0d48" -X GET {{base_url}}/notifications?startdatetime={startdatetime}&enddatetime={enddatetime}&status={status}
$ curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: 02f93023a39c98e1d1bc9f5197a83dfc5ddc0d48" -X DELETE {{base_url}}/notifications/{id}
$ curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: 02f93023a39c98e1d1bc9f5197a83dfc5ddc0d48" -H "Content-Type: application/json" -X PUT -d '{"data":{"status":"read"}}' {{base_url}}/notifications/{id}
$ curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: 02f93023a39c98e1d1bc9f5197a83dfc5ddc0d48" -X DELETE {{base_url}}/notifications/{id}
$ curl -i -X GET {{base_url}}/offlinemeters/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Offline Meter ID |
name | string | Offline Meter name |
uuid | string | Offline Meter UUID |
energy_category | Object | Energy Category Object |
is_counted | boolean | Offline Meter is counted in associated unit |
hourly_low_limit | decimal(18,3) | Inclusive. Default is 0. If the meter has accuracy problems, set the value to a small positive value, such as 0.100 |
hourly_high_limit | decimal(18,3) | Inclusive. Maximum energy consumption per hour, Rated total active Power, Rated Flow, etc. |
cost_center | Object | Cost Center Object |
energy_item | Object | Energy Item Object |
description | string | Offline Meter description |
$ curl -i -X GET {{base_url}}/offlinemeters
$ curl -i -X DELETE {{base_url}}/offlinemeters/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"OfflinePM20", "energy_category_id":1, "is_counted":true, "hourly_low_limit":0.000, "hourly_high_limit":999.999, "cost_center_id":1, "energy_item_id":1, "description":"空调用电"}}' {{base_url}}/offlinemeters
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"OfflinePM20", "energy_category_id":1, "is_counted":true, "hourly_low_limit":0.000, "hourly_high_limit":999.999, "cost_center_id":1, "energy_item_id":1, "description":"空调用电"}}' {{base_url}}/offlinemeters/{id}
$ curl -i -X GET {{base_url}}/offlinemeterfiles/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Offline Meter File ID |
file_name | string | Offline Meter File name |
uuid | string | Offline Meter File UUID |
upload_datetime | float | the number of milliseconds since January 1, 1970, 00:00:00, universal time |
status | string | Offline Meter File processing status (new, done, error) |
file_object | BLOB | Offline Meter File Object |
$ curl -i -X GET {{base_url}}/offlinemeterfiles
$ curl -i -X DELETE {{base_url}}/offlinemeterfiles/{id}
$ curl -i -H "Content-Type: application/TBD" -X POST -d 'file: (binary)' {{base_url}}/offlinemeters
$ curl -i -X GET {{base_url}}/points/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Point ID |
name | string | Point name |
data_source | object | Data Source Object |
object_type | string | Object Type ('ENERGY_VALUE', 'ANALOG_VALUE, 'BINARY_VALUE') |
units | string | Units of Measure |
high_limit | float | High Limit of the Point Value |
low_limit | float | Low Limit of the Point Value |
ratio | float | Raw value will be multiplied by ratio value |
is_trend | boolean | The Point Value is Recorded as Trend |
address | json | Address structure varied by protocol |
Modbus TCP Structure | ||
├slave_id | integer | Slave ID |
├function_code | integer | Modbus functions:READ_COILS = 1, READ_DISCRETE_INPUTS = 2, READ_HOLDING_REGISTERS = 3, READ_INPUT_REGISTERS = 4 |
├offset | integer | Offset |
├number_of_registers | integer | Number of Registers |
└format | string | Data Format. see below introductions |
BACnet/IP Structure | ||
├object_type | string | BACnet Object Type ('analogValue', 'analogInput', 'analogOutput', 'binaryValue', 'binaryInput', 'binaryOutput') |
├object_id | integer | BACnet Object Instance Number |
├property_name | string | BACnet Property Name ('presentValue') |
└property_array_index | integer/null | BACnet Property Array Index or None of Object Type is not Array |
description | string | Point description, allow null |
$ curl -i -X GET {{base_url}}/points
$ curl -i -X DELETE {{base_url}}/points/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"ModbusPoint1", "data_source_id":1, "object_type": "ENERGY_VALUE", "units":"kWh", "low_limit":0, "high_limit":999999999, "is_trend":true, "address":"{\"slave_id\":1, \"function_code\":3, \"offset\":1, \"number_of_registers\":2, \"data_format\":\"float\"}", "description":null}}' {{base_url}}/points
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"ModbusPoint1", "data_source_id":1, "object_type": "ENERGY_VALUE", "units":"kWh", "low_limit":0, "high_limit":999999999, "is_trend":true, "address":"{\"slave_id\":1, \"function_code\":3, \"offset\":1, \"number_of_registers\":2, \"data_format\":\"float\"}", "description":null}}' {{base_url}}/points/{id}
$ curl -i -X GET {{base_url}}/privileges/{id}
$ curl -i -X GET {{base_url}}/privileges
$ curl -i -X DELETE {{base_url}}/privileges/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"superusers","data":"{\"spaces\":[1,2,3,5]}"}}' {{base_url}}/privileges
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"superusers", "data":"{\"spaces\":[1, 3]}"}}' {{base_url}}/privileges/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Rule ID |
name | string | Rule Name |
uuid | string | Rule UUID |
fdd_code | string | SYSTEM01, SYSTEM02, ..., REALTIME01, REALTIME02, ..., SPACE01, SPACE02, ... METER01, METER02, ... |
category | string | SYSTEM, REALTIME, SPACE, METER, TENANT, STORE, SHOPFLOOR, EQUIPMENT, COMBINEDEQUIPMENT |
priority | string | CRITICAL, HIGH, MEDIUM, LOW |
channel | string | WEB, EMAIL, SMS, WECHAT, CALL |
expression | string | JSON string of diagnosed objects, points, values, and recipients |
message_template | string | Plain text template that supports $-substitutions |
is_enabled | boolean | Indicates if this rule is enabled |
last_run_datetime | float | null, or the number of milliseconds since January 1, 1970, 00:00:00, universal time |
next_run_datetime | float | null, or the number of milliseconds since January 1, 1970, 00:00:00, universal time |
$ curl -i -X GET {{base_url}}/rules/{id}
$ curl -i -X GET {{base_url}}/rules
$ curl -i -X DELETE {{base_url}}/rules/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"Space Energy Consumption Over Limit", "fdd_code":"SPACE01", "category":"SPACE", "priority":"HIGH", "channel":"WEB", "expression":"{\"space_id\":1, \"high_limit\":1000.000}", "message_template":"%s截止到目前电耗%s,超标%s。", "is_enabled":true}}' {{base_url}}/rules
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"Space Energy Consumption Over Limit", "fdd_code":"SPACE01", "category":"SPACE", "priority":"HIGH", "channel":"WEB", "expression":"{\"space_id\":1, \"high_limit\":1000.000}", "message_template":"%s截止到目前电耗%s,超标%s。", "is_enabled":true}}' {{base_url}}/rules/{id}
$ curl -i -X GET {{base_url}}/sensors/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Sensor ID |
name | string | Sensor name |
uuid | string | Sensor UUID |
description | string | Sensor description |
$ curl -i -X GET {{base_url}}/sensors
$ curl -i -X DELETE {{base_url}}/sensors/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"Sensor10", "description":"sensor description"}}' {{base_url}}/sensors
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"Sensor10", "description":"sensor description"}}' {{base_url}}/sensors/{id}
$ curl -i -X GET {{base_url}}/sensors/{id}/points
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"point_id":"3"}}' {{base_url}}/sensors/{id}/points
$ curl -i -X DELETE {{base_url}}/sensors/{id}/points/{pid}
$ curl -i -X GET {{base_url}}/shopfloors/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Shopfloor ID |
name | string | Shopfloor name |
uuid | string | Shopfloor UUID |
area | decimal(18, 3) | Area |
is_input_counted | boolean | Indicates if the Shopfloor's energy input is counted for aggregating |
contact | Object | Contact Object |
cost_center | Object | Cost Center Object |
description | string | Shopfloor description |
$ curl -i -X GET {{base_url}}/shopfloors
$ curl -i -X DELETE {{base_url}}/shopfloors/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"MyEMS Shopfloor", "area":999.99, "is_input_counted":true, "contact_id":1, "cost_center_id":1, "description":"Shopfloor description"}}' {{base_url}}/shopfloors
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMS Shopfloor", "area":999.99, "is_input_counted":true, "contact_id":1, "cost_center_id":1, "description":"Shopfloor description"}}' {{base_url}}/shopfloors/{id}
$ curl -i -X GET {{base_url}}/shopfloors/{id}/equipments
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"equipment_id":1}}' {{base_url}}/shopfloors/{id}/equipments
$ curl -i -X DELETE {{base_url}}/shopfloors/{id}/equipments/{eid}
$ curl -i -X GET {{base_url}}/shopfloors/{id}/meters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"meter_id":1}}' {{base_url}}/shopfloors/{id}/meters
$ curl -i -X DELETE {{base_url}}/shopfloors/{id}/meters/{mid}
$ curl -i -X GET {{base_url}}/shopfloors/{id}/offlinemeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"offline_meter_id":1}}' {{base_url}}/shopfloors/{id}/offlinemeters
$ curl -i -X DELETE {{base_url}}/shopfloors/{id}/offlinemeters/{mid}
$ curl -i -X GET {{base_url}}/shopfloors/{id}/points
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"point_id":1}}' {{base_url}}/shopfloors/{id}/points
$ curl -i -X DELETE {{base_url}}/shopfloors/{id}/points/{pid}
$ curl -i -X GET {{base_url}}/shopfloors/{id}/sensors
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"sensor_id":1}}' {{base_url}}/shopfloors/{id}/sensors
$ curl -i -X DELETE {{base_url}}/shopfloors/{id}/sensors/{sid}
$ curl -i -X GET {{base_url}}/shopfloors/{id}/virtualmeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/shopfloors/{id}/virtualmeters
$ curl -i -X DELETE {{base_url}}/shopfloors/{id}/virtualmeters/{mid}
$ curl -i -X GET {{base_url}}/spaces/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Space ID |
name | string | Space name |
uuid | string | Space UUID |
parent_space_id | integer | Parent Space ID |
area | decimal(18, 3) | Area |
timezone | Object | Timezone Object |
is_input_counted | boolean | Indicates if the space's energy input is counted for aggregating |
is_output_counted | boolean | Indicates if the space's energy output is counted for aggregating |
contact | Object | Contact Object |
cost_center | Object | Cost Center Object |
description | string | Space description |
$ curl -i -X GET {{base_url}}/spaces
$ curl -i -X DELETE {{base_url}}/spaces/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"MyEMSSpace", "parent_space_id":1, "area":999.99, "timezone_id":56, "is_input_counted":true, "is_output_counted":false, "contact_id":1, "cost_center_id":1, "description":"Space description"}}' {{base_url}}/spaces
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMSSpace", "parent_space_id":2, "area":999.99, "timezone_id":56, "is_input_counted":true, "is_output_counted":true, "contact_id":1, "cost_center_id":1, "description":"Space description"}}' {{base_url}}/spaces/{id}
$ curl -i -X GET {{base_url}}/spaces/{id}/children
$ curl -i -X GET {{base_url}}/spaces/{id}/combinedequipments
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"combined_equipment_id":1}}' {{base_url}}/spaces/{id}/equipments
$ curl -i -X DELETE {{base_url}}/spaces/{id}/combinedequipments/{eid}
$ curl -i -X GET {{base_url}}/spaces/{id}/equipments
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"equipment_id":1}}' {{base_url}}/spaces/{id}/equipments
$ curl -i -X DELETE {{base_url}}/spaces/{id}/equipments/{eid}
$ curl -i -X GET {{base_url}}/spaces/{id}/meters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"meter_id":1}}' {{base_url}}/spaces/{id}/meters
$ curl -i -X DELETE {{base_url}}/spaces/{id}/meters/{mid}
$ curl -i -X GET {{base_url}}/spaces/{id}/offlinemeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"offline_meter_id":1}}' {{base_url}}/spaces/{id}/offlinemeters
$ curl -i -X DELETE {{base_url}}/spaces/{id}/offlinemeters/{mid}
$ curl -i -X GET {{base_url}}/spaces/{id}/points
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"point_id":1}}' {{base_url}}/spaces/{id}/points
$ curl -i -X DELETE {{base_url}}/spaces/{id}/points/{pid}
$ curl -i -X GET {{base_url}}/spaces/{id}/sensors
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"sensor_id":1}}' {{base_url}}/spaces/{id}/sensors
$ curl -i -X DELETE {{base_url}}/spaces/{id}/sensors/{sid}
$ curl -i -X GET {{base_url}}/spaces/{id}/stores
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"store_id":1}}' {{base_url}}/spaces/{id}/stores
$ curl -i -X DELETE {{base_url}}/spaces/{id}/stores/{tid}
$ curl -i -X GET {{base_url}}/spaces/{id}/tenants
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"tenant_id":1}}' {{base_url}}/spaces/{id}/tenants
$ curl -i -X DELETE {{base_url}}/spaces/{id}/tenants/{tid}
$ curl -i -X GET {{base_url}}/spaces/{id}/virtualmeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/spaces/{id}/virtualmeters
$ curl -i -X DELETE {{base_url}}/spaces/{id}/virtualmeters/{mid}
$ curl -i -H "User-UUID: 793f1bb4-6e25-4242-8cdc-2f662b25484f" -H "Token: a6e52af82e5b4168ae03b1c5fd8fa31b2ab3a338" -X GET {{base_url}}/spaces/tree
$ curl -i -X GET {{base_url}}/stores/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Store ID |
name | string | Store name |
uuid | string | Store UUID |
address | string | Address |
latitude | decimal(9, 6) | Latitude |
longitude | decimal(9, 6) | Longitude |
area | decimal(18, 3) | Area |
store_type | Object | Store Type object |
is_input_counted | boolean | Indicates if this store's input energy is counted into parent space |
contact | Object | Contact Object |
cost_center | Object | Cost Center Object |
description | string | Store description |
$ curl -i -X GET {{base_url}}/stores
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"麦当劳(新王府井店)", "address":"北京市东城区王府井大街200号工美大厦1层010-65120499", "latitude":39.909429, "longitude":116.416993, "area":418.8, "store_type_id":9, "is_input_counted": true, "contact_id":1, "cost_center_id":1, "description":"my description"}}' {{base_url}}/stores
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"麦当劳(新王府井店)", "address":"北京市东城区王府井大街200号工美大厦1层010-65120499", "latitude":39.909429, "longitude":116.416993, "area":818.8, "store_type_id":9, "is_input_counted": true, "contact_id":1, "cost_center_id":1, "description":"my description"}}' {{base_url}}/stores/{id}
$ curl -i -X DELETE {{base_url}}/stores/{id}
$ curl -i -X GET {{base_url}}/stores/{id}/meters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"meter_id":1}}' {{base_url}}/stores/{id}/meters
$ curl -i -X DELETE {{base_url}}/stores/{id}/meters/{mid}
$ curl -i -X GET {{base_url}}/stores/{id}/offlinemeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"offline_meter_id":1}}' {{base_url}}/stores/{id}/offlinemeters
$ curl -i -X DELETE {{base_url}}/stores/{id}/offlinemeters/{mid}
$ curl -i -X GET {{base_url}}/stores/{id}/points
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"point_id":1}}' {{base_url}}/stores/{id}/points
$ curl -i -X DELETE {{base_url}}/stores/{id}/points/{pid}
$ curl -i -X GET {{base_url}}/stores/{id}/sensors
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"sensor_id":1}}' {{base_url}}/stores/{id}/sensors
$ curl -i -X DELETE {{base_url}}/stores/{id}/sensors/{sid}
$ curl -i -X GET {{base_url}}/stores/{id}/virtualmeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/stores/{id}/virtualmeters
$ curl -i -X DELETE {{base_url}}/stores/{id}/virtualmeters/{mid}
$ curl -i -X GET {{base_url}}/storetypes/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Store Type ID |
name | string | Store Type name |
uuid | string | Store Type UUID |
description | string | Store Type description |
simplified_code | string | Store Type simplified code |
$ curl -i -X GET {{base_url}}/storetypes
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name": "Office", "description":"办公", "simplified_code":"OF"}}' {{base_url}}/storetypes
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name": "Office1", "description":"办公", "simplified_code":"OF1"}}' {{base_url}}/storetypes/{id}
$ curl -i -X DELETE {{base_url}}/storetypes/{id}
$ curl -i -X GET {{base_url}}/tariffs/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Tariff ID |
name | string | Tariff name |
uuid | string | Tariff UUID |
unit_of_price | string | Unit of Price |
valid_from | float | Valid From (POSIX timestamp * 1000) |
valid_through | float | Valid Through (POSIX timestamp * 1000) |
tariff_type | string | Tariff type (timeofuse or block) |
timeofuse[] | json array | Time Of Use items |
├ | integer | array index |
├ start_time_of_day | string | Start time of day |
├ end_time_of_day | string | End time of day |
├ peak_type | string | Peak type: toppeak,onpeak,midpeak,offpeak |
└ price | decimal | Price |
block[] | json array | Block items |
├ | integer | array index |
├ start_amount | decimal | Start amount |
├ end_amount | decimal | End amount |
└ price | decimal | Price |
$ curl -i -X GET {{base_url}}/tariffs
$ curl -i -X DELETE {{base_url}}/tariffs/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"阶梯电价","energy_category_id":1, "tariff_type":"block", "unit_of_price":"元/千瓦时", "valid_from":"2020-01-01T00:00:00", "valid_through":"2021-01-01T00:00:00", "block":[{"start_amount":"0", "end_amount":"10000", "price":"0.567"}, {"start_amount":"10000", "end_amount":"30000", "price":"0.678"}, {"start_amount":"30000", "end_amount":"100000", "price":"0.789"}]}}' {{base_url}}/tariffs
To POST a time of use tariff:
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"2020分时电价1-6","energy_category_id":1, "tariff_type":"timeofuse", "unit_of_price":"元/千瓦时", "valid_from":"2020-01-01T00:00:00", "valid_through":"2020-07-01T00:00:00", "timeofuse":[{"start_time_of_day":"00:00:00", "end_time_of_day":"05:59:59", "peak_type":"offpeak", "price":0.345}, {"start_time_of_day":"06:00:00", "end_time_of_day":"07:59:59", "peak_type":"midpeak", "price":0.708}, {"start_time_of_day":"08:00:00", "end_time_of_day":"10:59:59", "peak_type":"onpeak", "price":1.159}, {"start_time_of_day":"11:00:00", "end_time_of_day":"17:59:59", "peak_type":"midpeak", "price":0.708}, {"start_time_of_day":"18:00:00", "end_time_of_day":"20:59:59", "peak_type":"onpeak", "price":1.159}, {"start_time_of_day":"21:00:00", "end_time_of_day":"21:59:59", "peak_type":"midpeak", "price":0.708}, {"start_time_of_day":"22:00:00", "end_time_of_day":"23:59:59", "peak_type":"offpeak", "price":0.345}]}}' {{base_url}}/tariffs
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"阶梯电价","energy_category_id":1, "tariff_type":"block", "unit_of_price":"元/千瓦时", "valid_from":"2020-01-01T00:00:00", "valid_through":"2021-01-01T00:00:00", "block":[{"start_amount":"0", "end_amount":"20000", "price":"0.567"}, {"start_amount":"20000", "end_amount":"30000", "price":"0.678"}, {"start_amount":"30000", "end_amount":"100000", "price":"0.789"}]}}' {{base_url}}/tariffs/{id}
To update a time of use tariff:
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"2020分时电价1-6","energy_category_id":1, "tariff_type":"timeofuse", "unit_of_price":"元/千瓦时", "valid_from":"2020-01-01T00:00:00", "valid_through":"2020-07-01T00:00:00", "timeofuse":[{"start_time_of_day":"00:00:00", "end_time_of_day":"05:59:59", "peak_type":"offpeak", "price":0.456}, {"start_time_of_day":"06:00:00", "end_time_of_day":"07:59:59", "peak_type":"midpeak", "price":0.708}, {"start_time_of_day":"08:00:00", "end_time_of_day":"10:59:59", "peak_type":"onpeak", "price":1.159}, {"start_time_of_day":"11:00:00", "end_time_of_day":"17:59:59", "peak_type":"midpeak", "price":0.708}, {"start_time_of_day":"18:00:00", "end_time_of_day":"20:59:59", "peak_type":"onpeak", "price":1.159}, {"start_time_of_day":"21:00:00", "end_time_of_day":"21:59:59", "peak_type":"midpeak", "price":0.708}, {"start_time_of_day":"22:00:00", "end_time_of_day":"23:59:59", "peak_type":"offpeak", "price":0.345}]}}' {{base_url}}/tariffs/{id}
$ curl -i -X GET {{base_url}}/tenants/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Tenant ID |
name | string | Tenant name |
uuid | string | Tenant UUID |
buildings | string | Buildings (one or many) |
floors | string | Floors (one or many) |
rooms | string | Rooms (one or many) |
area | decimal(18, 3) | Area |
tenant_type | Object | Tenant Type object |
is_input_counted | boolean | Indicates if this tenant's input energy is counted into parent space |
is_key_tenant | boolean | Indicates if this is a key tenant |
lease_number | string | Tenant lease number |
lease_start_datetime_utc | float | Lease start datetime in utc timezone (POSIX timestamp * 1000) |
lease_end_datetime_utc | float | Lease end datetime in utc timezone (POSIX timestamp * 1000) |
is_in_lease | boolean | Indicates if this tenant is in lease |
contact | Object | Contact Object |
cost_center | Object | Cost Center Object |
description | string | Tenant description |
$ curl -i -X GET {{base_url}}/tenants
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"Starbucks", "buildings":"Building #1", "floors":"L1 L2 L3", "rooms":"1201b+2247+3F", "area":418.8, "tenant_type_id":9, "is_input_counted": true, "is_key_tenant":true, "lease_number":"6b0da806", "lease_start_datetime_utc":"2019-12-31T16:00:00", "lease_end_datetime_utc":"2022-12-31T16:00:00", "is_in_lease":true, "contact_id":1, "cost_center_id":1, "description":"my description"}}' {{base_url}}/tenants
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"Hermes 爱马仕", "buildings":"Building #1", "floors":"L1 L2 L3 L4 L5", "rooms":"1201b+2247+3F", "area":818.8, "tenant_type_id":9, "is_input_counted": true, "is_key_tenant":true, "lease_number":"6b0da806", "lease_start_datetime_utc":"2019-12-31T16:00:00", "lease_end_datetime_utc":"2022-12-31T16:00:00", "is_in_lease":true, "contact_id":1, "cost_center_id":1, "description":"my description"}}' {{base_url}}/tenants/{id}
$ curl -i -X DELETE {{base_url}}/tenants/{id}
$ curl -i -X GET {{base_url}}/tenants/{id}/meters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"meter_id":1}}' {{base_url}}/tenants/{id}/meters
$ curl -i -X DELETE {{base_url}}/tenants/{id}/meters/{mid}
$ curl -i -X GET {{base_url}}/tenants/{id}/offlinemeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"offline_meter_id":1}}' {{base_url}}/tenants/{id}/offlinemeters
$ curl -i -X DELETE {{base_url}}/tenants/{id}/offlinemeters/{mid}
$ curl -i -X GET {{base_url}}/tenants/{id}/points
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"point_id":1}}' {{base_url}}/tenants/{id}/points
$ curl -i -X DELETE {{base_url}}/tenants/{id}/points/{pid}
$ curl -i -X GET {{base_url}}/tenants/{id}/sensors
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"sensor_id":1}}' {{base_url}}/tenants/{id}/sensors
$ curl -i -X DELETE {{base_url}}/tenants/{id}/sensors/{sid}
$ curl -i -X GET {{base_url}}/tenants/{id}/virtualmeters
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_meter_id":1}}' {{base_url}}/tenants/{id}/virtualmeters
$ curl -i -X DELETE {{base_url}}/tenants/{id}/virtualmeters/{mid}
$ curl -i -X GET {{base_url}}/tenanttypes/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Tenant Type ID |
name | string | Tenant Type name |
uuid | string | Tenant Type UUID |
description | string | Tenant Type description |
simplified_code | string | Tenant Type simplified code |
$ curl -i -X GET {{base_url}}/tenanttypes
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name": "Office", "description":"办公", "simplified_code":"OF"}}' {{base_url}}/tenanttypes
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name": "Office1", "description":"办公", "simplified_code":"OF1"}}' {{base_url}}/tenanttypes/{id}
$ curl -i -X DELETE {{base_url}}/tenanttypes/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Text Message ID |
recipient_name | string | Recipient Name |
recipient_mobile | string | Recipient Mobile Number |
message | string | Email Message Body |
attachment_file_name | string | Email Attachment File Name |
create_datetime | float | Email Message Created Datetime (POSIX timestamp * 1000) |
scheduled_datetime | float | Email Message Scheduled Datetime (POSIX timestamp * 1000) |
acknowledge_code | string | Recipient reply with Acknowledge code to acknowledge |
status | string | Status ('new', 'sent', 'acknowledged', 'timeout' |
$ curl -i -X GET {{base_url}}/textmessages/{id}
$ curl -i -X GET {{base_url}}/textmessages/from/{startdate}/to/{enddate}
$ curl -i -X DELETE {{base_url}}/textmessages/{id}
$ curl -i -X GET {{base_url}}/timezones/{id}
$ curl -i -X GET {{base_url}}/timezones
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"Hawaiian Standard Time","description":"(GMT-10:00) Hawaii", "utc_offset":"-10:00"}}' {{base_url}}/timezones/{id}
$ curl -i -X GET {{base_url}}/users/{id}
$ curl -i -X GET {{base_url}}/users
$ curl -i -X DELETE {{base_url}}/users/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"albert", "display_name":"Mr. Albert", "email":"albert@myems.io", "is_admin":false, "password":"!MyEMS1"}}' {{base_url}}/users
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"albert", "display_name":"Mr. Albert", "email":"albert@myems.io", "is_admin":false, "privilege_id":1, "password":"!MyEMS1"}}' {{base_url}}/users/{id}
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"johnson", "password":"!Password1"}}' {{base_url}}/users/login
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"email":"johnson@myems.io", "password":"!Password1"}}' {{base_url}}/users/login
$ curl -i -H "Content-Type: application/json" -H "User-UUID: 793f1bb4-6e25-4242-8cdc-2f662b25484f" -H "Token: a6e52af82e5b4168ae03b1c5fd8fa31b2ab3a338" -X PUT {{base_url}}/users/logout
$ curl -i -H "Content-Type: application/json" -H "User-UUID: 793f1bb4-6e25-4242-8cdc-2f662b25484f" -H "Token: a6e52af82e5b4168ae03b1c5fd8fa31b2ab3a338" -X PUT -d '{"data":{"old_password":"Password1", "new_password":"Password2"}}' {{base_url}}/users/changepassword
$ curl -i -H "Content-Type: application/json" -H "User-UUID: 793f1bb4-6e25-4242-8cdc-2f662b25484f" -H "Token: a6e52af82e5b4168ae03b1c5fd8fa31b2ab3a338" -X PUT -d '{"data":{"name":"johnson","password":"NewPassword1"}}' {{base_url}}/users/resetpassword
$ curl -i -X GET {{base_url}}/virtualmeters/{id}
Result
Name | Data Type | Description |
---|---|---|
id | integer | Virtual Meter ID |
name | string | Virtual Meter name |
uuid | string | Virtual Meter UUID |
energy_category | Object | Energy Category Object |
is_counted | boolean | the Virtual Meter is counted in |
cost_center | Object | Cost Center Object |
energy_item | Object | Energy Item Object |
description | string | Offline Meter description |
expression | json | Expression |
├ id | integer | Expression ID |
├ uuid | string | Expression UUID |
├ equation | string | Expression Equation |
└ variables[] | json array | Expression Variables |
├ | integer | array index |
├ id | integer | Variable ID |
├ name | string | Variable Name |
├ meter_type | string | Meter Type ('meter', 'offline_meter', 'virtual_meter' |
├ meter_name | string | Meter Name |
$ curl -i -X GET {{base_url}}/virtualmeters
$ curl -i -X DELETE {{base_url}}/virtualmeters/{id}
$ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"VM21", "energy_category_id":1, "is_counted": true, "cost_center_id":1, "energy_item_id":1, "description":"virtual description", "expression": {"equation":"x1-x2-x3", "variables":[{"name":"x1", "meter_type":"meter", "meter_id":3},{"name":"x2", "meter_type":"meter", "meter_id":4},{"name":"x3", "meter_type":"meter", "meter_id":5}] } }}' {{base_url}}/virtualmeters
$ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"VM21", "energy_category_id":1, "is_counted": true, "cost_center_id":1, "energy_item_id":1, "description":"virtual description", "expression": {"equation":"x1-x2-x3", "variables":[{"name":"x1", "meter_type":"meter", "meter_id":3},{"name":"x2", "meter_type":"meter", "meter_id":4},{"name":"x3", "meter_type":"meter", "meter_id":5}] } }}' {{base_url}}/virtualmeters/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Web Message ID |
user_id | integer | Web Message User ID |
user_display_name | string | User Display Name |
subject | string | Web Message Subject |
message | string | Web Message Body |
created_datetime | float | Web Message Created Datetime (POSIX timestamp * 1000) |
status | string | Status ('new', 'acknowledged', 'timeout') |
reply | string | User's Reply text, allow null |
$ curl -i -X GET {{base_url}}/webmessages/{id}
$ curl -i -X GET {{base_url}}/webmessages/from/{startdate}/to/{enddate}
$ curl -i -X GET {{base_url}}/webmessagesnew
$ curl -i -X DELETE {{base_url}}/webmessages/{id}
Result in JSON
Name | Data Type | Description |
---|---|---|
id | integer | Message ID |
recipient_name | string | Recipient Name |
recipient_openid | string | Recipient OpenID |
message_template_id | string | Message Template ID |
message_data | json | Message Data in JSON |
created_datetime | float | Message Created Datetime (POSIX timestamp * 1000) |
scheduled_datetime | float | Message Scheduled Datetime (POSIX timestamp * 1000) |
acknowledge_code | string | Recipient reply with Acknowledge code to acknowledge |
status | string | Status ('new', 'sent', 'acknowledged', 'timeout' |
$ curl -i -X GET {{base_url}}/wechatmessages/{id}
$ curl -i -X GET {{base_url}}/wechatmessages/from/{startdate}/to/{enddate}
$ curl -i -X DELETE {{base_url}}/wechatmessages/{id}
$ curl -i -X GET {{base_url}}/reports/advancedreports?reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime}
$ curl -i -X GET {{base_url}}/reports/advancedreports/{id}
$ curl -i -X GET {{base_url}}/reports/advancedreports/{id}
$ curl -i -X GET {{base_url}}/reports/dashboard?useruuid={useruuid}&periodtype={periodtype}&baseperiodstartdatetime={baseperiodstartdatetime}&baseperiodenddatetime={baseperiodenddatetime}&reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime}
$ curl -i -X GET {{base_url}}/reports/distributionsystem?distributionsystemid=1
$ curl -i -X GET {{base_url}}/reports/energyflowdiagram?energyflowdiagramid=1&reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime}
$ curl -i -X GET {{base_url}}/reports/equipmentefficiency?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/equipmentenergycategory?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/equipmentenergyitem?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/equipmentincome?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/equipmentload?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/equipmentoutput?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/equipmentsaving?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/equipmentstatistics?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/meterenergy?meterid=6&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/metercost?meterid=6&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/meterrealtime?meterid=1
$ curl -i -X GET {{base_url}}/reports/metersubmetersbalance?meterid=1&periodtype=daily&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/metertrend?meterid=6&reportingperiodstartdatetime=2020-09-10T00:00:00&reportingperiodenddatetime=2020-09-11T00:00:00
$ curl -i -X GET {{base_url}}/reports/metertracking?spaceid=1
$ curl -i -X GET {{base_url}}/reports/offlinemeterenergy?offlinemeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/offlinemetercost?offlinemeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spacecost?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spaceefficiency?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spaceenergycategory?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spaceenergyitem?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spaceincome?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spaceload?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spaceoutput?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spacesaving?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/spacestatistics?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/tenantbill?tenantid=1&reportingperiodstartdatetime=2020-10-01T00:00:00&reportingperiodenddatetime=2020-11-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/tenantcost?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/tenantenergycategory?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/tenantenergyitem?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/tenantload?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/tenantsaving?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/tenantstatistics?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/virtualmeterenergy?virtualmeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
$ curl -i -X GET {{base_url}}/reports/virtualmetercost?virtualmeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。