Spaces:
Build error
Build error
Gouzi Mohaled
commited on
Commit
·
25f28c1
1
Parent(s):
a515fda
Ajout des fichiers LFS
Browse files- openapi/.gitignore +6 -0
- openapi/openapi-cluster.ytt.yaml +41 -0
- openapi/openapi-collections.ytt.yaml +282 -0
- openapi/openapi-main.ytt.yaml +871 -0
- openapi/openapi-points.ytt.yaml +376 -0
- openapi/openapi-service.ytt.yaml +178 -0
- openapi/openapi-shard-snapshots.ytt.yaml +214 -0
- openapi/openapi-shards.ytt.yaml +57 -0
- openapi/openapi-snapshots.ytt.yaml +257 -0
- openapi/openapi.lib.yml +92 -0
- openapi/schemas/.keep +0 -0
openapi/.gitignore
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/schemas/AllDefinitions.json
|
2 |
+
/models.yaml
|
3 |
+
/models.json
|
4 |
+
/openapi-merged.json
|
5 |
+
/openapi-*.yaml
|
6 |
+
!/openapi-*.ytt.yaml
|
openapi/openapi-cluster.ytt.yaml
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ load("openapi.lib.yml", "response", "reference", "type", "array")
|
2 |
+
|
3 |
+
paths:
|
4 |
+
/cluster:
|
5 |
+
get:
|
6 |
+
tags:
|
7 |
+
- Distributed
|
8 |
+
summary: Get cluster status info
|
9 |
+
description: Get information about the current state and composition of the cluster
|
10 |
+
operationId: cluster_status
|
11 |
+
responses: #@ response(reference("ClusterStatus"))
|
12 |
+
|
13 |
+
/cluster/recover:
|
14 |
+
post:
|
15 |
+
tags:
|
16 |
+
- Distributed
|
17 |
+
summary: Tries to recover current peer Raft state.
|
18 |
+
operationId: recover_current_peer
|
19 |
+
responses: #@ response(type("boolean"))
|
20 |
+
|
21 |
+
/cluster/peer/{peer_id}:
|
22 |
+
delete:
|
23 |
+
tags:
|
24 |
+
- Distributed
|
25 |
+
summary: Remove peer from the cluster
|
26 |
+
description: Tries to remove peer from the cluster. Will return an error if peer has shards on it.
|
27 |
+
operationId: remove_peer
|
28 |
+
parameters:
|
29 |
+
- name: peer_id
|
30 |
+
in: path
|
31 |
+
description: Id of the peer
|
32 |
+
required: true
|
33 |
+
schema:
|
34 |
+
type: integer
|
35 |
+
- name: force
|
36 |
+
in: query
|
37 |
+
description: If true - removes peer even if it has shards/replicas on it.
|
38 |
+
schema:
|
39 |
+
type: boolean
|
40 |
+
default: false
|
41 |
+
responses: #@ response(type("boolean"))
|
openapi/openapi-collections.ytt.yaml
ADDED
@@ -0,0 +1,282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ load("openapi.lib.yml", "response", "reference", "type", "array")
|
2 |
+
|
3 |
+
paths:
|
4 |
+
/collections:
|
5 |
+
get:
|
6 |
+
tags:
|
7 |
+
- Collections
|
8 |
+
summary: List collections
|
9 |
+
description: Get list name of all existing collections
|
10 |
+
operationId: get_collections
|
11 |
+
responses: #@ response(reference("CollectionsResponse"))
|
12 |
+
|
13 |
+
/collections/{collection_name}:
|
14 |
+
get:
|
15 |
+
tags:
|
16 |
+
- Collections
|
17 |
+
summary: Collection info
|
18 |
+
description: Get detailed information about specified existing collection
|
19 |
+
operationId: get_collection
|
20 |
+
parameters:
|
21 |
+
- name: collection_name
|
22 |
+
in: path
|
23 |
+
description: Name of the collection to retrieve
|
24 |
+
required: true
|
25 |
+
schema:
|
26 |
+
type: string
|
27 |
+
responses: #@ response(reference("CollectionInfo"))
|
28 |
+
|
29 |
+
put:
|
30 |
+
tags:
|
31 |
+
- Collections
|
32 |
+
summary: Create collection
|
33 |
+
description: Create new collection with given parameters
|
34 |
+
operationId: create_collection
|
35 |
+
requestBody:
|
36 |
+
description: Parameters of a new collection
|
37 |
+
content:
|
38 |
+
application/json:
|
39 |
+
schema:
|
40 |
+
$ref: "#/components/schemas/CreateCollection"
|
41 |
+
|
42 |
+
parameters:
|
43 |
+
- name: collection_name
|
44 |
+
in: path
|
45 |
+
description: Name of the new collection
|
46 |
+
required: true
|
47 |
+
schema:
|
48 |
+
type: string
|
49 |
+
- name: timeout
|
50 |
+
in: query
|
51 |
+
description: |
|
52 |
+
Wait for operation commit timeout in seconds.
|
53 |
+
If timeout is reached - request will return with service error.
|
54 |
+
schema:
|
55 |
+
type: integer
|
56 |
+
responses: #@ response(type("boolean"))
|
57 |
+
|
58 |
+
patch:
|
59 |
+
tags:
|
60 |
+
- Collections
|
61 |
+
summary: Update collection parameters
|
62 |
+
description: Update parameters of the existing collection
|
63 |
+
operationId: update_collection
|
64 |
+
requestBody:
|
65 |
+
description: New parameters
|
66 |
+
content:
|
67 |
+
application/json:
|
68 |
+
schema:
|
69 |
+
$ref: "#/components/schemas/UpdateCollection"
|
70 |
+
|
71 |
+
parameters:
|
72 |
+
- name: collection_name
|
73 |
+
in: path
|
74 |
+
description: Name of the collection to update
|
75 |
+
required: true
|
76 |
+
schema:
|
77 |
+
type: string
|
78 |
+
- name: timeout
|
79 |
+
in: query
|
80 |
+
description: |
|
81 |
+
Wait for operation commit timeout in seconds.
|
82 |
+
If timeout is reached - request will return with service error.
|
83 |
+
schema:
|
84 |
+
type: integer
|
85 |
+
responses: #@ response(type("boolean"))
|
86 |
+
|
87 |
+
delete:
|
88 |
+
tags:
|
89 |
+
- Collections
|
90 |
+
summary: Delete collection
|
91 |
+
description: Drop collection and all associated data
|
92 |
+
operationId: delete_collection
|
93 |
+
parameters:
|
94 |
+
- name: collection_name
|
95 |
+
in: path
|
96 |
+
description: Name of the collection to delete
|
97 |
+
required: true
|
98 |
+
schema:
|
99 |
+
type: string
|
100 |
+
- name: timeout
|
101 |
+
in: query
|
102 |
+
description: |
|
103 |
+
Wait for operation commit timeout in seconds.
|
104 |
+
If timeout is reached - request will return with service error.
|
105 |
+
schema:
|
106 |
+
type: integer
|
107 |
+
responses: #@ response(type("boolean"))
|
108 |
+
|
109 |
+
/collections/aliases:
|
110 |
+
post:
|
111 |
+
tags:
|
112 |
+
- Aliases
|
113 |
+
summary: Update aliases of the collections
|
114 |
+
operationId: update_aliases
|
115 |
+
requestBody:
|
116 |
+
description: Alias update operations
|
117 |
+
content:
|
118 |
+
application/json:
|
119 |
+
schema:
|
120 |
+
$ref: "#/components/schemas/ChangeAliasesOperation"
|
121 |
+
parameters:
|
122 |
+
- name: timeout
|
123 |
+
in: query
|
124 |
+
description: |
|
125 |
+
Wait for operation commit timeout in seconds.
|
126 |
+
If timeout is reached - request will return with service error.
|
127 |
+
schema:
|
128 |
+
type: integer
|
129 |
+
responses: #@ response(type("boolean"))
|
130 |
+
|
131 |
+
/collections/{collection_name}/index:
|
132 |
+
put:
|
133 |
+
tags:
|
134 |
+
- Indexes
|
135 |
+
summary: Create index for field in collection
|
136 |
+
description: Create index for field in collection
|
137 |
+
operationId: create_field_index
|
138 |
+
parameters:
|
139 |
+
- name: collection_name
|
140 |
+
in: path
|
141 |
+
description: Name of the collection
|
142 |
+
required: true
|
143 |
+
schema:
|
144 |
+
type: string
|
145 |
+
- name: wait
|
146 |
+
in: query
|
147 |
+
description: "If true, wait for changes to actually happen"
|
148 |
+
required: false
|
149 |
+
schema:
|
150 |
+
type: boolean
|
151 |
+
- name: ordering
|
152 |
+
in: query
|
153 |
+
description: "define ordering guarantees for the operation"
|
154 |
+
required: false
|
155 |
+
schema:
|
156 |
+
$ref: "#/components/schemas/WriteOrdering"
|
157 |
+
requestBody:
|
158 |
+
description: Field name
|
159 |
+
content:
|
160 |
+
application/json:
|
161 |
+
schema:
|
162 |
+
$ref: "#/components/schemas/CreateFieldIndex"
|
163 |
+
|
164 |
+
responses: #@ response(reference("UpdateResult"))
|
165 |
+
|
166 |
+
/collections/{collection_name}/exists:
|
167 |
+
get:
|
168 |
+
tags:
|
169 |
+
- Collections
|
170 |
+
summary: Check the existence of a collection
|
171 |
+
description: Returns "true" if the given collection name exists, and "false" otherwise
|
172 |
+
operationId: collection_exists
|
173 |
+
parameters:
|
174 |
+
- name: collection_name
|
175 |
+
in: path
|
176 |
+
description: Name of the collection
|
177 |
+
required: true
|
178 |
+
schema:
|
179 |
+
type: string
|
180 |
+
responses: #@ response(reference("CollectionExistence"))
|
181 |
+
|
182 |
+
/collections/{collection_name}/index/{field_name}:
|
183 |
+
delete:
|
184 |
+
tags:
|
185 |
+
- Indexes
|
186 |
+
summary: Delete index for field in collection
|
187 |
+
description: Delete field index for collection
|
188 |
+
operationId: delete_field_index
|
189 |
+
parameters:
|
190 |
+
- name: collection_name
|
191 |
+
in: path
|
192 |
+
description: Name of the collection
|
193 |
+
required: true
|
194 |
+
schema:
|
195 |
+
type: string
|
196 |
+
- name: field_name
|
197 |
+
in: path
|
198 |
+
description: Name of the field where to delete the index
|
199 |
+
required: true
|
200 |
+
schema:
|
201 |
+
type: string
|
202 |
+
- name: wait
|
203 |
+
in: query
|
204 |
+
description: "If true, wait for changes to actually happen"
|
205 |
+
required: false
|
206 |
+
schema:
|
207 |
+
type: boolean
|
208 |
+
- name: ordering
|
209 |
+
in: query
|
210 |
+
description: "define ordering guarantees for the operation"
|
211 |
+
required: false
|
212 |
+
schema:
|
213 |
+
$ref: "#/components/schemas/WriteOrdering"
|
214 |
+
responses: #@ response(reference("UpdateResult"))
|
215 |
+
|
216 |
+
/collections/{collection_name}/cluster:
|
217 |
+
get:
|
218 |
+
tags:
|
219 |
+
- Distributed
|
220 |
+
summary: Collection cluster info
|
221 |
+
description: Get cluster information for a collection
|
222 |
+
operationId: collection_cluster_info
|
223 |
+
parameters:
|
224 |
+
- name: collection_name
|
225 |
+
in: path
|
226 |
+
description: Name of the collection to retrieve the cluster info for
|
227 |
+
required: true
|
228 |
+
schema:
|
229 |
+
type: string
|
230 |
+
responses: #@ response(reference("CollectionClusterInfo"))
|
231 |
+
|
232 |
+
post:
|
233 |
+
tags:
|
234 |
+
- Distributed
|
235 |
+
summary: Update collection cluster setup
|
236 |
+
operationId: update_collection_cluster
|
237 |
+
requestBody:
|
238 |
+
description: Collection cluster update operations
|
239 |
+
content:
|
240 |
+
application/json:
|
241 |
+
schema:
|
242 |
+
$ref: "#/components/schemas/ClusterOperations"
|
243 |
+
parameters:
|
244 |
+
- name: collection_name
|
245 |
+
in: path
|
246 |
+
description: Name of the collection on which to to apply the cluster update operation
|
247 |
+
required: true
|
248 |
+
schema:
|
249 |
+
type: string
|
250 |
+
- name: timeout
|
251 |
+
in: query
|
252 |
+
description: |
|
253 |
+
Wait for operation commit timeout in seconds.
|
254 |
+
If timeout is reached - request will return with service error.
|
255 |
+
schema:
|
256 |
+
type: integer
|
257 |
+
responses: #@ response(type("boolean"))
|
258 |
+
|
259 |
+
/collections/{collection_name}/aliases:
|
260 |
+
get:
|
261 |
+
tags:
|
262 |
+
- Aliases
|
263 |
+
summary: List aliases for collection
|
264 |
+
description: Get list of all aliases for a collection
|
265 |
+
operationId: get_collection_aliases
|
266 |
+
parameters:
|
267 |
+
- name: collection_name
|
268 |
+
in: path
|
269 |
+
description: Name of the collection
|
270 |
+
required: true
|
271 |
+
schema:
|
272 |
+
type: string
|
273 |
+
responses: #@ response(reference("CollectionsAliasesResponse"))
|
274 |
+
|
275 |
+
/aliases:
|
276 |
+
get:
|
277 |
+
tags:
|
278 |
+
- Aliases
|
279 |
+
summary: List collections aliases
|
280 |
+
description: Get list of all existing collections aliases
|
281 |
+
operationId: get_collections_aliases
|
282 |
+
responses: #@ response(reference("CollectionsAliasesResponse"))
|
openapi/openapi-main.ytt.yaml
ADDED
@@ -0,0 +1,871 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ load("openapi.lib.yml", "response", "reference", "type", "array")
|
2 |
+
|
3 |
+
openapi: 3.0.1
|
4 |
+
security:
|
5 |
+
- api-key: []
|
6 |
+
- bearerAuth: []
|
7 |
+
- {}
|
8 |
+
info:
|
9 |
+
title: Qdrant API
|
10 |
+
description: >
|
11 |
+
|
12 |
+
API description for Qdrant vector search engine.
|
13 |
+
|
14 |
+
|
15 |
+
This document describes CRUD and search operations on collections of points (vectors with payload).
|
16 |
+
|
17 |
+
|
18 |
+
Qdrant supports any combinations of `should`, `min_should`, `must` and `must_not` conditions,
|
19 |
+
which makes it possible to use in applications when object could not be described solely by vector.
|
20 |
+
It could be location features, availability flags, and other custom properties businesses should take into account.
|
21 |
+
|
22 |
+
## Examples
|
23 |
+
|
24 |
+
This examples cover the most basic use-cases - collection creation and basic vector search.
|
25 |
+
|
26 |
+
### Create collection
|
27 |
+
|
28 |
+
First - let's create a collection with dot-production metric.
|
29 |
+
|
30 |
+
```
|
31 |
+
|
32 |
+
curl -X PUT 'http://localhost:6333/collections/test_collection' \
|
33 |
+
-H 'Content-Type: application/json' \
|
34 |
+
--data-raw '{
|
35 |
+
"vectors": {
|
36 |
+
"size": 4,
|
37 |
+
"distance": "Dot"
|
38 |
+
}
|
39 |
+
}'
|
40 |
+
|
41 |
+
```
|
42 |
+
|
43 |
+
Expected response:
|
44 |
+
|
45 |
+
```
|
46 |
+
|
47 |
+
{
|
48 |
+
"result": true,
|
49 |
+
"status": "ok",
|
50 |
+
"time": 0.031095451
|
51 |
+
}
|
52 |
+
|
53 |
+
```
|
54 |
+
|
55 |
+
We can ensure that collection was created:
|
56 |
+
|
57 |
+
```
|
58 |
+
|
59 |
+
curl 'http://localhost:6333/collections/test_collection'
|
60 |
+
|
61 |
+
```
|
62 |
+
|
63 |
+
Expected response:
|
64 |
+
|
65 |
+
```
|
66 |
+
|
67 |
+
{
|
68 |
+
"result": {
|
69 |
+
"status": "green",
|
70 |
+
"vectors_count": 0,
|
71 |
+
"segments_count": 5,
|
72 |
+
"disk_data_size": 0,
|
73 |
+
"ram_data_size": 0,
|
74 |
+
"config": {
|
75 |
+
"params": {
|
76 |
+
"vectors": {
|
77 |
+
"size": 4,
|
78 |
+
"distance": "Dot"
|
79 |
+
}
|
80 |
+
},
|
81 |
+
"hnsw_config": {
|
82 |
+
"m": 16,
|
83 |
+
"ef_construct": 100,
|
84 |
+
"full_scan_threshold": 10000
|
85 |
+
},
|
86 |
+
"optimizer_config": {
|
87 |
+
"deleted_threshold": 0.2,
|
88 |
+
"vacuum_min_vector_number": 1000,
|
89 |
+
"default_segment_number": 2,
|
90 |
+
"max_segment_size": null,
|
91 |
+
"memmap_threshold": null,
|
92 |
+
"indexing_threshold": 20000,
|
93 |
+
"flush_interval_sec": 5,
|
94 |
+
"max_optimization_threads": null
|
95 |
+
},
|
96 |
+
"wal_config": {
|
97 |
+
"wal_capacity_mb": 32,
|
98 |
+
"wal_segments_ahead": 0
|
99 |
+
}
|
100 |
+
}
|
101 |
+
},
|
102 |
+
"status": "ok",
|
103 |
+
"time": 2.1199e-05
|
104 |
+
}
|
105 |
+
|
106 |
+
```
|
107 |
+
|
108 |
+
|
109 |
+
### Add points
|
110 |
+
|
111 |
+
Let's now add vectors with some payload:
|
112 |
+
|
113 |
+
```
|
114 |
+
|
115 |
+
curl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \
|
116 |
+
-H 'Content-Type: application/json' \
|
117 |
+
--data-raw '{
|
118 |
+
"points": [
|
119 |
+
{"id": 1, "vector": [0.05, 0.61, 0.76, 0.74], "payload": {"city": "Berlin"}},
|
120 |
+
{"id": 2, "vector": [0.19, 0.81, 0.75, 0.11], "payload": {"city": ["Berlin", "London"] }},
|
121 |
+
{"id": 3, "vector": [0.36, 0.55, 0.47, 0.94], "payload": {"city": ["Berlin", "Moscow"] }},
|
122 |
+
{"id": 4, "vector": [0.18, 0.01, 0.85, 0.80], "payload": {"city": ["London", "Moscow"] }},
|
123 |
+
{"id": 5, "vector": [0.24, 0.18, 0.22, 0.44], "payload": {"count": [0]}},
|
124 |
+
{"id": 6, "vector": [0.35, 0.08, 0.11, 0.44]}
|
125 |
+
]
|
126 |
+
}'
|
127 |
+
|
128 |
+
```
|
129 |
+
|
130 |
+
Expected response:
|
131 |
+
|
132 |
+
```
|
133 |
+
|
134 |
+
{
|
135 |
+
"result": {
|
136 |
+
"operation_id": 0,
|
137 |
+
"status": "completed"
|
138 |
+
},
|
139 |
+
"status": "ok",
|
140 |
+
"time": 0.000206061
|
141 |
+
}
|
142 |
+
|
143 |
+
```
|
144 |
+
|
145 |
+
### Search with filtering
|
146 |
+
|
147 |
+
Let's start with a basic request:
|
148 |
+
|
149 |
+
```
|
150 |
+
|
151 |
+
curl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \
|
152 |
+
-H 'Content-Type: application/json' \
|
153 |
+
--data-raw '{
|
154 |
+
"vector": [0.2,0.1,0.9,0.7],
|
155 |
+
"top": 3
|
156 |
+
}'
|
157 |
+
|
158 |
+
```
|
159 |
+
|
160 |
+
Expected response:
|
161 |
+
|
162 |
+
```
|
163 |
+
|
164 |
+
{
|
165 |
+
"result": [
|
166 |
+
{ "id": 4, "score": 1.362, "payload": null, "version": 0 },
|
167 |
+
{ "id": 1, "score": 1.273, "payload": null, "version": 0 },
|
168 |
+
{ "id": 3, "score": 1.208, "payload": null, "version": 0 }
|
169 |
+
],
|
170 |
+
"status": "ok",
|
171 |
+
"time": 0.000055785
|
172 |
+
}
|
173 |
+
|
174 |
+
```
|
175 |
+
|
176 |
+
But result is different if we add a filter:
|
177 |
+
|
178 |
+
```
|
179 |
+
|
180 |
+
curl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \
|
181 |
+
-H 'Content-Type: application/json' \
|
182 |
+
--data-raw '{
|
183 |
+
"filter": {
|
184 |
+
"should": [
|
185 |
+
{
|
186 |
+
"key": "city",
|
187 |
+
"match": {
|
188 |
+
"value": "London"
|
189 |
+
}
|
190 |
+
}
|
191 |
+
]
|
192 |
+
},
|
193 |
+
"vector": [0.2, 0.1, 0.9, 0.7],
|
194 |
+
"top": 3
|
195 |
+
}'
|
196 |
+
|
197 |
+
```
|
198 |
+
|
199 |
+
Expected response:
|
200 |
+
|
201 |
+
```
|
202 |
+
|
203 |
+
{
|
204 |
+
"result": [
|
205 |
+
{ "id": 4, "score": 1.362, "payload": null, "version": 0 },
|
206 |
+
{ "id": 2, "score": 0.871, "payload": null, "version": 0 }
|
207 |
+
],
|
208 |
+
"status": "ok",
|
209 |
+
"time": 0.000093972
|
210 |
+
}
|
211 |
+
|
212 |
+
```
|
213 |
+
|
214 |
+
contact:
|
215 |
+
email: [email protected]
|
216 |
+
license:
|
217 |
+
name: Apache 2.0
|
218 |
+
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
219 |
+
version: master
|
220 |
+
externalDocs:
|
221 |
+
description: Find out more about Qdrant applications and demo
|
222 |
+
url: https://qdrant.tech/documentation/
|
223 |
+
servers:
|
224 |
+
- url: "{protocol}://{hostname}:{port}"
|
225 |
+
variables:
|
226 |
+
protocol:
|
227 |
+
enum:
|
228 |
+
- http
|
229 |
+
- https
|
230 |
+
default: http
|
231 |
+
hostname:
|
232 |
+
default: localhost
|
233 |
+
port:
|
234 |
+
default: "6333"
|
235 |
+
tags:
|
236 |
+
- name: Collections
|
237 |
+
description: Searchable collections of points.
|
238 |
+
- name: Points
|
239 |
+
description: Float-point vectors with payload.
|
240 |
+
- name: Search
|
241 |
+
description: Find points in a collection.
|
242 |
+
- name: Aliases
|
243 |
+
description: Additional names for existing collections.
|
244 |
+
- name: Indexes
|
245 |
+
description: Indexes for payloads associated with points.
|
246 |
+
- name: Distributed
|
247 |
+
description: Service distributed setup.
|
248 |
+
- name: Snapshots
|
249 |
+
description: Storage and collections snapshots.
|
250 |
+
- name: Service
|
251 |
+
description: Qdrant service utilities.
|
252 |
+
- name: Beta
|
253 |
+
description: Beta features, do not depend on these yet.
|
254 |
+
|
255 |
+
paths:
|
256 |
+
/collections/{collection_name}/points/scroll:
|
257 |
+
post:
|
258 |
+
tags:
|
259 |
+
- Points
|
260 |
+
summary: Scroll points
|
261 |
+
description: Scroll request - paginate over all points which matches given filtering condition
|
262 |
+
operationId: scroll_points
|
263 |
+
requestBody:
|
264 |
+
description: Pagination and filter parameters
|
265 |
+
content:
|
266 |
+
application/json:
|
267 |
+
schema:
|
268 |
+
$ref: "#/components/schemas/ScrollRequest"
|
269 |
+
|
270 |
+
parameters:
|
271 |
+
- name: collection_name
|
272 |
+
in: path
|
273 |
+
description: Name of the collection to retrieve from
|
274 |
+
required: true
|
275 |
+
schema:
|
276 |
+
type: string
|
277 |
+
- name: consistency
|
278 |
+
in: query
|
279 |
+
description: Define read consistency guarantees for the operation
|
280 |
+
required: false
|
281 |
+
schema:
|
282 |
+
$ref: "#/components/schemas/ReadConsistency"
|
283 |
+
- name: timeout
|
284 |
+
in: query
|
285 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
286 |
+
required: false
|
287 |
+
schema:
|
288 |
+
type: integer
|
289 |
+
minimum: 1
|
290 |
+
responses: #@ response(reference("ScrollResult"))
|
291 |
+
|
292 |
+
/collections/{collection_name}/points/search:
|
293 |
+
post:
|
294 |
+
tags:
|
295 |
+
- Search
|
296 |
+
summary: Search points
|
297 |
+
description: Retrieve closest points based on vector similarity and given filtering conditions
|
298 |
+
operationId: search_points
|
299 |
+
requestBody:
|
300 |
+
description: Search request with optional filtering
|
301 |
+
content:
|
302 |
+
application/json:
|
303 |
+
schema:
|
304 |
+
$ref: "#/components/schemas/SearchRequest"
|
305 |
+
|
306 |
+
parameters:
|
307 |
+
- name: collection_name
|
308 |
+
in: path
|
309 |
+
description: Name of the collection to search in
|
310 |
+
required: true
|
311 |
+
schema:
|
312 |
+
type: string
|
313 |
+
- name: consistency
|
314 |
+
in: query
|
315 |
+
description: Define read consistency guarantees for the operation
|
316 |
+
required: false
|
317 |
+
schema:
|
318 |
+
$ref: "#/components/schemas/ReadConsistency"
|
319 |
+
- name: timeout
|
320 |
+
in: query
|
321 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
322 |
+
required: false
|
323 |
+
schema:
|
324 |
+
type: integer
|
325 |
+
minimum: 1
|
326 |
+
responses: #@ response(array(reference("ScoredPoint")))
|
327 |
+
|
328 |
+
/collections/{collection_name}/points/search/batch:
|
329 |
+
post:
|
330 |
+
tags:
|
331 |
+
- Search
|
332 |
+
summary: Search batch points
|
333 |
+
description: Retrieve by batch the closest points based on vector similarity and given filtering conditions
|
334 |
+
operationId: search_batch_points
|
335 |
+
requestBody:
|
336 |
+
description: Search batch request
|
337 |
+
content:
|
338 |
+
application/json:
|
339 |
+
schema:
|
340 |
+
$ref: "#/components/schemas/SearchRequestBatch"
|
341 |
+
|
342 |
+
parameters:
|
343 |
+
- name: collection_name
|
344 |
+
in: path
|
345 |
+
description: Name of the collection to search in
|
346 |
+
required: true
|
347 |
+
schema:
|
348 |
+
type: string
|
349 |
+
- name: consistency
|
350 |
+
in: query
|
351 |
+
description: Define read consistency guarantees for the operation
|
352 |
+
required: false
|
353 |
+
schema:
|
354 |
+
$ref: "#/components/schemas/ReadConsistency"
|
355 |
+
- name: timeout
|
356 |
+
in: query
|
357 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
358 |
+
required: false
|
359 |
+
schema:
|
360 |
+
type: integer
|
361 |
+
minimum: 1
|
362 |
+
responses: #@ response(array(array(reference("ScoredPoint"))))
|
363 |
+
|
364 |
+
/collections/{collection_name}/points/search/groups:
|
365 |
+
post:
|
366 |
+
tags:
|
367 |
+
- Search
|
368 |
+
summary: Search point groups
|
369 |
+
description: Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field
|
370 |
+
operationId: search_point_groups
|
371 |
+
requestBody:
|
372 |
+
description: Search request with optional filtering, grouped by a given payload field
|
373 |
+
content:
|
374 |
+
application/json:
|
375 |
+
schema:
|
376 |
+
$ref: "#/components/schemas/SearchGroupsRequest"
|
377 |
+
|
378 |
+
parameters:
|
379 |
+
- name: collection_name
|
380 |
+
in: path
|
381 |
+
description: Name of the collection to search in
|
382 |
+
required: true
|
383 |
+
schema:
|
384 |
+
type: string
|
385 |
+
- name: consistency
|
386 |
+
in: query
|
387 |
+
description: Define read consistency guarantees for the operation
|
388 |
+
required: false
|
389 |
+
schema:
|
390 |
+
$ref: "#/components/schemas/ReadConsistency"
|
391 |
+
- name: timeout
|
392 |
+
in: query
|
393 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
394 |
+
required: false
|
395 |
+
schema:
|
396 |
+
type: integer
|
397 |
+
minimum: 1
|
398 |
+
responses: #@ response(reference("GroupsResult"))
|
399 |
+
|
400 |
+
/collections/{collection_name}/points/recommend:
|
401 |
+
post:
|
402 |
+
tags:
|
403 |
+
- Search
|
404 |
+
summary: Recommend points
|
405 |
+
description: Look for the points which are closer to stored positive examples and at the same time further to negative examples.
|
406 |
+
operationId: recommend_points
|
407 |
+
requestBody:
|
408 |
+
description: Request points based on positive and negative examples.
|
409 |
+
content:
|
410 |
+
application/json:
|
411 |
+
schema:
|
412 |
+
$ref: "#/components/schemas/RecommendRequest"
|
413 |
+
|
414 |
+
parameters:
|
415 |
+
- name: collection_name
|
416 |
+
in: path
|
417 |
+
description: Name of the collection to search in
|
418 |
+
required: true
|
419 |
+
schema:
|
420 |
+
type: string
|
421 |
+
- name: consistency
|
422 |
+
in: query
|
423 |
+
description: Define read consistency guarantees for the operation
|
424 |
+
required: false
|
425 |
+
schema:
|
426 |
+
$ref: "#/components/schemas/ReadConsistency"
|
427 |
+
- name: timeout
|
428 |
+
in: query
|
429 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
430 |
+
required: false
|
431 |
+
schema:
|
432 |
+
type: integer
|
433 |
+
minimum: 1
|
434 |
+
responses: #@ response(array(reference("ScoredPoint")))
|
435 |
+
|
436 |
+
/collections/{collection_name}/points/recommend/batch:
|
437 |
+
post:
|
438 |
+
tags:
|
439 |
+
- Search
|
440 |
+
summary: Recommend batch points
|
441 |
+
description: Look for the points which are closer to stored positive examples and at the same time further to negative examples.
|
442 |
+
operationId: recommend_batch_points
|
443 |
+
requestBody:
|
444 |
+
description: Request points based on positive and negative examples.
|
445 |
+
content:
|
446 |
+
application/json:
|
447 |
+
schema:
|
448 |
+
$ref: "#/components/schemas/RecommendRequestBatch"
|
449 |
+
|
450 |
+
parameters:
|
451 |
+
- name: collection_name
|
452 |
+
in: path
|
453 |
+
description: Name of the collection to search in
|
454 |
+
required: true
|
455 |
+
schema:
|
456 |
+
type: string
|
457 |
+
- name: consistency
|
458 |
+
in: query
|
459 |
+
description: Define read consistency guarantees for the operation
|
460 |
+
required: false
|
461 |
+
schema:
|
462 |
+
$ref: "#/components/schemas/ReadConsistency"
|
463 |
+
- name: timeout
|
464 |
+
in: query
|
465 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
466 |
+
required: false
|
467 |
+
schema:
|
468 |
+
type: integer
|
469 |
+
minimum: 1
|
470 |
+
responses: #@ response(array(array(reference("ScoredPoint"))))
|
471 |
+
|
472 |
+
/collections/{collection_name}/points/recommend/groups:
|
473 |
+
post:
|
474 |
+
tags:
|
475 |
+
- Search
|
476 |
+
summary: Recommend point groups
|
477 |
+
description: Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.
|
478 |
+
operationId: recommend_point_groups
|
479 |
+
requestBody:
|
480 |
+
description: Request points based on positive and negative examples, grouped by a payload field.
|
481 |
+
content:
|
482 |
+
application/json:
|
483 |
+
schema:
|
484 |
+
$ref: "#/components/schemas/RecommendGroupsRequest"
|
485 |
+
|
486 |
+
parameters:
|
487 |
+
- name: collection_name
|
488 |
+
in: path
|
489 |
+
description: Name of the collection to search in
|
490 |
+
required: true
|
491 |
+
schema:
|
492 |
+
type: string
|
493 |
+
- name: consistency
|
494 |
+
in: query
|
495 |
+
description: Define read consistency guarantees for the operation
|
496 |
+
required: false
|
497 |
+
schema:
|
498 |
+
$ref: "#/components/schemas/ReadConsistency"
|
499 |
+
- name: timeout
|
500 |
+
in: query
|
501 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
502 |
+
required: false
|
503 |
+
schema:
|
504 |
+
type: integer
|
505 |
+
minimum: 1
|
506 |
+
responses: #@ response(reference("GroupsResult"))
|
507 |
+
|
508 |
+
/collections/{collection_name}/points/discover:
|
509 |
+
post:
|
510 |
+
tags:
|
511 |
+
- Search
|
512 |
+
summary: Discover points
|
513 |
+
description: >
|
514 |
+
Use context and a target to find the most similar points to the target, constrained by the context.
|
515 |
+
|
516 |
+
When using only the context (without a target), a special search - called context search - is performed where
|
517 |
+
pairs of points are used to generate a loss that guides the search towards the zone where
|
518 |
+
most positive examples overlap. This means that the score minimizes the scenario of
|
519 |
+
finding a point closer to a negative than to a positive part of a pair.
|
520 |
+
|
521 |
+
Since the score of a context relates to loss, the maximum score a point can get is 0.0,
|
522 |
+
and it becomes normal that many points can have a score of 0.0.
|
523 |
+
|
524 |
+
When using target (with or without context), the score behaves a little different: The
|
525 |
+
integer part of the score represents the rank with respect to the context, while the
|
526 |
+
decimal part of the score relates to the distance to the target. The context part of the score for
|
527 |
+
each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair,
|
528 |
+
and -1 otherwise.
|
529 |
+
operationId: discover_points
|
530 |
+
requestBody:
|
531 |
+
description: Request points based on {positive, negative} pairs of examples, and/or a target
|
532 |
+
content:
|
533 |
+
application/json:
|
534 |
+
schema:
|
535 |
+
$ref: "#/components/schemas/DiscoverRequest"
|
536 |
+
|
537 |
+
parameters:
|
538 |
+
- name: collection_name
|
539 |
+
in: path
|
540 |
+
description: Name of the collection to search in
|
541 |
+
required: true
|
542 |
+
schema:
|
543 |
+
type: string
|
544 |
+
- name: consistency
|
545 |
+
in: query
|
546 |
+
description: Define read consistency guarantees for the operation
|
547 |
+
required: false
|
548 |
+
schema:
|
549 |
+
$ref: "#/components/schemas/ReadConsistency"
|
550 |
+
- name: timeout
|
551 |
+
in: query
|
552 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
553 |
+
required: false
|
554 |
+
schema:
|
555 |
+
type: integer
|
556 |
+
minimum: 1
|
557 |
+
responses: #@ response(array(reference("ScoredPoint")))
|
558 |
+
|
559 |
+
/collections/{collection_name}/points/discover/batch:
|
560 |
+
post:
|
561 |
+
tags:
|
562 |
+
- Search
|
563 |
+
summary: Discover batch points
|
564 |
+
description: Look for points based on target and/or positive and negative example pairs, in batch.
|
565 |
+
operationId: discover_batch_points
|
566 |
+
requestBody:
|
567 |
+
description: Batch request points based on { positive, negative } pairs of examples, and/or a target.
|
568 |
+
content:
|
569 |
+
application/json:
|
570 |
+
schema:
|
571 |
+
$ref: "#/components/schemas/DiscoverRequestBatch"
|
572 |
+
|
573 |
+
parameters:
|
574 |
+
- name: collection_name
|
575 |
+
in: path
|
576 |
+
description: Name of the collection to search in
|
577 |
+
required: true
|
578 |
+
schema:
|
579 |
+
type: string
|
580 |
+
- name: consistency
|
581 |
+
in: query
|
582 |
+
description: Define read consistency guarantees for the operation
|
583 |
+
required: false
|
584 |
+
schema:
|
585 |
+
$ref: "#/components/schemas/ReadConsistency"
|
586 |
+
- name: timeout
|
587 |
+
in: query
|
588 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
589 |
+
required: false
|
590 |
+
schema:
|
591 |
+
type: integer
|
592 |
+
minimum: 1
|
593 |
+
responses: #@ response(array(array(reference("ScoredPoint"))))
|
594 |
+
|
595 |
+
/collections/{collection_name}/points/count:
|
596 |
+
post:
|
597 |
+
tags:
|
598 |
+
- Points
|
599 |
+
summary: Count points
|
600 |
+
description: Count points which matches given filtering condition
|
601 |
+
operationId: count_points
|
602 |
+
requestBody:
|
603 |
+
description: Request counts of points which matches given filtering condition
|
604 |
+
content:
|
605 |
+
application/json:
|
606 |
+
schema:
|
607 |
+
$ref: "#/components/schemas/CountRequest"
|
608 |
+
|
609 |
+
parameters:
|
610 |
+
- name: collection_name
|
611 |
+
in: path
|
612 |
+
description: Name of the collection to count in
|
613 |
+
required: true
|
614 |
+
schema:
|
615 |
+
type: string
|
616 |
+
- name: timeout
|
617 |
+
in: query
|
618 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
619 |
+
required: false
|
620 |
+
schema:
|
621 |
+
type: integer
|
622 |
+
minimum: 1
|
623 |
+
responses: #@ response(reference("CountResult"))
|
624 |
+
|
625 |
+
/collections/{collection_name}/facet:
|
626 |
+
post:
|
627 |
+
tags:
|
628 |
+
- Points
|
629 |
+
summary: Facet a payload key with a given filter.
|
630 |
+
description: Count points that satisfy the given filter for each unique value of a payload key.
|
631 |
+
operationId: facet
|
632 |
+
requestBody:
|
633 |
+
description: Request counts of points for each unique value of a payload key
|
634 |
+
content:
|
635 |
+
application/json:
|
636 |
+
schema:
|
637 |
+
$ref: "#/components/schemas/FacetRequest"
|
638 |
+
|
639 |
+
parameters:
|
640 |
+
- name: collection_name
|
641 |
+
in: path
|
642 |
+
description: Name of the collection to facet in
|
643 |
+
required: true
|
644 |
+
schema:
|
645 |
+
type: string
|
646 |
+
- name: timeout
|
647 |
+
in: query
|
648 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
649 |
+
required: false
|
650 |
+
schema:
|
651 |
+
type: integer
|
652 |
+
minimum: 1
|
653 |
+
- name: consistency
|
654 |
+
in: query
|
655 |
+
description: Define read consistency guarantees for the operation
|
656 |
+
required: false
|
657 |
+
schema:
|
658 |
+
$ref: "#/components/schemas/ReadConsistency"
|
659 |
+
responses: #@ response(reference("FacetResponse"))
|
660 |
+
|
661 |
+
/collections/{collection_name}/points/query:
|
662 |
+
post:
|
663 |
+
tags:
|
664 |
+
- Search
|
665 |
+
summary: Query points
|
666 |
+
description: Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
|
667 |
+
operationId: query_points
|
668 |
+
requestBody:
|
669 |
+
description: Describes the query to make to the collection
|
670 |
+
content:
|
671 |
+
application/json:
|
672 |
+
schema:
|
673 |
+
$ref: "#/components/schemas/QueryRequest"
|
674 |
+
|
675 |
+
|
676 |
+
parameters:
|
677 |
+
- name: collection_name
|
678 |
+
in: path
|
679 |
+
description: Name of the collection to query
|
680 |
+
required: true
|
681 |
+
schema:
|
682 |
+
type: string
|
683 |
+
- name: consistency
|
684 |
+
in: query
|
685 |
+
description: Define read consistency guarantees for the operation
|
686 |
+
required: false
|
687 |
+
schema:
|
688 |
+
$ref: "#/components/schemas/ReadConsistency"
|
689 |
+
- name: timeout
|
690 |
+
in: query
|
691 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
692 |
+
required: false
|
693 |
+
schema:
|
694 |
+
type: integer
|
695 |
+
minimum: 1
|
696 |
+
|
697 |
+
responses: #@ response(reference("QueryResponse"))
|
698 |
+
|
699 |
+
/collections/{collection_name}/points/query/batch:
|
700 |
+
post:
|
701 |
+
tags:
|
702 |
+
- Search
|
703 |
+
summary: Query points in batch
|
704 |
+
description: Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
|
705 |
+
operationId: query_batch_points
|
706 |
+
requestBody:
|
707 |
+
description: Describes the queries to make to the collection
|
708 |
+
content:
|
709 |
+
application/json:
|
710 |
+
schema:
|
711 |
+
$ref: "#/components/schemas/QueryRequestBatch"
|
712 |
+
|
713 |
+
parameters:
|
714 |
+
- name: collection_name
|
715 |
+
in: path
|
716 |
+
description: Name of the collection to query
|
717 |
+
required: true
|
718 |
+
schema:
|
719 |
+
type: string
|
720 |
+
- name: consistency
|
721 |
+
in: query
|
722 |
+
description: Define read consistency guarantees for the operation
|
723 |
+
required: false
|
724 |
+
schema:
|
725 |
+
$ref: "#/components/schemas/ReadConsistency"
|
726 |
+
- name: timeout
|
727 |
+
in: query
|
728 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
729 |
+
required: false
|
730 |
+
schema:
|
731 |
+
type: integer
|
732 |
+
minimum: 1
|
733 |
+
|
734 |
+
responses: #@ response(array(reference("QueryResponse")))
|
735 |
+
|
736 |
+
/collections/{collection_name}/points/query/groups:
|
737 |
+
post:
|
738 |
+
tags:
|
739 |
+
- Search
|
740 |
+
summary: Query points, grouped by a given payload field
|
741 |
+
description: Universally query points, grouped by a given payload field
|
742 |
+
operationId: query_points_groups
|
743 |
+
requestBody:
|
744 |
+
description: Describes the query to make to the collection
|
745 |
+
content:
|
746 |
+
application/json:
|
747 |
+
schema:
|
748 |
+
$ref: "#/components/schemas/QueryGroupsRequest"
|
749 |
+
|
750 |
+
parameters:
|
751 |
+
- name: collection_name
|
752 |
+
in: path
|
753 |
+
description: Name of the collection to query
|
754 |
+
required: true
|
755 |
+
schema:
|
756 |
+
type: string
|
757 |
+
- name: consistency
|
758 |
+
in: query
|
759 |
+
description: Define read consistency guarantees for the operation
|
760 |
+
required: false
|
761 |
+
schema:
|
762 |
+
$ref: "#/components/schemas/ReadConsistency"
|
763 |
+
- name: timeout
|
764 |
+
in: query
|
765 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
766 |
+
required: false
|
767 |
+
schema:
|
768 |
+
type: integer
|
769 |
+
minimum: 1
|
770 |
+
|
771 |
+
responses: #@ response(reference("GroupsResult"))
|
772 |
+
|
773 |
+
/collections/{collection_name}/points/search/matrix/pairs:
|
774 |
+
post:
|
775 |
+
tags:
|
776 |
+
- Search
|
777 |
+
summary: Search points matrix distance pairs
|
778 |
+
description: Compute distance matrix for sampled points with a pair based output format
|
779 |
+
operationId: search_matrix_pairs
|
780 |
+
requestBody:
|
781 |
+
description: Search matrix request with optional filtering
|
782 |
+
content:
|
783 |
+
application/json:
|
784 |
+
schema:
|
785 |
+
$ref: "#/components/schemas/SearchMatrixRequest"
|
786 |
+
|
787 |
+
parameters:
|
788 |
+
- name: collection_name
|
789 |
+
in: path
|
790 |
+
description: Name of the collection to search in
|
791 |
+
required: true
|
792 |
+
schema:
|
793 |
+
type: string
|
794 |
+
- name: consistency
|
795 |
+
in: query
|
796 |
+
description: Define read consistency guarantees for the operation
|
797 |
+
required: false
|
798 |
+
schema:
|
799 |
+
$ref: "#/components/schemas/ReadConsistency"
|
800 |
+
- name: timeout
|
801 |
+
in: query
|
802 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
803 |
+
required: false
|
804 |
+
schema:
|
805 |
+
type: integer
|
806 |
+
minimum: 1
|
807 |
+
responses: #@ response(reference("SearchMatrixPairsResponse"))
|
808 |
+
|
809 |
+
/collections/{collection_name}/points/search/matrix/offsets:
|
810 |
+
post:
|
811 |
+
tags:
|
812 |
+
- Search
|
813 |
+
summary: Search points matrix distance offsets
|
814 |
+
description: Compute distance matrix for sampled points with an offset based output format
|
815 |
+
operationId: search_matrix_offsets
|
816 |
+
requestBody:
|
817 |
+
description: Search matrix request with optional filtering
|
818 |
+
content:
|
819 |
+
application/json:
|
820 |
+
schema:
|
821 |
+
$ref: "#/components/schemas/SearchMatrixRequest"
|
822 |
+
|
823 |
+
parameters:
|
824 |
+
- name: collection_name
|
825 |
+
in: path
|
826 |
+
description: Name of the collection to search in
|
827 |
+
required: true
|
828 |
+
schema:
|
829 |
+
type: string
|
830 |
+
- name: consistency
|
831 |
+
in: query
|
832 |
+
description: Define read consistency guarantees for the operation
|
833 |
+
required: false
|
834 |
+
schema:
|
835 |
+
$ref: "#/components/schemas/ReadConsistency"
|
836 |
+
- name: timeout
|
837 |
+
in: query
|
838 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
839 |
+
required: false
|
840 |
+
schema:
|
841 |
+
type: integer
|
842 |
+
minimum: 1
|
843 |
+
responses: #@ response(reference("SearchMatrixOffsetsResponse"))
|
844 |
+
|
845 |
+
components:
|
846 |
+
securitySchemes:
|
847 |
+
api-key:
|
848 |
+
type: apiKey
|
849 |
+
in: header
|
850 |
+
name: api-key
|
851 |
+
description: Authorization key, either read-write or read-only
|
852 |
+
bearerAuth:
|
853 |
+
type: http
|
854 |
+
scheme: bearer
|
855 |
+
schemas:
|
856 |
+
ErrorResponse:
|
857 |
+
type: object
|
858 |
+
properties:
|
859 |
+
time:
|
860 |
+
type: number
|
861 |
+
format: float
|
862 |
+
description: Time spent to process this request
|
863 |
+
status:
|
864 |
+
type: object
|
865 |
+
properties:
|
866 |
+
error:
|
867 |
+
type: string
|
868 |
+
description: Description of the occurred error.
|
869 |
+
result:
|
870 |
+
type: object
|
871 |
+
nullable: true
|
openapi/openapi-points.ytt.yaml
ADDED
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ load("openapi.lib.yml", "response", "reference", "type", "array")
|
2 |
+
|
3 |
+
paths:
|
4 |
+
/collections/{collection_name}/points/{id}:
|
5 |
+
get:
|
6 |
+
tags:
|
7 |
+
- Points
|
8 |
+
summary: Get point
|
9 |
+
description: Retrieve full information of single point by id
|
10 |
+
operationId: get_point
|
11 |
+
parameters:
|
12 |
+
- name: collection_name
|
13 |
+
in: path
|
14 |
+
description: Name of the collection to retrieve from
|
15 |
+
required: true
|
16 |
+
schema:
|
17 |
+
type: string
|
18 |
+
- name: id
|
19 |
+
in: path
|
20 |
+
description: Id of the point
|
21 |
+
required: true
|
22 |
+
schema:
|
23 |
+
$ref: "#/components/schemas/ExtendedPointId"
|
24 |
+
- name: consistency
|
25 |
+
in: query
|
26 |
+
description: Define read consistency guarantees for the operation
|
27 |
+
required: false
|
28 |
+
schema:
|
29 |
+
$ref: "#/components/schemas/ReadConsistency"
|
30 |
+
responses: #@ response(reference("Record"))
|
31 |
+
|
32 |
+
/collections/{collection_name}/points:
|
33 |
+
post:
|
34 |
+
tags:
|
35 |
+
- Points
|
36 |
+
summary: Get points
|
37 |
+
description: Retrieve multiple points by specified IDs
|
38 |
+
operationId: get_points
|
39 |
+
requestBody:
|
40 |
+
description: List of points to retrieve
|
41 |
+
content:
|
42 |
+
application/json:
|
43 |
+
schema:
|
44 |
+
$ref: "#/components/schemas/PointRequest"
|
45 |
+
|
46 |
+
parameters:
|
47 |
+
- name: collection_name
|
48 |
+
in: path
|
49 |
+
description: Name of the collection to retrieve from
|
50 |
+
required: true
|
51 |
+
schema:
|
52 |
+
type: string
|
53 |
+
- name: consistency
|
54 |
+
in: query
|
55 |
+
description: Define read consistency guarantees for the operation
|
56 |
+
required: false
|
57 |
+
schema:
|
58 |
+
$ref: "#/components/schemas/ReadConsistency"
|
59 |
+
- name: timeout
|
60 |
+
in: query
|
61 |
+
description: If set, overrides global timeout for this request. Unit is seconds.
|
62 |
+
required: false
|
63 |
+
schema:
|
64 |
+
type: integer
|
65 |
+
minimum: 1
|
66 |
+
responses: #@ response(array(reference("Record")))
|
67 |
+
|
68 |
+
put:
|
69 |
+
tags:
|
70 |
+
- Points
|
71 |
+
summary: Upsert points
|
72 |
+
description: Perform insert + updates on points. If point with given ID already exists - it will be overwritten.
|
73 |
+
operationId: upsert_points
|
74 |
+
requestBody:
|
75 |
+
description: Operation to perform on points
|
76 |
+
content:
|
77 |
+
application/json:
|
78 |
+
schema:
|
79 |
+
$ref: "#/components/schemas/PointInsertOperations"
|
80 |
+
|
81 |
+
parameters:
|
82 |
+
- name: collection_name
|
83 |
+
in: path
|
84 |
+
description: Name of the collection to update from
|
85 |
+
required: true
|
86 |
+
schema:
|
87 |
+
type: string
|
88 |
+
- name: wait
|
89 |
+
in: query
|
90 |
+
description: "If true, wait for changes to actually happen"
|
91 |
+
required: false
|
92 |
+
schema:
|
93 |
+
type: boolean
|
94 |
+
- name: ordering
|
95 |
+
in: query
|
96 |
+
description: "define ordering guarantees for the operation"
|
97 |
+
required: false
|
98 |
+
schema:
|
99 |
+
$ref: "#/components/schemas/WriteOrdering"
|
100 |
+
responses: #@ response(reference("UpdateResult"))
|
101 |
+
|
102 |
+
/collections/{collection_name}/points/delete:
|
103 |
+
post:
|
104 |
+
tags:
|
105 |
+
- Points
|
106 |
+
summary: Delete points
|
107 |
+
description: Delete points
|
108 |
+
operationId: delete_points
|
109 |
+
requestBody:
|
110 |
+
description: Operation to perform on points
|
111 |
+
content:
|
112 |
+
application/json:
|
113 |
+
schema:
|
114 |
+
$ref: "#/components/schemas/PointsSelector"
|
115 |
+
|
116 |
+
parameters:
|
117 |
+
- name: collection_name
|
118 |
+
in: path
|
119 |
+
description: Name of the collection to delete from
|
120 |
+
required: true
|
121 |
+
schema:
|
122 |
+
type: string
|
123 |
+
- name: wait
|
124 |
+
in: query
|
125 |
+
description: "If true, wait for changes to actually happen"
|
126 |
+
required: false
|
127 |
+
schema:
|
128 |
+
type: boolean
|
129 |
+
- name: ordering
|
130 |
+
in: query
|
131 |
+
description: "define ordering guarantees for the operation"
|
132 |
+
required: false
|
133 |
+
schema:
|
134 |
+
$ref: "#/components/schemas/WriteOrdering"
|
135 |
+
responses: #@ response(reference("UpdateResult"))
|
136 |
+
|
137 |
+
/collections/{collection_name}/points/vectors:
|
138 |
+
put:
|
139 |
+
tags:
|
140 |
+
- Points
|
141 |
+
summary: Update vectors
|
142 |
+
description: Update specified named vectors on points, keep unspecified vectors intact.
|
143 |
+
operationId: update_vectors
|
144 |
+
requestBody:
|
145 |
+
description: Update named vectors on points
|
146 |
+
content:
|
147 |
+
application/json:
|
148 |
+
schema:
|
149 |
+
$ref: "#/components/schemas/UpdateVectors"
|
150 |
+
|
151 |
+
parameters:
|
152 |
+
- name: collection_name
|
153 |
+
in: path
|
154 |
+
description: Name of the collection to update from
|
155 |
+
required: true
|
156 |
+
schema:
|
157 |
+
type: string
|
158 |
+
- name: wait
|
159 |
+
in: query
|
160 |
+
description: "If true, wait for changes to actually happen"
|
161 |
+
required: false
|
162 |
+
schema:
|
163 |
+
type: boolean
|
164 |
+
- name: ordering
|
165 |
+
in: query
|
166 |
+
description: "define ordering guarantees for the operation"
|
167 |
+
required: false
|
168 |
+
schema:
|
169 |
+
$ref: "#/components/schemas/WriteOrdering"
|
170 |
+
responses: #@ response(reference("UpdateResult"))
|
171 |
+
|
172 |
+
/collections/{collection_name}/points/vectors/delete:
|
173 |
+
post:
|
174 |
+
tags:
|
175 |
+
- Points
|
176 |
+
summary: Delete vectors
|
177 |
+
description: Delete named vectors from the given points.
|
178 |
+
operationId: delete_vectors
|
179 |
+
requestBody:
|
180 |
+
description: Delete named vectors from points
|
181 |
+
content:
|
182 |
+
application/json:
|
183 |
+
schema:
|
184 |
+
$ref: "#/components/schemas/DeleteVectors"
|
185 |
+
|
186 |
+
parameters:
|
187 |
+
- name: collection_name
|
188 |
+
in: path
|
189 |
+
description: Name of the collection to delete from
|
190 |
+
required: true
|
191 |
+
schema:
|
192 |
+
type: string
|
193 |
+
- name: wait
|
194 |
+
in: query
|
195 |
+
description: "If true, wait for changes to actually happen"
|
196 |
+
required: false
|
197 |
+
schema:
|
198 |
+
type: boolean
|
199 |
+
- name: ordering
|
200 |
+
in: query
|
201 |
+
description: "define ordering guarantees for the operation"
|
202 |
+
required: false
|
203 |
+
schema:
|
204 |
+
$ref: "#/components/schemas/WriteOrdering"
|
205 |
+
responses: #@ response(reference("UpdateResult"))
|
206 |
+
|
207 |
+
/collections/{collection_name}/points/payload:
|
208 |
+
post:
|
209 |
+
tags:
|
210 |
+
- Points
|
211 |
+
summary: Set payload
|
212 |
+
description: Set payload values for points
|
213 |
+
operationId: set_payload
|
214 |
+
requestBody:
|
215 |
+
description: Set payload on points
|
216 |
+
content:
|
217 |
+
application/json:
|
218 |
+
schema:
|
219 |
+
$ref: "#/components/schemas/SetPayload"
|
220 |
+
|
221 |
+
parameters:
|
222 |
+
- name: collection_name
|
223 |
+
in: path
|
224 |
+
description: Name of the collection to set from
|
225 |
+
required: true
|
226 |
+
schema:
|
227 |
+
type: string
|
228 |
+
- name: wait
|
229 |
+
in: query
|
230 |
+
description: "If true, wait for changes to actually happen"
|
231 |
+
required: false
|
232 |
+
schema:
|
233 |
+
type: boolean
|
234 |
+
- name: ordering
|
235 |
+
in: query
|
236 |
+
description: "define ordering guarantees for the operation"
|
237 |
+
required: false
|
238 |
+
schema:
|
239 |
+
$ref: "#/components/schemas/WriteOrdering"
|
240 |
+
responses: #@ response(reference("UpdateResult"))
|
241 |
+
put:
|
242 |
+
tags:
|
243 |
+
- Points
|
244 |
+
summary: Overwrite payload
|
245 |
+
description: Replace full payload of points with new one
|
246 |
+
operationId: overwrite_payload
|
247 |
+
requestBody:
|
248 |
+
description: Payload and points selector
|
249 |
+
content:
|
250 |
+
application/json:
|
251 |
+
schema:
|
252 |
+
$ref: "#/components/schemas/SetPayload"
|
253 |
+
|
254 |
+
parameters:
|
255 |
+
- name: collection_name
|
256 |
+
in: path
|
257 |
+
description: Name of the collection to set from
|
258 |
+
required: true
|
259 |
+
schema:
|
260 |
+
type: string
|
261 |
+
- name: wait
|
262 |
+
in: query
|
263 |
+
description: "If true, wait for changes to actually happen"
|
264 |
+
required: false
|
265 |
+
schema:
|
266 |
+
type: boolean
|
267 |
+
- name: ordering
|
268 |
+
in: query
|
269 |
+
description: "define ordering guarantees for the operation"
|
270 |
+
required: false
|
271 |
+
schema:
|
272 |
+
$ref: "#/components/schemas/WriteOrdering"
|
273 |
+
responses: #@ response(reference("UpdateResult"))
|
274 |
+
|
275 |
+
/collections/{collection_name}/points/payload/delete:
|
276 |
+
post:
|
277 |
+
tags:
|
278 |
+
- Points
|
279 |
+
summary: Delete payload
|
280 |
+
description: Delete specified key payload for points
|
281 |
+
operationId: delete_payload
|
282 |
+
requestBody:
|
283 |
+
description: delete payload on points
|
284 |
+
content:
|
285 |
+
application/json:
|
286 |
+
schema:
|
287 |
+
$ref: "#/components/schemas/DeletePayload"
|
288 |
+
|
289 |
+
parameters:
|
290 |
+
- name: collection_name
|
291 |
+
in: path
|
292 |
+
description: Name of the collection to delete from
|
293 |
+
required: true
|
294 |
+
schema:
|
295 |
+
type: string
|
296 |
+
- name: wait
|
297 |
+
in: query
|
298 |
+
description: "If true, wait for changes to actually happen"
|
299 |
+
required: false
|
300 |
+
schema:
|
301 |
+
type: boolean
|
302 |
+
- name: ordering
|
303 |
+
in: query
|
304 |
+
description: "define ordering guarantees for the operation"
|
305 |
+
required: false
|
306 |
+
schema:
|
307 |
+
$ref: "#/components/schemas/WriteOrdering"
|
308 |
+
responses: #@ response(reference("UpdateResult"))
|
309 |
+
|
310 |
+
/collections/{collection_name}/points/payload/clear:
|
311 |
+
post:
|
312 |
+
tags:
|
313 |
+
- Points
|
314 |
+
summary: Clear payload
|
315 |
+
description: Remove all payload for specified points
|
316 |
+
operationId: clear_payload
|
317 |
+
requestBody:
|
318 |
+
description: clear payload on points
|
319 |
+
content:
|
320 |
+
application/json:
|
321 |
+
schema:
|
322 |
+
$ref: "#/components/schemas/PointsSelector"
|
323 |
+
|
324 |
+
parameters:
|
325 |
+
- name: collection_name
|
326 |
+
in: path
|
327 |
+
description: Name of the collection to clear payload from
|
328 |
+
required: true
|
329 |
+
schema:
|
330 |
+
type: string
|
331 |
+
- name: wait
|
332 |
+
in: query
|
333 |
+
description: "If true, wait for changes to actually happen"
|
334 |
+
required: false
|
335 |
+
schema:
|
336 |
+
type: boolean
|
337 |
+
- name: ordering
|
338 |
+
in: query
|
339 |
+
description: "define ordering guarantees for the operation"
|
340 |
+
required: false
|
341 |
+
schema:
|
342 |
+
$ref: "#/components/schemas/WriteOrdering"
|
343 |
+
responses: #@ response(reference("UpdateResult"))
|
344 |
+
/collections/{collection_name}/points/batch:
|
345 |
+
post:
|
346 |
+
tags:
|
347 |
+
- Points
|
348 |
+
summary: Batch update points
|
349 |
+
description: Apply a series of update operations for points, vectors and payloads
|
350 |
+
operationId: batch_update
|
351 |
+
requestBody:
|
352 |
+
description: update operations
|
353 |
+
content:
|
354 |
+
application/json:
|
355 |
+
schema:
|
356 |
+
$ref: "#/components/schemas/UpdateOperations"
|
357 |
+
parameters:
|
358 |
+
- name: collection_name
|
359 |
+
in: path
|
360 |
+
description: Name of the collection to apply operations on
|
361 |
+
required: true
|
362 |
+
schema:
|
363 |
+
type: string
|
364 |
+
- name: wait
|
365 |
+
in: query
|
366 |
+
description: "If true, wait for changes to actually happen"
|
367 |
+
required: false
|
368 |
+
schema:
|
369 |
+
type: boolean
|
370 |
+
- name: ordering
|
371 |
+
in: query
|
372 |
+
description: "define ordering guarantees for the operation"
|
373 |
+
required: false
|
374 |
+
schema:
|
375 |
+
$ref: "#/components/schemas/WriteOrdering"
|
376 |
+
responses: #@ response(array(reference("UpdateResult")))
|
openapi/openapi-service.ytt.yaml
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ load("openapi.lib.yml", "response", "reference", "type", "array")
|
2 |
+
|
3 |
+
paths:
|
4 |
+
/:
|
5 |
+
get:
|
6 |
+
summary: Returns information about the running Qdrant instance
|
7 |
+
description: Returns information about the running Qdrant instance like version and commit id
|
8 |
+
operationId: root
|
9 |
+
tags:
|
10 |
+
- Service
|
11 |
+
responses:
|
12 |
+
"200":
|
13 |
+
description: Qdrant server version information
|
14 |
+
content:
|
15 |
+
application/json:
|
16 |
+
schema:
|
17 |
+
$ref: "#/components/schemas/VersionInfo"
|
18 |
+
"4XX":
|
19 |
+
description: error
|
20 |
+
|
21 |
+
/telemetry:
|
22 |
+
get:
|
23 |
+
summary: Collect telemetry data
|
24 |
+
description: Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics
|
25 |
+
operationId: telemetry
|
26 |
+
tags:
|
27 |
+
- Service
|
28 |
+
parameters:
|
29 |
+
- name: anonymize
|
30 |
+
in: query
|
31 |
+
description: "If true, anonymize result"
|
32 |
+
required: false
|
33 |
+
schema:
|
34 |
+
type: boolean
|
35 |
+
responses: #@ response(reference("TelemetryData"))
|
36 |
+
|
37 |
+
/metrics:
|
38 |
+
get:
|
39 |
+
summary: Collect Prometheus metrics data
|
40 |
+
description: Collect metrics data including app info, collections info, cluster info and statistics
|
41 |
+
operationId: metrics
|
42 |
+
tags:
|
43 |
+
- Service
|
44 |
+
parameters:
|
45 |
+
- name: anonymize
|
46 |
+
in: query
|
47 |
+
description: "If true, anonymize result"
|
48 |
+
required: false
|
49 |
+
schema:
|
50 |
+
type: boolean
|
51 |
+
responses:
|
52 |
+
"200":
|
53 |
+
description: Metrics data in Prometheus format
|
54 |
+
content:
|
55 |
+
text/plain:
|
56 |
+
schema:
|
57 |
+
type: string
|
58 |
+
example: |
|
59 |
+
# HELP app_info information about qdrant server
|
60 |
+
# TYPE app_info gauge
|
61 |
+
app_info{name="qdrant",version="0.11.1"} 1
|
62 |
+
# HELP cluster_enabled is cluster support enabled
|
63 |
+
# TYPE cluster_enabled gauge
|
64 |
+
cluster_enabled 0
|
65 |
+
# HELP collections_total number of collections
|
66 |
+
# TYPE collections_total gauge
|
67 |
+
collections_total 1
|
68 |
+
"4XX":
|
69 |
+
description: error
|
70 |
+
|
71 |
+
/locks:
|
72 |
+
post:
|
73 |
+
summary: Set lock options
|
74 |
+
description: Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options
|
75 |
+
operationId: post_locks
|
76 |
+
tags:
|
77 |
+
- Service
|
78 |
+
requestBody:
|
79 |
+
description: Lock options and optional error message
|
80 |
+
content:
|
81 |
+
application/json:
|
82 |
+
schema:
|
83 |
+
$ref: "#/components/schemas/LocksOption"
|
84 |
+
responses: #@ response(reference("LocksOption"))
|
85 |
+
|
86 |
+
get:
|
87 |
+
summary: Get lock options
|
88 |
+
description: Get lock options. If write is locked, all write operations and collection creation are forbidden
|
89 |
+
operationId: get_locks
|
90 |
+
tags:
|
91 |
+
- Service
|
92 |
+
responses: #@ response(reference("LocksOption"))
|
93 |
+
|
94 |
+
/healthz:
|
95 |
+
get:
|
96 |
+
summary: Kubernetes healthz endpoint
|
97 |
+
description: An endpoint for health checking used in Kubernetes.
|
98 |
+
operationId: healthz
|
99 |
+
tags:
|
100 |
+
- Service
|
101 |
+
responses:
|
102 |
+
"200":
|
103 |
+
description: Healthz response
|
104 |
+
content:
|
105 |
+
text/plain:
|
106 |
+
schema:
|
107 |
+
type: string
|
108 |
+
example: healthz check passed
|
109 |
+
"4XX":
|
110 |
+
description: error
|
111 |
+
|
112 |
+
/livez:
|
113 |
+
get:
|
114 |
+
summary: Kubernetes livez endpoint
|
115 |
+
description: An endpoint for health checking used in Kubernetes.
|
116 |
+
operationId: livez
|
117 |
+
tags:
|
118 |
+
- Service
|
119 |
+
responses:
|
120 |
+
"200":
|
121 |
+
description: Healthz response
|
122 |
+
content:
|
123 |
+
text/plain:
|
124 |
+
schema:
|
125 |
+
type: string
|
126 |
+
example: healthz check passed
|
127 |
+
"4XX":
|
128 |
+
description: error
|
129 |
+
|
130 |
+
/readyz:
|
131 |
+
get:
|
132 |
+
summary: Kubernetes readyz endpoint
|
133 |
+
description: An endpoint for health checking used in Kubernetes.
|
134 |
+
operationId: readyz
|
135 |
+
tags:
|
136 |
+
- Service
|
137 |
+
responses:
|
138 |
+
"200":
|
139 |
+
description: Healthz response
|
140 |
+
content:
|
141 |
+
text/plain:
|
142 |
+
schema:
|
143 |
+
type: string
|
144 |
+
example: healthz check passed
|
145 |
+
"4XX":
|
146 |
+
description: error
|
147 |
+
|
148 |
+
/issues:
|
149 |
+
get:
|
150 |
+
summary: Get issues
|
151 |
+
description: Get a report of performance issues and configuration suggestions
|
152 |
+
operationId: get_issues
|
153 |
+
tags:
|
154 |
+
- Beta
|
155 |
+
responses:
|
156 |
+
"200":
|
157 |
+
description: Successful response
|
158 |
+
content:
|
159 |
+
application/json:
|
160 |
+
schema:
|
161 |
+
type: object
|
162 |
+
"4XX":
|
163 |
+
description: error
|
164 |
+
delete:
|
165 |
+
summary: Clear issues
|
166 |
+
description: Removes all issues reported so far
|
167 |
+
operationId: clear_issues
|
168 |
+
tags:
|
169 |
+
- Beta
|
170 |
+
responses:
|
171 |
+
"200":
|
172 |
+
description: Successful response
|
173 |
+
content:
|
174 |
+
application/json:
|
175 |
+
schema:
|
176 |
+
type: boolean
|
177 |
+
"4XX":
|
178 |
+
description: error
|
openapi/openapi-shard-snapshots.ytt.yaml
ADDED
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ load("openapi.lib.yml", "response", "response_with_accepted", "reference", "type", "array")
|
2 |
+
|
3 |
+
paths:
|
4 |
+
/collections/{collection_name}/shards/{shard_id}/snapshots/upload:
|
5 |
+
post:
|
6 |
+
tags:
|
7 |
+
- Snapshots
|
8 |
+
summary: Recover shard from an uploaded snapshot
|
9 |
+
description: Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.
|
10 |
+
operationId: recover_shard_from_uploaded_snapshot
|
11 |
+
parameters:
|
12 |
+
- name: collection_name
|
13 |
+
in: path
|
14 |
+
description: Name of the collection
|
15 |
+
required: true
|
16 |
+
schema:
|
17 |
+
type: string
|
18 |
+
- name: shard_id
|
19 |
+
in: path
|
20 |
+
description: Id of the shard to recover
|
21 |
+
required: true
|
22 |
+
schema:
|
23 |
+
type: integer
|
24 |
+
- name: wait
|
25 |
+
in: query
|
26 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
27 |
+
required: false
|
28 |
+
schema:
|
29 |
+
type: boolean
|
30 |
+
- name: priority
|
31 |
+
in: query
|
32 |
+
description: "Defines source of truth for snapshot recovery"
|
33 |
+
required: false
|
34 |
+
schema:
|
35 |
+
$ref: "#/components/schemas/SnapshotPriority"
|
36 |
+
- name: checksum
|
37 |
+
in: query
|
38 |
+
description: "Optional SHA256 checksum to verify snapshot integrity before recovery."
|
39 |
+
required: false
|
40 |
+
schema:
|
41 |
+
type: string
|
42 |
+
requestBody:
|
43 |
+
description: Snapshot to recover from
|
44 |
+
content:
|
45 |
+
multipart/form-data:
|
46 |
+
schema:
|
47 |
+
type: object
|
48 |
+
properties:
|
49 |
+
snapshot:
|
50 |
+
type: string
|
51 |
+
format: binary
|
52 |
+
responses: #@ response_with_accepted(type("boolean"))
|
53 |
+
/collections/{collection_name}/shards/{shard_id}/snapshots/recover:
|
54 |
+
put:
|
55 |
+
tags:
|
56 |
+
- Snapshots
|
57 |
+
summary: Recover from a snapshot
|
58 |
+
description: Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.
|
59 |
+
operationId: recover_shard_from_snapshot
|
60 |
+
parameters:
|
61 |
+
- name: collection_name
|
62 |
+
in: path
|
63 |
+
description: Name of the collection
|
64 |
+
required: true
|
65 |
+
schema:
|
66 |
+
type: string
|
67 |
+
- name: shard_id
|
68 |
+
in: path
|
69 |
+
description: Id of the shard to recover
|
70 |
+
required: true
|
71 |
+
schema:
|
72 |
+
type: integer
|
73 |
+
- name: wait
|
74 |
+
in: query
|
75 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
76 |
+
required: false
|
77 |
+
schema:
|
78 |
+
type: boolean
|
79 |
+
requestBody:
|
80 |
+
description: Snapshot to recover from
|
81 |
+
content:
|
82 |
+
application/json:
|
83 |
+
schema:
|
84 |
+
$ref: "#/components/schemas/ShardSnapshotRecover"
|
85 |
+
responses: #@ response_with_accepted(type("boolean"))
|
86 |
+
|
87 |
+
/collections/{collection_name}/shards/{shard_id}/snapshots:
|
88 |
+
get:
|
89 |
+
tags:
|
90 |
+
- Snapshots
|
91 |
+
summary: List shards snapshots for a collection
|
92 |
+
description: Get list of snapshots for a shard of a collection
|
93 |
+
operationId: list_shard_snapshots
|
94 |
+
parameters:
|
95 |
+
- name: collection_name
|
96 |
+
in: path
|
97 |
+
description: Name of the collection
|
98 |
+
required: true
|
99 |
+
schema:
|
100 |
+
type: string
|
101 |
+
- name: shard_id
|
102 |
+
in: path
|
103 |
+
description: Id of the shard
|
104 |
+
required: true
|
105 |
+
schema:
|
106 |
+
type: integer
|
107 |
+
responses: #@ response(array(reference("SnapshotDescription")))
|
108 |
+
|
109 |
+
post:
|
110 |
+
tags:
|
111 |
+
- Snapshots
|
112 |
+
summary: Create shard snapshot
|
113 |
+
description: Create new snapshot of a shard for a collection
|
114 |
+
operationId: create_shard_snapshot
|
115 |
+
parameters:
|
116 |
+
- name: collection_name
|
117 |
+
in: path
|
118 |
+
description: Name of the collection for which to create a snapshot
|
119 |
+
required: true
|
120 |
+
schema:
|
121 |
+
type: string
|
122 |
+
- name: shard_id
|
123 |
+
in: path
|
124 |
+
description: Id of the shard
|
125 |
+
required: true
|
126 |
+
schema:
|
127 |
+
type: integer
|
128 |
+
- name: wait
|
129 |
+
in: query
|
130 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
131 |
+
required: false
|
132 |
+
schema:
|
133 |
+
type: boolean
|
134 |
+
responses: #@ response_with_accepted(reference("SnapshotDescription"))
|
135 |
+
|
136 |
+
/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}:
|
137 |
+
delete:
|
138 |
+
tags:
|
139 |
+
- Snapshots
|
140 |
+
summary: Delete shard snapshot
|
141 |
+
description: Delete snapshot of a shard for a collection
|
142 |
+
operationId: delete_shard_snapshot
|
143 |
+
parameters:
|
144 |
+
- name: collection_name
|
145 |
+
in: path
|
146 |
+
description: Name of the collection for which to delete a snapshot
|
147 |
+
required: true
|
148 |
+
schema:
|
149 |
+
type: string
|
150 |
+
- name: shard_id
|
151 |
+
in: path
|
152 |
+
description: Id of the shard
|
153 |
+
required: true
|
154 |
+
schema:
|
155 |
+
type: integer
|
156 |
+
- name: snapshot_name
|
157 |
+
in: path
|
158 |
+
description: Name of the snapshot to delete
|
159 |
+
required: true
|
160 |
+
schema:
|
161 |
+
type: string
|
162 |
+
- name: wait
|
163 |
+
in: query
|
164 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
165 |
+
required: false
|
166 |
+
schema:
|
167 |
+
type: boolean
|
168 |
+
responses: #@ response_with_accepted(type("boolean"))
|
169 |
+
get:
|
170 |
+
tags:
|
171 |
+
- Snapshots
|
172 |
+
summary: Download collection snapshot
|
173 |
+
description: Download specified snapshot of a shard from a collection as a file
|
174 |
+
operationId: get_shard_snapshot
|
175 |
+
parameters:
|
176 |
+
- name: collection_name
|
177 |
+
in: path
|
178 |
+
description: Name of the collection
|
179 |
+
required: true
|
180 |
+
schema:
|
181 |
+
type: string
|
182 |
+
- name: shard_id
|
183 |
+
in: path
|
184 |
+
description: Id of the shard
|
185 |
+
required: true
|
186 |
+
schema:
|
187 |
+
type: integer
|
188 |
+
- name: snapshot_name
|
189 |
+
in: path
|
190 |
+
description: Name of the snapshot to download
|
191 |
+
required: true
|
192 |
+
schema:
|
193 |
+
type: string
|
194 |
+
|
195 |
+
responses:
|
196 |
+
default:
|
197 |
+
description: error
|
198 |
+
content:
|
199 |
+
application/json:
|
200 |
+
schema:
|
201 |
+
$ref: "#/components/schemas/ErrorResponse"
|
202 |
+
4XX:
|
203 |
+
description: error
|
204 |
+
content:
|
205 |
+
application/json:
|
206 |
+
schema:
|
207 |
+
$ref: "#/components/schemas/ErrorResponse"
|
208 |
+
'200':
|
209 |
+
description: Snapshot file
|
210 |
+
content:
|
211 |
+
application/octet-stream:
|
212 |
+
schema:
|
213 |
+
type: string
|
214 |
+
format: binary
|
openapi/openapi-shards.ytt.yaml
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ load("openapi.lib.yml", "response", "reference", "type", "array")
|
2 |
+
|
3 |
+
paths:
|
4 |
+
/collections/{collection_name}/shards:
|
5 |
+
put:
|
6 |
+
tags:
|
7 |
+
- Distributed
|
8 |
+
summary: Create shard key
|
9 |
+
operationId: create_shard_key
|
10 |
+
requestBody:
|
11 |
+
description: Shard key configuration
|
12 |
+
content:
|
13 |
+
application/json:
|
14 |
+
schema:
|
15 |
+
$ref: "#/components/schemas/CreateShardingKey"
|
16 |
+
parameters:
|
17 |
+
- name: collection_name
|
18 |
+
in: path
|
19 |
+
description: Name of the collection to create shards for
|
20 |
+
required: true
|
21 |
+
schema:
|
22 |
+
type: string
|
23 |
+
- name: timeout
|
24 |
+
in: query
|
25 |
+
description: |
|
26 |
+
Wait for operation commit timeout in seconds.
|
27 |
+
If timeout is reached - request will return with service error.
|
28 |
+
schema:
|
29 |
+
type: integer
|
30 |
+
responses: #@ response(type("boolean"))
|
31 |
+
/collections/{collection_name}/shards/delete:
|
32 |
+
post:
|
33 |
+
tags:
|
34 |
+
- Distributed
|
35 |
+
summary: Delete shard key
|
36 |
+
operationId: delete_shard_key
|
37 |
+
requestBody:
|
38 |
+
description: Select shard key to delete
|
39 |
+
content:
|
40 |
+
application/json:
|
41 |
+
schema:
|
42 |
+
$ref: "#/components/schemas/DropShardingKey"
|
43 |
+
parameters:
|
44 |
+
- name: collection_name
|
45 |
+
in: path
|
46 |
+
description: Name of the collection to create shards for
|
47 |
+
required: true
|
48 |
+
schema:
|
49 |
+
type: string
|
50 |
+
- name: timeout
|
51 |
+
in: query
|
52 |
+
description: |
|
53 |
+
Wait for operation commit timeout in seconds.
|
54 |
+
If timeout is reached - request will return with service error.
|
55 |
+
schema:
|
56 |
+
type: integer
|
57 |
+
responses: #@ response(type("boolean"))
|
openapi/openapi-snapshots.ytt.yaml
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ load("openapi.lib.yml", "response", "response_with_accepted", "reference", "type", "array")
|
2 |
+
|
3 |
+
paths:
|
4 |
+
/collections/{collection_name}/snapshots/upload:
|
5 |
+
post:
|
6 |
+
tags:
|
7 |
+
- Snapshots
|
8 |
+
summary: Recover from an uploaded snapshot
|
9 |
+
description: Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.
|
10 |
+
operationId: recover_from_uploaded_snapshot
|
11 |
+
parameters:
|
12 |
+
- name: collection_name
|
13 |
+
in: path
|
14 |
+
description: Name of the collection
|
15 |
+
required: true
|
16 |
+
schema:
|
17 |
+
type: string
|
18 |
+
- name: wait
|
19 |
+
in: query
|
20 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
21 |
+
required: false
|
22 |
+
schema:
|
23 |
+
type: boolean
|
24 |
+
- name: priority
|
25 |
+
in: query
|
26 |
+
description: "Defines source of truth for snapshot recovery"
|
27 |
+
required: false
|
28 |
+
schema:
|
29 |
+
$ref: "#/components/schemas/SnapshotPriority"
|
30 |
+
- name: checksum
|
31 |
+
in: query
|
32 |
+
description: "Optional SHA256 checksum to verify snapshot integrity before recovery."
|
33 |
+
required: false
|
34 |
+
schema:
|
35 |
+
type: string
|
36 |
+
requestBody:
|
37 |
+
description: Snapshot to recover from
|
38 |
+
content:
|
39 |
+
multipart/form-data:
|
40 |
+
schema:
|
41 |
+
type: object
|
42 |
+
properties:
|
43 |
+
snapshot:
|
44 |
+
type: string
|
45 |
+
format: binary
|
46 |
+
responses: #@ response_with_accepted(type("boolean"))
|
47 |
+
/collections/{collection_name}/snapshots/recover:
|
48 |
+
put:
|
49 |
+
tags:
|
50 |
+
- Snapshots
|
51 |
+
summary: Recover from a snapshot
|
52 |
+
description: Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.
|
53 |
+
operationId: recover_from_snapshot
|
54 |
+
parameters:
|
55 |
+
- name: collection_name
|
56 |
+
in: path
|
57 |
+
description: Name of the collection
|
58 |
+
required: true
|
59 |
+
schema:
|
60 |
+
type: string
|
61 |
+
- name: wait
|
62 |
+
in: query
|
63 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
64 |
+
required: false
|
65 |
+
schema:
|
66 |
+
type: boolean
|
67 |
+
requestBody:
|
68 |
+
description: Snapshot to recover from
|
69 |
+
content:
|
70 |
+
application/json:
|
71 |
+
schema:
|
72 |
+
$ref: "#/components/schemas/SnapshotRecover"
|
73 |
+
responses: #@ response_with_accepted(type("boolean"))
|
74 |
+
|
75 |
+
/collections/{collection_name}/snapshots:
|
76 |
+
get:
|
77 |
+
tags:
|
78 |
+
- Snapshots
|
79 |
+
summary: List collection snapshots
|
80 |
+
description: Get list of snapshots for a collection
|
81 |
+
operationId: list_snapshots
|
82 |
+
parameters:
|
83 |
+
- name: collection_name
|
84 |
+
in: path
|
85 |
+
description: Name of the collection
|
86 |
+
required: true
|
87 |
+
schema:
|
88 |
+
type: string
|
89 |
+
responses: #@ response(array(reference("SnapshotDescription")))
|
90 |
+
|
91 |
+
post:
|
92 |
+
tags:
|
93 |
+
- Snapshots
|
94 |
+
summary: Create collection snapshot
|
95 |
+
description: Create new snapshot for a collection
|
96 |
+
operationId: create_snapshot
|
97 |
+
parameters:
|
98 |
+
- name: collection_name
|
99 |
+
in: path
|
100 |
+
description: Name of the collection for which to create a snapshot
|
101 |
+
required: true
|
102 |
+
schema:
|
103 |
+
type: string
|
104 |
+
- name: wait
|
105 |
+
in: query
|
106 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
107 |
+
required: false
|
108 |
+
schema:
|
109 |
+
type: boolean
|
110 |
+
responses: #@ response_with_accepted(reference("SnapshotDescription"))
|
111 |
+
|
112 |
+
/collections/{collection_name}/snapshots/{snapshot_name}:
|
113 |
+
delete:
|
114 |
+
tags:
|
115 |
+
- Snapshots
|
116 |
+
summary: Delete collection snapshot
|
117 |
+
description: Delete snapshot for a collection
|
118 |
+
operationId: delete_snapshot
|
119 |
+
parameters:
|
120 |
+
- name: collection_name
|
121 |
+
in: path
|
122 |
+
description: Name of the collection for which to delete a snapshot
|
123 |
+
required: true
|
124 |
+
schema:
|
125 |
+
type: string
|
126 |
+
- name: snapshot_name
|
127 |
+
in: path
|
128 |
+
description: Name of the snapshot to delete
|
129 |
+
required: true
|
130 |
+
schema:
|
131 |
+
type: string
|
132 |
+
- name: wait
|
133 |
+
in: query
|
134 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
135 |
+
required: false
|
136 |
+
schema:
|
137 |
+
type: boolean
|
138 |
+
responses: #@ response_with_accepted(type("boolean"))
|
139 |
+
get:
|
140 |
+
tags:
|
141 |
+
- Snapshots
|
142 |
+
summary: Download collection snapshot
|
143 |
+
description: Download specified snapshot from a collection as a file
|
144 |
+
operationId: get_snapshot
|
145 |
+
parameters:
|
146 |
+
- name: collection_name
|
147 |
+
in: path
|
148 |
+
description: Name of the collection
|
149 |
+
required: true
|
150 |
+
schema:
|
151 |
+
type: string
|
152 |
+
- name: snapshot_name
|
153 |
+
in: path
|
154 |
+
description: Name of the snapshot to download
|
155 |
+
required: true
|
156 |
+
schema:
|
157 |
+
type: string
|
158 |
+
|
159 |
+
responses:
|
160 |
+
default:
|
161 |
+
description: error
|
162 |
+
content:
|
163 |
+
application/json:
|
164 |
+
schema:
|
165 |
+
$ref: "#/components/schemas/ErrorResponse"
|
166 |
+
4XX:
|
167 |
+
description: error
|
168 |
+
content:
|
169 |
+
application/json:
|
170 |
+
schema:
|
171 |
+
$ref: "#/components/schemas/ErrorResponse"
|
172 |
+
'200':
|
173 |
+
description: Snapshot file
|
174 |
+
content:
|
175 |
+
application/octet-stream:
|
176 |
+
schema:
|
177 |
+
type: string
|
178 |
+
format: binary
|
179 |
+
|
180 |
+
/snapshots:
|
181 |
+
get:
|
182 |
+
tags:
|
183 |
+
- Snapshots
|
184 |
+
summary: List of storage snapshots
|
185 |
+
description: Get list of snapshots of the whole storage
|
186 |
+
operationId: list_full_snapshots
|
187 |
+
responses: #@ response(array(reference("SnapshotDescription")))
|
188 |
+
|
189 |
+
post:
|
190 |
+
tags:
|
191 |
+
- Snapshots
|
192 |
+
summary: Create storage snapshot
|
193 |
+
description: Create new snapshot of the whole storage
|
194 |
+
operationId: create_full_snapshot
|
195 |
+
parameters:
|
196 |
+
- name: wait
|
197 |
+
in: query
|
198 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
199 |
+
required: false
|
200 |
+
schema:
|
201 |
+
type: boolean
|
202 |
+
responses: #@ response_with_accepted(reference("SnapshotDescription"))
|
203 |
+
|
204 |
+
/snapshots/{snapshot_name}:
|
205 |
+
delete:
|
206 |
+
tags:
|
207 |
+
- Snapshots
|
208 |
+
summary: Delete storage snapshot
|
209 |
+
description: Delete snapshot of the whole storage
|
210 |
+
operationId: delete_full_snapshot
|
211 |
+
parameters:
|
212 |
+
- name: snapshot_name
|
213 |
+
in: path
|
214 |
+
description: Name of the full snapshot to delete
|
215 |
+
required: true
|
216 |
+
schema:
|
217 |
+
type: string
|
218 |
+
- name: wait
|
219 |
+
in: query
|
220 |
+
description: "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true."
|
221 |
+
required: false
|
222 |
+
schema:
|
223 |
+
type: boolean
|
224 |
+
responses: #@ response_with_accepted(type("boolean"))
|
225 |
+
get:
|
226 |
+
tags:
|
227 |
+
- Snapshots
|
228 |
+
summary: Download storage snapshot
|
229 |
+
description: Download specified snapshot of the whole storage as a file
|
230 |
+
operationId: get_full_snapshot
|
231 |
+
parameters:
|
232 |
+
- name: snapshot_name
|
233 |
+
in: path
|
234 |
+
description: Name of the snapshot to download
|
235 |
+
required: true
|
236 |
+
schema:
|
237 |
+
type: string
|
238 |
+
responses:
|
239 |
+
default:
|
240 |
+
description: error
|
241 |
+
content:
|
242 |
+
application/json:
|
243 |
+
schema:
|
244 |
+
$ref: "#/components/schemas/ErrorResponse"
|
245 |
+
4XX:
|
246 |
+
description: error
|
247 |
+
content:
|
248 |
+
application/json:
|
249 |
+
schema:
|
250 |
+
$ref: "#/components/schemas/ErrorResponse"
|
251 |
+
'200':
|
252 |
+
description: Snapshot file
|
253 |
+
content:
|
254 |
+
application/octet-stream:
|
255 |
+
schema:
|
256 |
+
type: string
|
257 |
+
format: binary
|
openapi/openapi.lib.yml
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@ def response(model):
|
2 |
+
default:
|
3 |
+
description: error
|
4 |
+
content:
|
5 |
+
application/json:
|
6 |
+
schema:
|
7 |
+
$ref: "#/components/schemas/ErrorResponse"
|
8 |
+
4XX:
|
9 |
+
description: error
|
10 |
+
content:
|
11 |
+
application/json:
|
12 |
+
schema:
|
13 |
+
$ref: "#/components/schemas/ErrorResponse"
|
14 |
+
"200":
|
15 |
+
description: successful operation
|
16 |
+
content:
|
17 |
+
application/json:
|
18 |
+
schema:
|
19 |
+
type: object
|
20 |
+
properties:
|
21 |
+
usage:
|
22 |
+
default: null
|
23 |
+
anyOf:
|
24 |
+
- $ref: '#/components/schemas/HardwareUsage'
|
25 |
+
- nullable: true
|
26 |
+
time:
|
27 |
+
type: number
|
28 |
+
format: float
|
29 |
+
description: Time spent to process this request
|
30 |
+
example: 0.002
|
31 |
+
status:
|
32 |
+
type: string
|
33 |
+
example: ok
|
34 |
+
result: #@ model
|
35 |
+
#@ end
|
36 |
+
|
37 |
+
#@ def response_with_accepted(model):
|
38 |
+
default:
|
39 |
+
description: error
|
40 |
+
content:
|
41 |
+
application/json:
|
42 |
+
schema:
|
43 |
+
$ref: "#/components/schemas/ErrorResponse"
|
44 |
+
4XX:
|
45 |
+
description: error
|
46 |
+
content:
|
47 |
+
application/json:
|
48 |
+
schema:
|
49 |
+
$ref: "#/components/schemas/ErrorResponse"
|
50 |
+
"200":
|
51 |
+
description: successful operation
|
52 |
+
content:
|
53 |
+
application/json:
|
54 |
+
schema:
|
55 |
+
type: object
|
56 |
+
properties:
|
57 |
+
time:
|
58 |
+
type: number
|
59 |
+
format: float
|
60 |
+
description: Time spent to process this request
|
61 |
+
example: 0.002
|
62 |
+
status:
|
63 |
+
type: string
|
64 |
+
example: ok
|
65 |
+
result: #@ model
|
66 |
+
"202":
|
67 |
+
description: operation is accepted
|
68 |
+
content:
|
69 |
+
application/json:
|
70 |
+
schema:
|
71 |
+
type: object
|
72 |
+
properties:
|
73 |
+
time:
|
74 |
+
type: number
|
75 |
+
format: float
|
76 |
+
description: Time spent to process this request
|
77 |
+
status:
|
78 |
+
type: string
|
79 |
+
#@ end
|
80 |
+
|
81 |
+
#@ def reference(model_name):
|
82 |
+
$ref: #@ "#/components/schemas/" + model_name
|
83 |
+
#@ end
|
84 |
+
|
85 |
+
#@ def type(type_name):
|
86 |
+
type: #@ type_name
|
87 |
+
#@ end
|
88 |
+
|
89 |
+
#@ def array(type_data):
|
90 |
+
type: array
|
91 |
+
items: #@ type_data
|
92 |
+
#@ end
|
openapi/schemas/.keep
ADDED
File without changes
|