Retrieves a list of model versions.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
paimodel:ListModelVersions | list | *All Resource
| None | None |
Request syntax
GET /api/v1/models/{ModelId}/versions HTTP/1.1Path Parameters
Parameter | Type | Required | Description | Example |
ModelId | string | Yes | The model ID. For more information, see ListModels. | model-dajbueh****** |
Request parameters
Parameter | Type | Required | Description | Example |
PageNumber | integer | No | The page number of the model version list. The value starts from 1. The default value is 1. | 1 |
PageSize | integer | No | The number of entries to return on each page for a paged query. The default value is 10. | 10 |
Order | string | No | The order in which to sort the entries in the paged query. The default value is ASC.
| DESC |
SortBy | string | No | The field to use for sorting in the paged query. Currently, the GmtCreateTime field is used for sorting. | GmtCreateTime |
VersionName | string | No | The model version name. This parameter is used to filter the model version list. | 1.0.1 |
FormatType | string | No | The model format. This parameter is used to filter the model version list. Valid values:
Valid values:
| SavedModel |
FrameworkType | string | No | The model framework. This parameter is used to filter the model version list. Valid values:
Valid values:
| TensorFlow |
SourceType | string | No | The source type of the model. This parameter is used to filter the model version list. Valid values:
Valid values:
| PAIFlow |
SourceId | string | No | The source ID.
where:
| region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf |
Label | string | No | The label string. This parameter is used to filter the list. Model versions that have the specified string in the key or value of their labels are returned. | key1 |
ApprovalStatus | string | No | The approval status. This parameter is used to filter the model version list. Valid values:
| Approved |
Response elements
Element | Type | Description | Example |
object | The response body. | ||
RequestId | string | The request ID. | 473469C7-AA6F-4DC5-B3DB-A3DC***3C83E |
| Versions | array | The list of model versions. | |
The model version. | |||
TotalCount | integer | The total number of model versions. | 15 |
Examples
Success response
JSON format
{
"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": "情感分析。",
"FormatType": "SavedModel",
"FrameworkType": "TensorFlow",
"Options": "{}",
"SourceType": "PAIFlow",
"SourceId": "region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf",
"ApprovalStatus": "Approved",
"Labels": [
{
"Value": "v1",
"Key": "k1"
}
],
"Metrics": {
"Results": [
{
"Dataset": {
"DatasetId": "d-sdkjanksaklerhfd"
},
"Metrics": {
"cer": 0.175
}
},
{
"Dataset": {
"Uri": "oss://xxxx/"
},
"Metrics": {
"cer": 0.172
}
}
]
},
"TrainingSpec": {},
"InferenceSpec": {
"processor": "tensorflow_gpu_1.12"
},
"EvaluationSpec": {},
"CompressionSpec": {},
"ExtraInfo": {
"CoverUris": [
"https://e***u.oss-cn-hangzhou.aliyuncs.com/st****017.preview.png"
],
"TrainedWords": [
"albedo_overlord"
]
},
"DistillationSpec": {}
}
],
"TotalCount": 15
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.