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

Stream create time lower including bound filter in RFC 3339 format. Only streams 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

Stream create time upper excluding bound filter in RFC 3339 format. Only streams with the creation time lower than the specified boundary 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.

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 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
application/json
{
  • "streams": [
    ]
}

delete streams

Delete streams matching specified filters (OR).

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 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
stream_ids
Array of strings <uuid> (stream_id) <= 1000 items

Stream ID filter.

names
Array of strings (stream_name) <= 1000 items

Stream name filter.

Responses

Request samples

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

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

Stream create time lower including bound filter in RFC 3339 format. Only streams 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

Stream create time upper excluding bound filter in RFC 3339 format. Only streams 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 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
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 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 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
application/json
{
  • "stream_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
  • "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "name": "some name",
  • "description": "some description",
  • "data": {},
  • "event_handler": {
    },
  • "policies": {
    },
  • "location": {
    },
  • "autorestart": {
    },
  • "version": 1,
  • "create_time": "2018-08-11T09:11:41.674Z",
  • "status": "pending",
  • "last_error": null,
  • "video_info": {
    },
  • "groups": [
    ],
  • "preview": {
    }
}

update stream

Update stream fields: description, status.

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 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 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
description
string <= 128 characters

New stream description.

status
string
Enum: "pending" "pause" "cancel"

New stream processing status.

Responses

Request samples

Content type
application/json
{
  • "description": "Cancelled stream description.",
  • "status": "cancel"
}

Response samples

Content type
application/json
Example
{}

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 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 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": 10
}

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 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 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
application/json
{}

queue

check the streams processing queue

See the streams in the queue.

query Parameters
limit
required
integer >= 1

Maximum number of the objects in the response.

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.

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.

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
application/json
{
  • "streams": [
    ]
}

get some streams from the queue

Receive streams from the queue. The streams are received according to the specified filters.

The following actions are performed upon the request:

  • The streams are marked as "in progress".
  • The streams are deleted from the Streams Processing Queue.

The information about the streams is 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 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
required
object (post_streams_processing_queue_request_filters)
limit
required
integer >= 1

Maximum number of the streams to return.

Responses

Request samples

Content type
application/json
{
  • "filters": {
    },
  • "limit": 1
}

Response samples

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

post feedback on streams

Post information about streams processing.

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
required
Array of objects

Array of stream info.

Responses

Request samples

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

Response samples

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

preview

get last frame preview

Get stream last frame preview.

To add preview for stream, use "post feedback on streams" request to create last frame preview.

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

Stream 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 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
application/json
Example
{}

get live preview

Get stream live preview.

To add preview for stream, use "post feedback on streams" request to create live preview.

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

Stream 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 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
application/json
Example
{}

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

targets
Array of strings
Default: ["stream_id","status","error","video_info","log_time","version","preview"]
Items Enum: "stream_id" "status" "error" "video_info" "log_time" "version" "preview"
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 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
application/json
{
  • "logs": [
    ]
}

delete stream logs

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

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 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
application/json
{
  • "deleted_count": 1000
}

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 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
account_id
required
string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...

Account ID for authentication in the LUNA PLATFORM.

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
{
  • "account_id": "ee4c42b6-23ae-410e-a2aa-a4220e64ba4b",
  • "group_name": "stream_group-1",
  • "description": "default stream group"
}

Response samples

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

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 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
application/json
[
  • {
    },
  • {
    }
]

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 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
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 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
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 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
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 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
application/json
{}

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

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

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

Accept
string
Enum: "application/json" "text/plain"

Acceptable type of receiving data.

Responses

Response samples

Content type
{
  • "INFLUX_MONITORING": {
    }
}

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 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
application/json
{
  • "execution_time": 0.123
}