Skip to main content
GET
https://sandbox.getcollate.io/api
/
v1
/
mlmodels
/
{id}
GET /v1/mlmodels/{id}
from metadata.sdk import configure
from metadata.sdk.entities import MLModels

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Get by ID
model = MLModels.retrieve("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2")
print(f"{model.fullyQualifiedName}: {model.algorithm}")

# Get by ID with fields
model = MLModels.retrieve(
    "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
    fields=["owners", "tags", "followers", "votes"]
)

# Get by fully qualified name
model = MLModels.retrieve_by_name("mlflow_svc.customer_segmentation")

# Get by name with fields
model = MLModels.retrieve_by_name(
    "mlflow_svc.customer_segmentation",
    fields=["owners", "tags", "domains"]
)
{
  "id": "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
  "name": "customer_segmentation",
  "fullyQualifiedName": "mlflow_svc.customer_segmentation",
  "displayName": "Customer Segmentation Model",
  "algorithm": "KMeans",
  "version": 0.1,
  "updatedAt": 1769982669247,
  "updatedBy": "admin",
  "service": {
    "id": "ca22d46e-81b9-4e48-85b5-0adc44980da9",
    "type": "mlmodelService",
    "name": "mlflow_svc",
    "fullyQualifiedName": "mlflow_svc",
    "deleted": false
  },
  "serviceType": "Mlflow",
  "href": "http://localhost:8585/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
  "deleted": false,
  "owners": [],
  "tags": [],
  "followers": [],
  "votes": {
    "upVotes": 0,
    "downVotes": 0
  },
  "domains": []
}

Retrieve an ML Model

Get a single ML model by its unique ID or fully qualified name.

Get by ID

id
string
required
UUID of the ML model to retrieve.
fields
string
Comma-separated list of fields to include (e.g., owners,tags,followers,votes,extension,domains,sourceHash).
include
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.

Get by Fully Qualified Name

Use GET /v1/mlmodels/name/{fqn} to retrieve by fully qualified name.
fqn
string
required
Fully qualified name of the ML model (e.g., mlflow_svc.customer_segmentation).
fields
string
Comma-separated list of fields to include: owners, tags, followers, votes, extension, domains, sourceHash.
include
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
GET /v1/mlmodels/{id}
from metadata.sdk import configure
from metadata.sdk.entities import MLModels

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Get by ID
model = MLModels.retrieve("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2")
print(f"{model.fullyQualifiedName}: {model.algorithm}")

# Get by ID with fields
model = MLModels.retrieve(
    "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
    fields=["owners", "tags", "followers", "votes"]
)

# Get by fully qualified name
model = MLModels.retrieve_by_name("mlflow_svc.customer_segmentation")

# Get by name with fields
model = MLModels.retrieve_by_name(
    "mlflow_svc.customer_segmentation",
    fields=["owners", "tags", "domains"]
)
{
  "id": "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
  "name": "customer_segmentation",
  "fullyQualifiedName": "mlflow_svc.customer_segmentation",
  "displayName": "Customer Segmentation Model",
  "algorithm": "KMeans",
  "version": 0.1,
  "updatedAt": 1769982669247,
  "updatedBy": "admin",
  "service": {
    "id": "ca22d46e-81b9-4e48-85b5-0adc44980da9",
    "type": "mlmodelService",
    "name": "mlflow_svc",
    "fullyQualifiedName": "mlflow_svc",
    "deleted": false
  },
  "serviceType": "Mlflow",
  "href": "http://localhost:8585/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2",
  "deleted": false,
  "owners": [],
  "tags": [],
  "followers": [],
  "votes": {
    "upVotes": 0,
    "downVotes": 0
  },
  "domains": []
}

Returns

Returns an ML model object with all requested fields populated.

Response

id
string
Unique identifier for the ML model (UUID format).
name
string
ML model name.
fullyQualifiedName
string
Fully qualified name in format service.modelName.
displayName
string
Human-readable display name.
description
string
Description of the ML model in Markdown format.
algorithm
string
Algorithm used by the ML model.
mlFeatures
array
Features used by the ML model.
mlHyperParameters
array
Hyperparameters used by the ML model.
target
string
Target variable or objective.
service
object
Reference to the parent ML model service.
serviceType
string
Type of ML model service (e.g., Mlflow, Sklearn, SageMaker).
version
number
Version number for the entity.
owners
array
List of owners. Only included when fields contains owners.
tags
array
Classification tags. Only included when fields contains tags.
domains
array
Domain assignments. Only included when fields contains domains.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to view this ML model
404NOT_FOUNDML model with given ID or FQN does not exist