
PowerScore API Documentation
Introduction to Machine-To-Machine API
This PowerScore API makes it easy to download reports and data dumps from Resource Innovation Institute (RII). For RII Partners, individual records can be securely downloaded in PDF and machine-readable formats, zipped up with all uploaded attachments. Similarly, custom reports can be built for monthly aggregate data, etc.
Login to get API Access Token
If you have received the email address, username, and password linked to your organization's API User Account, then you are ready to connect with our server.
First, use your API user info to securely login and receive an access token. This access token will then be used to make requests for data downloads, etc.
You can save your access token for use in multiple API requests over the next 24 hours. Or you can request a new access token for each request.
The access token that you receive will be different than the one in this page's examples. Your implementation should feed your temporary access tokens into further API requests.
curl --request POST \ --url 'https://powerscore.resourceinnovation.org/api-bot/login' \ --header 'content-type: application/json' \ --data '{"login":"[YOUR_USERNAME_OR_EMAIL]","password":"[YOUR_USER_PASSWORD]"}'Make sure to replace
[YOUR_USERNAME_OR_EMAIL]
[YOUR_USER_PASSWORD]
Sample Response:
{
"status": "Success",
"results": "Login successful, and a fresh access token is attached.",
"access_token": "84|GTuVfOvKa1Cz1S6ZcPNKDyI20bqchyM1g5Dmag5q",
"token_type": "Bearer"
}
Delete All API Access Tokens
API access tokens will automatically expire 24 hours after being requested and generated. But this optional request will revoke all previous access tokens for your API user's account.
curl --request GET \
--header "Authorization: Bearer 84|GTuVfOvKa1Cz1S6ZcPNKDyI20bqchyM1g5Dmag5q" \
--url "https://powerscore.resourceinnovation.org/api-bot/logout"
Be sure to replace the Bearer access token
with the one your machine requested using
the Login request.
Sample Response:
{ "status": "Success", "results": "All your past access tokens have been revoked." }
Test API Connection with Access Token
This method will simply confirm an access token's authorization [without also deleting all tokens].
curl --request GET \
--header "Authorization: Bearer 84|GTuVfOvKa1Cz1S6ZcPNKDyI20bqchyM1g5Dmag5q" \
--url "https://powerscore.resourceinnovation.org/api-bot/test-connection"
Be sure to replace the Bearer access token
with the one your machine requested using
the Login request.Sample Response:
{ "status": "Success", "results": "Connected with the machine-to-machine API for PowerScore" }
Download All Company PowerScore Data Highlights
This request will deliver a JSON export of data highlights from all of your company's PowerScore records. This includes:
- PowerScore ID#
- All KPIs
- Lighting power density calculations
- Input values for annual totals
- Key PowerScore record categorizations
The unique PowerScore ID# provided within these data highlights can be used to download all data and files related to an individual record (described below, coming soon).
curl --request GET \
--header "Authorization: Bearer 84|GTuVfOvKa1Cz1S6ZcPNKDyI20bqchyM1g5Dmag5q" \
--url "https://powerscore.resourceinnovation.org/api-bot/my-powerscores/json"
Be sure to replace the Bearer access token
with the one your machine requested using
the Login request.
Sample Response:
{
"status": "Success",
"results": "Connected to download all your PowerScore data highlights.",
"data": {
"0": {
"PowerScore ID#": 42194819,
"PowerScore Label": "#42194819-22",
"URL" : "https://powerscore.resourceinnovation.org/calculated/u-42194819"
"Overall Ranking (Percentile)": 9.2885375494071,
"Electric Facility Efficiency KPI": 2296.4506963277,
"Electric Facility Efficiency KPI Units": "kBtu / sq ft",
"Crop Canopy Productivity KPI": 0.52542725988701,
"Crop Canopy Productivity KPI Units": "lbs / sq ft",
"Crop Electric Productivity KPI": 4370.6348559485,
"Crop Electric Productivity KPI Units": "kBtu / lb",
"Facility Water Efficiency KPI": 182.55914548023,
"Facility Water Efficiency KPI Units": "gal / sq ft",
"Crop Water Productivity KPI": 347.44894187539,
"Crop Water Productivity KPI Units": "gal / lb",
"Facility Waste Efficiency KPI": 3.2794950564972,
"Facility Waste Efficiency KPI Units": "lbs / sq ft",
"Crop Waste Productivity KPI": 6.2415776775694,
"Crop Waste Productivity KPI Units": "lbs / lb",
"HVAC Energy Efficiency KPI": 392.38,
"HVAC Energy Efficiency KPI Units": "kBtu / sq ft",
"Lighting Energy Efficiency KPI": 1028.0762711864,
"Lighting Energy Efficiency KPI Units": "Wh / day / sq ft",
"Crop Lighting Productivity KPI": 1956.6481408055,
"Crop Lighting Productivity KPI Units": "Wh / day / lb",
"Weighted LPD (all grow areas)": 47.64443934351,
"Weighted LPD (all grow areas) Units": "W / sq ft",
"LPD Flower": 60.911016949153,
"LPD Flower Units": "W / sq ft",
"LPD Veg": 26.012060828526,
"LPD Veg Units": "W / sq ft",
"LPD Clone": 17.969352014011,
"LPD Clone Units": "W / sq ft",
"Dry Flower": 2976.02,
"Dry Flower Units": "lbs",
"Flower Canopy": 5664,
"Flower Canopy Units": "sq ft",
"Electricity Used": 3812162,
"Water Usage": 1034015,
"Total Waste": 18575.06,
"Annual Total Pounds CO2e": 4685909.53088188,
"Type": "Indoor",
"Harvests Per Year": 30,
"Has Clone or Mother": "Y",
"Clone or Mother Sunlight": "N",
"Clone or Mother Light Dep": "N",
"Clone or Mother Artificial Light": "N",
"Clone or Mother Days In Cycle": 14,
"Clone or Mother Canopy Area (sq ft)": 1142,
"Clone or Mother Total Light Watts": 20521,
"Clone or Mother Light Counts": "CMH 345W x 22, Fluorescent 54W x 34, CMH 345W x 31, LED 40W x 10",
"Has Vegetating": "Y",
"Vegetating Sunlight": "N",
"Vegetating Light Dep": "N",
"Vegetating Artificial Light": "N",
"Vegetating Days In Cycle": 50,
"Vegetating Canopy Area (sq ft)": 1907,
"Vegetating Total Light Watts": 49605,
"Vegetating Light Counts": "CMH 345W x 40, CMH 345W x 35, CMH 345W x 50, Fluorescent 54W x 24, Fluorescent 54W x 96",
"Has Flowering": "Y",
"Flowering Sunlight": "N",
"Flowering Light Dep": "N",
"Flowering Artificial Light": "N",
"Flowering Days In Cycle": 60,
"Flowering Canopy Area (sq ft)": 5664,
"Flowering Total Light Watts": 345000,
"Flowering Light Counts": "CMH 690W x 69, CMH 690W x 69, CMH 690W x 105, CMH 690W x 105, CMH 690W x 77, CMH 690W x 75",
"County": "MULTNOMAH",
"State": "OR"
},
"1": ...
}