get version of service
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. |
{- "Version": {
- "api": 1,
- "major": 0,
- "minor": 0,
- "patch": 0
}
}
create a new account
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. |
Luna-Account-Id | string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb account id for new account creation |
login required | string (login) [ 3 .. 128 ] characters ^[a-z0-9_'\+\-\.]+@[a-z0-9]+\.[a-z]{2,}$ account username |
password required | string (password) [ 3 .. 128 ] characters account password |
account_type required | string (account_type) Enum: "admin" "advanced_user" "user" account type |
description | string (account_description) <= 128 characters Default: "" account description |
{- "login": "mylogin@visionlabs.ru",
- "password": "string",
- "account_type": "admin",
- "description": "main admin account"
}
{- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "/1/accounts/557d54ec-29ad-4f3c-93b4-c9092ef12515"
}
get accounts
page | integer >= 1 Default: 1 a page number. |
page_size | integer [ 1 .. 100 ] Default: 10 the number of items on page. |
login | string (login) [ 3 .. 128 ] characters ^[a-z0-9_'\+\-\.]+@[a-z0-9]+\.[a-z]{2,}$ Example: login=user@visionlabs.ru account login |
account_type | string (account_type) Enum: "admin" "advanced_user" "user" Example: account_type=user account 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. |
{- "accounts": [
- {
- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "login": "mylogin@visionlabs.ru",
- "account_type": "admin",
- "description": "main admin account"
}
], - "total_count": 50
}
get account by id
account_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 account id |
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. |
{- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "login": "mylogin@visionlabs.ru",
- "account_type": "admin",
- "description": "main admin account"
}
patch account by id. At least one field must be specified
account_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 account id |
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. |
login | string (login) [ 3 .. 128 ] characters ^[a-z0-9_'\+\-\.]+@[a-z0-9]+\.[a-z]{2,}$ account username |
password | string (password) [ 3 .. 128 ] characters account password |
account_type | string (account_type) Enum: "admin" "advanced_user" "user" account type |
description | string (account_description) <= 128 characters Default: "" account description |
{- "login": "mylogin@visionlabs.ru",
- "password": "string",
- "account_type": "admin",
- "description": "main admin account"
}
{- "error_code": 12022,
- "desc": "Bad/incomplete input data",
- "detail": "Failed to validate input json. Path: 'extra_field', message: 'extra fields not permitted'"
}
delete account by id
account_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 account id |
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. |
{- "error_code": 28001,
- "desc": "Object not found",
- "detail": "Account with id '8950722f-3fd4-4223-b48f-03f95f0e8dfb' not found",
}
get total accounts count
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. |
{- "count": 50
}
create a new token
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. |
Luna-Account-Id required | string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb account id |
description | string (token_description) <= 128 characters Default: "" token description |
expiration_time required | string or null <date-time> expiration time if format RFC 3339. |
required | object (permissions) token permissions |
visibility_area | string (visibility_area) Default: "all" Enum: "account" "all" specifies data visible for the token.
|
{- "description": "main account token",
- "expiration_time": "2018-08-11T09:11:41.674Z",
- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "token": [
- "view"
], - "image": [ ],
- "object": [ ],
- "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}
}, - "visibility_area": "account"
}
{- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
- "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "/1/tokens/557d54ec-29ad-4f3c-93b4-c9092ef12515"
}
get tokens
page | integer >= 1 Default: 1 a page number. |
page_size | integer [ 1 .. 100 ] Default: 10 the 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 |
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. |
{- "tokens": [
- {
- "description": "main account token",
- "expiration_time": "2018-08-11T09:11:41.674Z",
- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "token": [
- "view"
], - "image": [ ],
- "object": [ ],
- "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}
}, - "visibility_area": "account",
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
- "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515"
}
]
}
Update token. You cannot update a part of the token, so you should specify all the fields for your token.
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 |
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. |
Luna-Account-Id | string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb account id |
description | string (token_description) <= 128 characters Default: "" token description |
expiration_time required | string or null <date-time> expiration time if format RFC 3339. |
required | object (permissions) token permissions |
visibility_area | string (visibility_area) Default: "all" Enum: "account" "all" specifies data visible for the token.
|
{- "description": "main account token",
- "expiration_time": "2018-08-11T09:11:41.674Z",
- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "token": [
- "view"
], - "image": [ ],
- "object": [ ],
- "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}
}, - "visibility_area": "account"
}
{- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
- "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "/1/tokens/557d54ec-29ad-4f3c-93b4-c9092ef12515"
}
get token by id
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 |
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 |
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. |
{- "description": "main account token",
- "expiration_time": "2018-08-11T09:11:41.674Z",
- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "token": [
- "view"
], - "image": [ ],
- "object": [ ],
- "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}
}, - "visibility_area": "account",
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
- "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515"
}
delete token by id
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 |
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 |
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. |
{- "error_code": 12012,
- "desc": "Bad/incomplete input data",
- "detail": "Bad query parameters 'account_id'",
}
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
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. |
login required | string (login) [ 3 .. 128 ] characters ^[a-z0-9_'\+\-\.]+@[a-z0-9]+\.[a-z]{2,}$ account username |
password required | string (password) [ 3 .. 128 ] characters account password |
{- "login": "mylogin@visionlabs.ru",
- "password": "string"
}
{- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "token": [
- "view"
], - "image": [ ],
- "object": [ ],
- "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}
}, - "account_type": "admin",
- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515"
}
Get service OpenApi documentation. If Accept request header is of type application/x-yaml
,
returns documentation in yaml
format or returns html
documentation, if Accept-Type is text/html
Luna-Request-Id | string <timestamp,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 |
{- "error_code": 12024,
- "detail": "Bad/incomplete input data",
- "desc": "Unsupported media type",
}
Get sphinx documentation - Development Manual. After the request you will be redirected to the page /docs/dev/index.html
Luna-Request-Id | string <timestamp,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. |
{- "error_code": 1,
- "detail": "internal server error",
- "desc": "internal server error",
}
Get service configuration. Passwords and tokens will be hidden in the response.
Luna-Request-Id | string <timestamp,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 |
{- "INFLUX_MONITORING": {
- "SEND_DATA_FOR_MONITORING": 0,
- "VERSION": 2,
- "ORGANIZATION": "ORGANIZATION_NAME",
- "TOKEN": "********",
- "BUCKET": "luna_monitoring",
- "HOST": "127.0.0.1",
- "PORT": 8086,
- "USE_SSL": 0,
- "FLUSHING_PERIOD": 1
}
}
get health of service
include_luna_services | integer Default: 0 Enum: 0 1 whether to perform healthchecks for dependent luna services. |
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. |
{- "execution_time": 0.123
}