Table of documentation contents

/v1/.well-known

OpenID Configuration, Liveness and Readiness, all endpoints under the .well-known endpoint, give you information about the configuration and status of the Weaviate instance.

OpenID Configuration

The RESTful API discovery gives information if OpenID Connect (OIDC) authentication is enabled. The endpoint redirects to the token issued if one is configured.

Usage

The discovery endpoint accepts a GET request:

GET /v1/.well-known/openid-configuration

And it returns the following fields:

  • href: The reference to the client.
  • cliendID: The ID of the client.

If no OIDC provider is present, a 404 code will be returned.

Example

The following command:

  import weaviate

client = weaviate.Client("http://localhost:8080")

open_id_configuration = client.get_open_id_configuration()
print(open_id_configuration)

returns:

{
  "href": "http://my-token-issuer/auth/realms/my-weaviate-usecase",
  "cliendID": "my-weaviate-client"
}

Liveness

Live determines whether the application is alive. It can be used for Kubernetes liveness probe.

Usage

The discovery endpoint accepts a GET request:

GET /v1/.well-known/live

And it returns 200 if the application is able to respond to HTTP requests.

Example

If the following command:

  import weaviate

client = weaviate.Client("http://localhost:8080")

is_live = client.is_live()
print(is_live)

returns nothing (a 200 response), you know the application is able to respond to HTTP requests.

Readiness

Live determines whether the application is ready to receive traffic. It can be used for Kubernetes readiness probe.

Usage

The discovery endpoint accepts a GET request:

GET /v1/.well-known/ready

And it returns 200 if the application is able to respond to HTTP requests, and 503 if the application is currently not able to serve traffic. If other horizontal replicas of Weaviate are available and they are capable of receiving traffic, all traffic should be redirected there instead.

Example

If the following command:

  import weaviate

client = weaviate.Client("http://localhost:8080")

is_ready = client.is_ready()
print(is_ready) # returns True if Weaviate is ready

returns nothing (a 200 response), you know the application is able to respond to HTTP requests.

More Resources

If you can’t find the answer to your question here, please look at the:

  1. Frequently Asked Questions. Or,
  2. Knowledge base of old issues. Or,
  3. For questions: Stackoverflow. Or,
  4. For issues: Github. Or,
  5. Ask your question in the Slack channel: Slack.
Tags
  • RESTful API
  • references
  • discovery
  • oidc
  • well-known