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 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 ("timestamp,UUID"). It will be returned with response. |
{- "Version": {
- "api": 1,
- "major": 0,
- "minor": 0,
- "patch": 0
}
}
stream_id required | string <uuid> (stream_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: stream_id=557d54ec-29ad-4f3c-93b4-c9092ef12515 Stream ID for events you need to subscribe to. |
account_id | string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: account_id=557d54ec-29ad-4f3c-93b4-c9092ef12515 Account id of stream owner. |
import asyncio import websockets async def main(): uri = "ws://127.0.0.1:5240/1/ws?stream_id=70c75b04-1ec8-4aa1-930c-ddad9e47b54b" # Note filtering by gender! async with websockets.connect(uri) as websocket: while True: data = await websocket.recv() print(data) asyncio.run(main())
{- "stream_status": "in_progress",
- "error": "decoding error",
- "analytics_results": {
- "<analytics_name>": {
- "error": "decoding error"
}
}
}
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 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 ("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
Accept | string Value: "application/json" Preferred response content type |
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 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 ("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 <timestamp,uuid> ^[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 ("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,
- "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 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 ("timestamp,UUID"). It will be returned with response. |
{- "plugins": [
- {
- "name": "foo",
- "running": 1
}
]
}
Request for video analysis based on the specified analytics parameters eg facial estimations.
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 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 ("timestamp,UUID"). It will be returned with response. |
Content-Type | string Value: "application/json" |
required | object Video information. |
required | Array of any A list of parameters for comprehensive video analytics. |
{- "video": {
- "orientation": {
- "angle": 0
}, - "pts": {
- "start_time": null
}, - "error_handling": {
- "action": "fail"
}
}, - "analytics": [
- {
- "name": "people_count",
- "targets": [ ],
- "parameters": {
- "roi": {
- "x": 3327,
- "y": 3327,
- "width": 3327,
- "height": 3327,
- "mode": "abs"
}, - "droi": null,
- "rate": {
- "period": 10,
- "unit": "frame"
}, - "probe_count": 3,
- "image_retain_policy": {
- "mimetype": "PNG",
- "quality": 1,
- "max_size": 640
}, - "people_count_threshold": 1
}
}
]
}
{- "video_data": {
- "frames_count": 0,
- "frame_rate": 0,
- "duration": 0,
- "processed_parts": [
- {
- "start_offset": 0,
- "end_offset": 0
}
], - "error_count": 0
}, - "analytics": [
- {
- "name": "people_count",
- "result": {
- "crowd": {
- "events": [
- {
- "event_id": "string",
- "track_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "people_count": 0,
- "video_segment": {
- "start_time_offset": 0.123,
- "end_time_offset": 1.234
}, - "frames_estimations": [
- {
- "people_count": 0,
- "time_offset": 1.234,
- "people_coordinates": [
- [
- 64,
- 128
], - [
- 491,
- 375
]
]
}
], - "overview": {
- "time_offset": 1.234,
- "image": "string",
- "people_coordinates": [
- [
- 530,
- 201
], - [
- 272,
- 191
]
]
}
}
]
}
}
}
]
}
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 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 ("timestamp,UUID"). It will be returned with response. |
{- "execution_time": 0.123
}