获取模型版本列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
GET /api/v1/models/{ModelId}/versions
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
PageNumber | integer | 否 | 模型版本列表的页码。起始值为1,默认为1。 | 1 |
PageSize | integer | 否 | 分页查询时设置的每页行数。默认为10。 | 10 |
Order | string | 否 | 分页查询时,对指定的排序字段进行升序或降序。默认ASC。
| DESC |
SortBy | string | 否 | 分页查询时的排序字段。目前GmtCreateTime字段用于排序。 | GmtCreateTime |
VersionName | string | 否 | 配置模型版本名称,来过滤模型版本列表。 | 1.0.1 |
FormatType | string | 否 | 配置模型格式,来过滤模型版本列表。取值如下:
| SavedModel |
FrameworkType | string | 否 | 配置模型框架,来过滤模型版本列表,取值如下:
-XGBoost
| TensorFlow |
ModelId | string | 是 | 模型ID。如何获取模型ID,请参见ListModels。 | model-dajbueh****** |
SourceType | string | 否 | 根据模型来源类型,来过滤模型版本列表。取值如下:
| PAIFlow |
SourceId | string | 否 | 来源ID。
其中:
| region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf |
Label | string | 否 | 标签串。用于列表过滤,标签中Key或Value中,有指定字符串的,都会被过滤出来。 | key1 |
ApprovalStatus | string | 否 | 根据准入状态来过滤模型版本列表,取值如下:
| Approved |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC***3C83E",
"Versions": [
{
"VersionName": "0.1.0",
"GmtCreateTime": "2021-01-21T17:12:35Z",
"GmtModifiedTime": "2021-01-21T17:12:35Z",
"UserId": "155770209******",
"OwnerId": "155770209******",
"Uri": "oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/",
"VersionDescription": "情感分析。",
"Labels": [
{
"Key": "env",
"Value": "test"
}
],
"FormatType": "SavedModel",
"FrameworkType": "TensorFlow",
"Options": "{}",
"Metrics": {
"test": "test",
"test2": 1
},
"TrainingSpec": {
"test": "test",
"test2": 1
},
"InferenceSpec": {
"test": "test",
"test2": 1
},
"SourceType": "PAIFlow",
"SourceId": "region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf",
"ApprovalStatus": ""
}
],
"TotalCount": 15
}
错误码
访问错误中心查看更多错误码。