You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer/API.md
+37-4Lines changed: 37 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,25 @@ Our API gives you access to multiple energy data sources through a unified inter
36
36
| Battery | Battery storage systems | State of charge (%), Power flow (kW) |
37
37
| Energy Meter | Grid tie consumption/export | Consumption (kW), Delivery (kW), Phase data |
38
38
39
+
In general, data can be queried on a per gateway or specific DER basis. Use the [API Playground](https://api.srcful.dev/playground) for the most recent documentation and queries.
40
+
39
41
## Example Queries
40
42
41
-
### Real-time Solar Production
43
+
### List gateway DERS
44
+
```graphql
45
+
{
46
+
gateway {
47
+
gateway(id: "your-gateway-id") {
48
+
ders {
49
+
type
50
+
sn
51
+
}
52
+
}
53
+
}
54
+
}
55
+
```
56
+
57
+
### Real-time Solar Production for a gateway
42
58
43
59
```graphql
44
60
{
@@ -54,6 +70,22 @@ Our API gives you access to multiple energy data sources through a unified inter
54
70
}
55
71
```
56
72
73
+
### Real-time Solar Production for a solar DER
74
+
75
+
```graphql
76
+
{
77
+
derData {
78
+
solar(sn: "your-der-serial-number") {
79
+
latest {
80
+
ts
81
+
power # Current power in kW
82
+
}
83
+
today # Total generation today in kWh
84
+
}
85
+
}
86
+
}
87
+
```
88
+
57
89
### Battery Status with Historical Data
58
90
59
91
```graphql
@@ -66,8 +98,8 @@ Our API gives you access to multiple energy data sources through a unified inter
66
98
soc # State of charge percentage
67
99
}
68
100
historical(
69
-
start: "2023-06-01T00:00:00Z",
70
-
stop: "2023-06-01T23:59:59Z",
101
+
start: "2025-04-01T00:00:00Z",
102
+
stop: "2025-05-01T23:59:59Z",
71
103
resolution: "15m"
72
104
) {
73
105
ts
@@ -86,13 +118,14 @@ Our API gives you access to multiple energy data sources through a unified inter
0 commit comments