Katu9

Check health

Returns the health status of the API and its database connection

GET
/health

Response Body

Successful health check

TypeScript Definitions

Use the response body type in TypeScript.

statusRequiredstring
databaseRequiredobject
timestampRequiredstring
Format: "date-time"

Service unavailable

TypeScript Definitions

Use the response body type in TypeScript.

statusRequiredstring
databaseRequiredobject
timestampRequiredstring
Format: "date-time"
curl -X GET "https://api.katu9.com/health"
fetch("https://api.katu9.com/health")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://api.katu9.com/health"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.katu9.com/health"

response = requests.request("GET", url)

print(response.text)
{
  "status": "ok",
  "database": {
    "status": "connected",
    "responseTime": "15ms"
  },
  "timestamp": "2023-05-20T12:34:56.789Z"
}
{
  "status": "error",
  "database": {
    "status": "disconnected",
    "error": "Connection refused"
  },
  "timestamp": "2023-05-20T12:34:56.789Z"
}