LUNA PLATFORM 5 API (v.6.27.2)

Download OpenAPI specification:Download

VisionLabs Luna Platform 5 API. The API version is 6.

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

version

get version

Get versions of services.

header Parameters
Luna-Request-Id
string^[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
{
  • "LUNA PLATFORM": {
    },
  • "luna-api": {
    },
  • "luna-events": {
    },
  • "luna-faces": {
    },
  • "luna-image-store-bodies-samples": {
    },
  • "luna-image-store-faces-samples": {
    },
  • "luna-image-store-images": {
    },
  • "luna-handlers": {
    },
  • "luna-tasks": {
    },
  • "luna-matcher-proxy": {
    },
  • "luna-remote-sdk": {
    },
  • "luna-lambda": {
    }
}

version options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

accounts

get accounts

Get accounts.

Authorizations:
BasicAuthLunaAccountIdAuthBearerAuth
query Parameters
page
integer >= 1
Default: 1

Page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

Number of items on page.

login
string (login) [ 3 .. 128 ] characters ^[a-z0-9_\-\.]+@[a-z]+\.[a-z]{2,}$
Example: login=user@visionlabs.ru

Account login.

account_type
string (account_type)
Enum: "advanced_user" "user" "admin"
Example: account_type=user

Account type.

create_time__lt
string <date-time> (time)
Example: create_time__lt=2018-08-11T09:11:41.674Z

Upper bound for object create_time.

create_time__gte
string <date-time> (time)
Example: create_time__gte=2018-08-11T09:11:41.674Z

Lower included bound for object create_time.

targets
string
Default: ["account_id","login","account_type","description","create_time","last_update_time"]
Enum: "account_id" "login" "account_type" "description" "create_time" "last_update_time"
Example: targets=login

Comma-separated list of account target fields.

header Parameters
Luna-Request-Id
string^[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

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

url = f"{baseUri}/accounts"
headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE="
}

response = requests.get(url, headers=headers)

print(response.status_code)
print(response.json())

Response samples

Content type
application/json
{
  • "accounts": [
    ],
  • "total_count": 50
}

create account

Create an account.

Authorizations:
BasicAuthLunaAccountIdAuth
header Parameters
Luna-Request-Id
string^[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.

Content-Type
string
Value: "application/json"

Content type is application/json.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID for new account creation.

Request Body schema: application/json
login
required
string (login) [ 3 .. 128 ] characters ^[a-z0-9_\-\.]+@[a-z]+\.[a-z]{2,}$

Account email.

password
required
string (password) [ 3 .. 128 ] characters ^.{3,128}$

Account password.

account_type
required
string (account_type_for_creation)
Enum: "advanced_user" "user"

Specified user account type:

  • user - allows to interact with its own data

  • advanced_user - allows to interact with its own data and view other accounts data

description
string (account_description) <= 128 characters
Default: ""

Account description.

Responses

Request samples

Content type
application/json
{
  • "login": "mylogin@gmail.com",
  • "password": "string",
  • "account_type": "advanced_user",
  • "description": "main admin account"
}

Response samples

Content type
application/json
{}

accounts options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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

get account

Get account.

Authorizations:
BasicAuthLunaAccountIdAuthBearerAuth
query Parameters
targets
string
Default: ["account_id","login","account_type","description","create_time","last_update_time"]
Enum: "account_id" "login" "account_type" "description" "create_time" "last_update_time"
Example: targets=login

Comma-separated list of account target fields.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

url = f"{baseUri}/account"
headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE="
}

response = requests.get(url, headers=headers)

print(response.status_code)
print(response.json())

Response samples

Content type
application/json
{
  • "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "login": "mylogin@gmail.com",
  • "account_type": "advanced_user",
  • "description": "main admin account",
  • "create_time": "2018-08-11T09:11:41.674Z",
  • "last_update_time": "2018-08-11T09:11:41.674Z"
}

patch account

Patch account. At least one field must be specified.

Authorizations:
BasicAuthLunaAccountIdAuth
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Content-Type
string
Value: "application/json"

Content type is application/json.

Request Body schema: application/json
non-empty
login
string (login) [ 3 .. 128 ] characters ^[a-z0-9_\-\.]+@[a-z]+\.[a-z]{2,}$

Account email.

password
string (password) [ 3 .. 128 ] characters ^.{3,128}$

Account password.

account_type
string (account_type_for_creation)
Enum: "advanced_user" "user"

Specified user account type:

  • user - allows to interact with its own data

  • advanced_user - allows to interact with its own data and view other accounts data

description
string (account_description) <= 128 characters
Default: ""

Account description.

Responses

Request samples

Content type
application/json
{
  • "login": "mylogin@gmail.com",
  • "password": "string",
  • "account_type": "advanced_user",
  • "description": "main admin account"
}

Response samples

Content type
application/json
Example
{
  • "error_code": 12022,
  • "desc": "Bad/incomplete input data",
  • "detail": "Failed to validate input json. Path: 'extra_field', message: 'extra fields not permitted'"
}

accounts options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

tokens

create token

Create a token.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
query Parameters
grant_all_permissions
integer
Default: 0
Enum: 0 1

Grant all permissions to token. 1 - give, 0 - do not give. If value is 1 then permissions field is not required.

Grant only standart permissions.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Content-Type
string
Value: "application/json"

Content type is application/json.

Request Body schema: application/json
Any of
required
object

token permissions

* it is possible to use custom fields for permissions besides those given here

custom fields must have 3-16 characters (lowercase letters, _) with possible permissions: "creation", "view", "modification", "deletion"

"creation" — allows POST requests

"view" — allows GET requests

"modification" — allows PUT and PATCH requests

"deletion" — allows DELETE requests

description
string (token_description) <= 128 characters
Default: ""

Token description.

expiration_time
required
string or null <date-time>

Token expiration time in RFC 3339 format. null means token will never expired.

visibility_area
string (visibility_area)
Default: "all"
Enum: "account" "all"

Specifies data visible for the token.

account - only data related to this account can be received using GET requests.

all - data of all existing accounts can be received using GET requests. This value can be set for advanced_user account. This option does not work for user account.

Responses

Request samples

Content type
application/json
{
  • "description": "main account token",
  • "expiration_time": "2050-11-11T11:11:11.111+03:00",
  • "permissions": {
    },
  • "visibility_area": "all"
}

Response samples

Content type
application/json
{
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
  • "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "url": "/6/tokens/557d54ec-29ad-4f3c-93b4-c9092ef12515",
}

get tokens

Get tokens.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
query Parameters
page
integer >= 1
Default: 1

Page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

Number of items on page.

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 filter. Will not have effect if Luna-Account-Id header is used for authorization

create_time__lt
string <date-time> (time)
Example: create_time__lt=2018-08-11T09:11:41.674Z

Upper bound for object create_time.

create_time__gte
string <date-time> (time)
Example: create_time__gte=2018-08-11T09:11:41.674Z

Lower included bound for object create_time.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

# create token
url = f"{baseUri}/tokens"
headers = {"Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE="}
payload = {"permissions": {"face": ["view"]}, "description": "description"}
requests.post(url, json=payload, headers=headers)

headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE="
}
url = f"{baseUri}/tokens"
response = requests.get(url, headers=headers, params={"page": 1, "page_size": 10})

print(response.status_code)
print(response.json())

Response samples

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

tokens options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

replace token

Update token. You cannot update a part of the token, so you should specify all the fields for your token.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
token_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb

Token ID.

query Parameters
grant_all_permissions
integer
Default: 0
Enum: 0 1

Grant all permissions to token. 1 - give, 0 - do not give. If value is 1 then permissions field is not required.

Grant only standart permissions.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Content-Type
string
Value: "application/json"

Content type is application/json.

Request Body schema: application/json
Any of
required
object

token permissions

* it is possible to use custom fields for permissions besides those given here

custom fields must have 3-16 characters (lowercase letters, _) with possible permissions: "creation", "view", "modification", "deletion"

"creation" — allows POST requests

"view" — allows GET requests

"modification" — allows PUT and PATCH requests

"deletion" — allows DELETE requests

description
string (token_description) <= 128 characters
Default: ""

Token description.

expiration_time
required
string or null <date-time>

Token expiration time in RFC 3339 format. null means token will never expired.

visibility_area
string (visibility_area)
Default: "all"
Enum: "account" "all"

Specifies data visible for the token.

account - only data related to this account can be received using GET requests.

all - data of all existing accounts can be received using GET requests. This value can be set for advanced_user account. This option does not work for user account.

Responses

Request samples

Content type
application/json
Example
{
  • "permissions": {
    },
  • "description": "main account token",
  • "expiration_time": "2050-11-11T11:11:11.111+03:00",
  • "visibility_area": "account"
}

Response samples

Content type
application/json
{
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
  • "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "url": "/6/tokens/557d54ec-29ad-4f3c-93b4-c9092ef12515",
}

get token

Get token by ID.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
token_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb

Token ID.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library
import requests

baseUri = "http://127.0.0.1:5000/6"

headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE="
}
url = f"{baseUri}/tokens"
payload = {"permissions": {"face": ["view"]}, "description": "description", "expiration_time": None}
tokenId = requests.post(url, json=payload, headers=headers).json()["token_id"]

url = f"{baseUri}/tokens/{tokenId}"
response = requests.get(url, headers=headers)

print(response.status_code)
print(response.json())

Response samples

Content type
application/json
{
  • "permissions": {
    },
  • "description": "main account token",
  • "expiration_time": "2050-11-11T11:11:11.111+03:00",
  • "visibility_area": "account",
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
  • "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "create_time": "2018-08-11T09:11:41.674Z",
  • "last_update_time": "2018-08-11T09:11:41.674Z"
}

delete token

Delete token by ID.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
token_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb

Token ID.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library
import requests

baseUri = "http://127.0.0.1:5000/6"

headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE="
}
url = f"{baseUri}/tokens"
payload = {"permissions": {"face": ["view"]}, "description": "description", "expiration_time": None}
tokenId = requests.post(url, json=payload, headers=headers).json()["token_id"]

url = f"{baseUri}/tokens/{tokenId}"
response = requests.delete(url, headers=headers)

print(response.status_code)

Response samples

Content type
application/json
{}

token options

Get options for the resource.

path Parameters
token_id
required
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb

Token ID.

header Parameters
Luna-Request-Id
string^[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
{}

credentials verifier

verify credentials

Verify account or login with password or token.

  • In the case of success account id verification, account_type will be returned
  • In the case of success login/password verification, account_id and account_type will be returned
  • In the case of success token verification, account_type and token permissions will be returned
  • In the case of failure verification, error will be returned
header Parameters
Luna-Request-Id
string^[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.

Content-Type
string
Value: "application/json"

Content type is application/json.

Request Body schema: application/json
One of
login
required
string (login) [ 3 .. 128 ] characters ^[a-z0-9_\-\.]+@[a-z]+\.[a-z]{2,}$

Account email.

password
required
string (password) [ 3 .. 128 ] characters ^.{3,128}$

Account password.

Responses

Request samples

Content type
application/json
Example
{
  • "login": "mylogin@gmail.com",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "account_type": "advanced_user",
  • "permissions": {
    },
  • "account_id": "string"
}

credentials verifier options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

sdk

sdk resource

Detect faces and/or human bodies and estimate attributes on the input images. After the request is performed, the received data is not saved to the database or Image Store, it is only returned in the response.

The order of input images corresponds to the order of the elements in the output JSON.

If an input image is corrupted, an error is returned for the image. The processing of the other images continues in normal mode.

Notes for incoming data:

  • face or body bounding boxes passed with face or body warped image will be ignored.
Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
query Parameters
image_type
integer
Default: 0
Enum: 0 1 2

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

estimate_people_count
integer (int01)
Default: 0
Enum: 0 1

Whether to estimate people count on the image.

People counter licensing feature is required to be enabled to perform estimation.

people_count_coordinates
integer
Default: 1
Enum: 0 1

Whether to return people coordinates with people count estimation.

multiface_policy
integer (multiface_policy)
Default: 1
Enum: 0 1 2

Multiple face detection policy:

  • 0 - do not process images with several detected faces.

    If detect_body is enabled, the system will attempt to detect a human body related to the detected face. If a human body is detected, its detection will be associated with the same event as the face.

    If there is no face detected in the image, no human body detections will be returned. Thus there will be no human body detection returned if detect_face is disabled.

  • 1 - process images with several detected faces and/or human bodies.

    If detect_body is enabled, all the detections of human bodies will be returned. Face detection and human body detection of the same person will be associated with the same event.

    The detections of human bodies are returned even if there were no faces found.

  • 2 - get the best face detection from the image. A single face of the best quality is detected in the image.

    If detect_body is enabled, the system will attempt to detect a human body related to the detected face. If a human body is detected, its detection will be associated with the same event as the face.

    If there is no face detected in the image, no human body detections will be returned. Thus there will be no human body detection returned if detect_face is disabled.

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

Whether to detect faces on the image.

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

Whether to detect human bodies on the image.

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

Whether to estimate head pose in the image. The head pose is represented by pitch, yaw and roll angles.

Not supported with warped images (see warped_image or image_type parameter).

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

Whether to estimate emotions in the image. The probability of the following emotions is estimated: "anger", "disgust", "fear", "happiness", "sadness", "surprise", "neutral".

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

Whether to estimate mask in the image. The probability of the following masks states is estimated: "medical_mask", "missing", "occluded".

The estimated probability with the highest score is returned in the "predominant mask" parameter.

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

Whether to estimate glasses in the image. One of the following parameters is returned: "eyeglasses", "sunglasses", "no_glasses".

estimate_liveness
integer (int01)
Default: 0
Enum: 0 1

Whether to estimate liveness in the image. The "quality" and "score" probabilities are estimated. Based on these probabilities, the following result is returned: "real", "spoof", "unknown".

Liveness is utilized for this estimation. See "Administrator’s manual" for details about Liveness requirements.

Webcam or selfie photos are required. Otherwise the result may be incorrect.

Liveness licensing feature is required to be enabled to perform liveness estimation.

Liveness estimation is not supported for samples (warped images). The image_type parameter should be set to "0".

estimate_deepfake
integer (int01)
Default: 0
Enum: 0 1

Whether to estimate deepfake feature on the image.

Deepfake licensing feature is required to be enabled to perform deepfake estimation.

Not supported with warped images (see warped_image parameter).

estimate_landmarks68
integer (detect_landmarks68)
Default: 0
Enum: 0 1

Whether to detect basic 68-point facial landmarks in the image.

Not supported with warped images (see warped_image or image_type parameter).

estimate_landmarks5
integer (detect_landmarks5)
Default: 0
Enum: 0 1

Whether to detect basic 5-point facial landmarks in the image.

Not supported with warped images (see warped_image or image_type parameter).

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

Whether to estimate input face image quality. Each of the following probabilities is estimated: "darkness", "light", "blurriness", "illumination", "specularity".

The quality factor is estimated for each probability. It's value is in the range [0..1] where 0 corresponds to low quality and 1 to high quality.

Note. Face recognition is not greatly affected by uneven illumination or high specularity.

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

Whether to estimate gaze in the image. The gaze is represented by yaw angle and pitch angle for both eyes at once.

Not supported with warped images (see warped_image or image_type parameter).

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

Whether to estimate eye attributes in the image. The "right_eye" and "left_eye" parameters are estimated, which contain the "state" (opened, closed or occluded) and "iris_landmarks" parameters.

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

Whether to estimate mouth attributes in the image. Each of the following probabilities is estimated: "opened", "occluded", "smile", "score".

estimate_face_descriptor
integer (extract_descriptor)
Default: 1
Enum: 0 1
Example: estimate_face_descriptor=1

Whether to estimate face descriptor(s).

estimate_basic_attributes
integer (extract_basic_attributes)
Default: 0
Enum: 0 1

Whether to estimate face basic attributes (gender, age, ethnicity).

estimate_body_descriptor
integer (extract_descriptor)
Default: 1
Enum: 0 1
Example: estimate_body_descriptor=1

Whether to create human body descriptor(s).

estimate_upper_body
integer (int01)
Default: 0
Enum: 0 1

Whether to estimate human upper body on the image (headwear, clothing color, sleeve length).

estimate_lower_body
integer (int01)
Default: 0
Enum: 0 1

Whether to estimate human lower body on the image (lower garment, shoes).

estimate_accessories
integer (int01)
Default: 0
Enum: 0 1

Whether to estimate human body accessories on the image (backpack presence).

estimate_body_basic_attributes
integer (int01)
Default: 0
Enum: 0 1

Whether to estimate human body basic attributes on the image (age, gender).

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

Whether to create a human body warped image in the Base64 format.

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

Whether to create the face warped image in the Base64 format.

aggregate_attributes
integer (aggregate_attributes)

Whether to aggregate the following parameters:

  • face descriptor
  • body descriptor
  • face basic attributes (age, gender)
  • body basic attributes (apparent age, apparent gender)
  • mask states
  • emotions
  • liveness
  • deepfake
  • upper body attributes
  • lower body attributes
  • accessories

Aggregation will be performed only if the appropriate parameters for estimating the listed above parameters are enabled.

If set, all estimated parameters from each image will be aggregated and displayed in the aggregate_estimations field of the response body as single objects for all images.

Otherwise, all estimated parameters from each image will be displayed in the estimations field of the response body as separate objects for corresponding images.

pitch_threshold
integer (pitch_threshold) [ 0 .. 180 ]
Example: pitch_threshold=180

Maximum deviation pitch angle from 0. If the estimated value is equal or less than the threshold, the image is filtered.

Remove this parameter from the query, or set the parameter value to 180 if pitch angle filtration is not required.

When the value is set to "0", all the images are filtered.

roll_threshold
integer (roll_threshold) [ 0 .. 180 ]
Example: roll_threshold=180

Maximum deviation roll angle from 0. If the estimated value is equal or less than the threshold, the image is filtered.

Remove this parameter from the query, or set the parameter value to 180 if roll angle filtration is not required.

When the value is set to "0", all the images are filtered.

yaw_threshold
integer (yaw_threshold) [ 0 .. 180 ]
Example: yaw_threshold=180

Maximum deviation yaw angle from 0. If the estimated value is equal or less than the threshold, the image is filtered.

Remove this parameter from the query, or set the parameter value to 180 if yaw angle filtration is not required.

When the value is set to "0", all the images are filtered.

score_threshold
number (score_threshold) [ 0 .. 1 ]
Default: 0
Example: score_threshold=0.7

Descriptor quality score threshold. The higher the quality score for the image, the better the extraction results.

All the attributes with a quality score below the threshold will be ignored (and not stored in the DB). The function will proceed as usual with all the remaining descriptors (if left).

Consult VisionLabs about the recommended value of this parameter.

Note! This parameter is not related to the image quality estimated in the detect request (estimate_quality request parameter).

mask_states
Array of integers (mask_states) non-empty
Items Enum: 1 2 3
Example: mask_states=2&mask_states=3

Filter by mask states.

mask state value
missing 1
medical_mask 2
occluded 3
liveness_states
Array of integers (liveness_states) non-empty
Items Enum: 0 1 2
Example: liveness_states=1

Filter by liveness states.

liveness state value
spoof 0
real 1
unknown 2
deepfake_states
Array of integers (deepfake_states) non-empty
Items Enum: 0 1
Example: deepfake_states=1

Filter by deepfake states.

deepfake state value
fake 0
real 1
use_exif_info
integer
Default: 1
Enum: 0 1
Example: use_exif_info=1

Whether to try to auto orient image based on EXIF data.

The processed image should have EXIF data, otherwise auto orientation will not be performed.

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

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

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

Whether to extract EXIF meta information from input JPEG images.

Exact output will vary since there are no mandatory requirements for both authoring software and digital cameras how to write the data.

This function will only parse the tags and output their names and values as they are. Please refer to JEITA CP-3451 EXIF specification for details.

header Parameters
Accept
string
Enum: "application/json" "application/msgpack"

Accept request header.

Luna-Request-Id
string^[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.

Content-Type
string
Enum: "application/json" "multipart/form-data" "image/jpeg" "image/png" "image/bmp" "image/x-portable-pixmap" "image/tiff" "image/x-jpeg-base64" "image/x-png-base64" "image/x-bmp-base64" "image/x-tiff-base64" "image/x-portable-pixmap-base64"
Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Request Body schema:
string <binary>

Responses

Request samples

Content type
No sample

Response samples

Content type
Example
{
  • "images_estimations": [
    ]
}

sdk options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

videosdk

video analytics (beta)

Request for video analysis based on the specified analytics parameters eg facial estimations.

header Parameters
Luna-Request-Id
string^[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.

Content-Type
string
Value: "application/json"
Request Body schema: application/json
required
object

Video URL.

required
Array of any

A list of parameters for comprehensive video analytics.

Responses

Request samples

Content type
application/json
{
  • "video": {},
  • "analytics": [
    ]
}

Response samples

Content type
{
  • "video_data": {
    },
  • "analytics": [
    ]
}

videosdk options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

iso

iso resource

The resource performs a visual examination of frontal type images based on ISO/IEC 19794-5 standard. This means that the images that have passed the validation are standardized and attributes of the person's face meet the established requirements. For more information on the requirements for face attributes in the image, see ISO/IEC 19794-5 Clauses 7-10.

The output JSON contains the result of the check for each estimator. The image check is considered successful if the set of these results complies with the ISO standard.

The order of input images is corresponding to elements order in output JSON. If an image is broken, the resource will return an error for this image and other images will be correctly processed.

Notes for incoming data:

  • face or body bounding boxes passed with face or body warped image will be ignored.
Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
query Parameters
image_type
integer
Default: 0
Enum: 0 1

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

multiface_policy
integer (iso_multiface_policy)
Default: 0
Enum: 0 1 2

multiple face detection policy:

  • 0 - multiple face detection not allowed

  • 1 - multiple face detection allowed

  • 2 - get only best face detection from the image

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

Whether to extract EXIF meta information from input JPEG images.

Exact output will vary since there are no mandatory requirements for both authoring software and digital cameras how to write the data.

This function will only parse the tags and output their names and values as they are. Please refer to JEITA CP-3451 EXIF specification for details.

header Parameters
Accept
string
Enum: "application/json" "application/msgpack"

Accept request header.

Luna-Request-Id
string^[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.

Content-Type
string
Enum: "application/json" "multipart/form-data" "image/jpeg" "image/png" "image/bmp" "image/x-portable-pixmap" "image/tiff" "image/x-jpeg-base64" "image/x-png-base64" "image/x-bmp-base64" "image/x-tiff-base64" "image/x-portable-pixmap-base64"
Request Body schema:
string <binary>

Responses

Request samples

Content type
No sample

Response samples

Content type
Example
{
  • "images": [
    ]
}

iso options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

samples

detect faces

Detect faces in input images, create samples, and estimate face properties.

Detections can be filtered out by head pose. The pose is defined by yaw, pitch and roll angles. To specify a filtering threshold per-angle, use corresponding query parameters (yaw_threshold, pitch_threshold and roll_threshold). By default no filtering is applied.

The estimated face properties are not saved to the Faces database. They are only returned in the response.

Samples are saved in the storage without the ability to disable saving. You can disable the saving of samples only using the handlers.

Notes for incoming data:

  • face or body bounding boxes passed with face or body warped image will be ignored.
Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
query Parameters
multiface_policy
integer (multiface_policy)
Default: 1
Enum: 0 1 2

Multiple face detection policy:

  • 0 - multiple face detection not allowed;

  • 1 - multiple face detection allowed;

  • 2 - get only best face detection from the image.

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

Whether to estimate head pose in the image. The head pose is represented by pitch, yaw and roll angles.

Not supported with warped images (see warped_image or image_type parameter).

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

Whether to estimate emotions in the image. The probability of the following emotions is estimated: "anger", "disgust", "fear", "happiness", "sadness", "surprise", "neutral".

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

Whether to estimate mask in the image. The probability of the following masks states is estimated: "medical_mask", "missing", "occluded".

The estimated probability with the highest score is returned in the "predominant mask" parameter.

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

Whether to detect basic 68-point facial landmarks in the image. Not supported with warped images (see warped_image parameter).

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

Whether to extract EXIF meta information from input JPEG images.

Exact output will vary since there are no mandatory requirements for both authoring software and digital cameras how to write the data.

This function will only parse the tags and output their names and values as they are. Please refer to JEITA CP-3451 EXIF specification for details.

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

Whether to estimate input face image quality. Each of the following probabilities is estimated: "darkness", "light", "blurriness", "illumination", "specularity".

The quality factor is estimated for each probability. It's value is in the range [0..1] where 0 corresponds to low quality and 1 to high quality.

Note. Face recognition is not greatly affected by uneven illumination or high specularity.

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

Whether to estimate gaze in the image. The gaze is represented by yaw angle and pitch angle for both eyes at once.

Not supported with warped images (see warped_image or image_type parameter).

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

Whether to estimate eye attributes in the image. The "right_eye" and "left_eye" parameters are estimated, which contain the "state" (opened, closed or occluded) and "iris_landmarks" parameters.

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

Whether to estimate mouth attributes in the image. Each of the following probabilities is estimated: "opened", "occluded", "smile", "score".

pitch_threshold
integer (pitch_threshold) [ 0 .. 180 ]
Example: pitch_threshold=180

Maximum deviation pitch angle from 0. If the estimated value is equal or less than the threshold, the image is filtered.

Remove this parameter from the query, or set the parameter value to 180 if pitch angle filtration is not required.

When the value is set to "0", all the images are filtered.

roll_threshold
integer (roll_threshold) [ 0 .. 180 ]
Example: roll_threshold=180

Maximum deviation roll angle from 0. If the estimated value is equal or less than the threshold, the image is filtered.

Remove this parameter from the query, or set the parameter value to 180 if roll angle filtration is not required.

When the value is set to "0", all the images are filtered.

yaw_threshold
integer (yaw_threshold) [ 0 .. 180 ]
Example: yaw_threshold=180

Maximum deviation yaw angle from 0. If the estimated value is equal or less than the threshold, the image is filtered.

Remove this parameter from the query, or set the parameter value to 180 if yaw angle filtration is not required.

When the value is set to "0", all the images are filtered.

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

Whether an input image is a sample or not.

use_exif_info
integer
Default: 1
Enum: 0 1
Example: use_exif_info=1

Whether to try to auto orient image based on EXIF data.

The processed image should have EXIF data, otherwise auto orientation will not be performed.

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

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

estimate_face_quality
integer
Default: 0
Enum: 0 1

Whether to estimate face quality.

It enables you to perform various face quality checks by thresholds which similar to ISO standard. For more information on the requirements for face attributes in the image, see ISO/IEC 19794-5 Clauses 7-10.

ISO licensing feature is required to be enabled to perform face quality estimation.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Content-Type
string
Enum: "image/jpeg" "image/png" "image/bmp" "image/x-portable-pixmap" "image/tiff" "multipart/form-data" "application/json" "image/x-jpeg-base64" "image/x-png-base64" "image/x-bmp-base64" "image/x-tiff-base64" "image/x-portable-pixmap-base64"
Request Body schema:
string <binary>

Responses

Request samples

Content type
No sample

Response samples

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

detector options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

save face/body sample

Save face or body sample to the storage.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
samples_type
required
string
Enum: "faces" "bodies"

Samples type.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Content-Type
string
Enum: "image/jpeg" "image/png" "image/bmp" "image/tiff" "image/x-portable-pixmap"
Request Body schema:
One of
string <binary> (face_sample)

Image generated by VisionLabs algorithms.

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "image/jpeg",
}

with open("face_warp.jpg", "rb") as image_file:
    image = image_file.read()

url = f"{baseUri}/samples/faces"
response = requests.post(url, data=image, headers=headers)

print(response.status_code)
print(response.json())

Response samples

Content type
application/json
{
  • "sample_id": "b5d6fd45-fcca-453d-ac05-3e594054b813",
  • "url": "/6/samples/bodies/b5d6fd45-fcca-453d-ac05-3e594054b813"
}

face/body samples options

Get options for the resource.

path Parameters
samples_type
required
string
Enum: "faces" "bodies"

Samples type.

header Parameters
Luna-Request-Id
string^[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 face/body sample

Get face or body sample by ID.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
samples_type
required
string
Enum: "faces" "bodies"

Samples type.

sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

# create sample
headers = {
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "image/jpeg",
}

with open("face_warp.jpg", "rb") as image_file:
    image = image_file.read()

url = f"{baseUri}/samples/faces"
sampleId = requests.post(url, data=image, headers=headers).json()["sample_id"]

# get sample
headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
}
url = f"{baseUri}/samples/faces/{sampleId}"
response = requests.get(url, headers=headers)

print(response.status_code)
print(response.json())

Response samples

Content type
application/json
Example
{}

check if face/body sample exists

Check if face or body sample with sample_id exists.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
samples_type
required
string
Enum: "faces" "bodies"

Samples type.

sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

# create sample
headers = {
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "image/jpeg",
}

with open("face_warp.jpg", "rb") as image_file:
    image = image_file.read()

url = f"{baseUri}/samples/faces"
sampleId = requests.post(url, data=image, headers=headers).json()["sample_id"]

# get sample
headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
}
url = f"{baseUri}/samples/faces/{sampleId}"
response = requests.head(url, headers=headers)

print(response.status_code)

remove face/body sample

Remove face or body sample by ID.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
samples_type
required
string
Enum: "faces" "bodies"

Samples type.

sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

# create sample
headers = {
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "image/jpeg",
}

with open("face_warp.jpg", "rb") as image_file:
    image = image_file.read()

url = f"{baseUri}/samples/faces"
sampleId = requests.post(url, data=image, headers=headers).json()["sample_id"]

# get sample
headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
}
url = f"{baseUri}/samples/faces/{sampleId}"
response = requests.delete(url, headers=headers)

print(response.status_code)

Response samples

Content type
application/json
Example
{}

face/body sample options

Get options for the resource.

path Parameters
samples_type
required
string
Enum: "faces" "bodies"

Samples type.

sample_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
header Parameters
Luna-Request-Id
string^[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 sample | previous version Deprecated

Get sample by ID using previous API version.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Response samples

Content type
application/json
Example
{}

check if sample exists | previous version Deprecated

Check if face or body sample with sample_id exists using previous API version.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

remove sample | previous version Deprecated

Remove sample by ID using previous API version.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Response samples

Content type
application/json
Example
{}

sample options | previous version Deprecated

Get options for the resource using previous API version.

path Parameters
sample_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
header Parameters
Luna-Request-Id
string^[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 sample | legacy Deprecated

Get a face sample by ID.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Response samples

Content type
application/json
Example
{}

check if face sample exists | legacy Deprecated

Check if face sample with sample_id exists.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

remove face sample | legacy Deprecated

Remove sample by ID.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
sample_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
header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Response samples

Content type
application/json
Example
{}

face sample options | legacy Deprecated

Get options for the resource.

path Parameters
sample_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
header Parameters
Luna-Request-Id
string^[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
{}

images

create images

Save images with unique ID.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
header Parameters
Luna-Request-Id
string^[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.

Content-Type
string
Enum: "image/jpeg" "image/png" "image/bmp" "image/tiff" "image/x-portable-pixmap"

Type of transferring image.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

* (X-Luna-Meta-<user_defined_key>)
string
Example: <user_defined_value>

User-defined image metadata key-value. To store metadata values for multiple keys, the multiple headers should be defined.

Request Body schema:
string <binary> (binary_image)

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "image/jpeg",
}

with open("face_warp.jpg", "rb") as image_file:
    image = image_file.read()

url = f"{baseUri}/images"
response = requests.post(url, data=image, headers=headers)

print(response.status_code)
print(response.json())

Response samples

Content type
application/json
{}

images options

Get options for the resource.

header Parameters
Luna-Request-Id
string^[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
{}

check if image exists

Check if image with image_id exists.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
image_id
required
string <uuid> (image_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Image ID.

query Parameters
with_meta
integer
Default: 0
Enum: 0 1
Example: with_meta=1

Whether to retrieve user-defined image metadata.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

# create sample
headers = {
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "image/jpeg",
}

with open("face_warp.jpg", "rb") as image_file:
    image = image_file.read()

url = f"{baseUri}/images"
imageId = requests.post(url, data=image, headers=headers).json()["image_id"]

# get image
headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
}
url = f"{baseUri}/images/{imageId}"
response = requests.head(url, headers=headers)

print(response.status_code)

delete image

Delete an image.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
image_id
required
string <uuid> (image_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Image ID.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

# create sample
headers = {
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "image/jpeg",
}

with open("face_warp.jpg", "rb") as image_file:
    image = image_file.read()

url = f"{baseUri}/images"
imageId = requests.post(url, data=image, headers=headers).json()["image_id"]

# get image
headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
}
url = f"{baseUri}/images/{imageId}"
response = requests.delete(url, headers=headers)

print(response.status_code)

Response samples

Content type
application/json
Example
{}

get image

Receive an origin image.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
path Parameters
image_id
required
string <uuid> (image_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Image ID.

query Parameters
with_meta
integer
Default: 0
Enum: 0 1
Example: with_meta=1

Whether to retrieve user-defined image metadata.

header Parameters
Luna-Request-Id
string^[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.

Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

# create sample
headers = {
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "image/jpeg",
}

with open("face_warp.jpg", "rb") as image_file:
    image = image_file.read()

url = f"{baseUri}/images"
imageId = requests.post(url, data=image, headers=headers).json()["image_id"]

# get image
headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
}
url = f"{baseUri}/images/{imageId}"
response = requests.get(url, headers=headers)

print(response.status_code)

Response samples

Content type
application/json
Example
{}

image options

Get options for the resource.

path Parameters
image_id
required
string <uuid> (image_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515

Image ID.

header Parameters
Luna-Request-Id
string^[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
{}

objects

create objects

Save object with unique ID.

Authorizations:
BasicAuthBearerAuthLunaAccountIdAuth
header Parameters
Luna-Account-Id
string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Deprecated
Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

Account ID.

An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID.

User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests).

Luna-Request-Id
string^[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.

Content-Type
required
string

Type of transferring information.

WARNING A value of this header will be used as a Content-Type header value for requests "GET object" and will be use for a mime type calculation.

Request Body schema: */*
string <binary>

Some user defined bytes. The service saves the bytes as is.

Responses

Request samples

# This example is written using requests library

import requests

baseUri = "http://127.0.0.1:5000/6"

headers = {
    "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a",
    "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=",
    "Content-Type": "text/plain",
}

url = f"{baseUri}/objects"
response = requests.post(url, data="example", headers=headers)

print(response.status_code)
print(response.json())

Response samples

Content type
application/json
{}