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

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

topic_id = "0a021819-982e-4ee4-a5a2-4af30eaa3016"
user_id = "user-uuid-here"

# Add a follower
topic = Topics.add_followers(topic_id, [user_id])
print(f"Followers: {len(topic.followers)}")

# Remove a follower
topic = Topics.remove_followers(topic_id, [user_id])

# Add a vote
topic = Topics.add_vote(topic_id, vote_type="votedUp")

# Remove a vote
topic = Topics.remove_vote(topic_id)
{
  "id": "0a021819-982e-4ee4-a5a2-4af30eaa3016",
  "name": "address_book",
  "fullyQualifiedName": "sample_kafka.address_book",
  "description": "All Protobuf record related events gets captured in this topic",
  "version": 0.1,
  "updatedAt": 1769982663546,
  "updatedBy": "admin",
  "service": {
    "id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
    "type": "messagingService",
    "name": "sample_kafka",
    "fullyQualifiedName": "sample_kafka"
  },
  "serviceType": "Kafka",
  "messageSchema": {
    "schemaText": "syntax = \"proto2\";\npackage tutorial;\nmessage Person { ... }",
    "schemaType": "Protobuf"
  },
  "partitions": 1,
  "cleanupPolicies": ["delete"],
  "replicationFactor": 1,
  "deleted": false,
  "followers": [
    {
      "id": "user-uuid-here",
      "type": "user",
      "name": "john.doe"
    }
  ],
  "owners": [],
  "tags": [],
  "domains": []
}

Followers & Votes

Manage followers and votes for topic entities.

Followers

Add Follower

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

Remove Follower

DELETE /v1/topics/{id}/followers/{userId}
id
string
required
UUID of the topic.
userId
string
required
UUID of the user to remove.

Votes

Add or Update Vote

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

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

topic_id = "0a021819-982e-4ee4-a5a2-4af30eaa3016"
user_id = "user-uuid-here"

# Add a follower
topic = Topics.add_followers(topic_id, [user_id])
print(f"Followers: {len(topic.followers)}")

# Remove a follower
topic = Topics.remove_followers(topic_id, [user_id])

# Add a vote
topic = Topics.add_vote(topic_id, vote_type="votedUp")

# Remove a vote
topic = Topics.remove_vote(topic_id)
{
  "id": "0a021819-982e-4ee4-a5a2-4af30eaa3016",
  "name": "address_book",
  "fullyQualifiedName": "sample_kafka.address_book",
  "description": "All Protobuf record related events gets captured in this topic",
  "version": 0.1,
  "updatedAt": 1769982663546,
  "updatedBy": "admin",
  "service": {
    "id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
    "type": "messagingService",
    "name": "sample_kafka",
    "fullyQualifiedName": "sample_kafka"
  },
  "serviceType": "Kafka",
  "messageSchema": {
    "schemaText": "syntax = \"proto2\";\npackage tutorial;\nmessage Person { ... }",
    "schemaType": "Protobuf"
  },
  "partitions": 1,
  "cleanupPolicies": ["delete"],
  "replicationFactor": 1,
  "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_FOUNDTopic or user does not exist