Skip to main content
POST
https://sandbox.getcollate.io/api
/
v1
/
services
/
mlmodelServices
POST /v1/services/mlmodelServices
from metadata.sdk import configure
from metadata.sdk.entities import MlModelServices
from metadata.generated.schema.api.services.createMlModelService import CreateMlModelServiceRequest

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

request = CreateMlModelServiceRequest(
    name="mlflow_svc",
    displayName="MLflow Production",
    serviceType="Mlflow",
    description="Production MLflow tracking server",
    connection={
        "config": {
            "type": "Mlflow",
            "trackingUri": "http://localhost:8088",
            "registryUri": "http://localhost:8088",
            "supportsMetadataExtraction": True
        }
    }
)

service = MlModelServices.create(request)
print(f"Created: {service.fullyQualifiedName}")
{
  "id": "ca22d46e-81b9-4e48-85b5-0adc44980da9",
  "name": "mlflow_svc",
  "fullyQualifiedName": "mlflow_svc",
  "serviceType": "Mlflow",
  "description": "Production MLflow tracking server",
  "version": 0.1,
  "updatedAt": 1769982621618,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/mlmodelServices/ca22d46e-81b9-4e48-85b5-0adc44980da9",
  "connection": {
    "config": {
      "type": "Mlflow",
      "trackingUri": "http://localhost:8088",
      "registryUri": "http://localhost:8088",
      "supportsMetadataExtraction": true
    }
  },
  "owners": [],
  "tags": [],
  "deleted": false,
  "domains": []
}

Create an ML Model Service

Create a new ML model service connection to a platform such as Mlflow, Sklearn, or SageMaker.

Body Parameters

name
string
required
Name of the ML model service. Must be unique across all ML model services.
serviceType
string
required
Type of ML model service (e.g., Mlflow, Sklearn, SageMaker, CustomMlModel).
connection
object
required
Connection configuration specific to the service type.
displayName
string
Human-readable display name for the ML model service.
description
string
Description of the ML model service in Markdown format.
owners
array
Array of owner references (users or teams) to assign to the service.
domain
string
Fully qualified name of the domain to assign for governance purposes.
tags
array
Array of classification tags to apply to the ML model service.
POST /v1/services/mlmodelServices
from metadata.sdk import configure
from metadata.sdk.entities import MlModelServices
from metadata.generated.schema.api.services.createMlModelService import CreateMlModelServiceRequest

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

request = CreateMlModelServiceRequest(
    name="mlflow_svc",
    displayName="MLflow Production",
    serviceType="Mlflow",
    description="Production MLflow tracking server",
    connection={
        "config": {
            "type": "Mlflow",
            "trackingUri": "http://localhost:8088",
            "registryUri": "http://localhost:8088",
            "supportsMetadataExtraction": True
        }
    }
)

service = MlModelServices.create(request)
print(f"Created: {service.fullyQualifiedName}")
{
  "id": "ca22d46e-81b9-4e48-85b5-0adc44980da9",
  "name": "mlflow_svc",
  "fullyQualifiedName": "mlflow_svc",
  "serviceType": "Mlflow",
  "description": "Production MLflow tracking server",
  "version": 0.1,
  "updatedAt": 1769982621618,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/mlmodelServices/ca22d46e-81b9-4e48-85b5-0adc44980da9",
  "connection": {
    "config": {
      "type": "Mlflow",
      "trackingUri": "http://localhost:8088",
      "registryUri": "http://localhost:8088",
      "supportsMetadataExtraction": true
    }
  },
  "owners": [],
  "tags": [],
  "deleted": false,
  "domains": []
}

Returns

Returns the created ML model service object with all specified properties and system-generated fields.

Response

id
string
Unique identifier for the ML model service (UUID format).
name
string
ML model service name.
fullyQualifiedName
string
Fully qualified name of the service.
displayName
string
Human-readable display name.
description
string
Description of the ML model service in Markdown format.
serviceType
string
Type of ML model service (e.g., Mlflow, Sklearn, SageMaker, CustomMlModel).
connection
object
Connection configuration for the service.
owners
array
List of owners assigned to the ML model service.
domain
string
Fully qualified name of the assigned domain.
tags
array
Classification tags applied to the ML model service.
version
number
Version number for the entity (starts at 0.1).

Create or Update (PUT)

Use PUT /v1/services/mlmodelServices instead of POST to perform an upsert. If an ML model service with the same fullyQualifiedName already exists, it will be updated; otherwise, a new service is created. The request body is the same as POST.
curl -X PUT "{base_url}/api/v1/services/mlmodelServices" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.

Bulk Create or Update (PUT)

Use PUT /v1/services/mlmodelServices/bulk to create or update multiple ML model services in a single request. The request body is an array of create request objects.
curl -X PUT "{base_url}/api/v1/services/mlmodelServices/bulk" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '[
    { "name": "mlflow_prod", "serviceType": "Mlflow", "connection": { "config": { "type": "Mlflow", "trackingUri": "http://mlflow-prod:8088" } } },
    { "name": "sagemaker_prod", "serviceType": "SageMaker", "connection": { "config": { "type": "SageMaker" } } }
  ]'

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid request body or missing required fields
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to create ML model services
409ENTITY_ALREADY_EXISTSML model service with same name already exists (POST only)