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:
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".
HTML page with GUI in which one can get, change or delete settings
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. |
<html> ... </html>
get version of service
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. |
{- "Version": {
- "api": 1,
- "major": 0,
- "minor": 0,
- "patch": 1
}
}
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.
service_name required | string Example: luna-image-store Service name |
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 |
<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. |
{ }
{- "LUNA_FACES_TIMEOUTS": {
- "value": {
- "request": 60,
- "connect": 20,
- "sock_connect": 10,
- "sock_read": 20
}, - "id": 36
}, - "INFLUX_MONITORING": {
- "value": {
- "send_data_for_monitoring": 0,
- "use_ssl": 0,
- "flushing_period": 1,
- "host": "127.0.0.1",
- "port": 8086,
- "database_name": "luna_monitoring",
- "user_name": "luna",
- "password": "luna"
}, - "id": 45
}, - "LUNA_LICENSES_LOGGER": {
- "value": {
- "log_level": "INFO",
- "folder_with_logs": "./",
- "max_log_file_size": 1024,
- "log_time": "LOCAL"
}, - "id": 80
}
}
Get setting
setting_id required | string Example: 12 Setting Id |
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. |
{- "id": 12,
- "value": {
- "db_type": "postgres",
- "db_user": "luna",
- "db_password": "luna",
- "db_name": "luna_faces",
- "db_host": "127.0.0.1",
- "db_port": 5432
}, - "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
setting_id required | string Example: 12 Setting Id |
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. |
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 |
{- "value": {
- "db_type": "postgres",
- "db_user": "luna",
- "db_password": "luna",
- "db_name": "luna_index_manager",
- "db_host": "127.0.0.1",
- "db_port": 5432
}, - "description": "database settings",
- "name": "LUNA_INDEX_MANAGER_DB",
- "tags": [
- "ffff"
]
}
{- "setting_id": 304
}
Create new setting
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. |
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 |
{- "value": {
- "db_type": "postgres",
- "db_user": "luna",
- "db_password": "luna",
- "db_name": "luna_index_manager",
- "db_host": "127.0.0.1",
- "db_port": 5432
}, - "name": "LUNA_INDEX_MANAGER_DB",
- "tags": [
- "tag1",
- "tag2"
]
}
{- "setting_id": 304
}
Get settings by filters
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 |
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. |
{- "id": 12,
- "value": {
- "db_type": "postgres",
- "db_user": "luna",
- "db_password": "luna",
- "db_name": "luna_faces",
- "db_host": "127.0.0.1",
- "db_port": 5432
}, - "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": {
- "properties": {
- "db_type": {
- "type": "string",
- "enum": [
- "postgres",
- "oracle",
- "vertica"
]
}
}
}
}
Get services list
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. |
{- "services": [
- "luna-faces",
- "luna-events"
]
}
Get limitations by filters
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. |
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. |
[- {
- "limitation_name": "LUNA_INDEX_MANAGER_DB",
- "validation_schema": {
- "properties": {
- "db_type": {
- "type": "string",
- "enum": [
- "postgres",
- "oracle",
- "vertica"
]
}, - "db_user": {
- "type": "string"
}, - "db_password": {
- "type": "string"
}, - "db_name": {
- "type": "string"
}, - "db_host": {
- "type": "string"
}, - "db_port": {
- "type": "integer",
- "minimum": 1
}
}, - "required": [
- "db_type",
- "db_user",
- "db_password",
- "db_name",
- "db_host",
- "db_port"
], - "type": "object",
- "additionalProperties": false
}, - "services": [
- "luna-index-manager"
], - "default_value": {
- "db_type": "postgres",
- "db_user": "luna",
- "db_password": "luna",
- "db_name": "luna_index_manager",
- "db_host": "127.0.0.1",
- "db_port": 5432
}, - "description": "Main database for luna-index-manager service"
}
]
Get limitation by name
limitation_name required | string Example: LOG_TIME Limitation name |
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. |
{- "limitation_name": "TTL_DESCRIPTOR",
- "services": [
- "luna-admin"
], - "validation_schema": {
- "type": "integer"
}, - "default_value": 1,
- "description": "ttl of free descriptors (in days)"
}
Create/replace limitation
limitation_name required | string Example: LOG_TIME Limitation name |
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. |
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 |
{- "validation_schema": {
- "type": "integer"
}, - "default_value": 1,
- "description": "new limitation",
- "services": [
- "luna-faces",
- "luna-image-store"
], - "group_names": [
- "luna-platform"
]
}
{- "setting_id": 304
}
Patch existing limitation
limitation_name required | string Example: LOG_TIME Limitation name |
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. |
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 |
{- "validation_schema": {
- "type": "integer",
- "enum": [
- 0,
- 1
]
}, - "services": [
- "luna-faces"
], - "description": "Use materialized views flag",
- "default_value": 0
}
{- "setting_id": 9,
- "unverified_setting_ids": [ ]
}
Delete limitation with limitation_name
limitation_name required | string Example: LOG_TIME Limitation name |
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. |
{- "error_code": 27006,
- "desc": "Object not found",
- "detail": "Limitation named 'LOG_TIME' not found",
}
Get groups list
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. |
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. |
{- "groups": [
- {
- "group_name": "databases",
- "description": "some databases"
}, - {
- "group_name": "loggers",
- "description": "some loggers"
}
]
}
Create new group
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. |
group_name required | string (group_name) [ 2 .. 128 ] characters Group name |
description | string <= 256 characters Default: "" Group description |
{- "group_name": "group1",
- "description": "group1 description"
}
{- "group_name": "group1"
}
Get group by name
group_id required | string Example: luna-platform Group name |
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. |
{- "group_name": "luna-queue",
- "description": "default group"
}
Patch group by name
group_id required | string Example: luna-platform Group name |
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. |
description required | string <= 256 characters Default: "" Group description |
{- "description": "group description"
}
{- "error_code": 12022,
- "desc": "Bad/incomplete input data",
- "detail": "Failed to validate input json. Path: '', message: 'data must contain ['description'] properties",
}
Delete group by ID
group_id required | string Example: luna-platform Group name |
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. |
{- "error_code": 27008,
- "detail": "Group named 'queues' not found",
- "desc": "Object not found",
}
Link or unlink group(s) to(from) limitation(s)
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. |
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 |
{- "group_names": [
- "databases",
- "loggers"
], - "limitation_names": [
- "LOGGER",
- "FACES_DB"
], - "action": "attach"
}
{- "error_code": 27006,
- "desc": "Object not found",
- "detail": "Limitation named 'LOG_TME' not found",
}
Get json file with all limitations and settings
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. |
{- "limitations": [
- {
- "limitation_name": "STORAGE_TYPE",
- "validation_schema": {
- "type": "string",
- "enum": [
- "LOCAL",
- "S3"
]
}, - "services": [
- "luna-image-store"
], - "default_value": "LOCAL",
- "description": "Storage type. LOCAL - local directory, S3 - AWS S3",
- "group_names": [
- "luna-origin"
]
}
], - "settings": [
- {
- "name": "STORAGE_TYPE",
- "value": "S3",
- "description": "default Storage type. LOCAL - local directory, S3 - AWS S3",
- "tags": [
- "storage_tag"
]
}
], - "groups": [
- {
- "group_name": "luna-origin",
- "description": "original platform group"
}
], - "version": "99993b66"
}
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
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 |
{- "error_code": 12024,
- "detail": "Bad/incomplete input data",
- "desc": "Unsupported media type",
}
Get sphinx documentation - Development Manual. After the request you will be redirected to the page /docs/dev/index.html
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. |
{- "error_code": 1,
- "detail": "Internal server error",
- "desc": "Internal server error",
}
Get service configuration. Passwords and tokens will be hidden in the response.
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 |
{- "INFLUX_MONITORING": {
- "SEND_DATA_FOR_MONITORING": 0,
- "VERSION": 2,
- "ORGANIZATION": "ORGANIZATION_NAME",
- "TOKEN": "********",
- "BUCKET": "luna_monitoring",
- "HOST": "127.0.0.1",
- "PORT": 8086,
- "USE_SSL": 0,
- "FLUSHING_PERIOD": 1
}
}
get health of service
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. |
{- "execution_time": 0.123
}