Download OpenAPI specification:Download
Service for vector search across user-defined collections.
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.
| 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. |
| 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 |
{- "object_type": "events",
- "descriptors": [
- {
- "descriptor_type": "face",
- "descriptor_version": 65
}
], - "payload": [
- "event_id"
], - "conditions": {
- "account_id": "b668c4a5-2191-476e-a261-3b4f9ce2e25e",
- "event_ids": [
- "b668c4a5-2191-476e-a261-3b4f9ce2e25e"
], - "event_id__gte": "b668c4a5-2191-476e-a261-3b4f9ce2e25e",
- "event_id__lt": "b668c4a5-2191-476e-a261-3b4f9ce2e25e",
- "create_time__gte": "2018-08-11T09:11:41.674Z",
- "create_time__lt": "2018-08-11T09:11:41.674Z",
- "end_time__gte": "2018-08-11T09:11:41.674Z",
- "end_time__lt": "2018-08-11T09:11:41.674Z",
- "external_ids": [
- "2xQ2gprbMUePw1s9gw9fvA=="
], - "face_ids": [
- "557d54ec-29ad-4f3c-93b4-c9092ef12515"
], - "user_data": "100-00-12",
- "sources": [
- "cam1",
- "cam2"
], - "stream_ids": [
- "b668c4a5-2191-476e-a261-3b4f9ce2e25e"
], - "handler_ids": [
- "b668c4a5-2191-476e-a261-3b4f9ce2e25e"
], - "top_matching_candidates_label": "good guys",
- "top_similar_object_similarity__gte": 0.5,
- "top_similar_object_similarity__lt": 0.5,
- "top_similar_external_ids": [
- "2xQ2gprbMUePw1s9gw9fvA=="
], - "tags": [
- "tag1",
- "tag2"
], - "emotions": [
- 1,
- 2,
- 4
], - "masks": "2,3",
- "liveness": [
- 0
], - "deepfake": [
- 0
], - "ethnic_groups": [
- 1
], - "gender": 0,
- "age__gte": 50,
- "age__lt": 50,
- "apparent_gender": [
- 1
], - "apparent_age__lt": 50,
- "apparent_age__gte": 50,
- "headwear_states": [
- 1
], - "headwear_apparent_colors": [
- "black"
], - "sleeve_lengths": [
- "short"
], - "upper_clothing_colors": [
- "black",
- "blue"
], - "lower_garment_types": [
- "trousers"
], - "lower_garment_colors": [
- "green",
- "gray"
], - "shoes_apparent_colors": [
- "white"
], - "backpack_states": [
- 1
], - "track_ids": [
- "useful_track_id_number_1"
], - "cities": [
- "moscow",
- "New-York"
], - "districts": [
- "mitino",
- "central park"
], - "streets": [
- "arbat, schepkina"
], - "house_numbers": [
- "1",
- "1/2str3"
], - "areas": [
- "area1",
- "area2"
], - "geo_position": {
- "origin_longitude": 0,
- "origin_latitude": 0,
- "longitude_delta": 0.01,
- "latitude_delta": 0.01
}, - "top_similar_object_ids": [
- "557d54ec-29ad-4f3c-93b4-c9092ef12515"
]
}, - "description": "string"
}{- "collection_id": "6383755390710280921"
}Get collection data and configs of registered descriptors
| 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. |
{- "collections": [
- {
- "parameters": {
- "object_type": "events",
- "descriptors": [
- {
- "descriptor_type": "face",
- "descriptor_version": 65
}
], - "payload": [
- "event_id"
], - "conditions": {
- "account_id": "b668c4a5-2191-476e-a261-3b4f9ce2e25e",
- "event_ids": [
- "b668c4a5-2191-476e-a261-3b4f9ce2e25e"
], - "event_id__gte": "b668c4a5-2191-476e-a261-3b4f9ce2e25e",
- "event_id__lt": "b668c4a5-2191-476e-a261-3b4f9ce2e25e",
- "create_time__gte": "2018-08-11T09:11:41.674Z",
- "create_time__lt": "2018-08-11T09:11:41.674Z",
- "end_time__gte": "2018-08-11T09:11:41.674Z",
- "end_time__lt": "2018-08-11T09:11:41.674Z",
- "external_ids": [
- "2xQ2gprbMUePw1s9gw9fvA=="
], - "face_ids": [
- "557d54ec-29ad-4f3c-93b4-c9092ef12515"
], - "user_data": "100-00-12",
- "sources": [
- "cam1",
- "cam2"
], - "stream_ids": [
- "b668c4a5-2191-476e-a261-3b4f9ce2e25e"
], - "handler_ids": [
- "b668c4a5-2191-476e-a261-3b4f9ce2e25e"
], - "top_matching_candidates_label": "good guys",
- "top_similar_object_similarity__gte": 0.5,
- "top_similar_object_similarity__lt": 0.5,
- "top_similar_external_ids": [
- "2xQ2gprbMUePw1s9gw9fvA=="
], - "tags": [
- "tag1",
- "tag2"
], - "emotions": [
- 1,
- 2,
- 4
], - "masks": "2,3",
- "liveness": [
- 0
], - "deepfake": [
- 0
], - "ethnic_groups": [
- 1
], - "gender": 0,
- "age__gte": 50,
- "age__lt": 50,
- "apparent_gender": [
- 1
], - "apparent_age__lt": 50,
- "apparent_age__gte": 50,
- "headwear_states": [
- 1
], - "headwear_apparent_colors": [
- "black"
], - "sleeve_lengths": [
- "short"
], - "upper_clothing_colors": [
- "black",
- "blue"
], - "lower_garment_types": [
- "trousers"
], - "lower_garment_colors": [
- "green",
- "gray"
], - "shoes_apparent_colors": [
- "white"
], - "backpack_states": [
- 1
], - "track_ids": [
- "useful_track_id_number_1"
], - "cities": [
- "moscow",
- "New-York"
], - "districts": [
- "mitino",
- "central park"
], - "streets": [
- "arbat, schepkina"
], - "house_numbers": [
- "1",
- "1/2str3"
], - "areas": [
- "area1",
- "area2"
], - "geo_position": {
- "origin_longitude": 0,
- "origin_latitude": 0,
- "longitude_delta": 0.01,
- "latitude_delta": 0.01
}, - "top_similar_object_ids": [
- "557d54ec-29ad-4f3c-93b4-c9092ef12515"
]
}, - "description": "string"
}, - "max_link_key": 0,
- "max_unlink_key": 0,
- "sync_time": "2019-08-24T14:15:22Z",
- "collection_name": "string",
- "description": "string"
}
]
}Unregister collection by ID
| collection_id required | string ID of the collection ( |
| 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. |
{- "error_code": 50006,
- "desc": "Object not found",
- "detail": "Collection with id '6383755390710280921' not found",
}Update collection description by its ID
| collection_id required | string ID of the collection ( |
| 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. |
| description required | string or null new description of the collection |
{- "description": "string"
}{- "error_code": 12022,
- "desc": "Bad/incomplete input data",
- "detail": "Failed to validate input json. Path: 'object_type', message: 'object_type must be one of ['events']",
}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.
| 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. |
{- "descriptor_configs": [
- {
- "object_type": "events",
- "dtype": "face",
- "version": 65,
- "platt_scaling": {
- "a": 1,
- "b": -0.217
}, - "length": 512
}
]
}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
| 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 |
{- "error_code": 12024,
- "detail": "Bad/incomplete input data",
- "desc": "Unsupported media type",
}Get sphinx documentation - Development Manual. After the request you will be redirected to the page /docs/dev/index.html
| 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. |
{- "error_code": 1,
- "detail": "Internal server error",
- "desc": "Internal server error",
}Get service configuration. Passwords and tokens will be hidden in the response.
| 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 |
{- "INFLUX_MONITORING": {
- "SEND_DATA_FOR_MONITORING": 0,
- "VERSION": 2,
- "ORGANIZATION": "ORGANIZATION_NAME",
- "TOKEN": "********",
- "BUCKET": "luna_monitoring",
- "HOST": "127.0.0.1",
- "PORT": 8086,
- "USE_SSL": 0,
- "FLUSHING_PERIOD": 1
}
}Get list of service plugins:
| 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. |
{- "plugins": [
- {
- "name": "string",
- "running": 0
}
]
}Get statistics of success and failed requests to the service in prometheus format.
| 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. |
# HELP request_count_total Counter of requests # TYPE request_count_total counter request_count_total{path="GET:/healthcheck",status_code="200"} 1.0
get health of service
| include_luna_services | integer Default: 0 Enum: 0 1 whether to perform healthchecks for dependent luna services. |
| 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. |
{- "execution_time": 0.123
}get service version
| 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. |
{- "Version": {
- "api": 0,
- "major": 0,
- "minor": 0,
- "patch": 0
}
}