-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.http
More file actions
28 lines (22 loc) · 844 Bytes
/
test.http
File metadata and controls
28 lines (22 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@root = https://api.octopus.energy/v1
@accountId = A-B8F15377
@token =
@period_from = 2024-12-22
@period_to = 2024-12-23
###
# @name products
GET {{root}}/products
###
# @name product
GET {{products.response.body.$.results[0].links[0].href}}
###
# @name region
GET {{product.response.body.$.single_register_electricity_tariffs['_A'].direct_debit_monthly.links[1].href}}?period_from={{period_from}}&period_to={{period_to}}
###
# @name account
GET {{root}}/accounts/{{accountId}}
Authorization: Basic {{token}}
###
# @name mpan
GET {{root}}/electricity-meter-points/{{account.response.body.$.properties[0].electricity_meter_points[0].mpan}}/meters/{{account.response.body.$.properties.[0].electricity_meter_points.[0].meters[1].serial_number}}/consumption?period_from={{period_from}}&period_to={{period_to}}
Authorization: Basic {{token}}