-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlinkOpenAPI.yaml
More file actions
372 lines (368 loc) · 12.9 KB
/
BlinkOpenAPI.yaml
File metadata and controls
372 lines (368 loc) · 12.9 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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
openapi: 3.0.0
info:
title: Unofficial Blink Camera API
version: "0.1.0"
servers:
- url: https://rest-prod.immedia-semi.com
paths:
'/network/{networkID}/camera/{cameraID}/enable':
post:
operationId: enableCamera
parameters:
- name: networkID
in: path
required: true
schema: { type: integer }
- name: cameraID
in: path
required: true
schema: { type: integer }
responses:
'200':
description: Enable Camera Response
content:
'application/json':
schema: { $ref: '#/components/schemas/InitialCommandResponse' }
'/network/{networkID}/camera/{cameraID}/disable':
post:
operationId: disableCamera
parameters:
- name: networkID
in: path
required: true
schema: { type: integer }
- name: cameraID
in: path
required: true
schema: { type: integer }
responses:
'200':
description: Disable Camera Response
content:
'application/json':
schema: { $ref: '#/components/schemas/InitialCommandResponse' }
'/{media}.jpg':
get:
operationId: getThumbnail
parameters:
- name: media
in: path
description: Media URL
required: true
schema: { type: string }
responses:
'200':
description: Thumbnail
content:
'image/jpeg':
schema: { type: string, format: binary }
'/{media}':
get:
operationId: getVideo
parameters:
- name: media
in: path
description: Media URL
required: true
schema: { type: string }
responses:
'200':
description: Media
content:
'application/mp4':
schema: { type: string, format: binary }
'/api/v5/account/login':
post:
operationId: login
requestBody:
required: true
content:
'application/json':
schema:
$ref: '#/components/schemas/LoginRequest'
responses:
'200':
description: Login response
content:
'application/json':
schema:
$ref: '#/components/schemas/LoginResponse'
'/api/v4/account/{accountID}/client/{clientID}/pin/verify':
post:
operationId: verifyPin
parameters:
- name: accountID
in: path
description: Account ID
required: true
schema: { type: integer }
- name: clientID
in: path
description: Client ID
required: true
schema: { type: integer }
requestBody:
required: true
content:
'application/json':
schema:
$ref: '#/components/schemas/VerifyPinRequest'
responses:
'200':
description: Verify Pin Response
content:
'application/json':
schema:
$ref: '#/components/schemas/VerifyPinResponse'
default:
$ref: '#/components/responses/ErrorResponse'
'/api/v3/accounts/{accountID}/homescreen':
get:
parameters:
- name: accountID
in: path
description: Account ID
required: true
schema: { type: integer }
operationId: homescreen
responses:
'200':
description: Home Screen
content:
'application/json':
schema:
$ref: '#/components/schemas/HomeScreenResponse'
'/api/v1/accounts/{accountID}/media/changed':
get:
operationId: getVideoEvents
parameters:
- name: accountID
in: path
description: Account ID
required: true
schema: { type: integer }
- name: since
in: query
required: true
schema: { type: string, format: date-time }
- name: page
description: Page number for multiple pages of results
in: query
required: true
schema: { type: integer }
responses:
'200':
description: Video events
content:
'application/json':
schema: { $ref: '#/components/schemas/VideoEvents' }
default:
$ref: '#/components/responses/ErrorResponse'
components:
responses:
'ErrorResponse':
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
'Error':
type: object
required: [message, code]
properties:
message: { type: string }
code: { type: integer }
'LoginRequest':
type: object
required: [password, email]
properties:
unique_id: { type: string }
password: { type: string }
email: { type: string }
client_name: { type: string }
app_version: { type: string }
reauth: { type: boolean }
device_identifier: { type: string }
'LoginResponse':
type: object
required: [account, auth, phone, verification, lockout_time_remaining, force_password_reset, allow_pin_resend_seconds]
properties:
account:
type: object
properties:
account_id: { type: integer }
user_id: { type: integer }
client_id: { type: integer }
new_account: { type: boolean }
tier: { type: string } # "e003"
region: { type: string } # "eu"
account_verification_required: { type: boolean }
client_verification_required: { type: boolean }
phone_verification_required: { type: boolean }
verification_channel: { type: string } # "email"
required: [account_id, user_id, client_id, new_account, tier, region, account_verification_required, client_verification_required, phone_verification_required, verification_channel]
auth:
type: object
properties:
token: { type: string }
required: [token]
phone:
type: object
properties:
number: { type: string } # "+"
last_4_digits: { type: string }
country_calling_code: { type: string }
valid: { type: boolean }
required: [number, last_4_digits, country_calling_code, valid]
verification:
type: object
properties:
email:
type: object
properties:
required: { type: boolean }
required: [required]
phone:
type: object
properties:
required: { type: boolean }
channel: { type: string } # "sms"
required: [required, channel]
required: [email, phone]
lockout_time_remaining: { type: integer }
force_password_reset: { type: boolean }
allow_pin_resend_seconds: { type: integer }
'VerifyPinRequest':
type: object
properties:
pin: { type: string } # "123456"
required: [pin]
'VerifyPinResponse':
type: object
required: [valid, require_new_pin, message, code]
properties:
valid: { type: boolean } # true
require_new_pin: { type: boolean } # false
message: { type: string } # "Client has been successfully verified"
code: { type: integer } # 1234
'HomeScreenResponse':
type: object
required: [account, networks, sync_modules, cameras]
properties:
account:
type: object
required: [id, email_verified, email_verification_required]
properties:
id: { type: integer } # 1234
email_verified: { type: boolean } # true
email_verification_required: { type: boolean } # false
networks:
type: array
items: { $ref: '#/components/schemas/Network' }
sync_modules:
type: array
items: { $ref: '#/components/schemas/SyncModule' }
cameras:
type: array
items:
$ref: '#/components/schemas/Camera'
'SyncModule':
type: object
required: [id, created_at, updated_at, name, onboarded, status, serial, fw_version, last_hb, wifi_strength, network_id, enable_temp_alerts, local_storage_enabled, local_storage_compatible, local_storage_status]
properties:
id: { type: integer } # 4539
created_at: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
updated_at: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
last_hb: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
name: { type: string } # Front Door"
onboarded: { type: boolean }
enable_temp_alerts: { type: boolean }
status: { type: string, enum: ["online", "offline"] }
serial: { type: string }
fw_version: { type: string }
wifi_strength: { type: integer }
network_id: { type: integer }
local_storage_enabled: { type: boolean }
local_storage_compatible: { type: boolean }
local_storage_status: { type: string } # "unavailable"
'Network':
type: object
required: [id, created_at, updated_at, name, time_zone, dst, armed, lv_save]
properties:
id: { type: integer } # 4539
created_at: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
updated_at: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
name: { type: string } # Front Door"
time_zone: { type: string } # "America/Chicago"
dst: { type: boolean }
armed: { type: boolean }
lv_save: { type: boolean }
'Camera':
type: object
required: [id, created_at, updated_at, name, serial, fw_version, type, enabled, status, battery, usage_rate, network_id, signals, local_storage_enabled, local_storage_compatible, issues]
properties:
id: { type: integer } # 4539
created_at: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
updated_at: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
name: { type: string } # Front Door"
serial: { type: string } # "861575233"
fw_version: { type: string } # "7.96"
type: { type: string } # "xt2"
enabled: { type: boolean } # true
thumbnail: { type: string } # "/media/e003/account/506/network/3801/camera/4539/thumbnail/fw_7.96__mJKyh0mA_2020_09_20__16_45PM"
status: { type: string, enum: ["done", "offline"] } # "done"
battery: { type: string, enum: ["ok", "low"] } # "ok"
usage_rate: { type: boolean } # true
network_id: { type: integer } # 3801
issues: { type: array, items: { $ref: '#/components/schemas/Issue' } }
signals:
type: object
required: [lfr, wifi, temp, battery]
properties:
lfr: { type: integer } # 3
wifi: { type: integer } # 5
temp: { type: integer } # 51
battery: { type: integer } # 3
local_storage_enabled: { type: boolean } # false
local_storage_compatible: { type: boolean } # false
'VideoEvents':
type: object
required: [limit, purge_id, refresh_count, media]
properties:
limit: { type: integer } # 25
purge_id: { type: integer } # 1234567890
refresh_count: { type: integer } # 0
media:
type: array
items:
$ref: '#/components/schemas/Media'
'Media':
type: object
required: [id, created_at, updated_at, deleted, device, device_id, device_name, network_id, network_name, type, source, watched, partial, thumbnail, media, additional_devices, time_zone]
properties:
id: { type: integer } # 1234567890
created_at: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
updated_at: { type: string, format: date-time } # "2020-09-14T16:41:38+00:00"
deleted: { type: boolean } # false
device: { type: string, enum: ["camera", "owl", "catalina"] } # "camera"
device_id: { type: integer } # 1234567
device_name: { type: string } # "The Device Name"
network_id: { type: integer } # 1234
network_name: { type: string } # "The Network Name"
type: { type: string, enum: ["video"] } # "video"
source: { type: string, enum: ["liveview", "pir", "snapshot"] } # "pir"
watched: { type: boolean } # true
partial: { type: boolean, nullable: true } # false
thumbnail: { type: string } # "/api/v2/accounts/1234/media/thumb/mediathumbnailname"
media: { type: string } # "/api/v2/accounts/1234/media/clip/mediavideoname.mp4"
time_zone: { type: string } # "America/Chicago"
'InitialCommandResponse':
type: object
required: [id]
properties:
id: { type: integer } # 1833710
'Issue':
type: object
properties:
__unknown: { type: integer }