-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswagger.json
More file actions
248 lines (248 loc) · 6.83 KB
/
Copy pathswagger.json
File metadata and controls
248 lines (248 loc) · 6.83 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
{
"swagger": "2.0",
"info": {
"description": "한국 전기안전공사의 Open API 서비스 입니다. 본 API 서비스는 전기안전공공플랫폼의 실시간 원격관제데이터를 RESTful-API 형태로 조회 할 수 있습니다. </br> `API 키발급 및 자세한 정보는 한국전기안전공사로 문의바랍니다.(krystaloh@kesco.or.kr)`.",
"version": "1.0.0",
"title": "한국전기안전공사 전기안전공공플랫폼 원격관제데이터 Open-API",
"termsOfService": "http://www.kesco.or.kr",
"contact": {
"email": "krystaloh@kesco.or.kr"
},
"license": {
"name": "KESCO",
"url": "http://www.kesco.or.kr"
}
},
"host": "https://kp.esps.or.kr/equipment",
"basePath": "/v2",
"tags": [
{
"name": "equipment",
"description": "실시간 IoT 장치별 측정 데이터 및 이벤트 현황 조회",
"externalDocs": {
"description": "Find out more",
"url": "http://www.kesco.or.kr"
}
}
],
"schemes": [
"http"
],
"paths": {
"/equipment/{equipmentId}": {
"get": {
"tags": [
"equipment"
],
"summary": "현재 id의 실시간 데이터 조회",
"description": "현재 id의 실시간 데이터 조회합니다. Option값 '1' 은 현재 측정데이터 조회이며, '2'는 이벤트 정보 조회입니다. 옵션값 '2'의 경우 start 및 end에 해당하는 시간 필터가 가능합니다.",
"operationId": "measuredData",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "X-Auth-Token",
"in": "header",
"description": "KESCO API 인증 Token-Key (기간만료 및 필요시 KESCO에 요청)",
"required": true,
"type": "string"
},
{
"name": "equipmentId",
"in": "path",
"description": "관제장치 식별자",
"required": true,
"type": "integer",
"format": "int64"
},
{
"name": "Option",
"in": "query",
"description": "1 -> 현재측정데이터<br> 2 -> 이벤트 데이터 ",
"required": true,
"type": "string"
},
{
"name": "start",
"in": "query",
"description": "Option 2 (현재데이터)에서 검색의 시작 지점<br>Format 1 : yyyymmddhhmmss 또는 yyyy-mm-dd hh:mm:ss <br> Format 2 : yyyymmdd 또는 yyyy-mm-dd",
"required": true,
"type": "string"
},
{
"name": "end",
"in": "query",
"type": "string",
"description": "Option 2 (현재데이터)에서 검색의 종료 지점<br>Format 1 : yyyymmddhhmmss 또는 yyyy-mm-dd hh:mm:ss <br> Format 2 : yyyymmdd 또는 yyyy-mm-dd",
"required": false
}
],
"responses": {
"400": {
"description": "Http Response Code 400, Please check you arguments. [Received argument | start : 20180601, end : 20180632]"
},
"405": {
"description": "Method Not Allowed"
},
"200 (Option:1)": {
"description": "successful operation (Option1 현재IoT측정데이터)",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/equipment"
}
}
},
"200 (Option:2)": {
"description": "successful operation (Option2 현재IoT이벤트데이터 ",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/eventData"
}
}
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
}
},
"securityDefinitions": {
"X-Auth-Token": {
"type": "apiKey",
"name": "X-Auth-Token",
"in": "http-Header"
}
},
"definitions": {
"equipment": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "000494"
},
"etime": {
"type": "string",
"example": "2018-05-13T04:10:35.216Z"
},
"alarm": {
"type": "string",
"example": "51/000"
},
"cat": {
"type": "string",
"example": "null"
},
"measure": {
"type": "object",
"$ref": "#/definitions/measure"
},
"sub": {
"type": "string",
"example": "kesco"
}
}
},
"eventData": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"example": "저항성누설전류주의"
},
"occurrenceTime": {
"type": "string",
"example": "2017-12-05T19:01:59.000Z"
},
"siteName": {
"type": "string",
"example": "외암리 199 (외암민속길9번길 8)"
},
"equipmentSeq": {
"type": "string",
"example": "3020"
},
"equipmentName": {
"type": "string",
"example": "외암리 195 (외암민속길 33)"
},
"measureValue": {
"type": "string",
"example": "256.21464"
},
"eventLevel": {
"type": "string",
"example": "주의"
},
"handlingResult": {
"type": "string",
"example": "조치중"
},
"handlingTime": {
"type": "string",
"example": "2017-12-08T07:24:24.000Z"
}
}
},
"measure": {
"type": "object",
"properties": {
"amp": {
"type": "number",
"format": "double",
"example": 0.003612
},
"coId": {
"type": "integer",
"format": "double",
"example": 1
},
"e1": {
"type": "integer",
"format": "double"
},
"e2": {
"type": "integer",
"format": "double"
},
"leakAmp": {
"type": "integer",
"format": "double",
"example": 0.011234
},
"leakResi": {
"type": "integer",
"format": "double",
"example": 0.011006
},
"ohm": {
"type": "integer",
"format": "double",
"example": 19.87072
},
"volt": {
"type": "integer",
"format": "double",
"example": 218.6904
},
"watt": {
"type": "integer",
"format": "double",
"example": 0.790871
}
}
}
}
}