-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yaml
53 lines (53 loc) · 1.64 KB
/
api.yaml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
openapi: 3.0.0
info:
title: Cyprus Electricity cost API
version: 1.0.0
description: An API to get the current cost of electricity in Cyprus.
x-logo:
url: https://electricity-calculator.cy/images/calculator.png
altText: EAC Calculator
servers:
- url: 'https://electricity-calculator.cy/api'
paths:
/getCurrentRate:
get:
summary: getCurrentRate
operationId: getCurrentRate
parameters:
- name: tariffCode
in: query
description: 'The tariff code for which you want to get the current rate. Allowed values: "01", "02", "08".'
required: false
schema:
type: string
default: "01"
enum: ["01", "02", "08"]
- name: creditUnits
in: query
description: 'A boolean indicating if you have credit units from net metering.'
required: false
schema:
type: boolean
default: false
responses:
'200':
description: Successful response
content:
application/json:
example:
measurement: €/kWh
total: 0.333658
breakdown:
electricityGeneration: 0.1035
networkUsage: 0.0302
ancillaryServices: 0.0065
fuelAdjustment: 0.137878
publicServiceObligation: 0.00058
resEsFund: 0.005
vat: 0.052945
'400':
description: Bad request
content:
application/json:
example:
error: 'The selected tariff code is invalid.'