Download OpenAPI specification:Download
VisionLabs Luna Sender API.
OpenAPI specification is the only valid document providing up-to-date information about the service API.
The specification can be used:
All the documents and code generated using this specification can include inaccuracies and should be carefully checked.
OpenAPI specification can be received using the "/docs/spec" resource. The "Accept" header should be set to "application/x-yaml".
Get versions of services.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
{- "Version": {
- "api": 1,
- "major": 0,
- "minor": 0,
- "patch": 1
}
}
sources | string Example: sources=cam1,cam2 Comma-separated list of sources. Each event from result will contain one of the given sources. | ||||||||||||||||
stream_ids | string <list of uuid.> Example: stream_ids=8950722f-3fd4-4223-b48f-03f95f0e8dfb,346a5645-ec89-4806-820a-dbcb6e0dc38 List of comma-separated stream IDs. | ||||||||||||||||
matching_candidates_labels | string Example: matching_candidates_labels=matching_label Matching candidates labels. Each event from result will contain one or more given labels. | ||||||||||||||||
object_similarity__gte | number Example: object_similarity__gte=0.5 Similar object similarity lower included bound (boundary for top matching candidate). | ||||||||||||||||
object_similarity__lt | number Example: object_similarity__lt=0.5 Top similar object similarity upper excluded bound (boundary for top matching candidate). | ||||||||||||||||
age__lt | integer Example: age__lt=50 Age upper excluded bound. | ||||||||||||||||
age__gte | integer Example: age__gte=50 Age lower included bound. | ||||||||||||||||
gender | integer Enum: 0 1 Example: gender=1 Gender. 1 - male, 0 - female. | ||||||||||||||||
ethnic_groups | string <list of integer (1, 2, 3, 4)> Example: ethnic_groups=1,2 Comma-separated list of dominant ethnic group. Each event from result will contain one of the given ethnic groups.
| ||||||||||||||||
liveness | string <list of integer (1, 2, 3)> Example: liveness=0,2 Comma-separated list of dominant liveness. Each event from result will contain one of the given liveness state.
| ||||||||||||||||
deepfake | string <list of integer (0, 1)> Example: deepfake=0,1 Comma-separated list of dominant deepfake. Each event from result will contain one of the given deepfake state.
| ||||||||||||||||
masks | string <list of integer (1, 2, 3)> Example: masks=1,2,3 Comma-separated list of predominant masks. Each event from result will contain one of the given mask state.
| ||||||||||||||||
emotions | string <list of integer (1, 2, 3, 4, 5, 6, 7)> Example: emotions=1,2,3 Comma-separated list of predominant emotions. Each event from result will contain one of the given emotions.
| ||||||||||||||||
tags | Array of strings (tag) >= 0 items [ items <= 36 characters ] Example: tags=tag_1,tag_2 A comma-separated list of tags. Each event from result will contain all of the given tags. Each tag can be at most 36 characters. | ||||||||||||||||
user_data | string Example: user_data=some%20special%20user%20info User data filter. Each event from result will contain user data that matches the filter value. For example, events with user data of abcd and cdef will match the filter value cd. | ||||||||||||||||
object Example: geo_position=origin_longitude,36.616,origin_latitude,55.752 Geo position filter, i.e. geo bounding box specified by coordinates of its center (origin) and some delta. Each event from result will be covered by bbox specified. | |||||||||||||||||
cities | string Example: cities=moscow,New-York Comma-separated list of cities. Each event from result will contain one of the given cities in location. | ||||||||||||||||
areas | string Example: areas=CAO,central park Comma-separated list of areas. Each event from result will contain one of the given areas in location. | ||||||||||||||||
districts | string Example: districts=mitino,central park Comma-separated list of districts. Each event from result will contain one of the given districts in location. | ||||||||||||||||
streets | string Example: streets=arbat,schepkina Comma-separated list of streets. Each event from result will contain one of the given streets in location. | ||||||||||||||||
house_numbers | string Example: house_numbers=1,1/2str3 Comma-separated list of house numbers. Each event from result will contain one of the given house numbers. in location. | ||||||||||||||||
handler_ids | string <list of uuid.> Example: handler_ids=8950722f-3fd4-4223-b48f-03f95f0e8dfb,346a5645-ec89-4806-820a-dbcb6e0dc38 List of comma-separated handler IDs. | ||||||||||||||||
apparent_gender | integer Enum: 0 1 2 Example: apparent_gender=1 Comma-separated list of apparent gender: 0 - female, 1 - male, 2 - undefined. Each event from result will contain one of the given states. | ||||||||||||||||
apparent_age__gte | integer [ 0 .. 100 ] Example: apparent_age__gte=50 Apparent age lower included bound. | ||||||||||||||||
apparent_age__lt | integer [ 0 .. 100 ] Example: apparent_age__lt=50 Apparent age upper excluded bound. | ||||||||||||||||
headwear_states | integer Enum: 0 1 2 Example: headwear_states=1 Comma-separated list of headwear states: 0 - absent, 1 - present, 2 - undefined. Each event from result will contain one of the given states. | ||||||||||||||||
sleeve_lengths | string Enum: "short" "long" "undefined" Example: sleeve_lengths=short Comma-separated list of sleeve length states. Each event from result will contain one of the given states. | ||||||||||||||||
upper_clothing_colors | string (expanded_palette) Enum: "black" "blue" "green" "gray" "orange" "purple" "red" "white" "yellow" "pink" "brown" "beige" "khaki" "multicolored" "undefined" Example: upper_clothing_colors=black,white Comma-separated list of upper clothing colors. Each event from result will contain at least one of the given clothing colors. | ||||||||||||||||
lower_garment_colors | string (expanded_palette) Enum: "black" "blue" "green" "gray" "orange" "purple" "red" "white" "yellow" "pink" "brown" "beige" "khaki" "multicolored" "undefined" Example: lower_garment_colors=black,white Comma-separated list of lower garment colors. Each event from result will contain at least one of the given clothing colors. | ||||||||||||||||
lower_garment_types | string Enum: "trousers" "shorts" "skirt" "undefined" Example: lower_garment_types=trousers,skirt Comma-separated list of lower garment types 0 - trousers, 1 - shorts, 2 - skirt, 3 - undefined. Each event from result will contain at least one of the given types. | ||||||||||||||||
shoes_colors | string (short_palette) Enum: "black" "other" "white" "undefined" Example: shoes_colors=black,white Comma-separated list of shoes colors. Each event from result will contain at least one of the given colors. | ||||||||||||||||
headwear_colors | string (short_palette) Enum: "black" "other" "white" "undefined" Example: headwear_colors=black,white Comma-separated list of headwear colors. Each event from result will contain at least one of the given colors. | ||||||||||||||||
backpack_states | integer Enum: 0 1 2 Example: backpack_states=1 Comma-separated list of backpack states: 0 - absent, 1 - present, 2 - undefined. Each event from result will contain one of the given states. |
Luna-Account-Id required | string <uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. Specify an account ID to be noticed about events in the account. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
from luna3.sender.wsclient import LunaWSClient senderAPI = LunaWSClient(origin="http://127.0.0.1:5080", api=2, accountId="8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a") # Note filtering by gender! with senderAPI.connect(gender=1) as ws: for _ in range(3): resp = ws.recv() print(resp)
{- "event": {
- "face_attributes": {
- "attribute_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "basic_attributes": {
- "age": 50,
- "gender": 0,
- "ethnicities": {
- "estimations": {
- "african_american": 1.92238889737406e-12,
- "asian": 0.954671621322632,
- "caucasian": 0.045328326523304,
- "indian": 7.65100649502415e-10
}, - "predominant_ethnicity": "asian"
}
}, - "score": 1,
- "url": "/0/attributes/24d405ce-bc56-4bf7-98e1-bdc962b4cf34",
- "samples": [
- "a3e8716f-70dc-42ad-8428-7a552e800a37"
]
}, - "body_attributes": {
- "score": 1,
- "samples": [
- "a3e8716f-70dc-42ad-8428-7a552e800a37"
]
}, - "source": "3rd Avenue",
- "stream_id": "string",
- "tags": [
- "tag1",
- "tag2"
], - "event_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "/0/events/24d405ce-bc56-4bf7-98e1-bdc962b4cf34",
- "matches": [
- {
- "label": "good guys",
- "candidates": [
- {
- "face": {
- "face_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
- "external_id": "2xQ2gprbMUePw1s9gw9fvA==",
- "account_id": "904e635f-3a47-4832-b4d6-d2d72ba78451",
- "user_data": "fox1991",
- "create_time": "2021-08-18T02:43:37.196724+03:00",
- "lists": [
- "429b0e78-4616-426a-b57f-02baa72d638d",
- "6d037c33-31ec-4d73-b3b3-ec80b09446c2"
], - "event_id": "f9687459-986b-406d-9c1f-0d6289be5256"
}, - "similarity": 0.5
}
]
}, - {
- "label": "bad guys",
- "candidates": [
- {
- "event": {
- "event_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c7",
- "external_id": "2xQ2gprbMUePw1s9gw9fvA==",
- "user_data": "fox1991",
- "create_time": "2021-06-18T02:44:58.653485+03:00",
- "handler_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c7",
- "source": "426542d6-5509-4e5b-8a01-e2abd5c0a8c7"
}, - "similarity": 0.3
}
]
}
], - "external_id": "external id",
- "user_data": "some event",
- "location": {
- "city": "Moscow",
- "area": "CAO",
- "district": "mitino",
- "street": "schepkina",
- "house_number": "1/2str3",
- "geo_position": {
- "longitude": 36.616,
- "latitude": 55.752
}
}, - "detections": [
- {
- "filename": "penelope.jpeg",
- "samples": {
- "face": {
- "sample_id": "b668c4a5-2191-476e-a261-3b4f9ce2e25e",
- "detection": {
- "attributes": {
- "liveness": {
- "prediction": "spoof",
- "estimations": {
- "score": 0.5108324766,
- "quality": 0.7190976739
}
}, - "deepfake": {
- "prediction": "fake",
- "score": 0.5108324766
}, - "face_occlusion": {
- "prediction": 0,
- "estimations": {
- "overall_score": 0.01,
- "hair_score": 0.02,
- "lower_face_score": 0.012,
- "nose_score": 0.002,
- "mouth_score": 0.003,
- "forehead_score": 0.012,
- "left_eye_score": 0.032,
- "right_eye_score": 0.021
}, - "face_occlusion": {
- "lower_face_occluded": 0,
- "mouth_occluded": 0,
- "nose_occluded": 0,
- "left_eye_occluded": 0,
- "right_eye_occluded": 0,
- "forehead_occluded": 0
}
}, - "mouth_attributes": {
- "occluded": 0,
- "opened": 0.121500025545354,
- "score": 0.999999165534973,
- "smile": 0
}, - "eyes_attributes": {
- "left_eye": {
- "iris_landmarks": [
- [
- 92,
- 92
], - [
- 92,
- 92
], - [
- 93,
- 93
], - [
- 93,
- 93
], - [
- 94,
- 94
], - [
- 95,
- 95
], - [
- 96,
- 96
], - [
- 98,
- 98
], - [
- 99,
- 99
], - [
- 100,
- 100
], - [
- 101,
- 101
], - [
- 102,
- 102
], - [
- 103,
- 103
], - [
- 104,
- 104
], - [
- 105,
- 105
], - [
- 105,
- 105
], - [
- 105,
- 105
], - [
- 105,
- 105
], - [
- 105,
- 105
], - [
- 104,
- 104
], - [
- 103,
- 103
], - [
- 102,
- 102
], - [
- 101,
- 101
], - [
- 100,
- 100
], - [
- 99,
- 99
], - [
- 98,
- 98
], - [
- 97,
- 97
], - [
- 96,
- 96
], - [
- 95,
- 95
], - [
- 94,
- 94
], - [
- 93,
- 93
], - [
- 93,
- 93
]
], - "state": "open"
}, - "right_eye": {
- "iris_landmarks": [
- [
- 152,
- 152
], - [
- 153,
- 153
], - [
- 153,
- 153
], - [
- 154,
- 154
], - [
- 154,
- 154
], - [
- 155,
- 155
], - [
- 157,
- 157
], - [
- 158,
- 158
], - [
- 159,
- 159
], - [
- 161,
- 161
], - [
- 162,
- 162
], - [
- 163,
- 163
], - [
- 164,
- 164
], - [
- 165,
- 165
], - [
- 166,
- 166
], - [
- 166,
- 166
], - [
- 166,
- 166
], - [
- 166,
- 166
], - [
- 166,
- 166
], - [
- 165,
- 165
], - [
- 164,
- 164
], - [
- 163,
- 163
], - [
- 162,
- 162
], - [
- 161,
- 161
], - [
- 159,
- 159
], - [
- 158,
- 158
], - [
- 158,
- 158
], - [
- 157,
- 157
], - [
- 156,
- 156
], - [
- 154,
- 154
], - [
- 154,
- 154
], - [
- 153,
- 153
]
], - "state": "open"
}
}, - "emotions": {
- "estimations": {
- "anger": 0.00894705578684807,
- "disgust": 0.00000965219624049496,
- "fear": 0.00121302821207792,
- "happiness": 0.00129503419157118,
- "neutral": 0.986027479171753,
- "sadness": 0.00187553185969591,
- "surprise": 0.000632198702078313
}, - "predominant_emotion": "neutral"
}, - "mask": {
- "estimations": {
- "medical_mask": 0.7108324766,
- "missing": 0.0700698048,
- "occluded": 0.2190976739
}, - "predominant_mask": "medical_mask"
}, - "head_pose": {
- "pitch": 18.6827487945557,
- "roll": -10.3542232513428,
- "yaw": 15.4102487564087
}, - "gaze": {
- "pitch": 10.7074518203735,
- "yaw": -14.6733160018921
}, - "glasses": {
- "glasses": "no_glasses"
}
}, - "quality": {
- "light": 0.87,
- "dark": 0.13,
- "illumination": 0.82,
- "blurriness": 0.2,
- "specularity": 0.84
}, - "rect": {
- "height": 240,
- "width": 209,
- "x": 170,
- "y": 198
}, - "landmarks5": [
- [
- 23,
- 72
], - [
- 82,
- 71
], - [
- 42,
- 114
], - [
- 29,
- 140
], - [
- 79,
- 138
]
], - "landmarks68": [
- [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
], - [
- 12,
- 13
]
], - "face_quality": {
- "status": 0,
- "checks": [
- {
- "name": "image_format",
- "object_value": "JPEG",
- "threshold_value": [
- "JPEG",
- "JPEG2000",
- "PNG"
], - "result": 1
}, - {
- "name": "illumination_quality",
- "object_value": 0.6005162000656128,
- "threshold_value": {
- "min": 0.3,
- "max": 1
}, - "result": 1
}, - {
- "name": "specularity_quality",
- "object_value": 0.7662366628646851,
- "threshold_value": {
- "min": 0.3,
- "max": 1
}, - "result": 1
}, - {
- "name": "blurriness_quality",
- "object_value": 0.9429352283477783,
- "threshold_value": {
- "min": 0.61,
- "max": 1
}, - "result": 1
}, - {
- "name": "dark_quality",
- "object_value": 0.9020983576774597,
- "threshold_value": {
- "min": 0.5,
- "max": 1
}, - "result": 1
}, - {
- "name": "light_quality",
- "object_value": 0.7881984114646912,
- "threshold_value": {
- "min": 0.57,
- "max": 1
}, - "result": 1
}, - {
- "name": "head_yaw",
- "object_value": 2.818983316421509,
- "threshold_value": {
- "min": -5,
- "max": 5
}, - "result": 1
}, - {
- "name": "head_pitch",
- "object_value": 3.816443920135498,
- "threshold_value": {
- "min": -5,
- "max": 5
}, - "result": 1
}, - {
- "name": "head_roll",
- "object_value": 5.434040069580078,
- "threshold_value": {
- "min": -8,
- "max": 8
}, - "result": 1
}, - {
- "name": "gaze_yaw",
- "object_value": -3.773012399673462,
- "threshold_value": {
- "min": -5,
- "max": 5
}, - "result": 1
}, - {
- "name": "gaze_pitch",
- "object_value": 0.7140519022941589,
- "threshold_value": {
- "min": -5,
- "max": 5
}, - "result": 1
}, - {
- "name": "mouth_smiling",
- "object_value": 0.000290759839117527,
- "threshold_value": {
- "min": 0,
- "max": 0.5
}, - "result": 1
}, - {
- "name": "mouth_occluded",
- "object_value": 0.00009619363845558837,
- "threshold_value": {
- "min": 0,
- "max": 0.3
}, - "result": 1
}, - {
- "name": "mouth_open",
- "object_value": 0.6226108074188232,
- "threshold_value": {
- "min": 0,
- "max": 0.64
}, - "result": 1
}, - {
- "name": "glasses",
- "object_value": "no_glasses",
- "threshold_value": [
- "no_glasses",
- "eyeglasses"
], - "result": 1
}, - {
- "name": "left_eye",
- "object_value": "open",
- "threshold_value": [
- "open"
], - "result": 1
}, - {
- "name": "right_eye",
- "object_value": "open",
- "threshold_value": [
- "open"
], - "result": 1
}, - {
- "name": "head_horizontal_center",
- "object_value": 0.51,
- "threshold_value": {
- "min": 0.45,
- "max": 0.55
}, - "result": 1
}, - {
- "name": "head_vertical_center",
- "object_value": 0.51,
- "threshold_value": {
- "min": 0.3,
- "max": 0.5
}, - "result": 1
}, - {
- "name": "head_width",
- "object_value": 0.61,
- "threshold_value": {
- "min": 0.5,
- "max": 0.75
}, - "result": 1
}, - {
- "name": "head_height",
- "object_value": 0.71,
- "threshold_value": {
- "min": 0.6,
- "max": 0.9
}, - "result": 1
}, - {
- "name": "eye_distance",
- "object_value": 110,
- "threshold_value": {
- "min": 90,
- "max": null
}, - "result": 1
}, - {
- "name": "image_width",
- "object_value": 1000,
- "threshold_value": {
- "min": 200,
- "max": 1100
}, - "result": 1
}, - {
- "name": "image_height",
- "object_value": 2000,
- "threshold_value": {
- "min": 200,
- "max": 1100
}, - "result": 1
}, - {
- "name": "aspect_ratio",
- "object_value": 0.5,
- "threshold_value": {
- "min": 0.1,
- "max": 1
}, - "result": 1
}, - {
- "name": "face_width",
- "object_value": 500,
- "threshold_value": {
- "min": 400,
- "max": 600
}, - "result": 1
}, - {
- "name": "face_height",
- "object_value": 500,
- "threshold_value": {
- "min": 400,
- "max": 600
}, - "result": 1
}, - {
- "name": "indent_left",
- "object_value": 100,
- "threshold_value": {
- "min": 10,
- "max": 500
}, - "result": 1
}, - {
- "name": "indent_right",
- "object_value": 100,
- "threshold_value": {
- "min": 10,
- "max": 500
}, - "result": 1
}, - {
- "name": "indent_upper",
- "object_value": 100,
- "threshold_value": {
- "min": 10,
- "max": 500
}, - "result": 1
}, - {
- "name": "indent_lower",
- "object_value": 100,
- "threshold_value": {
- "min": 10,
- "max": 500
}, - "result": 1
}, - {
- "name": "image_size",
- "object_value": 100500,
- "threshold_value": {
- "min": 10,
- "max": 100600
}, - "result": 1
}, - {
- "name": "eyebrows_state",
- "object_value": "neutral",
- "threshold_value": [
- "neutral"
], - "result": 1
}, - {
- "name": "smile_properties",
- "object_value": "smile_lips",
- "threshold_value": [
- "none"
], - "result": 0
}, - {
- "name": "headwear_type",
- "object_value": "hat",
- "threshold_value": [
- "none"
], - "result": 0
}, - {
- "name": "natural_light",
- "object_value": 1,
- "threshold_value": 1,
- "result": 1
}, - {
- "name": "radial_distortion",
- "object_value": 0,
- "threshold_value": 0,
- "result": 1
}, - {
- "name": "red_eyes",
- "object_value": 0,
- "threshold_value": 0,
- "result": 1
}, - {
- "name": "face_color_type",
- "object_value": "color",
- "threshold_value": [
- "color"
], - "result": 1
}, - {
- "name": "illumination_uniformity",
- "object_value": 0.6305162000656128,
- "threshold_value": {
- "min": 0.5,
- "max": 1
}, - "result": 1
}, - {
- "name": "dynamic_range",
- "object_value": 0.8605162000656128,
- "threshold_value": {
- "min": 0.5,
- "max": 1
}, - "result": 1
}, - {
- "name": "background_lightness",
- "object_value": 0.5780888795852661,
- "threshold_value": {
- "min": 0.2,
- "max": 1
}, - "result": 1
}, - {
- "name": "background_uniformity",
- "object_value": 0.8874394297599792,
- "threshold_value": {
- "min": 0.5,
- "max": 1
}, - "result": 1
}, - {
- "name": "shoulders_position",
- "object_value": "parallel",
- "threshold_value": [
- "parallel"
], - "result": 1
}
]
}
}, - "url": "/0/samples/a16c8b6c-2818-4bae-9fd5-65acc8d4bb5c"
}, - "body": {
- "sample_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "detection": {
- "rect": {
- "height": 240,
- "width": 209,
- "x": 170,
- "y": 198
}, - "attributes": {
- "basic_attributes": {
- "apparent_age": 0,
- "apparent_gender": 0
}, - "upper_body": {
- "headwear": {
- "state": 0
}, - "sleeve": {
- "length": "short"
}, - "upper_clothing": {
- "colors": [
- "black"
]
}
}, - "accessories": {
- "backpack": {
- "state": 0
}
}
}
}, - "url": "/0/samples/a16c8b6c-2818-4bae-9fd5-65acc8d4bb5c"
}
}, - "detect_time": "2021-06-18T02:44:58.653485+03:00",
- "detect_ts": 123.456,
- "image_origin": "/6/images/b668c4a5-2191-476e-a261-3b4f9ce2e25e"
}
], - "aggregate_estimations": {
- "face": {
- "attributes": {
- "liveness": {
- "prediction": "spoof",
- "estimations": {
- "quality": 0.2,
- "score": 0.7
}
}, - "deepfake": {
- "prediction": "fake",
- "score": 0.3
}, - "mask": {
- "estimations": {
- "medical_mask": 1,
- "missing": 1,
- "occluded": 1
}, - "predominant_mask": "medical_mask",
- "face_occlusion": {
- "predominant_occlusion": "full",
- "estimations": {
- "full": 1,
- "clear": 1,
- "correct": 1,
- "partially": 1,
- "mouth": 1,
- "chin": 1
}
}
}, - "emotions": {
- "estimations": {
- "anger": 1,
- "disgust": 1,
- "fear": 1,
- "happiness": 1,
- "neutral": 1,
- "sadness": 1,
- "surprise": 1
}, - "predominant_emotion": "surprise"
}, - "face_occlusion": {
- "prediction": 0,
- "estimations": {
- "overall_score": 0.01,
- "hair_score": 0.02,
- "lower_face_score": 0.012,
- "nose_score": 0.002,
- "mouth_score": 0.003,
- "forehead_score": 0.012,
- "left_eye_score": 0.032,
- "right_eye_score": 0.021
}, - "face_occlusion": {
- "lower_face_occluded": 0,
- "mouth_occluded": 0,
- "nose_occluded": 0,
- "left_eye_occluded": 0,
- "right_eye_occluded": 0,
- "forehead_occluded": 0
}
}
}
}, - "body": {
- "attributes": {
- "basic_attributes": {
- "apparent_age": 0,
- "apparent_gender": 0
}, - "upper_body": {
- "headwear": {
- "state": 0
}, - "sleeve": {
- "length": "short"
}, - "upper_clothing": {
- "colors": [
- "black"
]
}
}, - "accessories": {
- "backpack": {
- "state": 0
}
}
}
}
}, - "track_id": "useful_track_id_number_1",
- "face": {
- "external_id": "external id",
- "face_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "string",
- "lists": [
- "557d54ec-29ad-4f3c-93b4-c9092ef12515"
], - "user_data": "face of person",
- "avatar": "",
- "event_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515"
}, - "meta": {
- "key": "value"
}
}, - "handler_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "event-create-time": "2019-08-24T14:15:22Z",
- "event-end-time": "2019-08-24T14:15:22Z",
- "Luna-Request-id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a"
}
event_type required | string Example: event_type=some_event_type General event type to subscribe. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account_id | string Example: account_id=8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a General event account to subscribe. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
* (event.path.to.field__operator:type) | string Example: event.field_1__gt:numeric=36.6&event.field_2.field_3__in=value,none&event.field_4:integer=5 User-defined general event filters. Parameter name pattern: Path to field is an event json field path. To navigate through nested objects the dot (.) is used. Field comparison operator is optional one of Field data type is optional one of Allowed usage of filters is:
|
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
from luna3.sender.wsclient import LunaWSClient senderAPI = LunaWSClient(origin="http://127.0.0.1:5080", api=2) with senderAPI.generalConnect(eventType="some_event_type") as ws: for _ in range(3): resp = ws.recv() print(resp)
{- "event": { },
- "event_type": "string",
- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "event-create-time": "2019-08-24T14:15:22Z",
- "event-end-time": "2019-08-24T14:15:22Z"
}
Publish events generated by the user.
Luna-Account-Id required | string <uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. Specify an account ID to be noticed about events in the account. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
Content-Type | string Value: "application/json" Content type is application/json. |
events required | Array of objects non-empty User generated events to be published. |
handler_id required | string Event handler ID. |
event_create_time required | string Event creation time. |
event_end_time required | string Event end time. |
{- "events": [
- { }
], - "handler_id": "string",
- "event_create_time": "string",
- "event_end_time": "string"
}
{- "error_code": 11027,
- "desc": "Bad/incomplete input data",
- "detail": "Failed to validate input json. Path: 'handler_id', message: 'field required'",
}
Publish events generated by the user.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
Content-Type | string Value: "application/json" Content type is application/json. |
event required | object Raw event. |
event_type required | string General event type. |
account_id | string Event account ID. |
event_create_time | string Event creation time. |
event_end_time | string Event end time. |
{- "event": { },
- "event_type": "string",
- "account_id": "string",
- "event_create_time": "string",
- "event_end_time": "string"
}
{- "error_code": 11027,
- "desc": "Bad/incomplete input data",
- "detail": "Failed to validate input json. Path: 'event_type', message: 'field required'",
}
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^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
Accept required | string (accept_docs_handler) 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^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
{- "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^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
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^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
{- "plugins": [
- {
- "name": "foo",
- "running": 1
}
]
}
Get statistics of success and failed requests to the service in prometheus format.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
# 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.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format is "{timestamp},{uuid}". It will be returned with response. |
{- "execution_time": 0.123
}