Skip to content

Commit b9490e4

Browse files
committed
First draft of the ADR for watt time v3 changes
First draft of the ADR for watt time v3 changes. Looking at path mappings and parameters. Still plenty to work on.
1 parent 412f185 commit b9490e4

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
# 0015. WattTime v3 Changes
3+
4+
## Status
5+
6+
Proposed
7+
8+
## Context
9+
As part of the update to Watt Time v3 we are proposing the changes to the underlying API calls. This needs to be tracked so we understand the impacts, and if multiple options are available, which option was selected and why.
10+
11+
This wll impact the `CarbonAware.DataSources.WattTime` project primarily.
12+
13+
## Decision
14+
15+
The proposal is for the outlined WattTime API mapping and changes.
16+
17+
## WattTime v2, v3 Mapping
18+
19+
The following document and guidelines was used to understand the impact to the Carbon Aware SDK for the WattTime v3 updates. https://docs.watttime.org/#tag/Transitioning-from-APIv2-to-APIv3
20+
21+
### Base URL
22+
The base URL will need to change.
23+
> TODO: Add where this is configured
24+
25+
|Base URL (v2) | Based URL (v3) |
26+
|---|---|
27+
| /v2 | /v3 |
28+
29+
30+
### Paths
31+
The paths will also need to change.
32+
33+
The following is configured at `CarbonAware.DataSources.WattTime/src/Constants/Paths.cs`
34+
35+
| API Endpoint | Description | Path (v2) | Path (v3) | Notes |
36+
|--------------|-------------|-----------|-----------|---|
37+
| Data | Get data | /data | /historical | Parameter changes outlined below. Start and End are now mandatory.
38+
| Forecast | Get forecast| /forecast | /forecast | Forecast parameters have undergone broader changes, and it can no longer be used for historical data
39+
| Historical | Get historical forecast data | /historical (?) | /forecast/historical (?) | **We need to validate why historical was being used for the API, and what historical used to be, and whether this should be the new /forecast/historical or not.**
40+
| BalancingAuthorityFromLocation | Get balancing authority from location | /ba-from-loc | |
41+
| Login | User login | https://api2.watttime.org/v2/login | https://api.watttime.org/login | No other changes
42+
43+
### Query Strings
44+
45+
#### Signal Type
46+
Everything call takes an optional `signal_type` parameter that defaults to `co2_moer`.
47+
48+
The following comes from `CarbonAware.DataSources.WattTime/src/Constants/QueryStrings.cs`
49+
50+
| Query String (v2) | Query String (v3) | Description |
51+
|------------------------------------|----------------------------------|------------------------------|
52+
| ba | region | Balancing Authority / Region |
53+
| starttime | start | Start Time |
54+
| endtime | end | End Time |
55+
| latitude | | Latitude |
56+
| longitude | | Longitude |
57+
| username | | Username |
58+
59+
## Green Impact
60+
61+
Neutral
62+

0 commit comments

Comments
 (0)