Skip to main content

models

POST /models.add_or_update_metadata#

Description#

Add or update model metadata

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
metadata
required
Metadata items to add or update< models.metadata_item > array
model
required
ID of the modelstring

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
updated
optional
Number of models updated (0 or 1)integer

POST /models.archive_many#

Description#

Archive models

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
ids
required
IDs of models to archive< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameSchema
failed
optional
< failed > array
succeeded
optional
< succeeded > array

failed

NameDescriptionSchema
error
optional
Error infoerror
id
optional
ID of the failed entitystring

error

NameSchema
codes
optional
< integer > array
data
optional
object
msg
optional
string

succeeded

NameDescriptionSchema
archived
optional
Indicates whether the model was archivedboolean
id
optional
ID of the succeeded entitystring

POST /models.create#

Description#

Create a new model not associated with a task

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
comment
optional
Model commentstring
design
optional
Json[d] object representing the model design. Should be identical to the
network design of the task which created the model
object
framework
optional
Framework on which the model is based. Case insensitive. Should be identical to
the framework of the task which created the model.
string
labels
optional
Json object< string, integer > map
name
required
Model name Unique within the company.string
parent
optional
Parent modelstring
project
optional
Project to which to model belongsstring
public
optional
Create a public model Default is false.
Default : false
boolean
ready
optional
Indication if the model is final and can be used by other tasks. Default is
false.
Default : false
boolean
system_tags
optional
System tags list. This field is reserved for system use, please don't use it.< string > array
tags
optional
User-defined tags list< string > array
task
optional
Associated task IDstring
uri
required
URI for the modelstring

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
created
optional
Was the model createdboolean
id
optional
ID of the modelstring

POST /models.delete#

Description#

Delete a model.

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
force
optional
Force. Required if there are tasks that use the model as an execution model, or
if the model's creating task is published.
boolean
model
required
Model IDstring

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
deleted
optional
Indicates whether the model was deletedboolean
url
optional
The url of the model filestring

POST /models.delete_many#

Description#

Delete models

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
force
optional
Force. Required if there are tasks that use the model as an execution model, or
if the model's creating task is published.
boolean
ids
required
IDs of models to delete< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameSchema
failed
optional
< failed > array
succeeded
optional
< succeeded > array

failed

NameDescriptionSchema
error
optional
Error infoerror
id
optional
ID of the failed entitystring

error

NameSchema
codes
optional
< integer > array
data
optional
object
msg
optional
string

succeeded

NameDescriptionSchema
deleted
optional
Indicates whether the model was deletedboolean
id
optional
ID of the succeeded entitystring
url
optional
The url of the model filestring

POST /models.delete_metadata#

Description#

Delete metadata from model

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
keys
required
The list of metadata keys to delete< string > array
model
required
ID of the modelstring

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
updated
optional
Number of models updated (0 or 1)integer

POST /models.edit#

Description#

Edit an existing model

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
comment
optional
Model commentstring
design
optional
Json[d] object representing the model design. Should be identical to the
network design of the task which created the model
object
framework
optional
Framework on which the model is based. Case insensitive. Should be identical to
the framework of the task which created the model.
string
iteration
optional
Iteration (used to update task statistics)integer
labels
optional
Json object< string, integer > map
model
required
Model IDstring
name
optional
Model name Unique within the company.string
parent
optional
Parent modelstring
project
optional
Project to which to model belongsstring
ready
optional
Indication if the model is final and can be used by other tasksboolean
system_tags
optional
System tags list. This field is reserved for system use, please don't use it.< string > array
tags
optional
User-defined tags list< string > array
task
optional
Associated task IDstring
uri
optional
URI for the modelstring

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
fields
optional
Updated fields names and valuesobject
updated
optional
Number of models updated (0 or 1)integer

POST /models.get_all#

Description#

Get all models

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
all
optional
Multi-field pattern condition (all fields match pattern)models.multi_field_pattern_data
any
optional
Multi-field pattern condition (any field matches pattern)models.multi_field_pattern_data
framework
optional
List of frameworks< string > array
id
optional
List of model IDs< string > array
name
optional
Get only models whose name matches this pattern (python regular expression
syntax)
string
only_fields
optional
List of model field names (if applicable, nesting is supported using '.'). If
provided, this list defines the query's projection (only these fields will be
returned for each result entry)
< string > array
order_by
optional
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
< string > array
page
optional
Page number, returns a specific page out of the resulting list of models
Minimum value : 0
integer
page_size
optional
Page size, specifies the number of results returned in each page (last page may
contain fewer results)
Minimum value : 1
integer
project
optional
List of associated project IDs< string > array
ready
optional
Indication whether to retrieve only models that are marked ready If not
supplied returns both ready and not-ready projects.
boolean
search_text
optional
Free text search querystring
system_tags
optional
System tags list used to filter results. Prepend '-' to system tag name to
indicate exclusion
< string > array
tags
optional
User-defined tags list used to filter results. Prepend '-' to tag name to
indicate exclusion
< string > array
task
optional
List of associated task IDs< string > array
uri
optional
List of model URIs< string > array
user
optional
List of user IDs used to filter results by the model's creating user< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
models
optional
Models list< models.model > array

POST /models.get_all_ex#

Description#

Get all models

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
all
optional
Multi-field pattern condition (all fields match pattern)models.multi_field_pattern_data
any
optional
Multi-field pattern condition (any field matches pattern)models.multi_field_pattern_data
framework
optional
List of frameworks< string > array
id
optional
List of model IDs< string > array
include_subprojects
optional
If set to 'true' and project field is set then models from the subprojects are
searched too
Default : false
boolean
name
optional
Get only models whose name matches this pattern (python regular expression
syntax)
string
only_fields
optional
List of model field names (if applicable, nesting is supported using '.'). If
provided, this list defines the query's projection (only these fields will be
returned for each result entry)
< string > array
order_by
optional
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
< string > array
page
optional
Page number, returns a specific page out of the resulting list of models
Minimum value : 0
integer
page_size
optional
Page size, specifies the number of results returned in each page (last page may
contain fewer results)
Minimum value : 1
integer
project
optional
List of associated project IDs< string > array
ready
optional
Indication whether to retrieve only models that are marked ready If not
supplied returns both ready and not-ready projects.
boolean
search_text
optional
Free text search querystring
system_tags
optional
System tags list used to filter results. Prepend '-' to system tag name to
indicate exclusion
< string > array
tags
optional
User-defined tags list used to filter results. Prepend '-' to tag name to
indicate exclusion
< string > array
task
optional
List of associated task IDs< string > array
uri
optional
List of model URIs< string > array
user
optional
List of user IDs used to filter results by the model's creating user< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
models
optional
Models list< models.model > array

POST /models.get_by_id#

Description#

Gets model information

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
model
required
Model idstring

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
model
optional
Model infomodels.model

POST /models.get_by_id_ex#

Description#

Get all models

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
all
optional
Multi-field pattern condition (all fields match pattern)models.multi_field_pattern_data
any
optional
Multi-field pattern condition (any field matches pattern)models.multi_field_pattern_data
framework
optional
List of frameworks< string > array
id
optional
List of model IDs< string > array
name
optional
Get only models whose name matches this pattern (python regular expression
syntax)
string
only_fields
optional
List of model field names (if applicable, nesting is supported using '.'). If
provided, this list defines the query's projection (only these fields will be
returned for each result entry)
< string > array
order_by
optional
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
< string > array
page
optional
Page number, returns a specific page out of the resulting list of models
Minimum value : 0
integer
page_size
optional
Page size, specifies the number of results returned in each page (last page may
contain fewer results)
Minimum value : 1
integer
project
optional
List of associated project IDs< string > array
ready
optional
Indication whether to retrieve only models that are marked ready If not
supplied returns both ready and not-ready projects.
boolean
search_text
optional
Free text search querystring
system_tags
optional
System tags list used to filter results. Prepend '-' to system tag name to
indicate exclusion
< string > array
tags
optional
User-defined tags list used to filter results. Prepend '-' to tag name to
indicate exclusion
< string > array
task
optional
List of associated task IDs< string > array
uri
optional
List of model URIs< string > array
user
optional
List of user IDs used to filter results by the model's creating user< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
models
optional
Models list< models.model > array

POST /models.get_by_task_id#

Description#

Gets model information

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
task
optional
Task idstring

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
model
optional
Model infomodels.model

POST /models.get_frameworks#

Description#

Get the list of frameworks used in the company models

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
projects
optional
The list of projects which models will be analyzed. If not passed or empty then
all the company and public models will be analyzed
< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
frameworks
optional
Unique list of the frameworks used in the company models< string > array

POST /models.make_private#

Description#

Convert public models to private

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
ids
optional
Ids of the models to convert. Only the models originated by the company can be
converted
< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
updated
optional
Number of models updatedinteger

POST /models.make_public#

Description#

Convert company models to public

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
ids
optional
Ids of the models to convert< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
updated
optional
Number of models updatedinteger

POST /models.move#

Description#

Move models to a project

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
ids
required
Models to move< string > array
project
optional
Target project ID. If not provided, project_name must be provided.string
project_name
optional
Target project name. If provided and a project with this name does not exist, a
new project will be created. If not provided, project must be provided.
string

Responses#

HTTP CodeSchema
200object

POST /models.publish_many#

Description#

Publish models

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
force_publish_task
optional
Publish the associated tasks (if exist) even if they are not in the 'stopped'
state. Optional, the default value is False.
boolean
ids
required
IDs of models to publish< string > array
publish_tasks
optional
Indicates that the associated tasks (if exist) should be published. Optional,
the default value is True.
boolean

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameSchema
failed
optional
< failed > array
succeeded
optional
< succeeded > array

failed

NameDescriptionSchema
error
optional
Error infoerror
id
optional
ID of the failed entitystring

error

NameSchema
codes
optional
< integer > array
data
optional
object
msg
optional
string

succeeded

NameDescriptionSchema
id
optional
ID of the succeeded entitystring
published_task
optional
Result of publishing of the model's associated task (if exists). Returned only if the task was published successfully as part of the model publishing.published_task
updated
optional
Indicates whether the model was updatedboolean

published_task

NameDescriptionSchema
data
optional
Data returned from the task publishing operation.data
id
optional
Task idstring

data

NameDescriptionSchema
fields
optional
Updated fields names and valuesobject
updated
optional
Number of tasks updated (0 or 1)integer

POST /models.set_ready#

Description#

Set the model ready flag to True. If the model is an output model of a task
then try to publish the task.

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
force_publish_task
optional
Publish the associated task (if exists) even if it is not in the 'stopped'
state. Optional, the default value is False.
boolean
model
required
Model idstring
publish_task
optional
Indicates that the associated task (if exists) should be published. Optional,
the default value is True.
boolean

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
published_task
optional
Result of publishing of the model's associated task (if exists). Returned only
if the task was published successfully as part of the model publishing.
published_task
updated
optional
Number of models updated (0 or 1)integer

published_task

NameDescriptionSchema
data
optional
Data returned from the task publishing operation.data
id
optional
Task idstring

data

NameDescriptionSchema
fields
optional
Updated fields names and valuesobject
updated
optional
Number of tasks updated (0 or 1)integer

POST /models.unarchive_many#

Description#

Unarchive models

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
ids
required
IDs of the models to unarchive< string > array

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameSchema
failed
optional
< failed > array
succeeded
optional
< succeeded > array

failed

NameDescriptionSchema
error
optional
Error infoerror
id
optional
ID of the failed entitystring

error

NameSchema
codes
optional
< integer > array
data
optional
object
msg
optional
string

succeeded

NameDescriptionSchema
id
optional
ID of the succeeded entitystring
unarchived
optional
Indicates whether the model was unarchivedboolean

POST /models.update#

Description#

Update a model

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
comment
optional
Model commentstring
created
optional
Model creation time (UTC)string (date-time)
iteration
optional
Iteration (used to update task statistics if an associated task is reported)integer
model
required
Model idstring
name
optional
Model name Unique within the company.string
project
optional
Project to which to model belongsstring
ready
optional
Indication if the model is final and can be used by other tasks Default is
false.
Default : false
boolean
system_tags
optional
System tags list. This field is reserved for system use, please don't use it.< string > array
tags
optional
User-defined tags list< string > array
task
optional
Associated task IDstring
ui_cache
optional
UI cache for this modelobject

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
fields
optional
Updated fields names and valuesobject
updated
optional
Number of models updated (0 or 1)integer

POST /models.update_for_task#

Description#

Create or update a new model for a task

Parameters#

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

request

NameDescriptionSchema
comment
optional
Model commentstring
iteration
optional
Iteration (used to update task statistics)integer
name
optional
Model name Unique within the company.string
override_model_id
optional
Override model ID. If provided, this model is updated in the task. Exactly one
of override_model_id or uri is required.
string
system_tags
optional
System tags list. This field is reserved for system use, please don't use it.< string > array
tags
optional
User-defined tags list< string > array
task
required
Task idstring
uri
optional
URI for the model. Exactly one of uri or override_model_id is a required.string

Responses#

HTTP CodeSchema
200Response 200

Response 200

NameDescriptionSchema
created
optional
Was the model createdboolean
fields
optional
Updated fields names and valuesobject
id
optional
ID of the modelstring
updated
optional
Number of models updated (0 or 1)integer