This article is deprecated in favor of https://developers.covetool.com/v1


The cove.tool REST API can be used to upload your project's geometry and get an EUI breakdown. In this article we will go through a basic example using HTTPie. At the end of the article you will see an additional example using Python.

There are 3 basic objects: projects, runs, and run values. A project has many runs, and a run has many run values. The run represents the data for a given building type/use type. So a mixed use project with Office, Retail, and Apartments would have 3 runs. The "unique ID" is the url  which must be included when updating an object.

Obtain an API token

Note that API tokens expire after 7 days and new one must be fetched. When the token will expire (in seconds) is included in the response.

request

http POST https://app.covetool.com/api/get-token/ username=username password=password

response

{ 
"expires_in": "604799.998047",
"token": "aaaa1111aaaa1111aaaa1111aaaa1111aaaa"
}


List all projects

request

http GET https://app.covetool.com/api/projects/ "Authorization: Token aaaa1111aaaa1111aaaa1111aaaa1111aaaa"

response

[
    {
        "name": "Project A",
        "run_set": [
            "https://app.covetool.com/api/runs/1/"
        ],
        "url": "https://app.covetool.com/api/projects/1/"
    },
    {
        "name": "Project B",
        "run_set": [
            "https://app.covetool.com/api/runs/2/"
        ],
        "url": "https://app.covetool.com/api/projects/2/"
    }
]

Update geometry areas for a given project/run 

Note that all values will be converted to the project's units (in the web app interface) by default. This can be controlled with the si_units  parameter - a value of true  will save the values as SI while a value of false will convert them from Imperial to SI before saving. The EUI data in the response will always be in SI units.

request

http POST https://app.covetool.com/api/run-values/ run='https://app.covetool.com/api/runs/1' "window_area_ne":="0" "roof_area":="900" "skylight_area":="150" "building_height":="15" "window_area_nw":="0" "window_area_se":="0" "window_area_sw":="0" "si_units":="true" "floor_area":="900" "wall_area_sw":="0" "wall_area_nw":="0" "wall_area_ne":="0" "wall_area_se":="0" "window_area_e":="200" "wall_area_w":="450" "wall_area_s":="450" "window_area_n":="200" "wall_area_n":="450" "window_area_s":="200" "window_area_w":="200" "wall_area_e":="450" "Authorization: Token aaaa1111aaaa1111aaaa1111aaaa1111aaaa"

response

{
    "data": {
        "eui_breakdown": {
            "headers": [
                "Cooling",
                "Heating",
                "Lighting",
                "Equipment",
                "Fans",
                "Pumps",
                "Hot Water"
            ],
            "values": [
                42.69810373890001,
                215.9911661803,
                35.150749997999995,
                26.540714283,
                83.00345598700001,
                4.380000116000001,
                5.9237200512
            ]
        },
        "eui_total": 413.68791035439995
    },
    "result": "success"
}

Update 3D geometry for a given project/run

The API also supports uploading 3D vertex geometry for the 3D analysis view within cove.tool. The request URL for the API endpoint is the same run-values URL as shown in the previous section. The units for the vertex coordinates are feet (ft). The supported keys and their descriptions are listed here:

source: your app name & version identifier, e.g. revit-2.2.0

rotation_angle: (optional) the rotation angle (degrees) from North in a clockwise direction

floors: an array of floor objects represented as vertex and triangle data

walls: an array of wall objects represented as vertex and triangle data

interior_walls: an array of interior wall objects represented as vertex and triangle data

windows: an array of window objects represented as vertex and triangle data

skylights: an array of skylight objects represented as vertex and triangle data

roofs: an array of roof objects represented as vertex and triangle data

shading_devices: an array of shading device objects represented as vertex and triangle data

An example JSON request with the walls data is shown below. Note that you can send each category separately. For each wall there must be a Mesh with a list of Vertices along with the Triangles which refer to Vertices by index. Normal and Center are required for each mesh so that the faces are rendered in the correct direction/position. LevelId and DerrivingElementUniqueId are optional fields. We recommend copying this example to a code editor which supports JSON formatting.

"walls": [{ "Mesh": { "Vertices": [{ "X": 185.93365478515625, "Y": -48.986751556396484, "Z": -1.3234889800848443e-23 }, { "X": 185.93365478515625, "Y": -48.986751556396484, "Z": 37.401573181152344 }, { "X": 185.93365478515625, "Y": -76.09632873535156, "Z": 37.401573181152344 }, { "X": 185.93365478515625, "Y": -77.04777526855469, "Z": 37.401573181152344 }, { "X": 185.93365478515625, "Y": -77.04777526855469, "Z": 13.295275688171387 }, { "X": 185.93365478515625, "Y": -69.00479125976562, "Z": 13.295275688171387 }, { "X": 185.93365478515625, "Y": -69.00479125976562, "Z": 31.496063232421875 }, { "X": 185.93365478515625, "Y": -68.50479125976562, "Z": 31.496063232421875 }, { "X": 185.93365478515625, "Y": -68.50479125976562, "Z": 13.295275688171387 }, { "X": 185.93365478515625, "Y": -55.06614685058594, "Z": 13.295275688171387 }, { "X": 185.93365478515625, "Y": -55.06614685058594, "Z": 12.795275688171387 }, { "X": 185.93365478515625, "Y": -68.50479125976562, "Z": 12.795275688171387 }, { "X": 185.93365478515625, "Y": -68.50479125976562, "Z": 0.0 }, { "X": 185.93365478515625, "Y": -55.874053955078125, "Z": 0.0 }, { "X": 185.93365478515625, "Y": -55.874053955078125, "Z": 7.001312255859375 }, { "X": 185.93365478515625, "Y": -52.87208557128906, "Z": 7.001312255859375 }, { "X": 185.93365478515625, "Y": -52.87208557128906, "Z": 1.3234889800848443e-23 }, { "X": 185.93365478515625, "Y": -77.04777526855469, "Z": 0.0 }, { "X": 185.93365478515625, "Y": -69.00479125976562, "Z": 0.0 }, { "X": 185.93365478515625, "Y": -69.00479125976562, "Z": 12.795275688171387 }, { "X": 185.93365478515625, "Y": -77.04777526855469, "Z": 12.795275688171387 }], "Triangles": [ [4, 5, 6], [11, 12, 14], [2, 3, 6], [6, 7, 2], [3, 4, 6], [2, 7, 1], [16, 0, 15], [15, 0, 1], [11, 14, 10], [10, 15, 9], [10, 14, 15], [1, 7, 9], [1, 9, 15], [9, 7, 8], [14, 12, 13], [20, 17, 18], [18, 19, 20] ] }, "Center": { "X": 185.93365478515625, "Y": -63.07649585546891, "Z": 19.126643342872285 }, "Normal": { "X": 1.9999999999999996, "Y": 0.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "6949fe39-3e9a-4d4d-b7fe-71339c615138-0002224e" }, { "Mesh": { "Vertices": [{ "X": 90.26213836669922, "Y": 101.02375793457031, "Z": 0.0 }, { "X": 21.80971336364746, "Y": 101.02375793457031, "Z": 0.0 }, { "X": 21.80971336364746, "Y": 101.02375793457031, "Z": 37.401573181152344 }, { "X": 80.60662841796875, "Y": 101.02375793457031, "Z": 37.401573181152344 }, { "X": 80.60662841796875, "Y": 101.02375793457031, "Z": 12.467191696166992 }, { "X": 89.2680435180664, "Y": 101.02375793457031, "Z": 12.467191696166992 }, { "X": 89.2680435180664, "Y": 101.02375793457031, "Z": 37.401573181152344 }, { "X": 89.3106918334961, "Y": 101.02375793457031, "Z": 37.401573181152344 }, { "X": 90.26213836669922, "Y": 101.02375793457031, "Z": 37.401573181152344 }, { "X": 90.26213836669922, "Y": 101.02375793457031, "Z": 12.967191696166992 }, { "X": 89.76213836669922, "Y": 101.02375793457031, "Z": 12.967191696166992 }, { "X": 89.76213836669922, "Y": 101.02375793457031, "Z": 12.467191696166992 }, { "X": 90.26213836669922, "Y": 101.02375793457031, "Z": 12.467191696166992 }, { "X": 75.3387451171875, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 75.3387451171875, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 78.34071350097656, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 78.34071350097656, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 29.806760787963867, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 29.806760787963867, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 32.8087272644043, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 32.8087272644043, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 34.13747024536133, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 34.13747024536133, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 37.13943862915039, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 37.13943862915039, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 42.41830825805664, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 42.41830825805664, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 45.4202766418457, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 45.4202766418457, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 46.368438720703125, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 46.368438720703125, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 49.37040710449219, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 49.37040710449219, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 50.318572998046875, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 50.318572998046875, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 53.32054138183594, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 53.32054138183594, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 54.26870346069336, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 54.26870346069336, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 57.27067184448242, "Y": 101.02375793457031, "Z": 3.0019686222076416 }, { "X": 57.27067184448242, "Y": 101.02375793457031, "Z": 7.004593372344971 }, { "X": 28.912731170654297, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 28.912731170654297, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 31.91469955444336, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 31.91469955444336, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 35.09711456298828, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 35.09711456298828, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 38.099082946777344, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 38.099082946777344, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 43.676509857177734, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 43.676509857177734, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 46.6784782409668, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 46.6784782409668, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 47.990814208984375, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 47.990814208984375, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 50.99278259277344, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 50.99278259277344, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 52.231300354003906, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 52.231300354003906, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 55.23326873779297, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 55.23326873779297, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 58.768375396728516, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 58.768375396728516, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 61.77034378051758, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 61.77034378051758, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 66.97047424316406, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 66.97047424316406, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 69.97244262695312, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 69.97244262695312, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 71.61286163330078, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 71.61286163330078, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 74.61483001708984, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 74.61483001708984, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 76.29232025146484, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 76.29232025146484, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 79.2942886352539, "Y": 101.02375793457031, "Z": 15.469160079956055 }, { "X": 79.2942886352539, "Y": 101.02375793457031, "Z": 19.471784591674805 }, { "X": 32.84973907470703, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 32.84973907470703, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 35.851707458496094, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 35.851707458496094, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 38.14829635620117, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 38.14829635620117, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 41.150264739990234, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 41.150264739990234, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 43.77493667602539, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 43.77493667602539, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 46.77690505981445, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 46.77690505981445, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 48.54855728149414, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 48.54855728149414, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 51.5505256652832, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 51.5505256652832, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 53.84711456298828, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 53.84711456298828, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 56.849082946777344, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 56.849082946777344, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 59.14567184448242, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 59.14567184448242, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 62.147640228271484, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 62.147640228271484, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 65.42848205566406, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 65.42848205566406, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 68.43045043945312, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 68.43045043945312, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 70.3989486694336, "Y": 101.02375793457031, "Z": 31.938976287841797 }, { "X": 70.3989486694336, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 73.40091705322266, "Y": 101.02375793457031, "Z": 27.936351776123047 }, { "X": 73.40091705322266, "Y": 101.02375793457031, "Z": 31.938976287841797 }], "Triangles": [ [12, 0, 11], [10, 11, 5], [5, 11, 0], [4, 5, 0], [70, 4, 39], [4, 75, 76], [4, 74, 75], [4, 76, 3], [74, 4, 71], [69, 67, 68], [67, 69, 70], [4, 70, 71], [74, 71, 73], [70, 39, 67], [4, 0, 39], [63, 66, 40], [39, 66, 67], [40, 66, 39], [66, 63, 65], [38, 36, 37], [36, 38, 35], [63, 40, 62], [40, 37, 59], [38, 39, 1], [59, 37, 36], [63, 64, 65], [65, 64, 102], [68, 65, 103], [62, 59, 60], [59, 62, 40], [61, 60, 95], [60, 61, 62], [64, 61, 98], [60, 57, 94], [39, 0, 1], [69, 68, 106], [76, 73, 15], [15, 73, 14], [5, 6, 10], [14, 72, 107], [72, 14, 73], [72, 69, 107], [14, 107, 108], [71, 72, 73], [9, 10, 8], [10, 6, 7], [13, 108, 3], [3, 16, 13], [10, 7, 8], [108, 105, 3], [13, 14, 108], [3, 15, 16], [3, 76, 15], [106, 107, 69], [103, 106, 68], [104, 106, 103], [98, 95, 96], [98, 61, 95], [65, 102, 103], [99, 100, 102], [99, 64, 98], [99, 102, 64], [106, 104, 105], [100, 3, 101], [101, 3, 104], [93, 3, 96], [96, 3, 97], [100, 97, 3], [96, 97, 98], [102, 100, 101], [104, 3, 105], [93, 94, 91], [60, 94, 95], [3, 93, 92], [36, 58, 59], [34, 1, 31], [30, 31, 1], [32, 34, 31], [28, 30, 27], [1, 27, 30], [35, 1, 34], [55, 33, 32], [33, 34, 32], [54, 32, 29], [33, 58, 36], [29, 28, 51], [28, 29, 30], [54, 51, 52], [50, 51, 28], [28, 25, 50], [29, 51, 54], [25, 47, 50], [54, 55, 32], [23, 24, 26], [23, 26, 1], [22, 23, 1], [18, 1, 17], [1, 18, 19], [22, 19, 20], [1, 42, 17], [1, 19, 22], [26, 27, 1], [47, 24, 46], [47, 25, 24], [46, 24, 21], [21, 20, 43], [20, 21, 22], [46, 43, 44], [43, 20, 17], [17, 42, 43], [21, 43, 46], [47, 48, 50], [1, 41, 42], [24, 25, 26], [35, 38, 1], [91, 57, 56], [56, 57, 58], [91, 92, 93], [55, 56, 58], [90, 56, 53], [52, 53, 54], [91, 56, 90], [58, 33, 55], [87, 53, 52], [89, 90, 87], [2, 92, 89], [87, 90, 53], [2, 89, 88], [86, 83, 85], [87, 88, 89], [52, 86, 87], [2, 88, 85], [52, 49, 86], [94, 57, 91], [83, 48, 82], [48, 83, 49], [83, 84, 85], [82, 48, 79], [78, 45, 44], [48, 49, 50], [79, 48, 45], [44, 45, 46], [78, 44, 41], [81, 82, 79], [81, 79, 80], [84, 81, 2], [77, 2, 80], [2, 77, 78], [78, 41, 2], [80, 2, 81], [79, 45, 78], [84, 2, 85], [41, 1, 2], [83, 86, 49], [92, 2, 3] ] }, "Center": { "X": 53.47754240551672, "Y": 101.02375793457034, "Z": 18.000580104371313 }, "Normal": { "X": 0.0, "Y": 2.0000000000000036, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "6949fe39-3e9a-4d4d-b7fe-71339c615138-00022251" }, { "Mesh": { "Vertices": [{ "X": 80.60662841796875, "Y": 100.0296630859375, "Z": 1.3234889800848443e-23 }, { "X": 80.60662841796875, "Y": 100.0296630859375, "Z": 12.467191696166992 }, { "X": 80.60662841796875, "Y": 100.0296630859375, "Z": 37.401573181152344 }, { "X": 80.60662841796875, "Y": 72.78884887695312, "Z": 37.401573181152344 }, { "X": 80.60662841796875, "Y": 72.78884887695312, "Z": 12.467191696166992 }, { "X": 80.60662841796875, "Y": 73.24324035644531, "Z": 12.467191696166992 }, { "X": 80.60662841796875, "Y": 73.24324035644531, "Z": 11.597768783569336 }, { "X": 80.60662841796875, "Y": 73.24324035644531, "Z": 1.3234889800848443e-23 }], "Triangles": [ [6, 7, 0], [5, 3, 4], [1, 5, 6], [5, 2, 3], [2, 5, 1], [1, 6, 0] ] }, "Center": { "X": 80.60662841796875, "Y": 86.4841410236401, "Z": 18.770494002740186 }, "Normal": { "X": 1.9999999999999996, "Y": 0.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9ddc7feb-6f54-4b53-9ca4-7923d929ea52-000233d8" }, { "Mesh": { "Vertices": [{ "X": -31.81528663635254, "Y": 20.40334129333496, "Z": 12.467191696166992 }, { "X": -4.748357772827148, "Y": 20.40334129333496, "Z": 12.467191696166992 }, { "X": -4.748357772827148, "Y": 20.40334129333496, "Z": -6.617444900424222e-24 }, { "X": -23.903541564941406, "Y": 20.40334129333496, "Z": -2.6469779601696886e-23 }, { "X": -23.903541564941406, "Y": 20.40334129333496, "Z": 7.001312255859375 }, { "X": -29.579395294189453, "Y": 20.40334129333496, "Z": 7.001312255859375 }, { "X": -29.579395294189453, "Y": 20.40334129333496, "Z": -6.617444900424222e-24 }, { "X": -31.81528663635254, "Y": 20.40334129333496, "Z": 0.0 }, { "X": -31.81528663635254, "Y": 20.40334129333496, "Z": 11.646981239318848 }], "Triangles": [ [2, 3, 4], [1, 4, 0], [4, 1, 2], [6, 7, 5], [8, 0, 4], [8, 5, 7], [8, 4, 5] ] }, "Center": { "X": -17.152626601751933, "Y": 20.40334129333496, "Z": 6.598389296030266 }, "Normal": { "X": 0.0, "Y": 2.0000000000000004, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9ddc7feb-6f54-4b53-9ca4-7923d929ea52-000235c5" }, { "Mesh": { "Vertices": [{ "X": -32.80937957763672, "Y": 7.416301250457764, "Z": 37.401573181152344 }, { "X": -32.80937957763672, "Y": 73.76407623291016, "Z": 37.401573181152344 }, { "X": -32.80937957763672, "Y": 73.76407623291016, "Z": 1.3234889800848443e-23 }, { "X": -32.80937957763672, "Y": 72.76998138427734, "Z": -6.617444900424222e-24 }, { "X": -32.80937957763672, "Y": 72.76998138427734, "Z": 11.646981239318848 }, { "X": -32.80937957763672, "Y": 20.40334129333496, "Z": 11.646981239318848 }, { "X": -32.80937957763672, "Y": 20.40334129333496, "Z": 0.0 }, { "X": -32.80937957763672, "Y": 16.508499145507812, "Z": -1.3234889800848443e-23 }, { "X": -32.80937957763672, "Y": 16.508499145507812, "Z": 19.028871536254883 }, { "X": -32.80937957763672, "Y": 54.75399398803711, "Z": 19.028871536254883 }, { "X": -32.80937957763672, "Y": 54.75399398803711, "Z": 19.528871536254883 }, { "X": -32.80937957763672, "Y": 16.508499145507812, "Z": 19.528871536254883 }, { "X": -32.80937957763672, "Y": 16.508499145507812, "Z": 32.480316162109375 }, { "X": -32.80937957763672, "Y": 16.008499145507812, "Z": 32.480316162109375 }, { "X": -32.80937957763672, "Y": 16.008499145507812, "Z": 19.528871536254883 }, { "X": -32.80937957763672, "Y": 7.416301250457764, "Z": 19.528871536254883 }, { "X": -32.80937957763672, "Y": 16.008499145507812, "Z": 0.0 }, { "X": -32.80937957763672, "Y": 7.416301250457764, "Z": 0.0 }, { "X": -32.80937957763672, "Y": 7.416301250457764, "Z": 19.028871536254883 }, { "X": -32.80937957763672, "Y": 16.008499145507812, "Z": 19.028871536254883 }], "Triangles": [ [2, 3, 4], [2, 4, 1], [12, 1, 10], [1, 4, 10], [5, 8, 9], [9, 4, 5], [4, 9, 10], [6, 7, 5], [5, 7, 8], [12, 13, 0], [15, 0, 13], [14, 15, 13], [12, 0, 1], [11, 12, 10], [19, 16, 17], [17, 18, 19] ] }, "Center": { "X": -32.80937957763672, "Y": 38.92895028728563, "Z": 23.002489417420993 }, "Normal": { "X": -2.0, "Y": 0.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-00024521" }, { "Mesh": { "Vertices": [{ "X": -5.202754020690918, "Y": -48.986751556396484, "Z": 37.401573181152344 }, { "X": -5.202754020690918, "Y": -48.986751556396484, "Z": 11.597768783569336 }, { "X": -5.202754020690918, "Y": -48.986751556396484, "Z": 0.0 }, { "X": -5.202754020690918, "Y": -76.05368041992188, "Z": 1.3234889800848443e-23 }, { "X": -5.202754020690918, "Y": -76.05368041992188, "Z": 37.401573181152344 }], "Triangles": [ [1, 3, 4], [3, 1, 2], [1, 4, 0] ] }, "Center": { "X": -5.202754020690918, "Y": -62.52021598815917, "Z": 18.700786590576172 }, "Normal": { "X": -2.0000000000000004, "Y": 0.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-00024d4d" }, { "Mesh": { "Vertices": [{ "X": 41.71932601928711, "Y": -77.04777526855469, "Z": 37.401573181152344 }, { "X": -5.202754020690918, "Y": -77.04777526855469, "Z": 37.401573181152344 }, { "X": -5.202754020690918, "Y": -77.04777526855469, "Z": 11.91476058959961 }, { "X": 22.028217315673828, "Y": -77.04777526855469, "Z": 11.91476058959961 }, { "X": 22.028217315673828, "Y": -77.04777526855469, "Z": 31.167978286743164 }, { "X": 22.528217315673828, "Y": -77.04777526855469, "Z": 31.167978286743164 }, { "X": 22.528217315673828, "Y": -77.04777526855469, "Z": 11.91476058959961 }, { "X": 31.742950439453125, "Y": -77.04777526855469, "Z": 11.91476058959961 }, { "X": 31.742950439453125, "Y": -77.04777526855469, "Z": 11.41476058959961 }, { "X": 22.528217315673828, "Y": -77.04777526855469, "Z": 11.41476058959961 }, { "X": 22.528217315673828, "Y": -77.04777526855469, "Z": 0.0 }, { "X": 41.71932601928711, "Y": -77.04777526855469, "Z": 1.3234889800848443e-23 }, { "X": -5.202754020690918, "Y": -77.04777526855469, "Z": 0.0 }, { "X": 22.028217315673828, "Y": -77.04777526855469, "Z": 0.0 }, { "X": 22.028217315673828, "Y": -77.04777526855469, "Z": 11.41476058959961 }, { "X": -5.202754020690918, "Y": -77.04777526855469, "Z": 11.41476058959961 }], "Triangles": [ [2, 4, 1], [4, 2, 3], [1, 4, 0], [10, 11, 8], [8, 11, 7], [5, 7, 0], [5, 6, 7], [0, 7, 11], [5, 0, 4], [9, 10, 8], [15, 12, 14], [13, 14, 12] ] }, "Center": { "X": 18.27600927948859, "Y": -77.04777526855469, "Z": 18.80350181891658 }, "Normal": { "X": 0.0, "Y": -1.9999999999999996, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-00024dc4" }, { "Mesh": { "Vertices": [{ "X": 4.114831447601318, "Y": -76.05368041992188, "Z": 37.401573181152344 }, { "X": 4.114831447601318, "Y": -48.986751556396484, "Z": 37.401573181152344 }, { "X": 4.114831447601318, "Y": -48.986751556396484, "Z": 0.0 }, { "X": 4.114831447601318, "Y": -76.05368041992188, "Z": 0.0 }], "Triangles": [ [0, 1, 2], [2, 3, 0] ] }, "Center": { "X": 4.1148314476013175, "Y": -62.52021598815917, "Z": 18.700786590576172 }, "Normal": { "X": -2.0, "Y": 0.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-00024f23" }, { "Mesh": { "Vertices": [{ "X": 175.62197875976562, "Y": -77.04777526855469, "Z": 0.0 }, { "X": 175.62197875976562, "Y": -77.04777526855469, "Z": 37.401573181152344 }, { "X": 175.62197875976562, "Y": -76.05368041992188, "Z": 37.401573181152344 }, { "X": 175.62197875976562, "Y": -49.44114685058594, "Z": 37.401573181152344 }, { "X": 175.62197875976562, "Y": -48.986751556396484, "Z": 37.401573181152344 }, { "X": 175.62197875976562, "Y": -48.986751556396484, "Z": 24.934383392333984 }, { "X": 175.62197875976562, "Y": -48.986751556396484, "Z": 24.064960479736328 }, { "X": 175.62197875976562, "Y": -48.986751556396484, "Z": 12.467191696166992 }, { "X": 175.62197875976562, "Y": -48.986751556396484, "Z": 11.597768783569336 }, { "X": 175.62197875976562, "Y": -48.986751556396484, "Z": 0.0 }, { "X": 175.62197875976562, "Y": -49.44114685058594, "Z": 1.3234889800848443e-23 }], "Triangles": [ [8, 9, 10], [4, 5, 3], [8, 0, 7], [7, 0, 6], [0, 8, 10], [6, 0, 2], [3, 5, 2], [1, 2, 0], [2, 5, 6] ] }, "Center": { "X": 175.62197875976565, "Y": -63.01726341247559, "Z": 18.700786590576172 }, "Normal": { "X": -1.9999999999999996, "Y": 0.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-00025aa7" }, { "Mesh": { "Vertices": [{ "X": 184.93955993652344, "Y": -77.04777526855469, "Z": 0.0 }, { "X": 184.93955993652344, "Y": -77.04777526855469, "Z": 12.467191696166992 }, { "X": 176.27813720703125, "Y": -77.04777526855469, "Z": 12.467191696166992 }, { "X": 176.27813720703125, "Y": -77.04777526855469, "Z": 0.0 }], "Triangles": [ [0, 1, 2], [2, 3, 0] ] }, "Center": { "X": 180.60884857177732, "Y": -77.04777526855467, "Z": 6.233595848083496 }, "Normal": { "X": 0.0, "Y": -2.0000000000000004, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-00025b3b" }, { "Mesh": { "Vertices": [{ "X": 25.746721267700195, "Y": -22.297773361206055, "Z": 37.401573181152344 }, { "X": 21.153545379638672, "Y": -22.297773361206055, "Z": 37.401573181152344 }, { "X": 21.153545379638672, "Y": -22.297773361206055, "Z": 0.0 }, { "X": 25.746721267700195, "Y": -22.297773361206055, "Z": 0.0 }], "Triangles": [ [0, 1, 2], [2, 3, 0] ] }, "Center": { "X": 23.450133323669437, "Y": -22.297773361206055, "Z": 18.700786590576172 }, "Normal": { "X": 0.0, "Y": -2.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-000260cb" }, { "Mesh": { "Vertices": [{ "X": 25.746721267700195, "Y": -2.6311049461364746, "Z": 37.401573181152344 }, { "X": 21.153545379638672, "Y": -2.6311049461364746, "Z": 37.401573181152344 }, { "X": 21.153545379638672, "Y": -2.6311049461364746, "Z": 0.0 }, { "X": 25.746721267700195, "Y": -2.6311049461364746, "Z": 0.0 }], "Triangles": [ [0, 1, 2], [2, 3, 0] ] }, "Center": { "X": 23.450133323669437, "Y": -2.6311049461364746, "Z": 18.700786590576172 }, "Normal": { "X": 0.0, "Y": -2.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-00026159" }, { "Mesh": { "Vertices": [{ "X": 25.746721267700195, "Y": 32.14579772949219, "Z": 37.401573181152344 }, { "X": 21.153545379638672, "Y": 32.14579772949219, "Z": 37.401573181152344 }, { "X": 21.153545379638672, "Y": 32.14579772949219, "Z": 0.0 }, { "X": 25.746721267700195, "Y": 32.14579772949219, "Z": 0.0 }], "Triangles": [ [0, 1, 2], [2, 3, 0] ] }, "Center": { "X": 23.450133323669437, "Y": 32.145797729492195, "Z": 18.700786590576172 }, "Normal": { "X": 0.0, "Y": -2.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-000261a8" }, { "Mesh": { "Vertices": [{ "X": 25.746721267700195, "Y": 57.614959716796875, "Z": 37.401573181152344 }, { "X": 21.153545379638672, "Y": 57.614959716796875, "Z": 37.401573181152344 }, { "X": 21.153545379638672, "Y": 57.614959716796875, "Z": 0.0 }, { "X": 25.746721267700195, "Y": 57.614959716796875, "Z": 0.0 }], "Triangles": [ [0, 1, 2], [2, 3, 0] ] }, "Center": { "X": 23.450133323669437, "Y": 57.61495971679687, "Z": 18.700786590576172 }, "Normal": { "X": 0.0, "Y": -2.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e597f98-694d-4ada-b8ef-0e7459e0b930-0002620f" }, { "Mesh": { "Vertices": [{ "X": -4.521159648895264, "Y": 72.76998138427734, "Z": -6.617444900424222e-24 }, { "X": -4.521159648895264, "Y": 72.76998138427734, "Z": 12.467191696166992 }, { "X": -31.81528663635254, "Y": 72.76998138427734, "Z": 12.467191696166992 }, { "X": -31.81528663635254, "Y": 72.76998138427734, "Z": 11.646981239318848 }, { "X": -31.81528663635254, "Y": 72.76998138427734, "Z": 0.0 }], "Triangles": [ [3, 0, 1], [0, 3, 4], [3, 1, 2] ] }, "Center": { "X": -18.1682231426239, "Y": 72.76998138427733, "Z": 6.233595848083494 }, "Normal": { "X": 0.0, "Y": -2.000000000000001, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "f1268bbe-9264-4ea5-b30b-6919ab197ea7-0002972a" }, { "Mesh": { "Vertices": [{ "X": 90.26213836669922, "Y": 100.0296630859375, "Z": 37.401573181152344 }, { "X": 90.26213836669922, "Y": 73.29081726074219, "Z": 37.401573181152344 }, { "X": 90.26213836669922, "Y": 73.29081726074219, "Z": -1.3234889800848443e-23 }, { "X": 90.26213836669922, "Y": 77.4863510131836, "Z": 0.0 }, { "X": 90.26213836669922, "Y": 77.4863510131836, "Z": 7.001312255859375 }, { "X": 90.26213836669922, "Y": 80.48831939697266, "Z": 7.001312255859375 }, { "X": 90.26213836669922, "Y": 80.48831939697266, "Z": 1.3234889800848443e-23 }, { "X": 90.26213836669922, "Y": 90.35118103027344, "Z": 1.3234889800848443e-23 }, { "X": 90.26213836669922, "Y": 90.35118103027344, "Z": 12.467191696166992 }, { "X": 90.26213836669922, "Y": 80.79573822021484, "Z": 12.467191696166992 }, { "X": 90.26213836669922, "Y": 80.79573822021484, "Z": 12.967191696166992 }, { "X": 90.26213836669922, "Y": 90.35118103027344, "Z": 12.967191696166992 }, { "X": 90.26213836669922, "Y": 90.35118103027344, "Z": 31.435253143310547 }, { "X": 90.26213836669922, "Y": 90.85118103027344, "Z": 31.435253143310547 }, { "X": 90.26213836669922, "Y": 90.85118103027344, "Z": 12.967191696166992 }, { "X": 90.26213836669922, "Y": 100.0296630859375, "Z": 12.967191696166992 }, { "X": 90.26213836669922, "Y": 100.0296630859375, "Z": 0.0 }, { "X": 90.26213836669922, "Y": 100.0296630859375, "Z": 12.467191696166992 }, { "X": 90.26213836669922, "Y": 90.85118103027344, "Z": 12.467191696166992 }, { "X": 90.26213836669922, "Y": 90.85118103027344, "Z": 0.0 }], "Triangles": [ [2, 3, 4], [2, 4, 1], [9, 10, 4], [9, 4, 5], [10, 1, 4], [9, 5, 8], [1, 10, 12], [5, 6, 7], [14, 15, 13], [11, 12, 10], [13, 0, 12], [15, 0, 13], [12, 0, 1], [8, 5, 7], [18, 19, 16], [16, 17, 18] ] }, "Center": { "X": 90.26213836669922, "Y": 86.72756147870598, "Z": 19.143575370423758 }, "Normal": { "X": 2.000000000000001, "Y": 0.0, "Z": 0.0 }, "LevelId": 311, "DerrivingElementUniqueId": "9e94f57c-3b96-47ee-8d6b-c46d9346a9cb-0002c838" }]

Python Example (geometry areas)

import json, requests

class ApiHelpers:
# Same credentials you use to log in to cove.tool
def __init__(self, username, password):
self.token = self._get_api_token(username, password)

def post_request(self, path, data, use_token=True):
url = self._api_url(path)
headers = self._headers(use_token)
response = requests.post(url, headers=headers, json=data)
return self._handle_response(response)

def get_request(self, path, use_token=True):
url = self._api_url(path)
headers = self._headers(use_token)
response = requests.get(url, headers=headers)
return self._handle_response(response)

def _api_url(self, path):
return 'https://app.covetool.com/api/' + path + '/'

def _get_api_token(self, username, password):
data = {
'username': username,
'password': password,
}
response_data = self.post_request('get-token', data, False)
token = response_data['token']
return str(token)

def _headers(self, use_token):
headers = {}
if use_token:
headers['Authorization'] = 'Token ' + self.token
return headers

def _handle_response(self, response):
if response.ok:
return response.json()
else:
return {'result': 'error'}

# Set up helpers instance
username = 'username' # Replace with your cove.tool username
password = 'password' # Replace with your cove.tool password
helpers = ApiHelpers(username, password)

# Get a list of projects
project_list = helpers.get_request('projects')
names = []
values = []
for project in project_list:
if project['run_set']:
name = str(project['name'])
value = str(project['run_set'][0])
names.append(name)
values.append(value)

# Update a run
# Replace "1" with a run ID that belongs to one of your projects
run = 'https://app.covetool.com/api/runs/1/'
si_units = 'true'
building_height = 15
roof_area = 900
floor_area = 900
skylight_area = 150
wall_area_e = 450
wall_area_ne = 0
wall_area_n = 450
wall_area_nw = 0
wall_area_w = 450
wall_area_sw = 0
wall_area_s = 450
wall_area_se = 0
window_area_e = 200
window_area_ne = 0
window_area_n = 200
window_area_nw = 0
window_area_w = 200
window_area_sw = 0
window_area_s = 200
window_area_se = 0

data = {
'run': run,
'si_units': si_units,
'building_height': building_height,
'roof_area': roof_area,
'floor_area': floor_area,
'skylight_area': skylight_area,
'wall_area_e': wall_area_e,
'wall_area_ne': wall_area_ne,
'wall_area_n': wall_area_n,
'wall_area_nw': wall_area_nw,
'wall_area_w': wall_area_w,
'wall_area_sw': wall_area_sw,
'wall_area_s': wall_area_s,
'wall_area_se': wall_area_se,
'window_area_e': window_area_e,
'window_area_ne': window_area_ne,
'window_area_n': window_area_n,
'window_area_nw': window_area_nw,
'window_area_w': window_area_w,
'window_area_sw': window_area_sw,
'window_area_s': window_area_s,
'window_area_se': window_area_se,
}

result = helpers.post_request('run-values', data)
eui_total = result['data']['eui_total']
print('EUI Total:', eui_total)
cooling = 0
heating = 0
lighting = 0
equipment = 0
fans = 0
pumps = 0
hot_water = 0
eui_breakdown = result['data']['eui_breakdown']
headers = eui_breakdown['headers']
values = eui_breakdown['values']
for i, header in enumerate(headers):
if header == 'Cooling':
cooling = float(values[i])
print('Cooling:', cooling)
elif header == 'Heating':
heating = float(values[i])
print('Heating:', heating)
elif header == 'Lighting':
lighting = float(values[i])
print('Lighting:', lighting)
elif header == 'Equipment':
equipment = float(values[i])
print('Equipment:', equipment)
elif header == 'Fans':
fans = float(values[i])
print('Fans:', fans)
elif header == 'Pumps':
pumps = float(values[i])
print('Pumps:', pumps)
elif header == 'Hot Water':
hot_water = float(values[i])
print('Hot Water:', hot_water)
Did this answer your question?