PUT /v1/tables/{id}/followers
from metadata.sdk import configure, client
from metadata.sdk.entities import Tables
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
rest = client().ometa.client
table_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
user_id = "user-uuid-here"
# Add a follower
table = Tables.add_followers(table_id, [user_id])
print(f"Followers: {len(table.followers.root)}")
# Remove a follower
table = Tables.remove_followers(table_id, [user_id])
# Add a vote
rest.put(f"/tables/{table_id}/vote", json={"updatedVoteType": "votedUp"})
# Remove a vote
rest.put(f"/tables/{table_id}/vote", json={"updatedVoteType": "unVoted"})
import java.util.Map;
import java.util.UUID;
import org.openmetadata.sdk.network.HttpMethod;
// client is an initialized OpenMetadataClient.
String tableId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
String userId = "b6f7a1e2-3c4d-4e5f-8a9b-0c1d2e3f4a5b";
// Add a follower
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/followers",
UUID.fromString(userId)
);
// Remove a follower
client.getHttpClient().executeForString(
HttpMethod.DELETE,
"/v1/tables/" + tableId + "/followers/" + userId,
null
);
// Add a vote
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/vote",
Map.of("updatedVoteType", "votedUp")
);
// Remove a vote
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/vote",
Map.of("updatedVoteType", "unVoted")
);
# Add a follower
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/followers" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '"2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4"'
# Remove a follower
curl -X DELETE "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/followers/2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4" \
-H "Authorization: Bearer {access_token}"
# Add a vote
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "votedUp"}'
# Remove a vote
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "unVoted"}'
{
"id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
"name": "agent_performance_summary",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.agent_performance_summary",
"followers": [
{
"id": "2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4",
"type": "user",
"name": "admin"
}
]
}
Followers & Votes
Manage followers and votes for tables
PUT
/
v1
/
tables
/
{id}
/
followers
PUT /v1/tables/{id}/followers
from metadata.sdk import configure, client
from metadata.sdk.entities import Tables
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
rest = client().ometa.client
table_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
user_id = "user-uuid-here"
# Add a follower
table = Tables.add_followers(table_id, [user_id])
print(f"Followers: {len(table.followers.root)}")
# Remove a follower
table = Tables.remove_followers(table_id, [user_id])
# Add a vote
rest.put(f"/tables/{table_id}/vote", json={"updatedVoteType": "votedUp"})
# Remove a vote
rest.put(f"/tables/{table_id}/vote", json={"updatedVoteType": "unVoted"})
import java.util.Map;
import java.util.UUID;
import org.openmetadata.sdk.network.HttpMethod;
// client is an initialized OpenMetadataClient.
String tableId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
String userId = "b6f7a1e2-3c4d-4e5f-8a9b-0c1d2e3f4a5b";
// Add a follower
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/followers",
UUID.fromString(userId)
);
// Remove a follower
client.getHttpClient().executeForString(
HttpMethod.DELETE,
"/v1/tables/" + tableId + "/followers/" + userId,
null
);
// Add a vote
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/vote",
Map.of("updatedVoteType", "votedUp")
);
// Remove a vote
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/vote",
Map.of("updatedVoteType", "unVoted")
);
# Add a follower
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/followers" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '"2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4"'
# Remove a follower
curl -X DELETE "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/followers/2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4" \
-H "Authorization: Bearer {access_token}"
# Add a vote
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "votedUp"}'
# Remove a vote
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "unVoted"}'
{
"id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
"name": "agent_performance_summary",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.agent_performance_summary",
"followers": [
{
"id": "2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4",
"type": "user",
"name": "admin"
}
]
}
Followers & Votes
Manage followers and votes for table entities. Followers receive notifications about changes. Votes help surface popular or important tables.Followers
Add Follower
PUT /v1/tables/{id}/followers
string
required
UUID of the table.
string
required
UUID of the user to add as a follower (sent as request body string).
Remove Follower
DELETE /v1/tables/{id}/followers/{userId}
string
required
UUID of the table.
string
required
UUID of the user to remove.
Votes
Add or Update Vote
PUT /v1/tables/{id}/vote
string
required
UUID of the table.
string
required
Vote type:
votedUp, votedDown, or unVoted.PUT /v1/tables/{id}/followers
from metadata.sdk import configure, client
from metadata.sdk.entities import Tables
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
rest = client().ometa.client
table_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
user_id = "user-uuid-here"
# Add a follower
table = Tables.add_followers(table_id, [user_id])
print(f"Followers: {len(table.followers.root)}")
# Remove a follower
table = Tables.remove_followers(table_id, [user_id])
# Add a vote
rest.put(f"/tables/{table_id}/vote", json={"updatedVoteType": "votedUp"})
# Remove a vote
rest.put(f"/tables/{table_id}/vote", json={"updatedVoteType": "unVoted"})
import java.util.Map;
import java.util.UUID;
import org.openmetadata.sdk.network.HttpMethod;
// client is an initialized OpenMetadataClient.
String tableId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
String userId = "b6f7a1e2-3c4d-4e5f-8a9b-0c1d2e3f4a5b";
// Add a follower
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/followers",
UUID.fromString(userId)
);
// Remove a follower
client.getHttpClient().executeForString(
HttpMethod.DELETE,
"/v1/tables/" + tableId + "/followers/" + userId,
null
);
// Add a vote
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/vote",
Map.of("updatedVoteType", "votedUp")
);
// Remove a vote
client.getHttpClient().executeForString(
HttpMethod.PUT,
"/v1/tables/" + tableId + "/vote",
Map.of("updatedVoteType", "unVoted")
);
# Add a follower
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/followers" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '"2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4"'
# Remove a follower
curl -X DELETE "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/followers/2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4" \
-H "Authorization: Bearer {access_token}"
# Add a vote
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "votedUp"}'
# Remove a vote
curl -X PUT "{base_url}/api/v1/tables/455e3d9d-dbbf-455e-b3be-7191daa825f3/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "unVoted"}'
{
"id": "455e3d9d-dbbf-455e-b3be-7191daa825f3",
"name": "agent_performance_summary",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.agent_performance_summary",
"followers": [
{
"id": "2e7fc52a-57d3-4c0e-8a90-1b77c5a6b8e4",
"type": "user",
"name": "admin"
}
]
}
Error Handling
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission |
404 | NOT_FOUND | Table or user does not exist |
Was this page helpful?