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

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

schema_id = "770e8400-e29b-41d4-a716-446655440000"
user_id = "user-uuid-here"

# Add a follower
schema = DatabaseSchemas.add_followers(schema_id, [user_id])
print(f"Followers: {len(schema.followers)}")

# Remove a follower
schema = DatabaseSchemas.remove_followers(schema_id, [user_id])

# Add a vote
schema = DatabaseSchemas.add_vote(schema_id, vote_type="votedUp")

# Remove a vote
schema = DatabaseSchemas.remove_vote(schema_id)

# Get profiler config
config = DatabaseSchemas.get_profiler_config(schema_id)

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

# Delete profiler config
DatabaseSchemas.delete_profiler_config(schema_id)
{
  "id": "f681432b-e66c-4096-a1cd-7771358c5323",
  "name": "information_schema",
  "fullyQualifiedName": "Glue.default.information_schema",
  "followers": [
    {
      "id": "user-uuid-here",
      "type": "user",
      "name": "john.doe"
    }
  ]
}

Advanced Database Schema Operations

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

Followers

Add Followers

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

Remove Follower

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

Votes

Add or Update Vote

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

Profiler Configuration

Get Profiler Config

GET /v1/databaseSchemas/{id}/profilerConfig

Set Profiler Config

PUT /v1/databaseSchemas/{id}/profilerConfig

Delete Profiler Config

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

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

schema_id = "770e8400-e29b-41d4-a716-446655440000"
user_id = "user-uuid-here"

# Add a follower
schema = DatabaseSchemas.add_followers(schema_id, [user_id])
print(f"Followers: {len(schema.followers)}")

# Remove a follower
schema = DatabaseSchemas.remove_followers(schema_id, [user_id])

# Add a vote
schema = DatabaseSchemas.add_vote(schema_id, vote_type="votedUp")

# Remove a vote
schema = DatabaseSchemas.remove_vote(schema_id)

# Get profiler config
config = DatabaseSchemas.get_profiler_config(schema_id)

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

# Delete profiler config
DatabaseSchemas.delete_profiler_config(schema_id)
{
  "id": "f681432b-e66c-4096-a1cd-7771358c5323",
  "name": "information_schema",
  "fullyQualifiedName": "Glue.default.information_schema",
  "followers": [
    {
      "id": "user-uuid-here",
      "type": "user",
      "name": "john.doe"
    }
  ]
}

Error Handling

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