Get model version API
You can use this API to get the metadata of a particular version of a model.
HTTP method and URI path
GET /v3/ml_assets/models/{model_id}/versions/{version_id}
Where:
model_id identifies the model ID and version_id identifies the model version ID.
Standard headers
Use the following standard HTTP header with this request:
Content-Type: application/json
Authorization: <Bearer token>
Required authorizations
The user ID associated with the token which is specified in the request header needs to be granted with one of the following roles:
- sysadm
- mladm
- appuser
- apiuser (only if the model was created by the user)
- devuser (only if the model was created by the user)
Expected response
On completion, the service returns an HTTP response, which includes a status code that indicates whether your request is completed. Status code 200 indicates a successful completion. A status code of 4nn or 5nn indicates an error.
| Field | Subfield | Description |
|---|---|---|
| entity | name | The name of the model. |
| author |
The author of the model creation. name: The name of the author of the model. |
|
| description | The description of the model. | |
| model_url | The URL of the model which contains the model ID. | |
| framework |
The framework used to create the model. The framework includes the framework’s name, version, and runtimes.
|
|
| training_definition_url | Training definition created for this model. It is only for Spark runtime model. | |
| versionSeq | The version sequence number of the returned version of the model. | |
| model_type | The value is standard. It means that the model was created from standard MLz’s API. | |
| label_column | The label column for the model. | |
| prediction_column | The prediction column for the model. | |
| probability_column | The probability column for the model. | |
| model_version |
The latest model version’s partial important information.
|
|
| training_info |
The training info for this model.
|
|
| training_data_schema | The training data schema for this model version. | |
| input_data_schema | The input data schema for this model version. | |
| metadata | guid | The model version ID. |
| created_at | The creation timestamp for this model. | |
| modified_at | The timestamp of the last modification of the model. | |
| url | The URL of this model version. |
{
"entity": {
"prediction_column": "prediction",
"author": {
"name": "mlz04"
},
"name": "imported_model_mladm",
"model_url": "https://127.0.0.1:11443/v3/ml_assets/models/0e177db5-239a-43b9-81a6-10e8a49eda00",
"training_definition_url": "https://127.0.0.1:11443/v3/ml_assets/training_definitions/5b0d4eb2-5396-4741-8174-c46c0bc81369/versions/40203584-1d3c-4943-968d-690d53b8ca00",
"description": "",
"training_data_schema": {
"fields": [
{
"metadata": {
"name": "CUST_ID",
"scale": 0
},
"name": "CUST_ID",
"nullable": true,
"type": "long"
},
{
"metadata": {
"name": "SEX",
"scale": 0
},
"name": "SEX",
"nullable": true,
"type": "string"
},
{
"metadata": {
"name": "AGE",
"scale": 0
},
"name": "AGE",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "EDUCATION",
"scale": 0
},
"name": "EDUCATION",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "INVESTMENT",
"scale": 2
},
"name": "INVESTMENT",
"nullable": true,
"type": "decimal(13,2)"
},
{
"metadata": {
"name": "INCOME",
"scale": 2
},
"name": "INCOME",
"nullable": true,
"type": "decimal(13,2)"
},
{
"metadata": {
"name": "ACTIVITY",
"scale": 0
},
"name": "ACTIVITY",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "CHURN",
"scale": 0
},
"name": "CHURN",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "YRLY_AMT",
"scale": 2
},
"name": "YRLY_AMT",
"nullable": true,
"type": "decimal(13,2)"
},
{
"metadata": {
"name": "AVG_DAILY_TX",
"scale": 0
},
"name": "AVG_DAILY_TX",
"nullable": true,
"type": "double"
},
{
"metadata": {
"name": "YRLY_TX",
"scale": 0
},
"name": "YRLY_TX",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "AVG_TX_AMT",
"scale": 2
},
"name": "AVG_TX_AMT",
"nullable": true,
"type": "decimal(13,2)"
},
{
"metadata": {
"name": "NEGTWEETS",
"scale": 0
},
"name": "NEGTWEETS",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "STATE",
"scale": 0
},
"name": "STATE",
"nullable": true,
"type": "string"
},
{
"metadata": {
"name": "EDUCATION_GROUP",
"scale": 0
},
"name": "EDUCATION_GROUP",
"nullable": true,
"type": "string"
},
{
"metadata": {
"name": "TWITTERID",
"scale": 0
},
"name": "TWITTERID",
"nullable": true,
"type": "string"
},
{
"metadata": {
"name": "CHURN_LABEL",
"scale": 0
},
"name": "CHURN_LABEL",
"nullable": true,
"type": "string"
}
],
"type": "struct"
},
"label_column": "CHURN_LABEL",
"framework": {
"name": "mllib",
"version": "4.0",
"runtimes": [
{
"name": "spark",
"version": "4.0"
}
]
},
"probability_column": "probability",
"training_info": {
"evaluation": {
"next_fire_time": "",
"status": "UNINITIALIZED"
},
"originId": "",
"originType": "",
"projectId": ""
},
"model_version": {
"content_status": {
"state": "no_content"
},
"content_url": "https://127.0.0.1:11443/v3/ml_assets/models/0e177db5-239a-43b9-81a6-10e8a49eda00/versions/7ca00397-867c-4e67-bd08-91c71cce61e6/content",
"evaluation_metrics_url": "https://127.0.0.1:11443/v3/ml_assets/models/0e177db5-239a-43b9-81a6-10e8a49eda00/versions/7ca00397-867c-4e67-bd08-91c71cce61e6/evaluation_metrics",
"guid": "7ca00397-867c-4e67-bd08-91c71cce61e6",
"url": "https://127.0.0.1:11443/v3/ml_assets/models/0e177db5-239a-43b9-81a6-10e8a49eda00/versions/7ca00397-867c-4e67-bd08-91c71cce61e6",
"version_status": {
"failure": "",
"state": "active"
}
},
"model_type": "standard",
"versionSeq": 1,
"input_data_schema": {
"fields": [
{
"metadata": {
"name": "CUST_ID",
"scale": 0
},
"name": "CUST_ID",
"nullable": true,
"type": "long"
},
{
"metadata": {
"name": "SEX",
"scale": 0
},
"name": "SEX",
"nullable": true,
"type": "string"
},
{
"metadata": {
"name": "AGE",
"scale": 0
},
"name": "AGE",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "EDUCATION",
"scale": 0
},
"name": "EDUCATION",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "INVESTMENT",
"scale": 2
},
"name": "INVESTMENT",
"nullable": true,
"type": "decimal(13,2)"
},
{
"metadata": {
"name": "INCOME",
"scale": 2
},
"name": "INCOME",
"nullable": true,
"type": "decimal(13,2)"
},
{
"metadata": {
"name": "ACTIVITY",
"scale": 0
},
"name": "ACTIVITY",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "CHURN",
"scale": 0
},
"name": "CHURN",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "YRLY_AMT",
"scale": 2
},
"name": "YRLY_AMT",
"nullable": true,
"type": "decimal(13,2)"
},
{
"metadata": {
"name": "AVG_DAILY_TX",
"scale": 0
},
"name": "AVG_DAILY_TX",
"nullable": true,
"type": "double"
},
{
"metadata": {
"name": "YRLY_TX",
"scale": 0
},
"name": "YRLY_TX",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "AVG_TX_AMT",
"scale": 2
},
"name": "AVG_TX_AMT",
"nullable": true,
"type": "decimal(13,2)"
},
{
"metadata": {
"name": "NEGTWEETS",
"scale": 0
},
"name": "NEGTWEETS",
"nullable": true,
"type": "integer"
},
{
"metadata": {
"name": "STATE",
"scale": 0
},
"name": "STATE",
"nullable": true,
"type": "string"
},
{
"metadata": {
"name": "EDUCATION_GROUP",
"scale": 0
},
"name": "EDUCATION_GROUP",
"nullable": true,
"type": "string"
},
{
"metadata": {
"name": "TWITTERID",
"scale": 0
},
"name": "TWITTERID",
"nullable": true,
"type": "string"
}
],
"type": "struct"
}
},
"metadata": {
"created_at": "2023-07-13T06:40:15.253Z",
"guid": "7ca00397-867c-4e67-bd08-91c71cce61e6",
"model_status": [],
"modified_at": "2023-07-13T06:40:15.253Z",
"url": "https://127.0.0.1:11443/v3/ml_assets/models/0e177db5-239a-43b9-81a6-10e8a49eda00/versions/7ca00397-867c-4e67-bd08-91c71cce61e6"
}
}