Luna-Configurator API (v.2.1.36)

Download OpenAPI specification:Download

Service provides RESTFul api interface for creating, removing, editing and getting settings.

There is possibility to get settings by tags for one specific service.

Also there is a simple web-GUI in which one can get, edit or remove existing settings.

OpenAPI specification is the only valid document providing up-to-date information about the service API.

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

dashboard

Graphical interface for managing settings

HTML page with GUI in which one can get, change or delete settings

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
text/html
<html> ... </html>

version

get version

get version of service

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

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

puller

Get settings for exact service

Request to receive most relevant settings for exact service. Using the values ​​of the "Accept" header, you can get a response in JSON or configuration file format. Skip body if you need only default settings.

path Parameters
service_name
required
string
Example: luna-image-store

Service name

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Content-Type
required
string
Value: "application/json"

content type is application/json.

Accept
string
Enum: "application/x-vl-config-file" "application/json"

Possible accept from puller

Request Body schema: application/json
<SETTING_NAME>
string <= 128 characters

The key-value format object, where the key is the non-default setting name, and the value is its tag.

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
{
  • "LUNA_FACES_ADDRESS": {},
  • "LUNA_FACES_TIMEOUTS": {
    },
  • "INFLUX_MONITORING": {
    },
  • "LUNA_LICENSES_LOGGER": {
    }
}

settings

Get setting by id

Get setting

path Parameters
setting_id
required
string
Example: 12

Setting Id

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "id": 12,
  • "value": {
    },
  • "description": "default Main database for luna-faces service",
  • "create_time": "2018-08-11T09:11:41.674+00:00",
  • "last_update_time": "2018-08-11T09:11:41.674+00:00",
  • "name": "LUNA_FACES_DB",
  • "is_default": true,
  • "tags": [ ]
}

Replace setting

Replace setting

path Parameters
setting_id
required
string
Example: 12

Setting Id

header Parameters
Content-Type
string
Value: "application/json"

content type is application/json.

Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Request Body schema: application/json
required
(AnyStandaloneType (AnyStandaloneType (object) or AnyStandaloneType (number) or AnyStandaloneType (string) or AnyStandaloneType (boolean))) or Array of any (AnyType)

any type

description
string <= 128 characters
Default: "None"

Setting description

name
required
string

Setting name

tags
required
Array of strings[ items <= 128 characters ]

Tags must be specified when replacing a non-default setting. While changing the default setting, one don’t need to specify tags

Responses

Request samples

Content type
application/json
{
  • "value": {
    },
  • "description": "database settings",
  • "name": "LUNA_INDEX_MANAGER_DB",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "setting_id": 304
}

Delete setting

Delete setting by ID

path Parameters
setting_id
required
string
Example: 12

Setting Id

Responses

Response samples

Content type
application/json
{}

Create new setting

Create new setting

header Parameters
Content-Type
string
Value: "application/json"

content type is application/json.

Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Request Body schema: application/json
value
required
object

Setting value

description
string <= 128 characters
Default: "None"

Setting description

name
required
string

Setting name

tags
required
Array of strings non-empty [ items <= 128 characters ]

List of various tags that will be used to get settings from the puller

Responses

Request samples

Content type
application/json
{
  • "value": {
    },
  • "name": "LUNA_INDEX_MANAGER_DB",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "setting_id": 304
}

Get settings

Get settings by filters

query Parameters
tags
Array of strings (setting_tags) [ items <= 128 characters ]
Example: tags=TAG1,TAG2

Comma separated setting tags.

page
integer (page)
Default: 1
Example: page=2

Page number

page_size
integer (page_size) [ 1 .. 1000 ]
Default: 10
Example: page_size=1000

Number of entries per page

get_schema
integer (get_schema)
Default: 0
Enum: 0 1
Example: get_schema=1

Allows to get the corresponding JSON scheme

is_default
boolean (is_default)
Enum: true false

Is default setting mark

setting_name
string
Example: setting_name=DEFAULT_IMAGE_EXTENSION

Setting name

service_name
string
Example: service_name=luna-image-store

Service name

group_names
string
Example: group_names=group_1,group_2

Comma separated group names.

description
string
Example: description=Main database for luna-events service

Part or whole description to filter by it

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
application/json
Example
{
  • "id": 12,
  • "value": {
    },
  • "description": "default Main database for luna-faces service",
  • "create_time": "2018-08-11T09:11:41.674+00:00",
  • "last_update_time": "2018-08-11T09:11:41.674+00:00",
  • "name": "LUNA_FACES_DB",
  • "is_default": true,
  • "tags": [ ],
  • "validation_schema": {
    }
}

services

Get services list

Get services list

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

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

limitations

Get limitations

Get limitations by filters

query Parameters
limitation_names
string
Example: limitation_names=LOG_TIME,LOG_LEVEL

Comma separated limitation names.

description
string
Example: description=Main database for luna-events service

Part or whole description to filter by it

group_names
string
Example: group_names=group_1,group_2

Comma separated group names.

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get limitation

Get limitation by name

path Parameters
limitation_name
required
string
Example: LOG_TIME

Limitation name

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "limitation_name": "TTL_DESCRIPTOR",
  • "services": [
    ],
  • "validation_schema": {
    },
  • "default_value": 1,
  • "description": "ttl of free descriptors (in days)"
}

Create/replace limitation

Create/replace limitation

path Parameters
limitation_name
required
string
Example: LOG_TIME

Limitation name

header Parameters
Content-Type
string
Value: "application/json"

content type is application/json.

Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Request Body schema: application/json
validation_schema
required
object

Limitation JSON schema

required
(AnyStandaloneType (AnyStandaloneType (object) or AnyStandaloneType (number) or AnyStandaloneType (string) or AnyStandaloneType (boolean))) or Array of any (AnyType)

any type

description
string <= 128 characters
Default: "None"

Limitation description

services
required
Array of strings (service_name) non-empty [ items <= 128 characters ]

List services for this limitation

group_names
Array of strings (group_name) [ items [ 2 .. 128 ] characters ]

List groups for this limitation

Responses

Request samples

Content type
application/json
{
  • "validation_schema": {
    },
  • "default_value": 1,
  • "description": "new limitation",
  • "services": [
    ],
  • "group_names": [
    ]
}

Response samples

Content type
application/json
{
  • "setting_id": 304
}

Patch existing limitation

Patch existing limitation

path Parameters
limitation_name
required
string
Example: LOG_TIME

Limitation name

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Request Body schema: application/json
non-empty
default_value
object

Default value for limitation

description
string <= 128 characters
Default: "None"

Description for limitation

validation_schema
object

Schema for validate settings values

services
Array of strings (service_name) non-empty [ items <= 128 characters ]

Names of services that use this limitation

group_names
Array of strings (group_name) non-empty [ items [ 2 .. 128 ] characters ]

Names of groups that use this limitation

Responses

Request samples

Content type
application/json
{
  • "validation_schema": {
    },
  • "services": [
    ],
  • "description": "Use materialized views flag",
  • "default_value": 0
}

Response samples

Content type
application/json
{
  • "setting_id": 9,
  • "unverified_setting_ids": [ ]
}

Delete limitation

Delete limitation with limitation_name

path Parameters
limitation_name
required
string
Example: LOG_TIME

Limitation name

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
application/json
{}

groups

Retrive list of groups

Get groups list

query Parameters
limitation_names
string
Example: limitation_names=LOG_TIME,LOG_LEVEL

Comma separated limitation names.

group_names
string
Example: group_names=group_1,group_2

Comma separated group names.

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

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

Create new group

Create new group

header Parameters
Content-Type
string
Value: "application/json"

content type is application/json.

Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Request Body schema: application/json
group_name
required
string (group_name) [ 2 .. 128 ] characters

Group name

description
string <= 256 characters
Default: ""

Group description

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "group_name": "group1"
}

Get group

Get group by name

path Parameters
group_id
required
string
Example: luna-platform

Group name

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "group_name": "luna-queue",
  • "description": "default group"
}

Patch group

Patch group by name

path Parameters
group_id
required
string
Example: luna-platform

Group name

header Parameters
Content-Type
string
Value: "application/json"

content type is application/json.

Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

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

Group description

Responses

Request samples

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

Response samples

Content type
application/json
Example
{}

Delete group

Delete group by ID

path Parameters
group_id
required
string
Example: luna-platform

Group name

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
application/json
{}

groups linker

Link or unlink groups

Link or unlink group(s) to(from) limitation(s)

header Parameters
Content-Type
string
Value: "application/json"

content type is application/json.

Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Request Body schema: application/json
group_names
required
Array of strings (group_name) non-empty [ items [ 2 .. 128 ] characters ]

Groups list

limitation_names
required
Array of strings (limitation_name) non-empty [ items <= 128 characters ]

Limitations list

action
required
string
Enum: "attach" "detach"

attach or detach list limitations from a list groups

Responses

Request samples

Content type
application/json
{
  • "group_names": [
    ],
  • "limitation_names": [
    ],
  • "action": "attach"
}

Response samples

Content type
application/json
Example
{}

dump

Get dump-file

Get json file with all limitations and settings

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "limitations": [
    ],
  • "settings": [
    ],
  • "groups": [
    ],
  • "version": "99993b66"
}

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,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). 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
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). 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,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). 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": {
    }
}

health

get health

get health of service

header Parameters
Luna-Request-Id
string <timestamp,uuid4> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{...
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,UUID4"). It will be returned with response.

Responses

Response samples

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