Health

The health check endpoint enables you to periodically test the health of your MeiliSearch instance.

Get health

GET

  1. /health

Get health of MeiliSearch server.

Example

<>

cURL

JS

Python

PHP

Java

Ruby

Go

Rust

Swift

Dart

  1. curl \
  2. -X GET 'http://localhost:7700/health'
  1. client.health()
  1. client.health()
  1. $client->health();
  1. client.health();
  1. client.health
  1. client.Health()
  1. // health() return an Err() if the server is not healthy, so this example would panic due to the unwrap
  2. client.health().await.unwrap();
  1. client.health { (result: Result<Health, Swift.Error>) in
  2. switch result {
  3. case .success:
  4. print("Healthy!")
  5. case .failure(let error):
  6. print(error)
  7. }
  8. }
  1. await client.health();

Response: 200 OK

  1. { "status": "available" }