lambda API (v.0.0.0)

Download OpenAPI specification:Download

'VisionLabs lambda-unique-name' is luna user lambda.

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

main

main

Below is the data structure that will be sent by the luna handlers service to the lambda. This description can be changed by the lambda creator.

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

Luna account Id. Designed to identify the created object.

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/msgpack"
Request Body schema: application/msgpack
object (image_msgpack)
object (event_meta_common)

User defined metadata (json object). Size shouldn't exceed 2MB.

Luna-Event-Time
string <date-time> (luna_event_time)

Time in format RFC 3339.

Luna-Event-End-Time
string <date-time> (luna_event_time)

Time in format RFC 3339.

city
string (city) <= 36 characters

City where event is incidented.

area
string (area) <= 36 characters

Area where event is incidented.

district
string (district) <= 36 characters

District where event is incidented.

street
string (street) <= 36 characters

Street where event is incidented.

house_number
string (house_number) <= 36 characters

House number where event is incidented.

longitude
number (longitude) [ -180 .. 180 ]

Longitude in degrees.

latitude
number (latitude) [ -90 .. 90 ]

Latitude in degrees.

track_id
string or null (track_id) ^[a-zA-Z0-9_\-]{1,36}$

Event track ID.

use_exif_info
integer (use_exif_info)
Enum: 0 1

Whether to try to auto orient image based on exif data

Has no effect with tiff images (they're always auto oriented).

Ignored with warped images (see warped_image or image_type parameter).

external_id
string (event_external_id) <= 36 characters
Default: ""

Event external ID.

user_data
string (event_user_data) <= 128 characters
Default: ""

Event user data.

image_type
integer (image_type)
Enum: 0 1 2

Image type of input image. 0 - raw image, 1 - face warped image, 2 - body warped image.

aggregate_attributes
integer (aggregate_attributes)
Default: 0
Enum: 0 1

Whether to aggregate attribute(s).

If true, all extracted attributes will be aggregated and stored as a single attribute. Otherwise, all attributes will be stored for each sample.

source
string (source) <= 128 characters

Some additional information that user provided with event.

no_cache
integer (no_cache)
Enum: 0 1

Flag to disable handler caching.

tags
Array of strings (tags) [ items <= 36 characters ]

List of tags.

Responses

Response samples

Content type
application/json
{
  • "events": [
    ],
  • "images": [],
  • "filtered_detections": {
    }
}

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
}