Get models API
You can use this API to get the metadata of the latest version of all the models stored in MLz.
HTTP method and URI path
GET /v3/ml_assets/models
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
- apiuser (only if the model was created by the user)
- devuser (only if the model was created by the user)
Query parameter
| Parameter | Type | Required or optional | Description |
|---|---|---|---|
| modelName | String | Optional | Model name for filtering from the response for all of the models. Specify this query parameter if you expect to get the model of which the name is modelName from all of the models. |
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.
resources:{models_array} array which contains the metadata information of all the models returned. Each element of the array carries the information of a model with fields described in Table 2.| 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 latest version of the returned 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.
|
|
| metadata | guid | The model 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 which contains the model ID. |
{
resources: [{
"entity": {
"prediction_column": "prediction",
"author": {
"name": "mlz01"
},
"name": "tentModel_local_reference",
"model_url": "https://127.0.0.1:11443/v3/ml_assets/models/f76b157f-0826-4d29-83f2-5dd48de3736d",
"training_definition_url": "https://127.0.0.1:11443/v3/ml_assets/training_definitions/36e1c170-3738-434d-9f6a-979e0b1e1aee/versions/00ba1825-588a-4cae-9a79-07235617b8ac",
"description": "Tent Model",
"label_column": "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/f76b157f-0826-4d29-83f2-5dd48de3736d/versions/3358f92f-2bd6-41f0-8df1-833cc39e0b78/content",
"evaluation_metrics_url": "https://127.0.0.1:11443/v3/ml_assets/models/f76b157f-0826-4d29-83f2-5dd48de3736d/versions/3358f92f-2bd6-41f0-8df1-833cc39e0b78/evaluation_metrics",
"guid": "3358f92f-2bd6-41f0-8df1-833cc39e0b78",
"size": {
"model_in_memory": 189937
},
"url": "https://127.0.0.1:11443/v3/ml_assets/models/f76b157f-0826-4d29-83f2-5dd48de3736d/versions/3358f92f-2bd6-41f0-8df1-833cc39e0b78"
},
"model_type": "standard",
"versionSeq": 1
},
"metadata": {
"created_at": "2022-11-14T08:01:38.965Z",
"guid": "f76b157f-0826-4d29-83f2-5dd48de3736d",
"model_status": [],
"modified_at": "2022-11-14T08:01:38.965Z",
"url": "https://127.0.0.1:11443/v3/ml_assets/models/f76b157f-0826-4d29-83f2-5dd48de3736d"
}
}]
}