Luna tasks (v.3.24.2)

Download OpenAPI specification:Download

VisionLabs Luna Tasks

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 version of service

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

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

tasks

get tasks

get tasks with filters

query Parameters
page
integer >= 1
Default: 1

a page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

the number of items on page.

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

upper bound for object create_time.

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

lower included bound for object create_time.

end_time__lt
string <date-time>
Example: end_time__lt=2018-08-11T09:11:41.674Z

upper bound for object end_time.

end_time__gte
string <date-time>
Example: end_time__gte=2018-08-11T09:11:41.674Z

lower included bound for object end_time.

task_ids
string <comma-separate task ids> (task_ids)
Example: task_ids=1,2,3

comma-separate task ids

task_type
integer (task_type)
Enum: 0 1 2 3 4 5 6 7 8 9 10
Example: task_type=1

task type

task type value
unknown 0
linker 1
clusterization 2
report 3
garbage collect 4
additional extract 5
cross match 6
roc-curve calculation 7
export objects 8
estimate data 9
lambda task 10
task_status
integer (task_status)
Enum: 0 1 2 3 4 5
Example: task_status=1

task status

task status value
pending 0
in progress 1
cancelled 2
failed 3
collect results 4
done 5
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

result_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: result_id=8f4f0070-c464-460b-bf78-fac225df72e9

id of task result, which stored in luna-image store.

schedule_id
integer (schedule_id) >= 1

Schedule according to which the task was created

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

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

get tasks count

get tasks count with filters

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

upper bound for object create_time.

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

lower included bound for object create_time.

end_time__lt
string <date-time>
Example: end_time__lt=2018-08-11T09:11:41.674Z

upper bound for object end_time.

end_time__gte
string <date-time>
Example: end_time__gte=2018-08-11T09:11:41.674Z

lower included bound for object end_time.

task_ids
string <comma-separate task ids> (task_ids)
Example: task_ids=1,2,3

comma-separate task ids

task_type
integer (task_type)
Enum: 0 1 2 3 4 5 6 7 8 9 10
Example: task_type=1

task type

task type value
unknown 0
linker 1
clusterization 2
report 3
garbage collect 4
additional extract 5
cross match 6
roc-curve calculation 7
export objects 8
estimate data 9
lambda task 10
task_status
integer (task_status)
Enum: 0 1 2 3 4 5
Example: task_status=1

task status

task status value
pending 0
in progress 1
cancelled 2
failed 3
collect results 4
done 5
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

schedule_id
integer (schedule_id) >= 1

Schedule according to which the task was created

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

Content type
application/json
{
  • "count": 152
}

get task

get task by id

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
Example
{
  • "task_type": "1",
  • "content": {
    },
  • "task_id": 123,
  • "create_time": "2021-07-28T01:23:21.537604+03:00",
  • "end_time": "2018-08-11T10:11:41.674Z",
  • "last_update_time": "2018-08-11T10:11:41.674Z",
  • "task_status": 1,
  • "result_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "count_task_parts_done": 10,
  • "count_task_parts_all": 100,
  • "description": "task description",
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "schedule_id": 1
}

cancel task

cancel task by id

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
Example
{}

delete task

delete task by id

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{}

get task result

get task result by task id

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

Content type
Example
{
  • "result": [
    ],
  • "errors": [
    ]
}

get subtasks

get subtasks of task with filter(s)

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

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

tasks notification policy

get task notification policy

get task notification policy by task id

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "enable": 0,
  • "task_callbacks": [
    ],
  • "subtask_callbacks": [
    ]
}

replace task notification policy

replace task notification policy by task id

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

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

luna account id

Request Body schema: application/json
enable
integer
Default: 0
Enum: 0 1

Whether callbacks enabled or not

Array of any (task_callbacks)

Callbacks for sending tasks id and status to third party system. Callbacks are executed after task status changed.

Sample Output for successful task

{
  "task_id": 123,  
  "task_status": "done",  
  "result_id": "00000000-0000-4000-a000-000000658854", 
  "result_url": "http://127.0.0.1:5000/6/tasks/00000000-0000-4000-a000-000000658854/result"
}

** Sample Output for failed task **

{"task_id": 123, "task_status": "failed"}

** Sample Output for cancelled task **

{"task_id": 123, "task_status": "cancelled"}
Array of any (subtask_callbacks)

Callbacks for sending subtasks id, status and number of completed subtasks to third party system. Callbacks are executed after subtask status changed.

** Sample Output for start subtask **

{"subtask_id": 123, "subtask_status": "in_progress", "completed_subtasks": 0}

** Sample Output for successful subtask **

{"subtask_id": 123, "subtask_status": "done", "completed_subtasks": 1}

** Sample Output for failed subtask **

{"subtask_id": 123, "subtask_status": "failed", "completed_subtasks": 0}

** Sample Output for cancelled subtask **

{"subtask_id": 123, "subtask_status": "cancelled", "completed_subtasks": 0}

Responses

Request samples

Content type
application/json
{
  • "enable": 0,
  • "task_callbacks": [
    ],
  • "subtask_callbacks": [
    ]
}

Response samples

Content type
application/json
Example
{}

errors

get errors of task

get errors of task by task id

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

query Parameters
page
integer >= 1
Default: 1

a page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

the number of items on page.

account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

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

get error count of task

get task error count by task id with filters

path Parameters
task_id
required
integer (task_id) >= 1
Example: 123

task id

query Parameters
error_time__lt
string <date-time>
Example: error_time__lt=2018-08-11T09:11:41.674Z

upper bound for object error_time.

error_time__gte
string <date-time>
Example: error_time__gte=2018-08-11T09:11:41.674Z

lower included bound for object error_time.

error_code
integer (error_code)

error code

account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

Content type
application/json
{
  • "count": 101
}

get errors

get errors with filters

query Parameters
page
integer >= 1
Default: 1

a page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

the number of items on page.

task_ids
string <comma-separate task ids> (task_ids)
Example: task_ids=1,2,3

comma-separate task ids

error_code
integer (error_code)

error code

error_ids
string <comma-separate task ids> (errorIds) non-empty
Example: error_ids=4,5,6

error ids

error_time__lt
string <date-time>
Example: error_time__lt=2018-08-11T09:11:41.674Z

upper bound for object error_time.

error_time__gte
string <date-time>
Example: error_time__gte=2018-08-11T09:11:41.674Z

lower included bound for object error_time.

task_type
integer (task_type)
Enum: 0 1 2 3 4 5 6 7 8 9 10
Example: task_type=1

task type

task type value
unknown 0
linker 1
clusterization 2
report 3
garbage collect 4
additional extract 5
cross match 6
roc-curve calculation 7
export objects 8
estimate data 9
lambda task 10
status_code
integer (status_code) [ 400 .. 599 ]
Example: status_code=500

status code

account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

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

get errors count

get errors count with filters

query Parameters
error_time__lt
string <date-time>
Example: error_time__lt=2018-08-11T09:11:41.674Z

upper bound for object error_time.

error_time__gte
string <date-time>
Example: error_time__gte=2018-08-11T09:11:41.674Z

lower included bound for object error_time.

task_type
integer (task_type)
Enum: 0 1 2 3 4 5 6 7 8 9 10
Example: task_type=1

task type

task type value
unknown 0
linker 1
clusterization 2
report 3
garbage collect 4
additional extract 5
cross match 6
roc-curve calculation 7
export objects 8
estimate data 9
lambda task 10
task_ids
string <comma-separate task ids> (task_ids)
Example: task_ids=1,2,3

comma-separate task ids

error_ids
string <comma-separate task ids> (errorIds) non-empty
Example: error_ids=4,5,6

error ids

error_code
integer (error_code)

error code

account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

Content type
application/json
{
  • "count": 101
}

get error

get error

path Parameters
error_id
required
integer (error_id)
Example: 10

error id

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

Responses

Response samples

Content type
application/json
{
  • "error_id": 10,
  • "task_id": 123,
  • "subtask_id": 5,
  • "error_code": 0,
  • "link": "string",
  • "description": "Faces not found",
  • "detail": "One or more faces not found, including face with id '8f4f0070-c464-460b-bf78-fac225df72e9'",
  • "additional_info": "8f4f0070-c464-460b-bf78-fac225df72e9",
  • "error_time": "2021-07-28T01:23:21.537604+03:00"
}

task processing

clustering task

Create new clustering task.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
Any of
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
object (clustering_task_content_events)

Events clustering task content

Responses

Request samples

Content type
application/json
Example
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

exporter task

Collect objects of interest, returns zip archive with csv file and images (optional).

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
object (exporter_task_content)

exporter task content

Responses

Request samples

Content type
application/json
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

linker task

Create new linker task.

Task perfomance.

  • Firstly, it checks existence of specified list_id or create new list, if create_list parameter set to 1

  • It gets face ids from luna-faces or luna-events* with filters and pagination. Then forms one or several subtasks with 1000(or less) face ids for each, and save content for each subtask into luna-image-store.

  • For each subtask: it gets subtask content (list_id and face_ids from luna-image-store) and do request to luna-faces to link specified faces to specified list. Each subtask saves results to luna-image-store with its own result_id

  • After the last subtask is done, it collect results from all subtasks, merge and put them to luna-image store with new result_id (as task result)

* for luna-events:

  • Get event with its descriptor from Luna Events

  • Create face, attribute(s) and sample(s) in Luna Faces. Heavy requests to internal services are executed with a timeout x 100 compared to the set one.

  • Link created face to the list

* if luna-image-store is disabled no subtask/task result will be stored

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
object (linker_task_content)

linker task content

Responses

Request samples

Content type
application/json
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

garbage collecting task

Create new garbage collecting task. Heavy requests to internal services are executed with a timeout x 100 compared to the set one.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
any (gc_task_content)

Responses

Request samples

Content type
application/json
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

reporter task

Create report in csv format by a task. Now support only clasterization tasks for reporting. Report contains additional info about clusterization objects (faces or events). You can set which additional info set to the report. First and second columns in report always a number of cluster and an object id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
object (reporter_task_content)

reporter task content

Responses

Request samples

Content type
application/json
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

additional extract task

Create new additional extract task, extraction of missing descriptors and base attributes is available.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
any (additional_extract_task_content)

additional extractor task content.

Responses

Request samples

Content type
application/json
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

cross matching task

Create cross matching task. Match references with candidates.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
object (cross_match_task_content)

cross match task content

Responses

Request samples

Content type
application/json
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

ROC-curve calculating task

Create ROC task. ROC (or Receiver Operating Characteristic) is a performance measurement for classification problem at various thresholds settings. The ROC-curve is plotted with TPR (True Positive Rate) against the FPR (False Positive Rate). TPR is a true positive match pair count divided by a count of total expected positive match pairs, and FPR is a false positive match pair count divided by a count of total expected negative match pairs. Each point (FPR, TPR) of the ROC-cure corresponds to a certain similarity threshold. Using ROC the model performance is determined by looking at the area under the ROC-curve (or AUC) and the ROC-curve and the secondary main diagonal intersection point where type I and type II error rates are equal. The model performance also determined by getting into the top-N probability, i.e. probability of getting a positive match pair into the top-N for any match result group sorted by similarity.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
object (roc_task_content)

roc task content.

Responses

Request samples

Content type
application/json
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

estimator task

Create new estimator task.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
object (estimator_task_content)

estimator task content

Responses

Request samples

Content type
application/json
Example
{
  • "notificaion_policy": {
    },
  • "description": "estimator task with zip archive",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

lambda task

Create new lambda task.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
object (notification_policy)

tasks processing notification policy

object (result_storage_policy)

tasks processing result storage policy

description
string (task_description) <= 128 characters

task description

required
object (lambda_task_content)

lambda task content

Responses

Request samples

Content type
application/json
{
  • "notification_policy": {
    },
  • "result_storage_policy": {
    },
  • "description": "task description",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": 123
}

schedules

create tasks schedule

Create a new task schedule.

Execution of scheduled tasks will be regulated according to the trigger and optionally starts one task immediately (see start_immediately parameter in behavior section)

No task from the schedule will be executed if the previous task has not yet been completed

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/json"

content type is application/json.

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

luna account id

Request Body schema: application/json
required
any (task_schedulable_request)

task schedule

required
object (schedule_trigger)

task schedule trigger

object (schedule_behaviour)

schedule behaviour parameters

Responses

Request samples

Content type
application/json
{
  • "task": {
    },
  • "trigger": {
    },
  • "behaviour": {
    }
}

Response samples

Content type
application/json
{
  • "schedule_id": 1
}

get tasks schedules

get tasks schedules with filters

query Parameters
page
integer >= 1
Default: 1

a page number.

page_size
integer [ 1 .. 1000 ]
Default: 10

the number of items on page.

task_type
integer (task_type_schedulable)
Enum: 1 2 3 4 5 6 7 8 9 10
Example: task_type=1

task type

task type value
linker 1
clusterization 2
report 3
garbage collect 4
additional extract 5
cross match 6
roc-curve calculation 7
export objects 8
estimate data 9
lambda 10

Scheduling a report task will spawn 2 tasks: clusterization and then report. If the clustering task is not completed, the report task will not be created

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

upper bound for object create_time.

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

lower included bound for object create_time.

account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

get tasks schedule

get tasks schedule

path Parameters
schedule_id
required
integer (schedule_id) >= 1

Schedule according to which the task was created

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "schedule_id": 1,
  • "task_ids": [
    ],
  • "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
  • "task": {
    },
  • "trigger": {
    },
  • "status": "running",
  • "next_run_time": "2021-07-28T01:23:21.537604+03:00",
  • "create_time": "2021-07-28T01:23:21.537604+03:00",
  • "last_update_time": "2021-07-28T01:23:21.537604+03:00"
}

replace tasks schedule

Replace tasks schedule:

  • if any task created by old schedule is running, it will be cancelled

  • schedule parameters will be replaced with the new ones

  • tasks will be executed according to the new schedule

path Parameters
schedule_id
required
integer (schedule_id) >= 1

Schedule according to which the task was created

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

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

luna account id

Request Body schema: application/json
required
any (task_schedulable_request)

task schedule

required
object (schedule_trigger)

task schedule trigger

object (schedule_behaviour)

schedule behaviour parameters

Responses

Request samples

Content type
application/json
{
  • "task": {
    },
  • "trigger": {
    },
  • "behaviour": {
    }
}

Response samples

Content type
application/json
{
  • "schedule_id": 1
}

patch tasks schedule

pause/start tasks schedule

path Parameters
schedule_id
required
integer (schedule_id) >= 1

Schedule according to which the task was created

query Parameters
action
required
string
Enum: "pause" "start"

pause/start tasks schedule

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

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

luna account id

Responses

Response samples

Content type
application/json
{}

delete tasks schedule

delete tasks schedule

path Parameters
schedule_id
required
integer (schedule_id) >= 1

Schedule according to which the task was created

query Parameters
account_id
string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]...
Example: account_id=7daa0e35-36a2-474a-8f2b-87f78b59d080

account id.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{}

documents

get openapi documentation

Get service OpenApi documentation. If Accept request header is of type application/x-yaml, returns documentation in yaml format or returns html documentation, if Accept-Type is text/html

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Accept
required
string (accept_docs_handler)
Enum: "application/x-yaml" "text/html"

acceptable type of receiving data

Responses

Response samples

Content type
application/json
{}

get development manual

Get sphinx documentation - Development Manual. After the request you will be redirected to the page /docs/dev/index.html

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{}

config

get service configuration

Get service configuration. Passwords and tokens will be hidden in the response.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Accept
string
Enum: "application/json" "text/plain"

acceptable type of receiving data

Responses

Response samples

Content type
{
  • "INFLUX_MONITORING": {
    }
}

plugins

get list of plugins

Get list of service plugins

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

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

metrics

get service requests statistics

Get statistics of success and failed requests to the service in prometheus format.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
text/plain
# HELP request_count_total Counter of requests
# TYPE request_count_total counter
request_count_total{path="GET:/healthcheck",status_code="200"} 1.0

health

get health

get health of service

query Parameters
include_luna_services
integer
Default: 0
Enum: 0 1

whether to perform healthchecks for dependent luna services.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "execution_time": 0.123
}