# Health API

## Return health of all services

<mark style="color:blue;">`GET`</mark> `/health`

{% tabs %}
{% tab title="200: OK Success of Health API" %}

```json
{
    "id": "sunbird-rc.registry.health",
    "ver": "1.0",
    "ets": 1669203912229,
    "params": {
        "resmsgid": "",
        "msgid": "e3deedb3-2c49-4d96-8d87-2b6f7b204e1c",
        "err": "",
        "status": "SUCCESSFUL",
        "errmsg": ""
    },
    "responseCode": "OK",
    "result": {
        "name": "sunbirdrc-registry-api",
        "healthy": false,
        "checks": [
            {
                "name": "sunbird.notification.service",
                "healthy": true,
                "err": "NOTIFICATION_ENABLED",
                "errmsg": "false"
            },
            {
                "name": "sunbird.encryption.service",
                "healthy": true,
                "err": "ENCRYPTION_ENABLED",
                "errmsg": "false"
            },
            {
                "name": "sunbird.signature.service",
                "healthy": true,
                "err": "",
                "errmsg": ""
            },
            {
                "name": "sunbird.certificate-api.service",
                "healthy": true,
                "err": "",
                "errmsg": ""
            },
            {
                "name": "sunbird.elastic.service",
                "healthy": true,
                "err": "",
                "errmsg": ""
            },
            {
                "name": "sunbird.keycloak.service",
                "healthy": true,
                "err": "",
                "errmsg": ""
            },
            {
                "name": "sunbird.file-storage.service",
                "healthy": false,
                "err": "CONNECTION_FAILURE",
                "errmsg": "The Access Key Id you provided does not exist in our records."
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### Usage

#### cURL

```shell
curl --location --request GET 'http://localhost:8081/health'
```

#### HTTPie

```shell
http --follow --timeout 3600 GET 'http://localhost:8081/health'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rc.sunbird.org/api-reference/other-apis/health-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
