LUNA Streams API (v.0.5.9)

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:

  • By documentation generation tools to visualize the API.
  • By code generation tools.

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".

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

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.

Responses

Response samples

Content type
{
  • "Version": {
    }
}

streams

create stream

Create stream.

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

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.

Request Body schema: application/json
One of
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.

Responses

Request samples

Content type
application/json
Example
{
  • "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "name": "",
  • "description": "",
  • "data": {},
  • "event_handler": {
    },
  • "policies": {
    },
  • "location": {
    },
  • "autorestart": {
    },
  • "status": "pending",
  • "group_name": "hd_stream_2"
}

Response samples

Content type
application/json
{
  • "stream_id": "b5d6fd45-fcca-453d-ac05-3e594054b813",
  • "version": 1
}

get streams

Get streams according to filters. The results are sorted by stream creation order, the oldest streams shown first.

query Parameters
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> </