Download OpenAPI specification:Download
VisionLabs LUNA Streams API. The API version is 1.
Service is intended for creation and management streams. "Stream" is an user logical entity.
Default port: 5160.
OpenAPI specification is the only valid document providing up-to-date information about the service LUNA Streams.
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 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 in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "Version": {
- "api": 1,
- "major": 0,
- "minor": 0,
- "patch": 0
}
}
Create stream.
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 in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
account_id required | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Stream account ID for authentication in LUNA PLATFORM. |
name | string <= 128 characters Default: "" Stream name. |
description | string <= 512 characters Default: "" Stream description. |
required | any (stream_data) Stream setting parameters. |
required | object (stream_event_handler) Parameters related to sending the best shots to LUNA PLATFORM and processing them using handlers. |
object (stream_policies) Stream processing parameters. | |
object (location_to_be_created) Stream location parameters. | |
object (stream_autorestart) Stream autorestart parameters. | |
status | string Default: "pending" Enum: "pending" "pause" Stream processing initial status. |
group_name | string (group_name) ^[a-zA-Z0-9_\-]{1,128}$ Stream group name. |
{- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "name": "",
- "description": "",
- "data": {
- "type": "udp",
- "roi": [
- 0,
- 0,
- 0,
- 0
], - "droi": [
- 0,
- 0,
- 0,
- 0
], - "rotation": 0,
- "preferred_program_stream_frame_width": 800,
- "endless": true
}, - "event_handler": {
- "api_version": 6,
- "bestshot_handler": {
- "handler_id": "ee4c42b6-23ae-410e-a2aa-a4220e64ba4b"
}, - "detection_handler": {
- "handler_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6"
}, - "authorization": {
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k"
}
}, - "policies": {
- "sending": {
- "time_period_of_searching": -1,
- "silent_period": 0,
- "type": "sec",
- "number_of_bestshots_to_send": 1,
- "send_only_full_set": true,
- "delete_track_after_sending": false
}, - "primary_track_policy": {
- "use_primary_track_policy": false,
- "best_shot_min_size": 70,
- "best_shot_proper_size": 140
}, - "liveness": {
- "use_shoulders_liveness_filtration": false,
- "use_mask_liveness_filtration": false,
- "use_flying_faces_liveness_filtration": false,
- "liveness_mode": 0,
- "number_of_liveness_checks": 10,
- "liveness_threshold": 0.6,
- "livenesses_weights": [
- 0.05,
- 0.45,
- 0.5
], - "mask_backgrounds_count": 300
}, - "filtering": {
- "min_score": 0.5187,
- "detection_yaw_threshold": 40,
- "detection_pitch_threshold": 40,
- "detection_roll_threshold": 30,
- "yaw_number": 1,
- "yaw_collection_mode": false,
- "mouth_occlusion_threshold": 0.1,
- "min_body_size_threshold": 0.1
}, - "frame_processing_mode": "auto",
- "real_time_mode_fps": 0,
- "ffmpeg_threads_number": 0,
- "healthcheck": {
- "max_error_count": 10,
- "period": 3600,
- "retry_delay": 5
}
}, - "location": {
- "city": "Moscow",
- "area": "Central",
- "district": "Basmanny",
- "street": "Podsosensky lane",
- "house_number": "23 bldg.3",
- "geo_position": {
- "longitude": 36.616,
- "latitude": 55.752
}
}, - "autorestart": {
- "restart": 0,
- "attempt_count": 10,
- "delay": 60
}, - "status": "pending",
- "group_name": "hd_stream_2"
}
{- "stream_id": "b5d6fd45-fcca-453d-ac05-3e594054b813",
- "version": 1
}
Get streams according to filters. The results are sorted by stream creation order, the oldest streams shown first.
account_id | string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: account_id=8950722f-3fd4-4223-b48f-03f95f0e8dfb Account ID. |
stream_ids | Array of strings <uuid> (stream_id) Example: stream_ids=ae09126e-70a6-49c7-923f-df2320f08639,68b363eb-600a-4e72-afb3-8c4196e385ce Stream ID filter. Only streams with the specified ids will be returned in the response. |
names | Array of strings (stream_name) Example: names=name1,name2 Stream name filter. Only streams with the specified names will be returned in the response. |
reference | string (stream_reference) <= 512 characters Example: reference=https://upload.wikimedia.org/wikipedia/commons/2xQ2gprbMUePw1s9gw9fvA== Stream reference filter. Only streams with the specified reference will be returned in the response. |
statuses | Array of strings (stream_status) Items Enum: "pending" "in_progress" "done" "pause" "restart" "cancel" "failure" "handler_lost" "not_found" Example: statuses=pending,pause Stream status filter - comma-separated list of status values. Only streams with the specified statuses will be returned in the response. |
create_time__gte | string <date-time> |