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

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

model_id = "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2"
user_id = "user-uuid-here"

# Add a follower
model = MLModels.add_followers(model_id, [user_id])
print(f"Followers: {len(model.followers)}")

# Remove a follower
model = MLModels.remove_followers(model_id, [user_id])

# Add a vote
model = MLModels.add_vote(model_id, vote_type="votedUp")

# Remove a vote
model = MLModels.remove_vote(model_id)
{
  "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"
  },
  "serviceType": "Mlflow",
  "deleted": false,
  "followers": [
    {
      "id": "user-uuid-here",
      "type": "user",
      "name": "john.doe"
    }
  ],
  "owners": [],
  "tags": [],
  "domains": []
}

Followers & Votes

Manage followers and votes for ML model entities.

Followers

Add Follower

PUT /v1/mlmodels/{id}/followers
id
string
required
UUID of the ML model.
id
string
required
UUID of the user to add as a follower (sent as request body string).

Remove Follower

DELETE /v1/mlmodels/{id}/followers/{userId}
id
string
required
UUID of the ML model.
userId
string
required
UUID of the user to remove.

Votes

Add or Update Vote

PUT /v1/mlmodels/{id}/vote
id
string
required
UUID of the ML model.
updatedVoteType
string
required
Vote type: votedUp, votedDown, or unVoted.
PUT /v1/mlmodels/{id}/followers
from metadata.sdk import configure
from metadata.sdk.entities import MLModels

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

model_id = "6b04e1d8-b66d-4f78-ab21-beb5be2cf4f2"
user_id = "user-uuid-here"

# Add a follower
model = MLModels.add_followers(model_id, [user_id])
print(f"Followers: {len(model.followers)}")

# Remove a follower
model = MLModels.remove_followers(model_id, [user_id])

# Add a vote
model = MLModels.add_vote(model_id, vote_type="votedUp")

# Remove a vote
model = MLModels.remove_vote(model_id)
{
  "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"
  },
  "serviceType": "Mlflow",
  "deleted": false,
  "followers": [
    {
      "id": "user-uuid-here",
      "type": "user",
      "name": "john.doe"
    }
  ],
  "owners": [],
  "tags": [],
  "domains": []
}

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission
404NOT_FOUNDML model or user does not exist