mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-04 09:01:00 -05:00
* WIP: Add `read_consistency` parameter to the APIs * WIP: Add `read_consistency` parameter to the APIs TODO: - Add documentation * `cargo fmt` * Add gRPC documentation * Add OpenAPI documentation * Cleanup * fixup! Add OpenAPI documentation * fixup! Add gRPC documentation Who would have known there's `generate_grpc_docs.sh`!? 🥲🙈🤦♀️ * generate openapi * Fix `read_consistency` query parameter deserialization * Further improve `read_consistency` query parameter deserialization * `cargo clippy` * Fix `Payload` comparison during read operation result resolving * Fix grammar * rename `read_consistency` -> `consistency` and add integration test * use majority for test * fix tests * Fix tests * fixup! Fix tests Apply the same fix to `ScoredPoint` * Remove an `unwrap` * fixup! Fix tests Gotta love those negative conditions, or how a missed `!` can ruin your day... 🤦♀️ * Make internal API calls strictly "local-shard only" * Implement a few basic traits for `ResolverRecord` * fixup! Implement a few basic traits for `ResolverRecord` * Revert "Make internal API calls strictly "local-shard only"" This reverts commit25378e61ff. * Fix `Record::payload` and `ScoredPoint::payload` serialization * Revert "Fix `Record::payload` and `ScoredPoint::payload` serialization" This reverts commitb566bea49b. * Fix `Record::payload` and `ScoredPoint::payload` visibility * fixup! Fix `Record::payload` and `ScoredPoint::payload` visibility Remove `todo!()` * refactoring --------- Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
267 lines
7.9 KiB
YAML
267 lines
7.9 KiB
YAML
#@ load("openapi.lib.yml", "response", "reference", "type", "array")
|
|
|
|
paths:
|
|
/collections/{collection_name}/points/{id}:
|
|
get:
|
|
tags:
|
|
- points
|
|
summary: Get point
|
|
description: Retrieve full information of single point by id
|
|
operationId: get_point
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection to retrieve from
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: id
|
|
in: path
|
|
description: Id of the point
|
|
required: true
|
|
schema:
|
|
$ref: "#/components/schemas/ExtendedPointId"
|
|
- name: consistency
|
|
in: query
|
|
description: Define read consistency guarantees for the operation
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/ReadConsistency"
|
|
responses: #@ response(reference("Record"))
|
|
|
|
/collections/{collection_name}/points:
|
|
post:
|
|
tags:
|
|
- points
|
|
summary: Get points
|
|
description: Retrieve multiple points by specified IDs
|
|
operationId: get_points
|
|
requestBody:
|
|
description: List of points to retrieve
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/PointRequest"
|
|
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection to retrieve from
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: consistency
|
|
in: query
|
|
description: Define read consistency guarantees for the operation
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/ReadConsistency"
|
|
responses: #@ response(array(reference("Record")))
|
|
|
|
put:
|
|
tags:
|
|
- points
|
|
summary: Upsert points
|
|
description: Perform insert + updates on points. If point with given ID already exists - it will be overwritten.
|
|
operationId: upsert_points
|
|
requestBody:
|
|
description: Operation to perform on points
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/PointInsertOperations"
|
|
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection to update from
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: wait
|
|
in: query
|
|
description: "If true, wait for changes to actually happen"
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
- name: ordering
|
|
in: query
|
|
description: "define ordering guarantees for the operation"
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/WriteOrdering"
|
|
responses: #@ response(reference("UpdateResult"))
|
|
|
|
/collections/{collection_name}/points/delete:
|
|
post:
|
|
tags:
|
|
- points
|
|
summary: Delete points
|
|
description: Delete points
|
|
operationId: delete_points
|
|
requestBody:
|
|
description: Operation to perform on points
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/PointsSelector"
|
|
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection to delete from
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: wait
|
|
in: query
|
|
description: "If true, wait for changes to actually happen"
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
- name: ordering
|
|
in: query
|
|
description: "define ordering guarantees for the operation"
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/WriteOrdering"
|
|
responses: #@ response(reference("UpdateResult"))
|
|
|
|
/collections/{collection_name}/points/payload:
|
|
post:
|
|
tags:
|
|
- points
|
|
summary: Set payload
|
|
description: Set payload values for points
|
|
operationId: set_payload
|
|
requestBody:
|
|
description: Set payload on points
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/SetPayload"
|
|
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection to set from
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: wait
|
|
in: query
|
|
description: "If true, wait for changes to actually happen"
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
- name: ordering
|
|
in: query
|
|
description: "define ordering guarantees for the operation"
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/WriteOrdering"
|
|
responses: #@ response(reference("UpdateResult"))
|
|
put:
|
|
tags:
|
|
- points
|
|
summary: Overwrite payload
|
|
description: Replace full payload of points with new one
|
|
operationId: overwrite_payload
|
|
requestBody:
|
|
description: Payload and points selector
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/SetPayload"
|
|
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection to set from
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: wait
|
|
in: query
|
|
description: "If true, wait for changes to actually happen"
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
- name: ordering
|
|
in: query
|
|
description: "define ordering guarantees for the operation"
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/WriteOrdering"
|
|
responses: #@ response(reference("UpdateResult"))
|
|
|
|
/collections/{collection_name}/points/payload/delete:
|
|
post:
|
|
tags:
|
|
- points
|
|
summary: Delete payload
|
|
description: Delete specified key payload for points
|
|
operationId: delete_payload
|
|
requestBody:
|
|
description: delete payload on points
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/DeletePayload"
|
|
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection to delete from
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: wait
|
|
in: query
|
|
description: "If true, wait for changes to actually happen"
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
- name: ordering
|
|
in: query
|
|
description: "define ordering guarantees for the operation"
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/WriteOrdering"
|
|
responses: #@ response(reference("UpdateResult"))
|
|
|
|
/collections/{collection_name}/points/payload/clear:
|
|
post:
|
|
tags:
|
|
- points
|
|
summary: Clear payload
|
|
description: Remove all payload for specified points
|
|
operationId: clear_payload
|
|
requestBody:
|
|
description: clear payload on points
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/PointsSelector"
|
|
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection to clear payload from
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: wait
|
|
in: query
|
|
description: "If true, wait for changes to actually happen"
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
- name: ordering
|
|
in: query
|
|
description: "define ordering guarantees for the operation"
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/WriteOrdering"
|
|
responses: #@ response(reference("UpdateResult"))
|