from metadata.sdk import configurefrom metadata.sdk.entities import MLModelsconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# Get by IDmodel = MLModels.retrieve("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2")print(f"{model.fullyQualifiedName.root}: {model.algorithm}")# Get by ID with fieldsmodel = MLModels.retrieve( "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2", fields=["owners", "tags", "followers", "votes"])# Get by fully qualified namemodel = MLModels.retrieve_by_name("mlflow_svc.customer_segmentation")# Get by name with fieldsmodel = MLModels.retrieve_by_name( "mlflow_svc.customer_segmentation", fields=["owners", "tags", "domains"])
import org.openmetadata.schema.entity.data.MlModel;// client is an initialized OpenMetadataClient.// Get by IDMlModel model = client.mlModels().get("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2");// Get by ID with fieldsMlModel modelWithFields = client.mlModels().get( "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2", "owners,tags,followers,votes");// Get by fully qualified nameMlModel modelByName = client.mlModels().getByName("mlflow_svc.customer_segmentation");// Get by name with fieldsMlModel modelByNameWithFields = client.mlModels().getByName( "mlflow_svc.customer_segmentation", "owners,tags,domains");
# Get by IDcurl "{base_url}/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2" \ -H "Authorization: Bearer {access_token}"# Get by ID with fieldscurl "{base_url}/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2?fields=owners,tags,domains" \ -H "Authorization: Bearer {access_token}"# Get by fully qualified namecurl "{base_url}/api/v1/mlmodels/name/mlflow_svc.customer_segmentation" \ -H "Authorization: Bearer {access_token}"# Get by name with fieldscurl "{base_url}/api/v1/mlmodels/name/mlflow_svc.customer_segmentation?fields=owners,tags,domains" \ -H "Authorization: Bearer {access_token}"
from metadata.sdk import configurefrom metadata.sdk.entities import MLModelsconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# Get by IDmodel = MLModels.retrieve("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2")print(f"{model.fullyQualifiedName.root}: {model.algorithm}")# Get by ID with fieldsmodel = MLModels.retrieve( "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2", fields=["owners", "tags", "followers", "votes"])# Get by fully qualified namemodel = MLModels.retrieve_by_name("mlflow_svc.customer_segmentation")# Get by name with fieldsmodel = MLModels.retrieve_by_name( "mlflow_svc.customer_segmentation", fields=["owners", "tags", "domains"])
import org.openmetadata.schema.entity.data.MlModel;// client is an initialized OpenMetadataClient.// Get by IDMlModel model = client.mlModels().get("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2");// Get by ID with fieldsMlModel modelWithFields = client.mlModels().get( "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2", "owners,tags,followers,votes");// Get by fully qualified nameMlModel modelByName = client.mlModels().getByName("mlflow_svc.customer_segmentation");// Get by name with fieldsMlModel modelByNameWithFields = client.mlModels().getByName( "mlflow_svc.customer_segmentation", "owners,tags,domains");
# Get by IDcurl "{base_url}/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2" \ -H "Authorization: Bearer {access_token}"# Get by ID with fieldscurl "{base_url}/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2?fields=owners,tags,domains" \ -H "Authorization: Bearer {access_token}"# Get by fully qualified namecurl "{base_url}/api/v1/mlmodels/name/mlflow_svc.customer_segmentation" \ -H "Authorization: Bearer {access_token}"# Get by name with fieldscurl "{base_url}/api/v1/mlmodels/name/mlflow_svc.customer_segmentation?fields=owners,tags,domains" \ -H "Authorization: Bearer {access_token}"
Get a single ML model by its unique ID or fully qualified name.
Get by ID
string
required
UUID of the ML model to retrieve.
string
Comma-separated list of fields to include, for example owners,tags,followers,votes,extension,domains,sourceHash.
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.
string
required
Fully qualified name of the ML model, for example mlflow_svc.customer_segmentation.
string
Comma-separated list of fields to include: owners, tags, followers, votes, extension, domains, sourceHash.
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
GET /v1/mlmodels/{id}
from metadata.sdk import configurefrom metadata.sdk.entities import MLModelsconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# Get by IDmodel = MLModels.retrieve("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2")print(f"{model.fullyQualifiedName.root}: {model.algorithm}")# Get by ID with fieldsmodel = MLModels.retrieve( "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2", fields=["owners", "tags", "followers", "votes"])# Get by fully qualified namemodel = MLModels.retrieve_by_name("mlflow_svc.customer_segmentation")# Get by name with fieldsmodel = MLModels.retrieve_by_name( "mlflow_svc.customer_segmentation", fields=["owners", "tags", "domains"])
import org.openmetadata.schema.entity.data.MlModel;// client is an initialized OpenMetadataClient.// Get by IDMlModel model = client.mlModels().get("6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2");// Get by ID with fieldsMlModel modelWithFields = client.mlModels().get( "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2", "owners,tags,followers,votes");// Get by fully qualified nameMlModel modelByName = client.mlModels().getByName("mlflow_svc.customer_segmentation");// Get by name with fieldsMlModel modelByNameWithFields = client.mlModels().getByName( "mlflow_svc.customer_segmentation", "owners,tags,domains");
# Get by IDcurl "{base_url}/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2" \ -H "Authorization: Bearer {access_token}"# Get by ID with fieldscurl "{base_url}/api/v1/mlmodels/6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2?fields=owners,tags,domains" \ -H "Authorization: Bearer {access_token}"# Get by fully qualified namecurl "{base_url}/api/v1/mlmodels/name/mlflow_svc.customer_segmentation" \ -H "Authorization: Bearer {access_token}"# Get by name with fieldscurl "{base_url}/api/v1/mlmodels/name/mlflow_svc.customer_segmentation?fields=owners,tags,domains" \ -H "Authorization: Bearer {access_token}"