Luna Vector Search Module API (v.0.0.3)

Download OpenAPI specification:Download

Service for vector search across user-defined collections.

collections

create collection

Creates a collection and assigns a caretaker to it, which performs the initial filling of the collection and subsequent periodic synchronization with external data sources.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Request Body schema: application/json
One of
object_type
required
string
Value: "events"

Entity type for which the collection is built

required
Array of objects (descriptor_config)

Descriptor paramaters for which the collection is built

payload
required
Array of strings (event_targets) non-empty
Items Enum: "event_id" "account_id" "create_time" "end_time" "handler_id" "face_id" "external_id" "source" "stream_id" "top_match" "match_result" "face_detections" "body_detections" "attach_result" "gender" "age" "emotion" "ethnic_group" "tags" "user_data" "location" "mask" "track_id" "liveness" "deepfake" "body_basic_attributes" "upper_body" "lower_body" "accessories" "meta"

Luna Platform supported event targets to be placed to the collection payload

required
object (event_conditions)

Luna Platform supported filters to be applied as conditions by which the collection is built. When no filters specified, all the entities will be placed in the collection

description
string or null

description of the collection

Responses

Request samples

Content type
application/json
{
  • "object_type": "events",
  • "descriptors": [
    ],
  • "payload": [
    ],
  • "conditions": {
    },
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "collection_id": "6383755390710280921"
}

get collections

Get collection data and configs of registered descriptors

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Responses

Response samples

Content type
application/json
{
  • "collections": [
    ]
}

remove collection

Unregister collection by ID

path Parameters
collection_id
required
string

ID of the collection (collection_id received in the "create collection" request)

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Responses

Response samples

Content type
application/json
{}

patch collection

Update collection description by its ID

path Parameters
collection_id
required
string

ID of the collection (collection_id received in the "create collection" request)

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Request Body schema: application/json
description
required
string or null

new description of the collection

Responses

Request samples

Content type
application/json
{
  • "description": "string"
}

Response samples

Content type
application/json
{}

descriptors

get descriptor configs

Get the descriptor settings registered in the system. Based on this data, the parameters of the vectors of the created collections are calculated, and some of this data is used as default values if no platt_scaling value is specified when creating the collection.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Responses

Response samples

Content type
application/json
{
  • "descriptor_configs": [
    ]
}

documents

get openapi documentation

Get service OpenApi documentation. If Accept request header is of type application/x-yaml, returns documentation in yaml format or returns html documentation, if Accept-Type is text/html

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Accept
required
string
Enum: "application/x-yaml" "text/html"

acceptable type of receiving data

Responses

Response samples

Content type
application/json
{}

get development manual

Get sphinx documentation - Development Manual. After the request you will be redirected to the page /docs/dev/index.html

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Responses

Response samples

Content type
application/json
{}

config

get service configuration

Get service configuration. Passwords and tokens will be hidden in the response.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Accept
string
Enum: "application/json" "text/plain"

acceptable type of receiving data

Responses

Response samples

Content type
{
  • "INFLUX_MONITORING": {
    }
}

plugins

get list of plugins

Get list of service plugins:

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Responses

Response samples

Content type
application/json
{
  • "plugins": [
    ]
}

metrics

get service requests statistics

Get statistics of success and failed requests to the service in prometheus format.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Responses

Response samples

Content type
text/plain
# HELP request_count_total Counter of requests
# TYPE request_count_total counter
request_count_total{path="GET:/healthcheck",status_code="200"} 1.0

health

get health

get health of service

query Parameters
include_luna_services
integer
Default: 0
Enum: 0 1

whether to perform healthchecks for dependent luna services.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Responses

Response samples

Content type
application/json
{
  • "execution_time": 0.123
}

version

get version

get service version

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

request identifier.

Responses

Response samples

Content type
application/json
{
  • "Version": {
    }
}