> For the complete documentation index, see [llms.txt](https://docs.wproofreader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wproofreader.com/v6.12.0/api-reference/auxiliary-api-commands/health-check.md).

# Health check

This API command returns the server's health status, including license information.

**Command name:** `health_check`

## Request URL (GET):

{% tabs %}
{% tab title="On-premises" %}

```
http(s)://endpoint/virtual_directory/api?cmd=health_check
```

{% endtab %}

{% tab title="Cloud" %}

```
https://svc.webspellchecker.net/api?cmd=ver
```

{% endtab %}
{% endtabs %}

## Response:

{% tabs %}
{% tab title="On-premises" %}

```json
{
  "pid": 25300,
  "license": {
    "valid": true,
    "remaining_seconds": 12701397
  }
}
```

{% endtab %}

{% tab title="Cloud" %}

```json
{
  "pid": 25300,
  "license": {
    "valid": true,
    "remaining_seconds": 0
  }
}
```

For cloud deployments, `valid` is always `true` and `remaining_seconds` is always `0`.
{% endtab %}
{% endtabs %}

## Response fields:

{% tabs %}
{% tab title="On-premises" %}

| Field                       | Type    | Description                               |
| --------------------------- | ------- | ----------------------------------------- |
| `pid`                       | number  | Process ID of the running server          |
| `license.valid`             | boolean | Indicates whether the license is valid    |
| `license.remaining_seconds` | number  | Time in seconds until the license expires |
| {% endtab %}                |         |                                           |

{% tab title="Cloud" %}

| Field                       | Type    | Description                      |
| --------------------------- | ------- | -------------------------------- |
| `pid`                       | number  | Process ID of the running server |
| `license.valid`             | boolean | Always `true`                    |
| `license.remaining_seconds` | number  | Always `0`                       |
| {% endtab %}                |         |                                  |
| {% endtabs %}               |         |                                  |

## Health status:

The service is healthy when the response status code is <mark style="color:green;">`200`</mark>.

{% tabs %}
{% tab title="On-premises" %}

| `200`        | `true`  | The service is healthy                          |
| ------------ | ------- | ----------------------------------------------- |
| `200`        | `false` | The service isn't working due to license issues |
| Other        | —       | The service is unavailable                      |
| {% endtab %} |         |                                                 |

{% tab title="Cloud" %}

| HTTP status   | Meaning                    |
| ------------- | -------------------------- |
| `200`         | The service is healthy     |
| Other         | The service is unavailable |
| {% endtab %}  |                            |
| {% endtabs %} |                            |

## See also:

For more detailed server information, use the [status](/v6.12.0/api-reference/auxiliary-api-commands/status-api.md) command.
