REST - /v1/meta
Usageโ
The meta endpoint accepts a GET
request:
GET /v1/meta
And it returns the following fields:
hostname
: The location of the Weaviate instance.version
: The version of Weaviate.modules
: Module specific info.
Exampleโ
The following command:
- Python
- JavaScript
- Go
- Java
- Curl
import weaviate
client = weaviate.Client("http://localhost:8080")
meta_info = client.get_meta()
print(meta_info)
const weaviate = require('weaviate-client');
const client = weaviate.client({
scheme: 'http',
host: 'localhost:8080',
});
client.misc
.metaGetter()
.do()
.then(res => {
console.log(res);
})
.catch(err => {
console.error(err)
});
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"
}
More Resourcesโ
If you can't find the answer to your question here, please look at the:
- Frequently Asked Questions. Or,
- Knowledge base of old issues. Or,
- For questions: Stackoverflow. Or,
- For more involved discussion: Weaviate Community Forum. Or,
- We also have a Slack channel.