luna-video-manager API (v.0.2.6)

Download OpenAPI specification:Download

'VisionLabs luna-video-manager'

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

Responses

Response samples

Content type
{
  • "Version": {
    }
}

documents

get openapi documentation

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

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

Responses

Response samples

Content type
application/json
{}

get development manual

Get sphinx documentation - Development Manual. After the request you will be redirected to the page /docs/dev/index.html

header Parameters
Accept
string
Enum: "application/json" "application/msgpack"

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.

Responses

Response samples

Content type
application/json
{}

config

get service configuration

Get service configuration. Passwords and tokens will be hidden in the response.

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

Responses

Response samples

Content type
{
  • "INFLUX_MONITORING": {
    }
}

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

Content type is application/json.

Luna-Account-Id
required
string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Account ID.

Request Body schema: application/json
Any of
name
string <= 128 characters ^[a-zA-Z0-9_\-]{0,128}$
Default: ""

Stream name.

description
string <= 512 characters
Default: ""

Stream description.

required
object (stream_data)
object (location_to_be_created)

Stream location parameters.

object (stream_autorestart)

Stream autorestart parameters.

required
Array of objects (analytics) non-empty

list of analytics with its parameters

group_name
string (group_name) ^[a-zA-Z0-9_\-]{1,128}$

Stream group name.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "",
  • "description": "",
  • "data": {},
  • "location": {
    },
  • "autorestart": {
    },
  • "analytics": [
    ],
  • "group_name": "hd_stream_2"
}

Response samples

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

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.

stream_id__gte
string <uuid> (stream_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: stream_id__gte=ae09126e-70a6-49c7-923f-df2320f08639

Stream id lower included bound.

stream_id__lt
string <uuid> (stream_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: stream_id__lt=ae09126e-70a6-49c7-923f-df2320f08639

Stream id upper excluded bound.

names
Array of strings (stream_name) [ items <= 128 characters ^[a-zA-Z0-9_\-]{0,128}$ ]
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 integers (stream_status)
Items Enum: 0 1 2 3 4 5
Example: statuses=pending,stop

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> (time)
Example: create_time__gte=2021-09-21T11:11:41.674Z

Entity create time lower including bound filter in RFC 3339 format. Only entities with the creation time greater than or equal to the specified boundary will be returned in the response.

create_time__lt
string <date-time> (time)
Example: create_time__lt=2021-09-21T19:11:41.674Z

Entity create time upper excluding bound filter in RFC 3339 format. Only entities with the creation time lower than the specified boundary will be returned in the response.

agent_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: agent_id=557d54ec-29ad-4f3c-93b4-c9092ef12515

Agent ID filter. Only streams associated with the specified id will be returned in the response.

group_name
string (group_name) ^[a-zA-Z0-9_\-]{1,128}$
Example: group_name=group1

Group name filter. Only groups with the specified names will be returned in the response.

order
string
Default: "desc"
Enum: "asc" "desc"

The sort order.

By default, the results will be sorted in order of stream appearance in the database (may not match stream create_time). If "desc" is set, the newest streams will be shown first. If "asc" is set, the oldest streams will be shown first.

But if some stream ID range filters specified (<entity>_id__gte or <entity>_id__lt), the results will be sorted by ID.

page
integer >= 1
Default: 1

Page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

Number of items on page.

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

Responses

Response samples

Content type
application/json
{
  • "streams": [
    ]
}

delete streams

Delete streams matching specified filters.

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.

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

Request Body schema: application/json
stream_ids
required
Array of strings <uuid> (stream_id) <= 1000 items

Stream ID filter.

Responses

Request samples

Content type
application/json
{
  • "stream_ids": [
    ]
}

Response samples

Content type
application/json
{}

count streams

Count streams according to the filters.

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) [ items <= 128 characters ^[a-zA-Z0-9_\-]{0,128}$ ]
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 integers (stream_status)
Items Enum: 0 1 2 3 4 5
Example: statuses=pending,stop

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> (time)
Example: create_time__gte=2021-09-21T11:11:41.674Z

Entity create time lower including bound filter in RFC 3339 format. Only entities with the creation time greater than or equal to the specified boundary will be returned in the response.

create_time__lt
string <date-time> (time)
Example: create_time__lt=2021-09-21T19:11:41.674Z

Entity create time upper excluding bound filter in RFC 3339 format. Only entities with the creation time lower than the specified boundary will be returned in the response.

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

Responses

Response samples

Content type
application/json
{
  • "streams_count": 146
}

get stream

Get the stream by ID.

path Parameters
stream_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the stream (stream_id received in the "create stream" request).

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.

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

Responses

Response samples

Content type
application/json
{
  • "stream_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
  • "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "name": "",
  • "description": "some description",
  • "data": {},
  • "location": {
    },
  • "autorestart": {
    },
  • "version": 1,
  • "create_time": "2018-08-11T09:11:41.674Z",
  • "status": 0,
  • "last_error": null,
  • "groups": [
    ],
  • "analytics": [
    ]
}

head stream

Check if stream exists.

path Parameters
stream_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the stream (stream_id received in the "create stream" request).

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.

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

Responses

Response samples

Content type
application/json
{}

put stream

Update existing stream. You should specify all the fields required for the stream in the request.

path Parameters
stream_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the stream (stream_id received in the "create stream" request).

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

Content type is application/json.

Luna-Account-Id
required
string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Account ID.

Request Body schema: application/json
Any of
name
string <= 128 characters ^[a-zA-Z0-9_\-]{0,128}$
Default: ""

Stream name.

description
string <= 512 characters
Default: ""

Stream description.

required
object (stream_data)
object (location_to_be_created)

Stream location parameters.

object (stream_autorestart)

Stream autorestart parameters.

required
Array of objects (analytics) non-empty

list of analytics with its parameters

group_name
string (group_name) ^[a-zA-Z0-9_\-]{1,128}$

Stream group name.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "",
  • "description": "",
  • "data": {},
  • "location": {
    },
  • "autorestart": {
    },
  • "analytics": [
    ],
  • "group_name": "hd_stream_2"
}

Response samples

Content type
application/json
{
  • "stream_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
  • "version": 1
}

patch stream

Pause/unpause stream

path Parameters
stream_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the stream (stream_id received in the "create stream" request).

query Parameters
action
required
string
Enum: "stop" "resume"

stop - stop stream processing, stream status will be switched to stop resume - resume stream processing, stream status will be switched to pending

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

Responses

Response samples

Content type
application/json
{}

remove stream

Remove the stream by ID.

path Parameters
stream_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the stream (stream_id received in the "create stream" request).

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.

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

Responses

Response samples

Content type
application/json
{}

stream events ws handshake

Stream ws events handshake. The resource is designed to receive realtime events from analytics.

Attention!

Subscription to events occurs via WebSocket. Messages sent by ws you can view in callback section. Connection supports autoping.

path Parameters
stream_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the stream (stream_id received in the "create stream" request).

header Parameters
Luna-Account-Id
required
string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Account ID.

Responses

Request samples

import asyncio
import websockets

async def main():
    uri = "ws://127.0.0.1:5230/1/streams/70c75b04-1ec8-4aa1-930c-ddad9e47b54b/ws"  # Note filtering by gender!
    async with websockets.connect(uri, extra_headers={"Luna-Account-Id": "70c75b04-1ec8-4aa1-930c-ddad9e47b54b") as websocket:
        while True:
            data = await websocket.recv()
            print(data)


asyncio.run(main())

Response samples

Content type
application/json
Example
{
  • "stream_status": "in_progress",
  • "error": null,
  • "analytics_results": {
    }
}

streams logs

get streams logs

Get streams logs according to filters. The results are sorted by log creation order, the new streams logs 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.

statuses
Array of integers (stream_status)
Items Enum: 0 1 2 3 4 5
Example: statuses=pending,stop

Stream status filter - comma-separated list of status values. Only streams with the specified statuses will be returned in the response.

targets
Array of strings
Default: ["stream_id","status","error","log_time"]
Items Enum: "stream_id" "status" "error" "log_time"
Example: targets=status

List of comma-separated stream logs targets.

log_time__lt
string <date-time> (time)
Example: log_time__lt=2021-09-21T19:11:41.674Z

Stream log record time upper excluding bound filter in RFC 3339 format. Only stream logs with the record time lower than the specified boundary will be returned in the response.

log_time__gte
string <date-time> (time)
Example: log_time__gte=2021-09-21T11:11:41.674Z

Stream log record time lower including bound filter in RFC 3339 format. Only stream log with the record time greater than or equal to the specified boundary will be returned in the response.

page
integer >= 1
Default: 1

Page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

Number of items on page.

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

Responses

Response samples

Content type
application/json
{
  • "logs": [
    ]
}

delete stream logs

Delete streams logs older than specified date excluding last log entry.

Also you can run streams logs auto deletion by using LUNA_STREAMS_LOGS_CLEAR_INTERVAL setting. For more information see development documentation.

query Parameters
log_time__lt
string <date-time> (time)
Example: log_time__lt=2021-09-21T19:11:41.674Z

Stream log record time upper excluding bound filter in RFC 3339 format. Only stream logs with the record time lower than the specified boundary will be deleted.

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

Responses

Response samples

Content type
application/json
{
  • "deleted_count": 1000
}

streams group linker

attach (or detach) streams to a group

Attach (or detach) streams to a group.

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.

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

Content type is application/json.

Request Body schema: application/json
action
required
string
Enum: "attach" "detach"

Action to perform: attach or detach streams to group.

stream_ids
required
Array of strings <uuid> (uuid) <= 1000 items

Stream IDs.

group_id
required
string <uuid> (group_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...

Stream group ID.

Responses

Request samples

Content type
application/json
{
  • "action": "attach",
  • "stream_ids": [
    ],
  • "group_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6"
}

Response samples

Content type
application/json
Example
{}

groups

create group

Create group.

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

Content type is application/json.

Luna-Account-Id
required
string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Account ID.

Request Body schema: application/json
group_name
required
string (group_name) ^[a-zA-Z0-9_\-]{1,128}$

Stream group name.

description
string <= 256 characters
Default: ""

Stream group description.

Responses

Request samples

Content type
application/json
{
  • "group_name": "hd_stream_2",
  • "description": ""
}

Response samples

Content type
application/json
{
  • "group_id": "ee4c42b6-23ae-410e-a2aa-a4220e64ba4b"
}

get groups

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

query Parameters
group_ids
Array of strings <uuid> (group_id)
Example: group_ids=ae09126e-70a6-49c7-923f-df2320f08639,68b363eb-600a-4e72-afb3-8c4196e385ce

Group IDs.

group_names
Array of strings (group_name)
Example: group_names=group1,group2

Group names.

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.

page
integer >= 1
Default: 1

Page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

Number of items on page.

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

Responses

Response samples

Content type
application/json
{
  • "groups": [
    ]
}

get group count

Count of groups according to the filters.

query Parameters
group_ids
Array of strings <uuid> (group_id)
Example: group_ids=ae09126e-70a6-49c7-923f-df2320f08639,68b363eb-600a-4e72-afb3-8c4196e385ce

Group IDs.

group_names
Array of strings (group_name)
Example: group_names=group1,group2

Group names.

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.

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

Responses

Response samples

Content type
application/json
{
  • "groups_count": 7
}

get group

Get the group by name.

path Parameters
group_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the group (group_id received in the "create group" request).

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.

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

Responses

Response samples

Content type
application/json
{
  • "account_id": "ee4c42b6-23ae-410e-a2aa-a4220e64ba4b",
  • "group_name": "stream_group-1",
  • "group_id": "b5d6fd45-fcca-453d-ac05-3e594054b813",
  • "description": "default stream group",
  • "create_time": "2018-08-11T09:11:41.674Z"
}

update group

Update group fields: description

path Parameters
group_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the group (group_id received in the "create group" request).

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.

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

Content type is application/json.

Request Body schema: application/json
description
required
string <= 256 characters

Stream group description.

Responses

Request samples

Content type
application/json
{
  • "description": "old stream group"
}

Response samples

Content type
application/json
{}

remove group

Remove the group by name.

path Parameters
group_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the group (group_id received in the "create group" request).

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.

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

Responses

Response samples

Content type
application/json
{}

analytics

create analytic

Create analytic.

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

Content type is application/json.

Luna-Account-Id
required
string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Account ID.

Request Body schema: application/json
analytic_name
required
string (analytic_name) <= 36 characters ^[a-zA-Z0-9_\-]{1,36}$

Analytic name.

description
string <= 512 characters
Default: ""

Analytic description.

documentation
string (analytic_documentation)
Default: ""

Binary analytic documentation encoded in base64.

object (validation_schema)

Analytic parameters json validation schema.

Specified schema will be used for analytic parameters validation during stream creation request, if no validation schema is specified, validation will not performed. Validation schema must be presented as jsonschema (see json schema specification for details)

analytic_version
integer (analytic_version) >= 1
Default: 1
object (default_parameters)
Default: {}

Default parameters for the video analytic.

Responses

Request samples

Content type
application/json
{
  • "analytic_name": "some name",
  • "description": "",
  • "documentation": "",
  • "validation_schema": { },
  • "analytic_version": 1,
  • "default_parameters": { }
}

Response samples

Content type
application/json
{
  • "analytic_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6"
}

get analytics

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

query Parameters
analytic_ids
Array of strings <uuid> (analytic_id)
Example: analytic_ids=ae09126e-80a9-49c7-923f-df2320f08639,68b363eb-600a-4e72-afb3-8c4196e385ce

Analytics ID filter. Only analytics with the specified ids will be returned in the response.

analytic_id__gte
string <uuid> (analytic_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: analytic_id__gte=ae09126e-70a6-49c7-923f-df2320f08639

Analytic id lower included bound.

analytic_id__lt
string <uuid> (analytic_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: analytic_id__lt=ae09126e-70a6-49c7-923f-df2320f08639

Analytic id upper excluded bound.

create_time__lt
string <date-time> (time)
Example: create_time__lt=2021-09-21T19:11:41.674Z

Entity create time upper excluding bound filter in RFC 3339 format. Only entities with the creation time lower than the specified boundary will be returned in the response.

create_time__gte
string <date-time> (time)
Example: create_time__gte=2021-09-21T11:11:41.674Z

Entity create time lower including bound filter in RFC 3339 format. Only entities with the creation time greater than or equal to the specified boundary will be returned in the response.

names
Array of strings (analytic_name) [ items <= 36 characters ^[a-zA-Z0-9_\-]{1,36}$ ]
Example: names=name1,name2

Analytic name filter. Only streams with the specified names will be returned in the response.

order
string
Default: "desc"
Enum: "asc" "desc"

The sort order.

By default, the results will be sorted in order of stream appearance in the database (may not match stream create_time). If "desc" is set, the newest streams will be shown first. If "asc" is set, the oldest streams will be shown first.

But if some stream ID range filters specified (<entity>_id__gte or <entity>_id__lt), the results will be sorted by ID.

page
integer >= 1
Default: 1

Page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

Number of items on page.

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

Responses

Response samples

Content type
application/json
{
  • "analytics": [
    ]
}

delete analytics

Delete analytics matching specified filters.

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.

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

Request Body schema: application/json
analytic_ids
required
Array of strings <uuid> (analytic_id) <= 1000 items

Analytic ID filter.

Responses

Request samples

Content type
application/json
{
  • "analytic_ids": [
    ]
}

Response samples

Content type
application/json
{}

get analytic

Get the analytic by ID.

path Parameters
analytic_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the analytic (analytic_id received in the "create analytic" request).

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.

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

Responses

Response samples

Content type
application/json
{
  • "analytic_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
  • "analytic_name": "some name",
  • "description": "",
  • "analytic_version": 1,
  • "default_parameters": { },
  • "create_time": "2018-08-11T09:11:41.674Z",
  • "last_update_time": "2018-08-11T09:11:41.674Z",
  • "validation_schema": { }
}

head analytic

Check if analytic exists.

path Parameters
analytic_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the analytic (analytic_id received in the "create analytic" request).

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.

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

Responses

Response samples

Content type
application/json
{}

put analytic

Update existing analytic. You should specify all the fields required for the stream in the request.

path Parameters
analytic_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the analytic (analytic_id received in the "create analytic" request).

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

Content type is application/json.

Luna-Account-Id
required
string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Account ID.

Request Body schema: application/json
analytic_name
required
string (analytic_name) <= 36 characters ^[a-zA-Z0-9_\-]{1,36}$

Analytic name.

description
string <= 512 characters
Default: ""

Analytic description.

documentation
string (analytic_documentation)
Default: ""

Binary analytic documentation encoded in base64.

object (validation_schema)

Analytic parameters json validation schema.

Specified schema will be used for analytic parameters validation during stream creation request, if no validation schema is specified, validation will not performed. Validation schema must be presented as jsonschema (see json schema specification for details)

analytic_version
integer (analytic_version) >= 1
Default: 1
object (default_parameters)
Default: {}

Default parameters for the video analytic.

Responses

Request samples

Content type
application/json
{
  • "analytic_name": "some name",
  • "description": "",
  • "documentation": "",
  • "validation_schema": { },
  • "analytic_version": 1,
  • "default_parameters": { }
}

Response samples

Content type
application/json
{
  • "analytic_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
  • "version": 1
}

remove analytic

Remove the analytic by ID.

path Parameters
analytic_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the analytic (analytic_id received in the "create analytic" request).

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.

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

Responses

Response samples

Content type
application/json
{}

get analytic documentation

Get the analytic documentation by ID.

path Parameters
analytic_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the analytic (analytic_id received in the "create analytic" request).

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.

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 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: "text/html" "application/x-yaml"

Preferred response content type

Responses

Response samples

Content type
"string"

agents

register agent

register agent.

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

Content type is application/json.

Luna-Account-Id
required
string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Account ID.

Request Body schema: application/json
name
required
string (agent_name) [ 3 .. 128 ] characters ^[a-zA-Z0-9_\-]{3,128}$

Agent name.

description
string <= 512 characters
Default: ""

Analytic description.

max_stream_count
required
integer (agent_max_stream_count) >= 1

Max streams count for agent

analytic_names
required
Array of strings (analytic_names) non-empty [ items <= 36 characters ^[a-zA-Z0-9_\-]{1,36}$ ]

Analytics list.

port
required
integer (agent_port) [ 1 .. 65535 ]

agent listening port

api_version
required
integer >= 1

agent api version

Responses

Request samples

Content type
application/json
{
  • "name": "some name",
  • "description": "",
  • "max_stream_count": 10,
  • "analytic_names": [
    ],
  • "port": 1,
  • "api_version": 1
}

Response samples

Content type
application/json
{
  • "agent_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
  • "refresh_period": 5,
  • "alive_period": 30
}

get agents

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

query Parameters
agent_ids
Array of strings <uuid> (agent_id)
Example: agent_ids=ae09126e-80a9-49c7-923f-df2320f08639,68b363eb-600a-4e72-afb3-8c4196e385ce

Agent ID filter. Only agents with the specified ids will be returned in the response.

agent_id__gte
string <uuid> (agent_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: agent_id__gte=ae09126e-70a6-49c7-923f-df2320f08639

Agent id lower included bound.

agent_id__lt
string <uuid> (agent_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: agent_id__lt=ae09126e-70a6-49c7-923f-df2320f08639

Agent id upper excluded bound.

names
Array of strings (agent_name) [ items [ 3 .. 128 ] characters ^[a-zA-Z0-9_\-]{3,128}$ ]
Example: names=name1,name2

Agent name filter. Only agents with the specified names will be returned in the response.

create_time__lt
string <date-time> (time)
Example: create_time__lt=2021-09-21T19:11:41.674Z

Entity create time upper excluding bound filter in RFC 3339 format. Only entities with the creation time lower than the specified boundary will be returned in the response.

create_time__gte
string <date-time> (time)
Example: create_time__gte=2021-09-21T11:11:41.674Z

Entity create time lower including bound filter in RFC 3339 format. Only entities with the creation time greater than or equal to the specified boundary will be returned in the response.

order
string
Default: "desc"
Enum: "asc" "desc"

The sort order.

By default, the results will be sorted in order of stream appearance in the database (may not match stream create_time). If "desc" is set, the newest streams will be shown first. If "asc" is set, the oldest streams will be shown first.

But if some stream ID range filters specified (<entity>_id__gte or <entity>_id__lt), the results will be sorted by ID.

page
integer >= 1
Default: 1

Page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

Number of items on page.

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

Responses

Response samples

Content type
application/json
{
  • "agents": [
    ]
}

delete agents

Delete agents matching specified filters.

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.

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

Request Body schema: application/json
agent_ids
required
Array of strings <uuid> (agent_id) <= 1000 items

Agent ID filter.

Responses

Request samples

Content type
application/json
{
  • "agent_ids": [
    ]
}

Response samples

Content type
application/json
{}

get agent

Get the agent by ID.

path Parameters
agent_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the agent (agent_id received in the "register agent" request).

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.

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

Responses

Response samples

Content type
application/json
{
  • "agent_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
  • "status": 0,
  • "active_stream_count": 5,
  • "create_time": "2018-08-11T09:11:41.674Z",
  • "last_update_time": "2018-08-11T09:11:41.674Z",
  • "analytic_names": [
    ],
  • "host": "10.0.10.10",
  • "name": "some name",
  • "description": "",
  • "max_stream_count": 10,
  • "port": 1,
  • "api_version": 1
}

head agent

Check if agent exists.

path Parameters
agent_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the agent (agent_id received in the "register agent" request).

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.

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

Responses

Response samples

Content type
application/json
{}

remove agent

Remove the agent by ID.

path Parameters
agent_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the agent (agent_id received in the "register agent" request).

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.

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

Responses

Response samples

Content type
application/json
{}

agents interaction

get streams which processing must be started.

Get agents streams by agent ID and send information about streams processing.

path Parameters
agent_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the agent (agent_id received in the "register agent" request).

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.

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

Responses

Response samples

Content type
application/json
{
  • "streams": [
    ]
}

post feedback on streams

Post information about streams processing.

path Parameters
agent_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

ID of the agent (agent_id received in the "register agent" request).

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

Content type is application/json.

Request Body schema: application/json
required
Array of objects >= 0 items

Array of stream info.

Responses

Request samples

Content type
application/json
{
  • "streams": [
    ]
}

Response samples

Content type
application/json
{
  • "streams": [
    ]
}

health

get health

get health of service

query Parameters
include_luna_services
integer
Default: 0
Enum: 0 1

Whether to perform healthchecks for dependent luna services.

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

Responses

Response samples

Content type
application/json
{
  • "execution_time": 0.123
}