PUT /v1/searchIndexes/{id}/followers
from metadata.sdk import client, configure
from metadata.sdk.entities import SearchIndexes
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
rest = client().ometa.client
si_id = "f5b0fa81-f241-4508-9219-dae31dcced18"
user_id = "user-uuid-here"
# Add a follower
si = SearchIndexes.add_followers(si_id, [user_id])
print(f"Followers: {len(si.followers.root)}")
# Remove a follower
si = SearchIndexes.remove_followers(si_id, [user_id])
# Add a vote
rest.put(f"/searchIndexes/{si_id}/vote", json={"updatedVoteType": "votedUp"})
# Remove a vote
rest.put(f"/searchIndexes/{si_id}/vote", json={"updatedVoteType": "unVoted"})
import java.util.Map;
import java.util.UUID;
import org.openmetadata.sdk.network.HttpClient;
import org.openmetadata.sdk.network.HttpMethod;
// client is an initialized OpenMetadataClient.
HttpClient http = client.getHttpClient();
String siId = "f5b0fa81-f241-4508-9219-dae31dcced18";
UUID userId = UUID.fromString("b6f7a1e2-3c4d-4e5f-8a9b-0c1d2e3f4a5b");
// Add a follower
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/followers", userId);
// Remove a follower
http.executeForString(HttpMethod.DELETE, "/v1/searchIndexes/" + siId + "/followers/" + userId, null);
// Add a vote
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/vote", Map.of("updatedVoteType", "votedUp"));
// Remove a vote
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/vote", Map.of("updatedVoteType", "unVoted"));
# Add a follower
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/followers" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '"user-uuid-here"'
# Remove a follower
curl -X DELETE "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/followers/user-uuid-here" \
-H "Authorization: Bearer {access_token}"
# Add a vote
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "votedUp"}'
# Remove a vote
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "unVoted"}'
{
"id": "f5b0fa81-f241-4508-9219-dae31dcced18",
"name": "table_search_index",
"fullyQualifiedName": "elasticsearch_sample.table_search_index",
"displayName": "TableSearchIndex",
"version": 0.1,
"updatedAt": 1769982670810,
"updatedBy": "admin",
"service": {
"id": "search-service-id",
"type": "searchService",
"name": "elasticsearch_sample",
"fullyQualifiedName": "elasticsearch_sample"
},
"serviceType": "ElasticSearch",
"deleted": false,
"followers": [
{
"id": "user-uuid-here",
"type": "user",
"name": "john.doe"
}
],
"owners": [],
"tags": [],
"domains": []
}
Followers & Votes
Manage followers and votes for search indexes
PUT
/
v1
/
searchIndexes
/
{id}
/
followers
PUT /v1/searchIndexes/{id}/followers
from metadata.sdk import client, configure
from metadata.sdk.entities import SearchIndexes
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
rest = client().ometa.client
si_id = "f5b0fa81-f241-4508-9219-dae31dcced18"
user_id = "user-uuid-here"
# Add a follower
si = SearchIndexes.add_followers(si_id, [user_id])
print(f"Followers: {len(si.followers.root)}")
# Remove a follower
si = SearchIndexes.remove_followers(si_id, [user_id])
# Add a vote
rest.put(f"/searchIndexes/{si_id}/vote", json={"updatedVoteType": "votedUp"})
# Remove a vote
rest.put(f"/searchIndexes/{si_id}/vote", json={"updatedVoteType": "unVoted"})
import java.util.Map;
import java.util.UUID;
import org.openmetadata.sdk.network.HttpClient;
import org.openmetadata.sdk.network.HttpMethod;
// client is an initialized OpenMetadataClient.
HttpClient http = client.getHttpClient();
String siId = "f5b0fa81-f241-4508-9219-dae31dcced18";
UUID userId = UUID.fromString("b6f7a1e2-3c4d-4e5f-8a9b-0c1d2e3f4a5b");
// Add a follower
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/followers", userId);
// Remove a follower
http.executeForString(HttpMethod.DELETE, "/v1/searchIndexes/" + siId + "/followers/" + userId, null);
// Add a vote
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/vote", Map.of("updatedVoteType", "votedUp"));
// Remove a vote
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/vote", Map.of("updatedVoteType", "unVoted"));
# Add a follower
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/followers" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '"user-uuid-here"'
# Remove a follower
curl -X DELETE "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/followers/user-uuid-here" \
-H "Authorization: Bearer {access_token}"
# Add a vote
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "votedUp"}'
# Remove a vote
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "unVoted"}'
{
"id": "f5b0fa81-f241-4508-9219-dae31dcced18",
"name": "table_search_index",
"fullyQualifiedName": "elasticsearch_sample.table_search_index",
"displayName": "TableSearchIndex",
"version": 0.1,
"updatedAt": 1769982670810,
"updatedBy": "admin",
"service": {
"id": "search-service-id",
"type": "searchService",
"name": "elasticsearch_sample",
"fullyQualifiedName": "elasticsearch_sample"
},
"serviceType": "ElasticSearch",
"deleted": false,
"followers": [
{
"id": "user-uuid-here",
"type": "user",
"name": "john.doe"
}
],
"owners": [],
"tags": [],
"domains": []
}
Followers & Votes
Manage followers and votes for search index entities.Followers
Add Follower
PUT /v1/searchIndexes/{id}/followers
string
required
UUID of the search index.
string
required
UUID of the user to add as a follower (sent as request body string).
Remove Follower
DELETE /v1/searchIndexes/{id}/followers/{userId}
string
required
UUID of the search index.
string
required
UUID of the user to remove.
Votes
Add or Update Vote
PUT /v1/searchIndexes/{id}/vote
string
required
UUID of the search index.
string
required
Vote type:
votedUp, votedDown, or unVoted.PUT /v1/searchIndexes/{id}/followers
from metadata.sdk import client, configure
from metadata.sdk.entities import SearchIndexes
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
rest = client().ometa.client
si_id = "f5b0fa81-f241-4508-9219-dae31dcced18"
user_id = "user-uuid-here"
# Add a follower
si = SearchIndexes.add_followers(si_id, [user_id])
print(f"Followers: {len(si.followers.root)}")
# Remove a follower
si = SearchIndexes.remove_followers(si_id, [user_id])
# Add a vote
rest.put(f"/searchIndexes/{si_id}/vote", json={"updatedVoteType": "votedUp"})
# Remove a vote
rest.put(f"/searchIndexes/{si_id}/vote", json={"updatedVoteType": "unVoted"})
import java.util.Map;
import java.util.UUID;
import org.openmetadata.sdk.network.HttpClient;
import org.openmetadata.sdk.network.HttpMethod;
// client is an initialized OpenMetadataClient.
HttpClient http = client.getHttpClient();
String siId = "f5b0fa81-f241-4508-9219-dae31dcced18";
UUID userId = UUID.fromString("b6f7a1e2-3c4d-4e5f-8a9b-0c1d2e3f4a5b");
// Add a follower
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/followers", userId);
// Remove a follower
http.executeForString(HttpMethod.DELETE, "/v1/searchIndexes/" + siId + "/followers/" + userId, null);
// Add a vote
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/vote", Map.of("updatedVoteType", "votedUp"));
// Remove a vote
http.executeForString(HttpMethod.PUT, "/v1/searchIndexes/" + siId + "/vote", Map.of("updatedVoteType", "unVoted"));
# Add a follower
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/followers" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '"user-uuid-here"'
# Remove a follower
curl -X DELETE "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/followers/user-uuid-here" \
-H "Authorization: Bearer {access_token}"
# Add a vote
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "votedUp"}'
# Remove a vote
curl -X PUT "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/vote" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"updatedVoteType": "unVoted"}'
{
"id": "f5b0fa81-f241-4508-9219-dae31dcced18",
"name": "table_search_index",
"fullyQualifiedName": "elasticsearch_sample.table_search_index",
"displayName": "TableSearchIndex",
"version": 0.1,
"updatedAt": 1769982670810,
"updatedBy": "admin",
"service": {
"id": "search-service-id",
"type": "searchService",
"name": "elasticsearch_sample",
"fullyQualifiedName": "elasticsearch_sample"
},
"serviceType": "ElasticSearch",
"deleted": false,
"followers": [
{
"id": "user-uuid-here",
"type": "user",
"name": "john.doe"
}
],
"owners": [],
"tags": [],
"domains": []
}
Error Handling
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission |
404 | NOT_FOUND | Search index or user does not exist |
Was this page helpful?