Cluster metadata
You can retrieve metadata about the Weaviate instance, such as:
hostname
: The location of the Weaviate instance.version
: The version of Weaviate.modules
: Module specific info.
Example
- Python Client v4
- Python Client v3
- JS/TS Client (v3)
- JS/TS Client (v2)
- Go
- Java
- Curl
import weaviate
client = weaviate.connect_to_local()
try:
meta_info = client.get_meta()
print(meta_info)
finally:
client.close()
import weaviate
client = weaviate.Client("http://localhost:8080")
meta_info = client.get_meta()
print(meta_info)
import weaviate from 'weaviate-client';
const client = await weaviate.connectToLocal()
const response = await client.getMeta()
console.log(response)
import weaviate from 'weaviate-ts-client';
const client = weaviate.client({
scheme: 'http',
host: 'localhost:8080',
});
const response = await client.misc
.metaGetter()
.do();
console.log(response);
package main
import (
"context"
"fmt"
"github.com/weaviate/weaviate-go-client/v4/weaviate"
)
func main() {
cfg := weaviate.Config{
Host: "localhost:8080",
Scheme: "http",
}
client, err := weaviate.NewClient(cfg)
if err != nil {
panic(err)
}
meta, err := client.Misc().MetaGetter().Do(context.Background())
if err != nil {
panic(err)
}
fmt.Printf("%v", meta)
}
package io.weaviate;
import io.weaviate.client.Config;
import io.weaviate.client.WeaviateClient;
import io.weaviate.client.base.Result;
import io.weaviate.client.v1.misc.model.Meta;
public class App {
public static void main(String[] args) {
Config config = new Config("http", "localhost:8080");
WeaviateClient client = new WeaviateClient(config);
Result<Meta> result = client.misc().metaGetter().run();
if (result.hasErrors()) {
System.out.println(result.getError());
return;
}
System.out.println(result.getResult());
}
}
curl http://localhost:8080/v1/meta
returns:
{
"hostname": "http://[::]:8080",
"modules": {
"text2vec-contextionary": {
"version": "en0.16.0-v0.4.21",
"wordCount": 818072
}
},
"version": "1.0.0"
}
Questions and feedback
If you have any questions or feedback, let us know in the user forum.