API
View in Postman: import the file MyEMS.postman_collection.json with Postman
AdvancedReportConfig
- Get All Advanced Report Configs
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X GET {{base_url}}/advancedreports
- Get All Advanced Report Config by ID
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X GET {{base_url}}/advancedreports/{id}
- GET Export an Advanced Report Config by ID to JSON
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X GET {{base_url}}/advancedreports/{id}/export
- POST Create an Advanced Report Config
curl -i -H "Content-Type: application/json" -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X POST -d '{"data":{"name":"Space Daily Report1", "expression":"{\"space_id\":1}", "is_enabled":true, "next_run_datetime": "2023-09-06T20:00:00", "is_run_immediately": false}}' {{base_url}}/advancedreports
- POST Import an Advanced Report Config from JSON
curl -i -H "Content-Type: application/json" -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X POST -d '{"data":{"name":"Space Daily Report1", "expression":"{\"space_id\":1}", "is_enabled":true, "next_run_datetime": "2023-09-06T20:00:00", "is_run_immediately": false}}' {{base_url}}/advancedreports/import
- POST Clone an Advanced Report Config by ID
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X POST {{base_url}}/advancedreports/clone
- PUT Run an Advanced Report by ID
curl -i -H "Content-Type: application/json" -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X PUT -d '{"data":{"name":"Space Monthly Report", "expression":"{\"space_id\":1}", "is_enabled":true, "next_run_datetime":"2023-09-01T00:00:00", "is_run_immediately": false}}' {{base_url}}/advancedreports/{id}/run
- PUT Update an Advanced Report Config
curl -i -H "Content-Type: application/json" -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X PUT -d '{"data":{"name":"Space Monthly Report", "expression":"{\"space_id\":1}", "is_enabled":true, "next_run_datetime":"2023-09-01T00:00:00", "is_run_immediately": false}}' {{base_url}}/advancedreports/{id}
- PUT Run an Advanced Report
curl -i -H "Content-Type: application/json" -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X PUT -d '{"data":{}}' {{base_url}}/advancedreports/{id}/run
- DELETE an Advanced Report Config
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X DELETE {{base_url}}/advancedreports/{id}
Combined Equipment
- GET a Combined Equipment by ID
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -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 |
qrcode | string | QRCode in String |
- GET All Combined Equipments
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X GET {{base_url}}/combinedequipments
- DELETE a Combined Equipment by ID
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X DELETE {{base_url}}/combinedequipments/{id}
- POST Create a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -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, "svg":"<svg></svg>", "camera_url":"http://XXX", "description":"equipment description"}}' {{base_url}}/combinedequipments
- PUT Update a Combined Equipment by ID
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"MyEMS Combined Chiller Plant", "is_input_counted":true, "is_output_counted":true, "cost_center_id":1, "svg":"<svg></svg>", "camera_url":"http://XXXs", "description":"equipment description"}}' {{base_url}}/combinedequipments/{id}
- GET Export a Combined Equipment by ID to JSON
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X GET -d '{"data":{}}' {{base_url}}/combinedequipments/{id}/export
- POST Import a Combined Equipment from JSON
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X PUT -d '{"data":{}}' {{base_url}}/combinedequipments/{id}/import
- POST Clone a Combined Equipment by ID
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X POST -d '{"data":{}}' {{base_url}}/combinedequipments/{id}/clone
- GET All Equipments of a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X GET {{base_url}}/combinedequipments/{id}/equipments
- POST Bind an Equipment to a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X POST -d '{"data":{"equipment_id":1}}' {{base_url}}/combinedequipments/{id}/equipments
- DELETE an Equipment from a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X DELETE {{base_url}}/combinedequipments/{id}/equipments/{eid}
- GET All Meters of a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X GET {{base_url}}/combinedequipments/{id}/meters
- POST Bind a Meter to a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X POST -d '{"data":{"meter_id":1, "is_output":false}}' {{base_url}}/combinedequipments/{id}/meters
- DELETE a Meter from a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X DELETE {{base_url}}/combinedequipments/{id}/meters/{mid}
- GET All Parameters of a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X GET {{base_url}}/combinedequipments/{id}/parameters
- GET a Parameter of a Combined Equipment by ID
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -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 |
- POST Create a constant Parameter for a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test constant parameter", "parameter_type":"constant", "constant":"test constant", "point_id":null, "numerator_meter_uuid":null, "denominator_meter_uuid":null}}' {{base_url}}/combinedequipments/{id}/parameters
- PUT Update a constant Parameter for a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"test parameter1", "parameter_type":"constant", "constant":"test constant1", "point_id":null, "numerator_meter_uuid":null, "denominator_meter_uuid":null}}' {{base_url}}/combinedequipments/{id}/parameters/{id}
- POST Create a fraction Parameter for a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test constant parameter", "parameter_type":"fraction", "constant":"null", "point_id":null, "numerator_meter_uuid":8449878f-b368-4ad9-a41c-e2c49189297a, "denominator_meter_uuid":3f8a66c4-8fbe-4e6d-8b40-15dee5290afd}}' {{base_url}}/combinedequipments/{id}/parameters
- PUT Update a fraction Parameter for a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"test parameter1", "parameter_type":"fraction", "constant":"null", "point_id":null, "numerator_meter_uuid":8449878f-b368-4ad9-a41c-e2c49189297a, "denominator_meter_uuid":3f8a66c4-8fbe-4e6d-8b40-15dee5290afd}}' {{base_url}}/combinedequipments/{id}/parameters/{id}
- POST Create a point Parameter for a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -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
- PUT Update a point Parameter for a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"test parameter", "parameter_type":"point", "constant":null, "point_id":3, "numerator_meter_uuid":null, "denominator_meter_uuid":null}}' {{base_url}}/combinedequipments/{id}/parameters/{id}
- POST Create a meter Parameter for a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X POST -d '{"data":{"name":"test fraction parameter", "parameter_type":"fraction", "constant":null, "point_id":null, "numerator_meter_uuid":"8449878f-b368-4ad9-a41c-e2c49189297a", "denominator_meter_uuid":"3f8a66c4-8fbe-4e6d-8b40-15dee5290afd"}}' {{base_url}}/combinedequipments/{id}/parameters
- DELETE a Parameter from a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X DELETE {{base_url}}/combinedequipments/{id}/parameters/{pid}
- GET All Offline Meters of a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X GET {{base_url}}/combinedequipments/{id}/offlinemeters
- POST Bind an Offline Meter to a Combined Equipment
curl -i -H "User-UUID: 793f1bb4-6e25-4242-8cdc-2f662b25484f" -H "Token: GET-TOKEN-AFTER-LOGIN" -H "Content-Type: application/json" -X POST -d '{"data":{"offline_meter_id":1}}' {{base_url}}/combinedequipments/{id}/offlinemeters
- DELETE an Offline Meter from a Combined Equipment
curl -i -H "User-UUID: dcdb67d1-6116-4987-916f-6fc6cf2bc0e4" -H "Token: GET-TOKEN-AFTER-LOGIN" -X DELETE {{base_url}}/combinedequipments/{id}/offlinemeters/{mid}