description: "Last time this task was created, updated, changed or events for this task were reported"
type: string
format: "date-time"
}
last_iteration {
description: "Last iteration reported for this task"
type: integer
}
last_metrics {
description: "Last metric variants (hash to events), one for each metric hash"
type: object
additionalProperties {
"$ref": "#/definitions/last_metrics_variants"
}
}
}
}
}
get_by_id {
"2.1" {
description: "Gets task information"
request {
type: object
required: [ task ]
properties {
task {
description: "Task ID"
type: string
}
}
}
response {
type: object
properties {
task {
description: "Task info"
"$ref": "#/definitions/task"
}
}
}
}
}
get_all_ex {
internal: true
"2.1": ${get_all."2.1"}
}
get_all {
"2.1" {
description: "Get all the company's tasks and all public tasks"
request {
type: object
properties {
id {
description: "List of IDs to filter by"
type: array
items { type: string }
}
name {
description: "Get only tasks whose name matches this pattern (python regular expression syntax)"
type: string
}
user {
description: "List of user IDs used to filter results by the task's creating user"
type: array
items { type: string }
}
project {
type: array
items { type: string }
}
page {
description: "Page number, returns a specific page out of the resulting list of tasks"
type: integer
minimum: 0
}
page_size {
description: "Page size, specifies the number of results returned in each page (last page may contain fewer results)"
type: integer
minimum: 1
}
order_by {
description: "List of field names to order by. When search_text is used, '@text_score' can be used as a field representing the text score of returned documents. Use '-' prefix to specify descending order. Optional, recommended when using page"
type: array
items { type: string }
}
type {
description: "List of task types. One or more of: 'import', 'annotation', 'training' or 'testing' (case insensitive)"
description: "List of task field names (nesting is supported using '.', e.g. execution.model_labels). If provided, this list defines the query's projection (only these fields will be returned for each result entry)"
type: array
items { type: string }
}
parent {
description: "Parent ID"
type: string
}
status_changed {
description: "List of status changed constraint strings (utcformat, epoch) with an optional prefix modifier (>, >=, <, <=)"
type: array
items {
type: string
pattern: "^(>=|>|<=|<)?.*$"
}
}
search_text {
description: "Free text search query"
type: string
}
_all_ {
description: "Multi-field pattern condition (all fields match pattern)"
"$ref": "#/definitions/multi_field_pattern_data"
}
_any_ {
description: "Multi-field pattern condition (any field matches pattern)"
"$ref": "#/definitions/multi_field_pattern_data"
}
}
dependencies {
page: [ page_size ]
}
}
response {
type: object
properties {
tasks {
description: "List of tasks"
type: array
items { "$ref": "#/definitions/task" }
}
}
}
}
}
create {
"2.1" {
description: "Create a new task"
request {
type: object
required: [
name
type
]
properties {
name {
description: "Task name. Unique within the company."
description: "Response from events.delete_for_task"
type: object
additionalProperties: true
}
deleted_models {
description: "Number of output models deleted by the reset"
type: integer
}
updated {
description: "Number of tasks updated (0 or 1)"
type: integer
enum: [ 0, 1 ]
}
fields {
description: "Updated fields names and values"
type: object
additionalProperties: true
}
}
}
}
}
delete {
"2.1" {
description: """Delete a task along with any information stored for it (statistics, frame updates etc.)
Unless Force flag is provided, operation will fail if task has objects associated with it - i.e. children tasks and projects.
Models that refer to the deleted task will be updated with a task ID indicating a deleted task.
"""
request = {
type: object
required: [
task
]
properties {
move_to_trash {
description: "Move task to trash instead of deleting it. For internal use only, tasks in the trash are not visible from the API and cannot be restored!"
type: boolean
default: false
}
force = ${_references.force_arg} {
description: "If not true, call fails if the task status is 'in_progress'"
}
}
} ${_references.status_change_request}
response {
type: object
properties {
deleted {
description: "Indicates whether the task was deleted"
type: boolean
}
updated_children {
description: "Number of child tasks whose parent property was updated"
type: integer
}
updated_models {
description: "Number of models whose task property was updated"
type: integer
}
updated_versions {
description: "Number of dataset versions whose task property was updated"
type: integer
}
frames {
description: "Response from frames.rollback"
type: object
additionalProperties: true
}
events {
description: "Response from events.delete_for_task"
type: object
additionalProperties: true
}
}
}
}
}
started {
"2.1" {
description: "Mark a task status as in_progress. Optionally allows to set the task's execution progress."
request = {
type: object
required: [
task
]
properties.force = ${_references.force_arg} {
description: "If not true, call fails if the task status is not 'not_started'"
}
} ${_references.status_change_request}
response {
type: object
properties {
started {
description: "Number of tasks started (0 or 1)"
type: integer
enum: [ 0, 1 ]
}
updated {
description: "Number of tasks updated (0 or 1)"
type: integer
enum: [ 0, 1 ]
}
fields {
description: "Updated fields names and values"
type: object
additionalProperties: true
}
}
}
}
}
stop {
"2.1" {
description: "Request to stop a running task"
request = {
type: object
required: [
task
]
properties.force = ${_references.force_arg} {
description: "If not true, call fails if the task status is not 'in_progress'"
}
} ${_references.status_change_request}
response {
type: object
properties {
updated {
description: "Number of tasks updated (0 or 1)"
type: integer
enum: [ 0, 1 ]
}
fields {
description: "Updated fields names and values"
type: object
additionalProperties: true
}
}
}
}
}
stopped {
"2.1" {
description: "Signal a task has stopped"
request = {
type: object
required: [
task
]
properties.force = ${_references.force_arg} {
description: "If not true, call fails if the task status is not 'stopped'"
}
} ${_references.status_change_request}
response {
type: object
properties {
updated {
description: "Number of tasks updated (0 or 1)"
type: integer
enum: [ 0, 1 ]
}
fields {
description: "Updated fields names and values"
type: object
additionalProperties: true
}
}
}
}
}
failed {
"2.1" {
description: "Indicates that task has failed"
request = {
type: object
required: [
task
]
properties.force = ${_references.force_arg}
} ${_references.status_change_request}
response {
type: object
properties {
updated {
description: "Number of tasks updated (0 or 1)"
type: integer
enum: [ 0, 1 ]
}
fields {
description: "Updated fields names and values"
type: object
additionalProperties: true
}
}
}
}
}
close {
"2.1" {
description: "Indicates that task is closed"
request = {
type: object
required: [
task
]
properties.force = ${_references.force_arg}
} ${_references.status_change_request}
response {
type: object
properties {
updated {
description: "Number of tasks updated (0 or 1)"
type: integer
enum: [ 0, 1 ]
}
fields {
description: "Updated fields names and values"
type: object
additionalProperties: true
}
}
}
}
}
publish {
"2.1" {
description: """Mark a task status as published.
For Annotation tasks - if any changes were committed by this task, a new version in the dataset together with an output view are created.
For Training tasks - if a model was created, it should be set to ready."""
request = {
type: object
required: [
task
]
properties {
force = ${_references.force_arg} {
description: "If not true, call fails if the task status is not 'stopped'"
}
publish_model {
description: "Indicates that the task output model (if exists) should be published. Optional, the default value is True."