Luna Serving (v.0.1.18)

Download OpenAPI specification:

'Luna Serving'

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
application/json
{
  • "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
Value: "application/json"

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

service

create service

Create service.

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
required
service_name
required
string (service_name) [ 3 .. 128 ] characters ^[a-zA-Z0-9_-]*$

Unique user service name.

addresses
required
Array of strings <uri> (service_addresses) non-empty [ items <uri > ]

lists of urls for service

description
string (service_description) <= 512 characters
Default: ""

Service description.

shared
integer (service_shared) [ 0 .. 1 ]
Default: 0

Shared service means that any user can access service.

object (healthcheck)

Service healthcheck parameters.

For a service to be considered alive, a request to route must return a response with status code 2xx or 3xx

Responses

Request samples

Content type
application/json
{
  • "service_name": "sanic_service1",
  • "addresses": [],
  • "description": "Greate service.",
  • "shared": 0,
  • "healthcheck": {
    }
}

Response samples

Content type
application/json
{
  • "service_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "service_name": "sanic_service1"
}

get services

Get service list.

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.

service_names
Array of strings (service_name) [ items [ 3 .. 128 ] characters ^[a-zA-Z0-9_-]*$ ]
Example: service_names=name1,name2

Service name filter.

page
integer >= 1
Default: 1

Page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

Number of items on page.

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.

targets
string
Default: "account_id,service_name,description,addresses,create_time,shared,healthcheck,health"
Example: targets=service_name,shared

Comma-separated list of service target fields. Available targets: account_id, service_name, description, addresses, create_time, shared, healthcheck, health

shared
integer [ 0 .. 1 ]

Shared service filter. Shared services are available for all users.

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
{
  • "services": [
    ]
}

get service

Get service by name.

path Parameters
service_name
required
string (service_name) [ 3 .. 128 ] characters ^[a-zA-Z0-9_-]*$
Example: sanic_service1

Name of the service.

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
{
  • "service_name": "sanic_service1",
  • "description": "Greate service.",
  • "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "create_time": "2018-08-11T09:11:41Z",
  • "addresses": [],
  • "shared": 0,
  • "healthcheck": {
    },
  • "health": {
    }
}

delete service

delete service.

path Parameters
service_name
required
string (service_name) [ 3 .. 128 ] characters ^[a-zA-Z0-9_-]*$
Example: sanic_service1

Name of the service.

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

traefik

get Traefik config Internal

Warning: only for Traefik use

Get JSON Traefik configuration

Responses

Response samples

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

plugins

get list of plugins

Get list of service plugins

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
{
  • "plugins": [
    ]
}

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
}