> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.ollang.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Health Check

> Check the health status and availability of the Integration API service

Check the health status of the Integration API service. This endpoint is used to monitor service availability and is typically called by load balancers, monitoring systems, and health check tools to ensure the service is operational.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api-integration.ollang.com/health"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api-integration.ollang.com/health", {
    method: "GET",
  });

  const healthStatus = await response.json();
  console.log("Health status:", healthStatus);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get('https://api-integration.ollang.com/health')
  health_status = response.json()
  print("Health status:", health_status)
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, array(
      CURLOPT_URL => 'https://api-integration.ollang.com/health',
      CURLOPT_RETURNTRANSFER => true,
  ));

  $response = curl_exec($curl);
  $healthStatus = json_decode($response, true);
  curl_close($curl);

  echo "Health status: " . json_encode($healthStatus);
  ```

  ```go Go theme={null}
  package main

  import (
      "encoding/json"
      "fmt"
      "io"
      "net/http"
  )

  func main() {
      resp, err := http.Get("https://api-integration.ollang.com/health")
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()

      body, _ := io.ReadAll(resp.Body)

      var healthStatus map[string]interface{}
      json.Unmarshal(body, &healthStatus)

      fmt.Println("Health status:", healthStatus)
  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.get("https://api-integration.ollang.com/health")
    .asString();

  JSONObject healthStatus = new JSONObject(response.getBody());
  System.out.println("Health status: " + healthStatus.toString());
  ```
</RequestExample>

## Authorizations

This endpoint does not require any authentication. It is publicly accessible to allow monitoring systems and load balancers to check service health without API keys.

<Info>
  You do not need to enter an X-Api-Key for this endpoint. You can leave the
  X-Api-Key field empty.
</Info>

## Response

The response contains the current health status of the service with a timestamp and status indicator.

<ResponseField name="time" type="number">
  Unix timestamp (in milliseconds) indicating when the health check was
  performed.
</ResponseField>

<ResponseField name="status" type="string">
  Current status of the service. Possible values are: - `OK` - Service is
  healthy and operational - `NOK` - Service is experiencing issues (rarely
  returned; usually results in HTTP error)
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "time": 1704711600000,
    "status": "OK"
  }
  ```

  ```json 500 theme={null}
  {
    "error": "Application unhealthy state",
    "message": "Service is experiencing internal issues",
    "code": -6
  }
  ```

  ```json 503 theme={null}
  {
    "error": "Service Unavailable",
    "message": "Service is temporarily unavailable",
    "code": "SERVICE_UNAVAILABLE"
  }
  ```
</ResponseExample>

## HTTP Status Codes

<ResponseField name="200" type="HTTP Status">
  **OK** - Service is healthy and all systems are operational.
</ResponseField>

<ResponseField name="500" type="HTTP Status">
  **Internal Server Error** - Service is unhealthy due to internal issues.
</ResponseField>

<ResponseField name="503" type="HTTP Status">
  **Service Unavailable** - Service is temporarily unavailable or under
  maintenance.
</ResponseField>
