模型
POST /models.add_or_update_metadata
描述
添加或更新模型元数据
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
metadata required | Metadata items to add or update | < models.metadata_item > array |
model required | ID of the model | string |
replace_metadata optional | If set then the all the metadata items will be replaced with the provided ones. Otherwise only the provided metadata items will be updated or added Default : false | boolean |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of models updated (0 or 1) | integer |
POST /models.archive_many
描述
归档模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids required | IDs of the models to archive | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
archived optional | Indicates whether the model was archived | boolean |
id optional | ID of the succeeded entity | string |
POST /models.create
描述
创建一个与任务无关的新模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
comment optional | Model comment | string |
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 model | string |
project optional | Project to which to model belongs | string |
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 ID | string |
uri required | URI for the model | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
created optional | Was the model created | boolean |
id optional | ID of the model | string |
POST /models.delete
描述
删除一个模型。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
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 ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | Indicates whether the model was deleted | boolean |
url optional | The url of the model file | string |
POST /models.delete_many
描述
删除模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
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 the models to delete | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
deleted optional | Indicates whether the model was deleted | boolean |
id optional | ID of the succeeded entity | string |
url optional | The url of the model file | string |
POST /models.delete_metadata
描述
从模型中删除元数据
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
keys required | The list of metadata keys to delete | < string > array |
model required | ID of the model | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of models updated (0 or 1) | integer |
POST /models.edit
描述
编辑现有模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
comment optional | Model comment | string |
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 ID | string |
name optional | Model name Unique within the company. | string |
parent optional | Parent model | string |
project optional | Project to which to model belongs | string |
ready optional | Indication if the model is final and can be used by other tasks | 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 ID | string |
uri optional | URI for the model | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of models updated (0 or 1) | integer |
POST /models.get_all
描述
获取所有模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
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 |
last_update optional | List of last_update constraint strings (utcformat, epoch) with an optional prefix modifier (>, >=, <, <=) | < 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 |
refresh_scroll optional | If set then all the data received with this scroll will be requeried | boolean |
scroll_id optional | Scroll ID returned from the previos calls to get_all | string |
search_text optional | Free text search query | string |
size optional | The number of models to retrieve Minimum value : 1 | integer |
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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
models optional | Models list | < models.model > array |
scroll_id optional | Scroll ID that can be used with the next calls to get_all to retrieve more data | string |
POST /models.get_all_ex
描述
获取所有模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
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 |
allow_public optional | Allow public models to be returned in the results Default : true | boolean |
filters optional | < string, filters > map | |
framework optional | List of frameworks | < string > array |
id optional | List of model IDs | < string > array |
include_stats optional | If true, include models statistic in response Default : false | boolean |
include_subprojects optional | If set to 'true' and project field is set then models from the subprojects are searched too Default : false | boolean |
last_update optional | List of last_update constraint strings (utcformat, epoch) with an optional prefix modifier (>, >=, <, <=) | < 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 |
refresh_scroll optional | If set then all the data received with this scroll will be requeried | boolean |
scroll_id optional | Scroll ID returned from the previos calls to get_all_ex | string |
search_text optional | Free text search query | string |
size optional | The number of models to retrieve Minimum value : 1 | integer |
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 |
过滤器
Name | Description | Schema |
---|---|---|
all optional | All the terms in 'all' condition are combined with 'and' operation | all |
any optional | All the terms in 'any' condition are combined with 'or' operation | any |
op optional | The operation between 'any' and 'all' parts of the filter if both are provided Default : "and" | enum (and, or) |
全部
Name | Schema |
---|---|
exclude optional | < string > array |
include optional | < string > array |
任意
Name | Schema |
---|---|
exclude optional | < string > array |
include optional | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
models optional | Models list | < models.model > array |
scroll_id optional | Scroll ID that can be used with the next calls to get_all_ex to retrieve more data | string |
POST /models.get_by_id
描述
获取模型信息
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
model required | Model id | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
model optional | Model info | models.model |
POST /models.get_by_id_ex
描述
获取所有模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
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 |
last_update optional | List of last_update constraint strings (utcformat, epoch) with an optional prefix modifier (>, >=, <, <=) | < 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 query | string |
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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
models optional | Models list | < models.model > array |
POST /models.get_by_task_id
描述
获取模型信息
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
task optional | Task id | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
model optional | Model info | models.model |
POST /models.get_frameworks
描述
获取公司模型中使用的框架列表
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
frameworks optional | Unique list of the frameworks used in the company models | < string > array |
POST /models.make_private
描述
将公共模型转换为私有
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids optional | Ids of the models to convert. Only the models originated by the company can be converted | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of models updated | integer |
POST /models.make_public
描述
将公司模型转换为公开
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids optional | Ids of the models to convert | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of models updated | integer |
POST /models.move
描述
将模型移动到项目
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids required | Models to move | < string > array |
project optional | Target project ID. If not provided, project_name must be provided. Use null for the root project | 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 |
响应
HTTP Code | Schema |
---|---|
200 | object |
POST /models.publish_many
描述
发布模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
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 the 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
id optional | ID of the succeeded entity | string |
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 updated | boolean |
published_task
Name | Description | Schema |
---|---|---|
data optional | Data returned from the task publishing operation. | data |
id optional | Task id | string |
数据
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /models.set_ready
描述
将模型准备标志设置为True。如果模型是任务的输出模型
则尝试发布任务。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
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 id | string |
publish_task optional | Indicates that the associated task (if exists) should be published. Optional, the default value is True. | boolean |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
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
Name | Description | Schema |
---|---|---|
data optional | Data returned from the task publishing operation. | data |
id optional | Task id | string |
数据
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /models.unarchive_many
描述
解档模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids required | IDs of the models to unarchive | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
id optional | ID of the succeeded entity | string |
unarchived optional | Indicates whether the model was unarchived | boolean |
POST /models.update
描述
更新模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
comment optional | Model comment | string |
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 id | string |
name optional | Model name Unique within the company. | string |
project optional | Project to which to model belongs | string |
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 ID | string |
ui_cache optional | UI cache for this model | object |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of models updated (0 or 1) | integer |
POST /models.update_for_task
描述
为任务创建或更新一个新模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
comment optional | Model comment | string |
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 id | string |
uri optional | URI for the model. Exactly one of uri or override_model_id is a required. | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
created optional | Was the model created | boolean |
fields optional | Updated fields names and values | object |
id optional | ID of the model | string |
updated optional | Number of models updated (0 or 1) | integer |
POST /models.update_tags
描述
从多个模型中添加或删除标签
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
add_tags optional | User tags to add | < string > array |
ids optional | IDs of the models to update | < string > array |
remove_tags optional | User tags to remove | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | The number of updated models | integer |