-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient-api.yaml
176 lines (175 loc) · 3.83 KB
/
client-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
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
swagger: '2.0'
info:
description: 'API trên mạch,'
version: 1.0.0
title: API EcoVison
host: localhost:2904
basePath: /
tags:
- name: local
description: This connection is in local
- name: internet
description: This API need the internet
schemes:
- http
paths:
/traindata:
get:
tags:
- local
summary: Get data for KNN
description: Request to NodeJS to get data for caching
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/person'
post:
tags:
- internet
summary: Add new data to traindata
description: Server have new data for training and want client save it
parameters:
- in: body
name: body
required: true
schema:
type: array
items:
$ref: '#/definitions/person'
responses:
'200':
description: OK
/dailydata:
post:
tags:
- local
summary: Save data to DB
description: Send a request for NodeJS to save info to DB
parameters:
- in: body
name: body
description: List of property object
required: true
schema:
type: object
properties:
imageLocalUrl:
type: string
frameLocalUrl:
type: string
isUnknown:
type: boolean
isNotSure:
type: boolean
minDistance:
type: number
feature:
type: array
items:
type: number
format: float32
createdAt:
type: string
format: timestamp
responses:
'200':
description: OK
get:
tags:
- internet
summary: Query data by some parameters
description: This API for server/PC request for searching
parameters:
- in: body
name: body
schema:
type: object
properties:
personId:
type: string
from:
type: string
to:
type: string
feature:
type: array
items:
type: number
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/dailydata'
definitions:
person:
type: object
required:
- _id
- personId
- features
- createdAt
- updatedAt
properties:
_id:
type: string
format: objectId
personId:
type: string
format: objectId
features:
type: array
format: array of feature128
items:
type: array
items:
type: number
format: float32
createdAt:
type: string
format: timestamp
updatedAt:
type: string
format: timestamp
dailydata:
type: object
required:
- _id
- createdAt
- minDistance
- predictedPersonId
properties:
_id:
type: string
imageUrl:
type: string
frameUrl:
type: string
imageLocalPath:
type: string
frameLocalPath:
type: string
feature:
type: array
format: array of float32
items:
type: number
createdAt:
type: string
format: timestamp
isUnknown:
type: boolean
isNotSure:
type: boolean
minDistance:
type: number
format: float32
name:
type: string
predictedPersonId:
type: string
format: person.personId