cURL
curl \
-X GET 'MEILISEARCH_URL/health' \
-H 'Authorization: Bearer API_KEY'client.health()$client->health();client.health()client.health();client.healthclient.Health()await client.HealthAsync();// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap
client
.health()
.await
.unwrap();await client.health();client.health { (result) in
switch result {
case .success:
print("Healthy!")
case .failure(let error):
print(error)
}
}{
"status": "available"
}Health
Get health
The health check endpoint enables you to periodically test the health of your Meilisearch instance. Returns a simple status indicating that the server is available.
The engine will return available status with a 200 status code when the instance is healthy.
It will return mustRestart status with a 500 status code if the instance requires a restart.
This restart is required after a compaction of the task queue for example.
GET
/
health
cURL
curl \
-X GET 'MEILISEARCH_URL/health' \
-H 'Authorization: Bearer API_KEY'client.health()$client->health();client.health()client.health();client.healthclient.Health()await client.HealthAsync();// health() return an Err() if the server is not healthy, so this example would panic due to the unwrap
client
.health()
.await
.unwrap();await client.health();client.health { (result) in
switch result {
case .success:
print("Healthy!")
case .failure(let error):
print(error)
}
}{
"status": "available"
}Response
200 - application/json
Instance is healthy.
The status of the instance.
Available options:
available, mustRestart Was this page helpful?