This repository was archived by the owner on Aug 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutilities-generator-api.raml
More file actions
146 lines (138 loc) · 4.47 KB
/
Copy pathutilities-generator-api.raml
File metadata and controls
146 lines (138 loc) · 4.47 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#%RAML 1.0
title: Utilities Generator API
version: v1
types:
MeterReading:
properties:
timestamp: string
value: number
PowerConsumption:
properties:
timestamp: string
consumption: number
OutageData:
properties:
start_time: string
end_time: string
duration: string
FaultEvent:
properties:
timestamp: string
type: string
severity: string
/utilities:
/generate:
/meter-readings:
get:
description: Generate simulated meter readings for a given period
queryParameters:
start_date:
description: Start date for the meter readings (e.g., "2024-01-01")
type: string
required: true
end_date:
description: End date for the meter readings (e.g., "2024-01-31")
type: string
required: true
meter_id:
description: Identifier for the meter
type: string
required: true
responses:
200:
body:
application/json:
example: |
{
"meter_id": "123456",
"readings": [
{"timestamp": "2024-01-01T00:00:00", "value": 100.5},
{"timestamp": "2024-01-02T00:00:00", "value": 101.2}
]
}
/power-consumption:
get:
description: Generate simulated power consumption data for a given period
queryParameters:
start_date:
description: Start date for power consumption data (e.g., "2024-01-01")
type: string
required: true
end_date:
description: End date for power consumption data (e.g., "2024-01-31")
type: string
required: true
interval:
description: Interval for data points (e.g., "hourly", "daily")
type: string
enum: [hourly, daily]
required: true
location:
description: Location ID for the power consumption data
type: string
responses:
200:
body:
application/json:
example: |
{
"location": "Houston",
"data": [
{"timestamp": "2024-01-01T00:00:00", "consumption": 500},
{"timestamp": "2024-01-01T01:00:00", "consumption": 520}
]
}
/outage-data:
get:
description: Generate simulated outage data for a given period
queryParameters:
start_date:
description: Start date for outage data (e.g., "2024-01-01")
type: string
required: true
end_date:
description: End date for outage data (e.g., "2024-01-31")
type: string
required: true
location:
description: Location ID for outage data
type: string
responses:
200:
body:
application/json:
example: |
{
"location": "Dallas",
"outages": [
{"start_time": "2024-01-05T10:00:00", "end_time": "2024-01-05T14:00:00", "duration": "4 hours"},
{"start_time": "2024-01-12T08:30:00", "end_time": "2024-01-12T11:45:00", "duration": "3 hours 15 minutes"}
]
}
/fault-events:
get:
description: Generate simulated fault events data for a given period
queryParameters:
start_date:
description: Start date for fault events data (e.g., "2024-01-01")
type: string
required: true
end_date:
description: End date for fault events data (e.g., "2024-01-31")
type: string
required: true
location:
description: Location ID for fault events data
type: string
responses:
200:
body:
application/json:
example: |
{
"location": "Austin",
"fault_events": [
{"timestamp": "2024-01-03T12:45:00", "type": "Equipment Failure", "severity": "Major"},
{"timestamp": "2024-01-15T08:20:00", "type": "Power Surge", "severity": "Minor"}
]
}