Weaviate is a graph-based, cloud-native, vector search engine that leverages semantic embeddings and knowledge graphs to enable efficient and accurate search, retrieval, and exploration of complex data structures at scale.
Once connected to Weaviate, you may need to gather information about the server, including the hostname, installed version, and module information.
Weaviate Meta – API Endpoint
The best way to quickly gather information about a Weaviate cluster is using the GET HTTP request and the API endpoint of v1/meta
GET /v1/meta
Once you make a request to the API, it returns the following information about the server:
- Hostname – the URL to the Weaviate instance.
- Version – the installed Weaviate version
- Modules – returns module-specific information.
The following shows a cURL command that demonstrates how to make a GET
request to the above endpoint.
curl http://localhost:8080/v1/meta
If your server is running a different address, ensure to replace it in the command above to your desired value.
The command should return JSON data with details about the Weaviate instance and the installed modules.
An example output is as shown:
{
"hostname": "http://[::]:8080",
"modules": {},
"version": "1.26.1"
}
Weaviate Meta – Python
We can also use the Weaviate Python client to gather information about the cluster. Ensure you have the Weaviate client installed with the command:
pip3 install weaviate-client
Once installed, you can use it to get metadata information about the cluster, as shown in the example below:
>>> import weaviate
>>> client = weaviate.Client("http://localhost:8080")
>>> meta_info = client.get_meta()
>>> print(meta_info)
This should return detailed information about the server:
{
"hostname": "http://[::]:8080",
"modules": {
"generative-cohere": {
"documentationHref": "https://docs.cohere.com/reference/generate",
"name": "Generative Search - Cohere"
},
"generative-openai": {
"documentationHref": "https://platform.openai.com/docs/guides/generation",
"name": "Generative Search - OpenAI"
},
"generative-huggingface": {
"documentationHref": "https://huggingface.co/docs/transformers/main_classes/pipelines",
"name": "Generative Search - Hugging Face"
}
}
}
Conclusion
In this tutorial, you learned how to gather metadata information about a running Weaviate instance using Python and HTTP requests.