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

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

database_id = "550e8400-e29b-41d4-a716-446655440000"
user_id = "user-uuid-here"

# Add a follower
database = Databases.add_followers(database_id, [user_id])
print(f"Followers: {len(database.followers)}")

# Remove a follower
database = Databases.remove_followers(database_id, [user_id])

# Add a vote
database = Databases.add_vote(database_id, vote_type="votedUp")

# Remove a vote
database = Databases.remove_vote(database_id)

# Get profiler config
config = Databases.get_profiler_config(database_id)

# Set profiler config
Databases.set_profiler_config(database_id, {
    "profileSample": 50,
    "profileSampleType": "PERCENTAGE",
    "sampleDataCount": 200
})

# Delete profiler config
Databases.delete_profiler_config(database_id)
{
  "id": "1d08c2c6-cea7-4adf-9043-0f6a6aaf9721",
  "name": "default",
  "fullyQualifiedName": "mysql_sample.default",
  "tags": [],
  "version": 0.1,
  "updatedAt": 1769982658682,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/databases/1d08c2c6-cea7-4adf-9043-0f6a6aaf9721",
  "owners": [],
  "service": {
    "id": "4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3",
    "type": "databaseService",
    "name": "mysql_sample",
    "fullyQualifiedName": "mysql_sample",
    "displayName": "mysql_sample",
    "deleted": false,
    "href": "http://localhost:8585/api/v1/services/databaseServices/4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3"
  },
  "serviceType": "Mysql",
  "followers": [
    {
      "id": "2e4b2c7a-f3d1-4e5b-a8c9-1b2d3e4f5a6b",
      "type": "user",
      "name": "admin",
      "fullyQualifiedName": "admin",
      "deleted": false,
      "href": "http://localhost:8585/api/v1/users/2e4b2c7a-f3d1-4e5b-a8c9-1b2d3e4f5a6b"
    }
  ],
  "default": false,
  "deleted": false,
  "domains": [],
  "entityStatus": "Unprocessed"
}

Advanced Database Operations

Manage followers, votes, and profiler configuration for database entities.

Followers

Add Followers

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

Remove Follower

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

Votes

Add or Update Vote

PUT /v1/databases/{id}/vote
id
string
required
UUID of the database.
updatedVoteType
string
required
Vote type: votedUp, votedDown, or unVoted.

Profiler Configuration

Get Profiler Config

GET /v1/databases/{id}/profilerConfig

Set Profiler Config

PUT /v1/databases/{id}/profilerConfig

Delete Profiler Config

DELETE /v1/databases/{id}/profilerConfig
PUT /v1/databases/{id}/followers
from metadata.sdk import configure
from metadata.sdk.entities import Databases

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

database_id = "550e8400-e29b-41d4-a716-446655440000"
user_id = "user-uuid-here"

# Add a follower
database = Databases.add_followers(database_id, [user_id])
print(f"Followers: {len(database.followers)}")

# Remove a follower
database = Databases.remove_followers(database_id, [user_id])

# Add a vote
database = Databases.add_vote(database_id, vote_type="votedUp")

# Remove a vote
database = Databases.remove_vote(database_id)

# Get profiler config
config = Databases.get_profiler_config(database_id)

# Set profiler config
Databases.set_profiler_config(database_id, {
    "profileSample": 50,
    "profileSampleType": "PERCENTAGE",
    "sampleDataCount": 200
})

# Delete profiler config
Databases.delete_profiler_config(database_id)
{
  "id": "1d08c2c6-cea7-4adf-9043-0f6a6aaf9721",
  "name": "default",
  "fullyQualifiedName": "mysql_sample.default",
  "tags": [],
  "version": 0.1,
  "updatedAt": 1769982658682,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/databases/1d08c2c6-cea7-4adf-9043-0f6a6aaf9721",
  "owners": [],
  "service": {
    "id": "4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3",
    "type": "databaseService",
    "name": "mysql_sample",
    "fullyQualifiedName": "mysql_sample",
    "displayName": "mysql_sample",
    "deleted": false,
    "href": "http://localhost:8585/api/v1/services/databaseServices/4724c3cb-d4b8-4ac0-aa55-e8bb66f01ac3"
  },
  "serviceType": "Mysql",
  "followers": [
    {
      "id": "2e4b2c7a-f3d1-4e5b-a8c9-1b2d3e4f5a6b",
      "type": "user",
      "name": "admin",
      "fullyQualifiedName": "admin",
      "deleted": false,
      "href": "http://localhost:8585/api/v1/users/2e4b2c7a-f3d1-4e5b-a8c9-1b2d3e4f5a6b"
    }
  ],
  "default": false,
  "deleted": false,
  "domains": [],
  "entityStatus": "Unprocessed"
}

Error Handling

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