-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
317 lines (279 loc) · 9.04 KB
/
Copy pathopenapi.yaml
File metadata and controls
317 lines (279 loc) · 9.04 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
openapi: 3.0.3
info:
title: ReconRoll API
description: REST API for the ReconRoll facial recognition attendance system.
version: 2.0.0
servers:
- url: https://192.168.100.90/api
description: Local deployment
security:
- tokenAuth: []
components:
securitySchemes:
tokenAuth:
type: apiKey
in: header
name: Authorization
description: "DRF token auth. Format: `Token <token>`"
paths:
# ── Auth ──────────────────────────────────────────────────────────────────
/users/signup/:
post:
summary: Register a new user
security: []
tags: [Auth]
responses:
"201": { description: User created }
"400": { description: Validation error }
/users/login/:
post:
summary: Log in and receive a token
security: []
tags: [Auth]
responses:
"200": { description: Login successful, returns token }
"400": { description: Invalid credentials }
/users/logout/:
post:
summary: Invalidate the current token
tags: [Auth]
responses:
"200": { description: Logged out }
"401": { description: Unauthorized }
/users/me/:
get:
summary: Get the current user's profile
tags: [Auth]
responses:
"200": { description: User profile }
"401": { description: Unauthorized }
# ── Enrollment ────────────────────────────────────────────────────────────
/enroll/:
post:
summary: Enroll a new person with one or more face images
security: []
tags: [Enrollment]
responses:
"201": { description: Person enrolled successfully }
"400": { description: Validation or face detection error }
/enroll/progress/:
get:
summary: Poll enrollment processing progress
security: []
tags: [Enrollment]
responses:
"200": { description: Progress percentage }
# ── People ────────────────────────────────────────────────────────────────
/people/:
get:
summary: List all people who have face encodings
tags: [People]
responses:
"200": { description: List of people }
"401": { description: Unauthorized }
/people/{id}/:
get:
summary: Get details for a specific person
tags: [People]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Person detail }
"404": { description: Not found }
# ── Rosters ───────────────────────────────────────────────────────────────
/rosters/:
get:
summary: List all rosters
tags: [Rosters]
responses:
"200": { description: List of rosters }
"401": { description: Unauthorized }
/roster/create/:
post:
summary: Create a new roster
tags: [Rosters]
responses:
"201": { description: Roster created }
"400": { description: Validation error }
/roster/{id}/:
get:
summary: Get a roster and its people
tags: [Rosters]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Roster detail }
"404": { description: Not found }
/roster/{id}/update/:
post:
summary: Update a roster's name, description, or people
tags: [Rosters]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Roster updated }
"400": { description: Validation error }
"404": { description: Not found }
/roster/{id}/delete/:
delete:
summary: Delete a roster
tags: [Rosters]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Roster deleted }
"404": { description: Not found }
# ── Sessions ──────────────────────────────────────────────────────────────
/sessions/:
get:
summary: List all sessions
tags: [Sessions]
responses:
"200": { description: List of sessions }
"401": { description: Unauthorized }
/session/create/:
post:
summary: Create a new session
tags: [Sessions]
responses:
"201": { description: Session created }
"400": { description: Validation error }
/session/{id}/:
get:
summary: Get session details and attendance summary
tags: [Sessions]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Session detail }
"404": { description: Not found }
/session/{id}/start/:
post:
summary: Start the recognition thread for a session
tags: [Sessions]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Recognition started }
"400": { description: Session already running or invalid state }
/session/{id}/stop/:
post:
summary: Stop the recognition thread and complete the session
tags: [Sessions]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Session stopped }
"404": { description: Not found }
/sessions/stop-all/:
post:
summary: Stop all currently running sessions
tags: [Sessions]
responses:
"200": { description: All sessions stopped }
"401": { description: Unauthorized }
/sessions/{id}/upload_frame/:
post:
summary: Upload a webcam frame for processing
tags: [Sessions]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Frame queued }
"400": { description: Session not running or thread not active }
"429": { description: Frame queue full }
# ── Session Data ──────────────────────────────────────────────────────────
/session/{id}/present_partial/:
get:
summary: Get present people for a session
tags: [Session Data]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Present people list }
/session/{id}/absent_partial/:
get:
summary: Get absent people for a session
tags: [Session Data]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Absent people list }
/session/{id}/events_partial/:
get:
summary: Get the event log for a session
tags: [Session Data]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Event list }
/session/{id}/unidentified_partial/:
get:
summary: Get unidentified face captures for a session
tags: [Session Data]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Unidentified faces list }
/session/{id}/progress_partial/:
get:
summary: Get attendance progress stats for a session
tags: [Session Data]
parameters:
- name: id
in: path
required: true
schema: { type: string, format: uuid }
responses:
"200": { description: Progress stats }
# ── Misc ──────────────────────────────────────────────────────────────────
/info/:
get:
summary: System info and feature overview
security: []
tags: [Misc]
responses:
"200": { description: System info }
/csrf/:
get:
summary: Get a CSRF token
security: []
tags: [Misc]
responses:
"200": { description: CSRF token }